/* ============================================================
   ROYDON × CCC — BRAND IDENTITY SITE
   Shared design system
   ============================================================ */

/* Degular — wordmark / display family.
   Drop the font files into /fonts/ and the site will pick them up.
   Falls back to Inter if the files aren't present. */
@font-face {
  font-family: 'Degular Display';
  src: url('fonts/DegularDisplay-Bold.woff2') format('woff2'),
       url('fonts/DegularDisplay-Bold.woff')  format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Degular Display';
  src: url('fonts/DegularDisplay-Black.woff2') format('woff2'),
       url('fonts/DegularDisplay-Black.woff')  format('woff');
  font-weight: 800 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Degular';
  src: url('fonts/Degular-Semibold.woff2') format('woff2'),
       url('fonts/Degular-Semibold.woff')  format('woff');
  font-weight: 600 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Degular';
  src: url('fonts/Degular-Bold.woff2') format('woff2'),
       url('fonts/Degular-Bold.woff')  format('woff');
  font-weight: 800 900; font-style: normal; font-display: swap;
}

:root {
  --black: #0A0A0A;
  --ink: #111111;
  --soft-ink: #2A2A2A;
  --mid-grey: #8A8A8A;
  --line: #D8D8D8;
  --paper: #F4F3EF;
  --white: #FFFFFF;
  --ivory: #F5F1E8;
  --charcoal: #1C1C1C;
  --copper: #B87333;
  --forge-gold: #B8893A;
  --navy: #0D2137;
  --electric: #2563EB;
  --steel: #6B7280;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swift: cubic-bezier(0.77, 0, 0.175, 1);
  /* Wordmark / display typography — Degular family (with graceful fallbacks) */
  --font-wordmark: 'Degular Display', 'Degular', 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }

/* ========== HAMBURGER + MENU OVERLAY ========== */
.brand-stamp {
  position: fixed; top: 32px; left: 32px; z-index: 95;
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  mix-blend-mode: difference;
  filter: invert(1);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: auto;
}
.brand-stamp.hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}
.brand-stamp a { display: inline-block; }

.hamburger {
  position: fixed; top: 24px; right: 32px; z-index: 110;
  width: 56px; height: 56px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--ink);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 24px rgba(10,10,10,0.18);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
              transform 0.4s var(--ease), box-shadow 0.5s var(--ease);
}
.hamburger:hover { transform: scale(1.04); }
.hamburger .bar {
  width: 22px; height: 1.5px; background: var(--paper);
  transition: transform 0.45s var(--ease), background 0.5s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open { background: var(--paper); border-color: transparent; box-shadow: 0 6px 24px rgba(10,10,10,0.2); }
.hamburger.open .bar { background: var(--ink); }
.hamburger.open .bar:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.hamburger.open .bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* dark variant — used on black/navy hero sections (inverted for contrast) */
.hamburger.dark {
  background: var(--paper);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.hamburger.dark .bar { background: var(--ink); }
.hamburger.dark.open { background: var(--paper); }
.hamburger.dark.open .bar { background: var(--ink); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 105;
  background: var(--black);
  color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 60px;
  pointer-events: none;
  clip-path: circle(0% at calc(100% - 52px) 52px);
  transition: clip-path 0.8s var(--ease);
}
.menu-overlay.open {
  pointer-events: auto;
  clip-path: circle(160% at calc(100% - 52px) 52px);
}

.menu-meta-top {
  position: absolute; top: 32px; left: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.menu-meta-bottom {
  position: absolute; bottom: 32px; left: 32px; right: 32px;
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.menu-list {
  list-style: none;
  width: 100%; max-width: 900px;
}
.menu-list li {
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.menu-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.1); }
.menu-list a {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 32px 16px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: rgba(255,255,255,0.85);
  transition: color 0.35s var(--ease), padding-left 0.45s var(--ease);
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.8s var(--ease), opacity 0.8s var(--ease), color 0.35s var(--ease), padding-left 0.45s var(--ease);
}
.menu-overlay.open .menu-list a { transform: translateY(0); opacity: 1; }
.menu-overlay.open .menu-list li:nth-child(1) a { transition-delay: 0.15s; }
.menu-overlay.open .menu-list li:nth-child(2) a { transition-delay: 0.22s; }
.menu-overlay.open .menu-list li:nth-child(3) a { transition-delay: 0.29s; }
.menu-overlay.open .menu-list li:nth-child(4) a { transition-delay: 0.36s; }

.menu-list a:hover { color: var(--paper); padding-left: 40px; }
.menu-list a .m-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; letter-spacing: 0.1em; font-weight: 500;
  color: rgba(255,255,255,0.45);
}
.menu-list a .m-sub {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.55);
}
.menu-list a.active { color: var(--paper); }
.menu-list a.active .m-num { color: var(--paper); }

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--ink);
  z-index: 200;
  transition: width 0.08s linear;
}
.dark-page .scroll-progress { background: var(--paper); }

/* ========== TYPOGRAPHY ========== */
.eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--mid-grey);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.eyebrow .bar { width: 32px; height: 1px; background: var(--mid-grey); }

.headline {
  font-family: var(--font-wordmark);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.headline em {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-style: italic;
  letter-spacing: -0.02em;
}

.body-copy {
  font-size: 17px; line-height: 1.55; color: var(--soft-ink);
  max-width: 620px; font-weight: 400;
}
.body-copy + .body-copy { margin-top: 20px; }

.pull-quote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mid-grey);
}

/* ========== SECTION STRUCTURE ========== */
.section {
  position: relative;
  padding: 140px 60px;
  min-height: 100vh;
}
.section-inner { max-width: 1440px; margin: 0 auto; }

.section-marker {
  position: absolute; top: 60px; left: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mid-grey);
  display: flex; align-items: center; gap: 10px;
}
.section-marker .mark-dot {
  width: 6px; height: 6px; background: var(--mid-grey); border-radius: 50%;
}
.dark-page .section-marker { color: rgba(255,255,255,0.5); }
.dark-page .section-marker .mark-dot { background: rgba(255,255,255,0.5); }

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }
.reveal-delay-5 { transition-delay: 0.60s; }

.word-reveal { display: inline-block; overflow: hidden; vertical-align: top; }
.word-reveal span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
}
.word-reveal.in span { transform: translateY(0); }

.scale-reveal {
  opacity: 0; transform: scale(0.96);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.scale-reveal.in { opacity: 1; transform: scale(1); }

/* ========== IMAGE PLACEHOLDERS ========== */
.placeholder {
  position: relative;
  background: var(--white);
  border: 1px dashed rgba(10,10,10,0.18);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.placeholder:hover { border-color: rgba(10,10,10,0.4); }
.placeholder::before {
  content: "";
  position: absolute; inset: 18px;
  background-image:
    linear-gradient(45deg, rgba(10,10,10,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(10,10,10,0.04) 25%, transparent 25%);
  background-size: 14px 14px;
  border-radius: 8px;
  pointer-events: none;
}
.placeholder .p-label {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mid-grey);
  display: flex; justify-content: space-between; align-items: flex-start;
  z-index: 1;
}
.placeholder .p-label .p-id {
  border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 100px;
  background: var(--paper);
  color: var(--soft-ink);
}
.placeholder .p-caption {
  position: relative; z-index: 1;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink);
  line-height: 1.35;
  max-width: 80%;
}
.placeholder img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}
.placeholder.has-image::before,
.placeholder.has-image .p-label,
.placeholder.has-image .p-caption { display: none; }

/* Preserve full image (no crop) — letterboxes against a dark stage */
.placeholder.has-image.fit-contain { aspect-ratio: auto; background: #0a0f1a; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.placeholder.has-image.fit-contain img { position: relative; inset: auto; object-fit: contain; height: auto; max-height: 90vh; width: auto; max-width: 100%; display: block; margin: 0 auto; }

.placeholder.dark {
  background: var(--charcoal);
  border-color: rgba(255,255,255,0.15);
}
.placeholder.dark::before {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%);
  background-size: 14px 14px;
}
.placeholder.dark .p-label { color: rgba(255,255,255,0.55); }
.placeholder.dark .p-label .p-id { background: rgba(255,255,255,0.08); color: var(--paper); border-color: rgba(255,255,255,0.18); }
.placeholder.dark .p-caption { color: var(--paper); }

/* ========== FOOTER ========== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
}
.footer-logo {
  font-family: var(--font-wordmark); font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; color: var(--paper); text-transform: none;
}

/* ========== DIRECTION PAGE — SHARED PATTERNS ========== */

/* Intro slide */
.dir-intro {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dir-intro .intro-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 60px;
}
.dir-intro .intro-name {
  font-size: clamp(3.5rem, 10vw, 10rem);
  font-weight: 800; letter-spacing: -0.055em;
  line-height: 0.9;
}
.dir-intro .intro-sub {
  margin-top: 32px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

/* Hook section */
.hook {
  padding: 200px 60px;
  display: flex; align-items: center; justify-content: center;
  min-height: 90vh;
}
.hook-inner { max-width: 1100px; text-align: center; }
.hook-line {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.035em;
}
.hook-line em {
  font-family: 'Instrument Serif', serif; font-weight: 400; font-style: italic;
}
.hook-line + .hook-line { margin-top: 0.3em; }
.hook-sub {
  margin: 60px auto 0;
  font-size: 18px;
  max-width: 640px;
  line-height: 1.55;
}

/* Direction block */
.dir-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.dir-block .pull-quote {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 80px;
}
.pillar {
  padding-top: 32px;
  border-top: 1px solid currentColor;
  opacity: 0.95;
}
.pillar-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.14em;
  margin-bottom: 32px;
  opacity: 0.55;
}
.pillar-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.pillar-body {
  font-size: 15px; line-height: 1.55; opacity: 0.78;
}

/* Mark reveal */
.mark-reveal {
  display: flex; flex-direction: column; align-items: center;
  padding: 200px 60px;
  text-align: center;
}
.mark-reveal .mark-stage {
  width: min(520px, 70vw);
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  margin: 80px 0;
  border-radius: 20px;
  position: relative;
}
.mark-reveal .mark-caption {
  max-width: 640px;
  font-size: 17px; line-height: 1.55;
  margin-top: 40px;
}
.mark-reveal .mark-meta {
  display: flex; gap: 24px; margin-top: 48px; flex-wrap: wrap; justify-content: center;
}
.mark-reveal .mark-meta span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 100px;
  opacity: 0.7;
}

/* Mockups grid */
.mockups {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 80px;
}
.mockups .placeholder:nth-child(1) { grid-column: span 6; aspect-ratio: 16/9; }
.mockups .placeholder:nth-child(2) { grid-column: span 3; aspect-ratio: 4/3; }
.mockups .placeholder:nth-child(3) { grid-column: span 3; aspect-ratio: 4/3; }
.mockups .placeholder:nth-child(4) { grid-column: span 6; aspect-ratio: 3/2; }
.mockups .placeholder:nth-child(5) { grid-column: span 6; aspect-ratio: 21/9; }

/* Typography & Colour */
.type-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 80px;
}
.type-block .type-row {
  border-top: 1px solid currentColor;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  opacity: 0.9;
}
.type-block .type-row:last-child { border-bottom: 1px solid currentColor; }
.type-block .type-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.55;
  padding-top: 10px;
}
.type-block .type-name {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700; letter-spacing: -0.025em;
}
.type-block .type-desc {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 14px;
  opacity: 0.7;
  margin-top: 8px;
}

.color-block .color-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid currentColor;
  opacity: 0.9;
}
.color-block .color-row:last-child { border-bottom: 1px solid currentColor; }
.color-swatch {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
}
.dark-page .color-swatch { border-color: rgba(255,255,255,0.18); }
.color-name {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 600; letter-spacing: -0.01em;
}
.color-role {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-size: 13px;
  opacity: 0.7; margin-top: 4px;
}
.color-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.08em;
  opacity: 0.7;
}

/* Closing tagline */
.closing {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px;
  text-align: center;
}
.closing-mark {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 60px;
  opacity: 0.6;
}
.closing-main {
  font-family: var(--font-wordmark);
  font-size: clamp(2.4rem, 6vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.closing-tag {
  margin-top: 40px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 2.2rem);
  letter-spacing: -0.01em;
}
.closing-attr {
  margin-top: 80px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0.6;
}

/* Next-page CTA at bottom of each direction */
.next-cta {
  padding: 120px 60px;
  border-top: 1px solid currentColor;
  display: flex; justify-content: space-between; align-items: center;
  gap: 40px;
  opacity: 0.95;
}
.next-cta .next-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 16px;
}
.next-cta .next-name {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1;
}
.next-cta .next-arrow {
  width: 80px; height: 80px; border: 1px solid currentColor; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  transition: transform 0.5s var(--ease);
}
.next-cta:hover .next-arrow { transform: rotate(45deg) scale(1.05); }

/* ========== DARK PAGE TOKEN ========== */
body.dark-page { background: var(--black); color: var(--paper); }
body.dark-page .eyebrow { color: rgba(255,255,255,0.6); }
body.dark-page .eyebrow .bar { background: rgba(255,255,255,0.45); }
body.dark-page .body-copy { color: rgba(255,255,255,0.78); }
body.dark-page .pull-quote { color: var(--paper); }
body.dark-page .mono { color: rgba(255,255,255,0.55); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .section { padding: 80px 32px; }
  .dir-block, .type-color-grid { grid-template-columns: 1fr; gap: 40px; }
  .pillars { grid-template-columns: 1fr; gap: 32px; }
  .mockups { grid-template-columns: repeat(2, 1fr); }
  .mockups .placeholder:nth-child(n) { grid-column: span 2; aspect-ratio: 4/3; }
  .section-marker { left: 32px; top: 32px; }
  .hamburger { right: 20px; top: 20px; }
  .brand-stamp { left: 24px; top: 22px; font-size: 18px; }
  .footer { padding: 40px 32px; flex-direction: column; gap: 20px; text-align: center; }
  .menu-list a { grid-template-columns: 50px 1fr; gap: 20px; padding: 20px 8px; }
  .menu-list a .m-sub { grid-column: 2; margin-top: 6px; }
  .next-cta { flex-direction: column; align-items: flex-start; padding: 80px 32px; }
}
