/* ==========================================================================
   Linefy Studio — style.css — v2.1 "Palette D — Ivory Flip"
   Ivory #F4EFE8 (dominant bg) / Midnight Navy #1B2A38 (text/footer/diptych) /
   Burnt Signal #E8472A (confrontation blocks + micro accent) / Acid Lime #C8F135 (micro accent only)
   Layer navy: #0F1C2E (deep, preloader) / #162235 (legacy dark panel, unused post-flip)
   Layer ivory: #EAE3D8 (deep ivory) / #FFFCF7 (white card)
   ========================================================================== */

:root{
  --navy: #1B2A38;
  --navy-deep: #0F1C2E;
  --navy-panel: #162235; /* legacy dark panel — kept for reference, superseded by --white/--ivory-deep */
  --signal: #E8472A;
  --signal-dark: #b6350f;
  --lime: #C8F135;
  --ivory: #F4EFE8;
  --ivory-deep: #EAE3D8;
  --white: #FFFCF7;
  --ivory-dim: #b9beb9;   /* secondary text ON DARK surfaces (footer, dark blocks) */
  --navy-dim: #59636D;    /* secondary text ON IVORY surfaces */
  --line: rgba(27,42,56,0.14);        /* hairline divider on ivory surfaces */
  --line-on-burnt: rgba(15,28,46,0.35);
  --line-on-dark: rgba(244,239,232,0.18); /* hairline divider on navy/dark surfaces (footer, hero diptych) */
  --maxw: 1200px;
  --gap: 24px;
  --ff-head: 'Archivo', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --nav-h: 68px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: auto; } html.lenis, html.lenis body{ height: auto; } .lenis.lenis-smooth{ scroll-behavior: auto !important; }

body{
  margin:0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: page-fade-in .5s ease both;
}
@keyframes page-fade-in{ from{ opacity:0; } to{ opacity:1; } }

img{ max-width:100%; display:block; }

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

h1,h2,h3,h4{
  font-family: var(--ff-head);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--navy);
}

p{ margin: 0 0 1em; color: var(--navy); }
.dim{ color: var(--navy-dim); }

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* focus states — navy outline reads on the dominant ivory surface;
   dark/burnt blocks (section-burnt, footer, buttons) get an ivory outline instead. */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.section-burnt a:focus-visible, .section-burnt button:focus-visible,
footer.site-footer a:focus-visible, footer.site-footer button:focus-visible,
.btn:focus-visible{
  outline-color: var(--ivory);
}

::selection{ background: var(--navy); color: var(--ivory); }
::-moz-selection{ background: var(--navy); color: var(--ivory); }

/* ---------- view transitions (progressive enhancement) ---------- */
@view-transition{ navigation: auto; }
::view-transition-old(root),
::view-transition-new(root){ animation-duration: .45s; animation-timing-function: ease; }

/* ==========================================================================
   Preloader — spec item 2
   ========================================================================== */
.preloader{
  position: fixed; inset:0; z-index: 999;
  background: var(--navy-deep);
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
  /* hard safety net: if JS never runs or dies mid-flight, never trap content
     behind the preloader forever — force it out of the way after 2.5s. */
  animation: preloader-safety-hide 0s linear 2.5s forwards;
}
@keyframes preloader-safety-hide{ to{ display:none; } }
.preloader .pre-logo{
  position:relative; z-index:2;
  height: 34px; width:auto;
  opacity:0;
  margin-bottom: 22px;
}
.preloader .pre-inner{
  display:flex; flex-direction:column; align-items:center;
}
.preloader svg.pre-line{
  width: min(320px, 60vw); height: 12px;
  overflow: visible;
}
.preloader svg.pre-line path{
  fill:none; stroke: var(--lime); stroke-width:2;
}
.preloader .pre-skip{
  position:absolute; bottom: 28px; right: 28px;
  font-family: var(--ff-head); font-size:.7rem; letter-spacing:.14em;
  text-transform:uppercase; color: var(--ivory-dim);
}
.preloader .split-top,
.preloader .split-bottom{
  position:absolute; left:0; right:0; height:50%;
  background: var(--navy-deep);
  z-index:1;
}
.preloader .split-top{ top:0; }
.preloader .split-bottom{ bottom:0; }

/* ==========================================================================
   Running line — spec item 1 (SVG scrub-drawn down the page)
   ========================================================================== */
.line-track{
  position:absolute; top:0; left:0; width:100%; height:100%;
  pointer-events:none; z-index:1; overflow:visible;
}
.line-track path{
  fill:none; stroke: var(--signal); stroke-width:1.5; stroke-linecap:round;
  opacity:.5;
}
/* the line is a decorative left-margin spine, not a page-crossing sweep —
   below 900px there isn't enough gutter to hold it clear of the content
   column, so it's simplest and safest to hide it entirely on small screens */
@media (max-width: 899px){
  .line-track{ display:none; }
}
main{ position: relative; }
/* the line is drawn as one continuous absolutely-positioned path (z-index:1)
   painted above normal-flow section backgrounds. Burnt-on-burnt would be
   invisible, so dark/burnt "confrontation" blocks are lifted to the same
   z-index (and later in DOM order) so their solid fill occludes the line
   where it passes underneath — it simply continues past the block.
   The homepage hero has no opaque full-bleed fill any more (ivory logo
   stage, same as the page background), so the line simply runs straight
   through it — visibly starting near the centered logo mark, right where
   the wavy 'fy' tail sits, then carrying on down the page in burnt. */
.marquee-section,
.section-burnt,
.project-nav-section{
  position: relative;
  z-index: 1;
}

/* legacy horizontal accent kept for services strip dividers */
.line-rule{
  border:none;
  height:1px;
  background: var(--line);
  margin: 0;
  position: relative; z-index:2;
}
.line-accent{
  height:2px;
  width:64px;
  background: var(--signal);
  border:none;
  margin: 18px 0 28px;
}

/* ---------- header / nav ---------- */
.site-header{
  position: sticky;
  top:0;
  z-index: 60;
  background: rgba(244,239,232,0);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.site-header.scrolled{
  background: rgba(244,239,232,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  min-height: var(--nav-h);
}
.logo{
  display:flex; align-items:center;
}
.logo img{
  height: 26px;
  width: auto;
  display:block;
}
.logo .logo-fallback-text{
  font-family: var(--ff-head);
  font-weight:700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo .logo-fallback-text span{ color: var(--signal); }

.nav-toggle{
  display:none;
  background:none;
  border:1px solid var(--line);
  color: var(--navy);
  width:44px; height:44px;
  border-radius:2px;
  cursor:pointer;
  font-size:1.2rem;
}

nav.main-nav ul{
  display:flex;
  gap: 32px;
  list-style:none;
  margin:0; padding:0;
}
nav.main-nav a{
  font-family: var(--ff-head);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding-bottom: 4px;
}
nav.main-nav a::after{
  content:"";
  position:absolute;
  left:0; bottom:0;
  width:0; height:2px;
  background: var(--signal);
  transition: width .25s ease;
}
nav.main-nav a:hover::after,
nav.main-nav a[aria-current="page"]::after{ width:100%; }
nav.main-nav a[aria-current="page"]{ color: var(--signal-dark); }

/* v2.2: the homepage hero flipped to ivory (logo hero replaced the dark
   diptych), so nav is navy-on-ivory from load on every page now — the old
   body.home dark-hero override (ivory/lime nav text while unscrolled) is
   retired. No page-specific nav treatment needed any more. */

@media (max-width: 720px){
  .nav-toggle{ display:block; }
  nav.main-nav{
    display:none;
    position:absolute;
    top:100%; left:0; right:0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(27,42,56,0.10);
  }
  nav.main-nav.open{ display:block; }
  nav.main-nav ul{
    flex-direction:column;
    gap:0;
    padding: 8px 24px 24px;
  }
  nav.main-nav li{ border-top: 1px solid var(--line); }
  nav.main-nav a{ display:block; padding: 14px 0; min-height:44px; display:flex; align-items:center; }
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family: var(--ff-head);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 28px;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--navy-deep);
  font-weight: 700;
  border-radius: 2px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover{ background: var(--navy-deep); color: var(--lime); border-color: var(--lime); transform: translateY(-1px); }
.btn-outline{
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-outline:hover{ border-color: var(--signal); color: var(--signal-dark); }
/* footer is a navy block — its outline button needs the dark-surface pairing */
footer.site-footer .btn-outline{ color: var(--ivory); border-color: var(--line-on-dark); }
footer.site-footer .btn-outline:hover{ border-color: var(--lime); color: var(--lime); }

/* ==========================================================================
   Hero — brand centerpiece (homepage only) — v2.3 "vector Lin/efy mark"
   The dark diptych panels are retired with the ivory flip. .hero stays the
   plain shared base (about.html / services.html use it unmodified, left-
   aligned, no logo). .hero-brand is the homepage-only modifier — it plays
   the role .has-diptych used to play — and adds the full-viewport centered
   layout that hosts the inline SVG logo mark (see initLogoGradient in
   main.js).
   ========================================================================== */
.hero{
  padding: 96px 0 72px;
  position: relative;
}
.hero .eyebrow{
  font-family: var(--ff-head);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--signal-dark);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1{
  font-size: clamp(2.8rem, 9vw, 7.5rem);
  margin-bottom: 0.3em;
  overflow: hidden;
}
.hero .intro{
  font-size: 1.1rem;
  max-width: 56ch;
  color: var(--navy);
}

/* screen-reader-only heading — the homepage h1 still carries the accessible
   name "Linefy Studio"; the animated logo mark carries it visually. */
.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- homepage-only hero layout ---- */
.hero-brand{
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 80px;
}
.hero-brand .wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-brand .eyebrow{ margin-bottom: 22px; }

/* ---- inline vector logo (homepage only) ----
   img/brand/logo.svg inlined directly so fill/stroke can be driven by JS
   with no raster upscaling. Flat authored resting color: both #lin and #efy
   groups are solid brand navy #1B2A38 — set directly as the <g> fill
   attribute, no gradient. That is the complete static state: with no JS at
   all (prefers-reduced-motion, JS disabled, CDN failure) the mark simply
   shows those flat fills, fully finished.
   With JS, initLogoAnimation() (main.js) draws each .letter path as a pen
   stroke (stroke-dasharray/offset from getTotalLength) in sequence
   L → i → n → e → fy, then blooms fill-opacity 0→1 as each letter
   finishes — ink filling in behind the line. No idle animation after. */
.hero-logo-svg{
  position: relative;
  width: clamp(300px, 58vw, 800px);
  height: auto;
  margin: 4px 0 36px;
  line-height: 0;
  z-index: 2;
}
.hero-logo-svg svg{
  display: block;
  width: 100%;
  height: auto;
}
.hero-logo-svg .letter{
  fill-opacity: 1;
}

/* ---- the signature line ----
   A full-hero-width SVG overlay, sibling of .wrap so it escapes .wrap's
   max-width and spans edge to edge. Two paths, built entirely at runtime by
   buildSignatureLine() (main.js): #sig-in enters from off the left viewport
   edge and joins the exact point where the L's stroke begins; #sig-out
   departs from the tip of the fy's descender tail and exits off the right
   viewport edge — one continuous hand-drawn gesture bracketing the wordmark
   draw-on. Empty/no `d` by default (no-JS / reduced-motion never see it —
   the finished flat-navy logo is the whole static state). pointer-events
   none, sits just below the logo's z-index so it never intercepts input or
   visually overlaps the letter fills. .hero already has overflow hidden via
   body's overflow-x:hidden, so the ±40px off-edge endpoints never cause a
   horizontal scrollbar. */
.hero-signature{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.hero-signature path{
  opacity: 0;
}

.hero .slogan{
  font-family: var(--ff-head);
  /* Forced to one line, always — the sentence is 38 characters incl. the
     curly quotes and em dash (“The line never ends — I stand on it.”).
     white-space: nowrap guarantees it never wraps (including at the
     em-dash); the clamp() below guarantees it never overflows sideways
     instead, by tying the font-size to the viewport width. Budgeted against
     an average glyph width of ~0.52em/char for var(--ff-head) and the
     .wrap's 24px-per-side padding (48px total, capped at --maxw: 1200px):
       required font-size (px) = (min(vw,1200) - 48) / (38 * 0.52)
     clamp(0.72rem, 3.7vw, 3.3rem) stays under that ceiling at every width —
     verified at 320/390/768/1440px (see main.js change notes / QA report),
     with 38–160px of horizontal margin to spare at each. Do not raise the
     3.7vw slope or the 3.3rem cap without re-running that check: either one
     going up reopens the three-line wrap this was fixing. */
  font-size: clamp(0.72rem, 2.7vw, 2.1rem);
  color: var(--navy);
  text-transform: none;
  white-space: nowrap;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--signal);
  padding-bottom: 12px;
  display: inline-block;
  overflow: hidden; /* masks the SplitText word-reveal */
}
.hero .slogan .word{ display: inline-block; }

/* ---- "From Seoul to the world" + 3D dot-sphere globe ----
   .hero-boundless is a flex row — the italic location line sits beside the
   canvas globe, vertically centered, spaced with a gap (not a margin, so
   the row re-flows cleanly at any globe size). .globe-3d is a plain
   <canvas>, drawn entirely in JS (initGlobe3D in main.js) — a fibonacci
   dot-sphere rotating slowly around a tilted Y axis, with a burnt-orange
   dot marking Seoul that pulses a ring every ~3s. DPR-aware for retina, so
   it stays crisp at its larger 6em size. Fades in with the .location
   SplitText word reveal. Respects prefers-reduced-motion (renders one
   static frame, Seoul-facing, no animation) and pauses via
   IntersectionObserver / visibilitychange.
   At 6em the globe is a real visual companion to the text rather than an
   inline glyph, so the row is centered as a unit (matches the rest of the
   centered hero-brand layout) instead of left-hung off the text baseline. */
.hero-boundless{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2em;
  margin-top: 14px;
}
.hero .location{
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  color: var(--navy);
  letter-spacing: 0.015em;
  margin: 0;
}
.hero .location .loc-accent{
  color: var(--signal-dark);
  font-style: italic;
}
.globe-3d{
  display: inline-block;
  width: 6em;
  height: 6em;
  vertical-align: middle;
  flex: none;
}

@media (max-width: 720px){
  .hero-brand{ padding: 120px 0 56px; }
  /* stacked, not side-by-side: at 4.5em the globe is wider than most
     phone viewports can spare next to the location line without wrapping
     awkwardly or squeezing the stats strip's rhythm below it */
  .hero-boundless{ flex-direction: column; gap: 0.6em; }
  .globe-3d{ width: 4.5em; height: 4.5em; }
}

/* ---------- stats strip ---------- */
.stats{
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.stats .wrap{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.stat .num{
  font-family: var(--ff-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--signal);
  margin-bottom: 4px;
}
.stat .label{
  font-size: 0.85rem;
  color: var(--navy-dim);
  letter-spacing: 0.02em;
}
@media (max-width: 640px){
  .stats .wrap{ grid-template-columns: 1fr; gap: 28px; text-align:left; }
}

/* ---------- section headers ---------- */
.section{ padding: 88px 0; position: relative; }
.section.tight{ padding: 64px 0; }
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.section-label{
  font-family: var(--ff-head);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--signal-dark);
  text-transform: uppercase;
}
.section-head h2{
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 8px 0 0;
  overflow:hidden;
}
.section h2, .contact-block h2{ overflow:hidden; }
@media (max-width: 640px){
  .section-head{ flex-direction:column; align-items:flex-start; gap:8px; }
}

/* ==========================================================================
   Work grid — spec item 5
   ========================================================================== */
.work-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.work-card{
  position: relative;
  display:block;
  overflow:hidden;
  aspect-ratio: 4/5;
  background: var(--white);
  border: 1px solid var(--line);
}
.work-card .idx-num{
  position:absolute; top:16px; left:16px; z-index:2;
  font-family: var(--ff-head);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--signal);
  background: rgba(15,28,46,0.7);
  padding: 4px 8px;
  border: 1px solid var(--line);
}
.work-card .img-mask{
  position:absolute; inset:0;
  overflow:hidden;
}
.work-card img{
  width:100%; height:112%;
  object-fit: cover;
  position:relative;
  top:-6%;
  transition: transform .5s ease;
  will-change: transform;
}
.work-card:hover img{ transform: scale(1.06); }
.work-card .overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(15,28,46,0) 40%, rgba(15,28,46,0.92) 100%);
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding: 22px;
  z-index:2;
}
.work-card .cat{
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 6px;
}
.work-card h3{
  font-size: 1.15rem;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ivory); /* sits on the dark image overlay gradient */
}
.work-card .underline{
  height:2px; width:0;
  background: var(--lime);
  transition: width .3s ease;
}
.work-card:hover .underline{ width: 48px; }

@media (max-width: 900px){
  .work-grid{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px){
  .work-grid{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   Marquee — spec item 6 (full-burnt confrontation block)
   ========================================================================== */
.marquee-section{
  background: var(--signal);
  padding: 36px 0;
  overflow: hidden;
  position: relative;
}
.marquee-track{
  display:flex;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}
.marquee-track span{
  font-family: var(--ff-head);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 5rem);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ivory);
  padding-right: 48px;
  letter-spacing: -0.01em;
}
.marquee-section.paused .marquee-track{ animation-play-state: paused; }

/* full-burnt utility block used on non-homepage pages */
.section-burnt{
  background: var(--signal);
  color: var(--navy-deep);
}
.section-burnt .section-label{ color: var(--navy-deep); }
.section-burnt h2, .section-burnt h1{ color: var(--navy-deep); }
.section-burnt p, .section-burnt .dim{ color: var(--navy-deep); }
.section-burnt .contact-block{
  background: transparent;
  border-color: var(--line-on-burnt);
}
.section-burnt .btn{
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: var(--lime);
}
.section-burnt .btn:hover{ background: var(--ivory); color: var(--navy-deep); border-color: var(--ivory); }

/* ---------- services strip ---------- */
.services-list{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.service-item{
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.service-item .idx{
  font-family: var(--ff-head);
  color: var(--signal-dark);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.service-item h3{
  font-size: 1.05rem;
  margin-bottom: 8px;
}
@media (max-width: 900px){
  .services-list{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px){
  .services-list{ grid-template-columns: 1fr; }
}

/* ---------- about teaser / two column ---------- */
.two-col{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items:start;
}
@media (max-width: 800px){
  .two-col{ grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- contact block ---------- */
.contact-block{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 56px;
  text-align:center;
}
.contact-block h2{ margin-bottom: 12px; }
.contact-block p{ max-width: 50ch; margin-left:auto; margin-right:auto; }
.contact-block .btn{ margin-top: 20px; }
@media (max-width: 640px){
  .contact-block{ padding: 36px 22px; }
}

/* ---------- footer — navy block (spec: ivory logo + ivory text) ---------- */
footer.site-footer{
  background: var(--navy);
  color: var(--ivory);
  border-top: 1px solid var(--line-on-dark);
  padding: 48px 0 32px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}
footer.site-footer .foot-logo{
  height: 44px;
  width: auto;
  margin-bottom: 28px;
  will-change: transform;
}
footer.site-footer .foot-grid{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 24px;
  margin-bottom: 24px;
}
footer.site-footer .foot-brand{
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--ivory);
}
footer.site-footer .foot-links{
  display:flex;
  gap: 20px;
  flex-wrap:wrap;
  font-size: 0.85rem;
  color: var(--ivory-dim);
}
footer.site-footer .foot-links a{ position:relative; }
footer.site-footer .foot-links a::after{
  content:"";
  position:absolute; left:0; bottom:-3px; width:0; height:1px;
  background: var(--lime);
  transition: width .25s ease;
}
footer.site-footer .foot-links a:hover{ color: var(--lime); }
footer.site-footer .foot-links a:hover::after{ width:100%; }
@media (max-width:600px){
  footer.site-footer .foot-links{ flex-direction:column; gap:0; }
  footer.site-footer .foot-links a{ display:flex; align-items:center; min-height:44px; }
}
footer.site-footer .credit,
footer.site-footer .credit-note{
  font-size: 0.78rem;
  color: var(--ivory-dim);
  max-width: 70ch;
  border-top: 1px solid var(--line-on-dark);
  padding-top: 18px;
  margin-top: 30px;
}
footer.site-footer .copyright{
  font-size: 0.75rem;
  color: var(--ivory-dim);
  margin-top: 12px;
}

/* ==========================================================================
   Project pages — spec item 7
   ========================================================================== */
.project-hero-wrap{
  position: relative;
  width:100%;
  max-height: 78vh;
  max-height: 78dvh; /* iOS URL bar fix — dvh overrides vh where supported */
  overflow: hidden;
}
.project-hero-wrap .project-hero-img{
  width:100%;
  height: 100%;
  min-height: 78vh;
  min-height: 78dvh;
  object-fit: cover;
  will-change: transform;
}
.project-hero-title{
  position:absolute; left:0; right:0; bottom:0;
  padding: 40px 0 20px;
  background: linear-gradient(180deg, rgba(15,28,46,0) 0%, rgba(15,28,46,0.88) 90%);
  z-index:2;
}
.project-hero-title h1{
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  margin:0;
  overflow:hidden;
  color: var(--ivory); /* sits on the dark hero-image gradient */
}
.project-meta{
  padding: 40px 0 0;
}
.project-meta .cat{
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-dark);
  margin-bottom: 14px;
}
.project-meta h1{
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 10px;
}
.project-meta .subline{
  color: var(--navy-dim);
  font-size: 1rem;
}

.role-block{
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal); /* always-visible fallback if JS never runs */
  padding: 24px 28px;
  margin: 40px 0;
  overflow: hidden;
}
.role-block .tag{
  font-family: var(--ff-head);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-dark);
  margin-bottom: 10px;
}
.role-block p{
  font-size: 1.05rem;
  margin: 0;
  color: var(--navy);
}
.role-block strong{ color: var(--signal-dark); }

.materials{
  font-size: 0.9rem;
  color: var(--navy-dim);
  margin-top: 18px;
}
.materials strong{ color: var(--navy); }

.credit-note{
  font-size: 0.85rem;
  color: var(--ivory-dim);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 30px;
}
.section-burnt .credit-note{ border-top-color: var(--line-on-burnt); color: rgba(15,28,46,0.7); }

/* ---------- gallery ---------- */
.gallery{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}
.gallery img{
  width:100%; height:100%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.gallery .g-wide{ grid-column: span 4; grid-row: span 2; }
.gallery .g-tall{ grid-column: span 2; grid-row: span 2; }
.gallery .g-med{ grid-column: span 3; grid-row: span 2; }
.gallery .g-sm{ grid-column: span 2; grid-row: span 1; }

@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .gallery .g-wide, .gallery .g-tall, .gallery .g-med, .gallery .g-sm{ grid-column: span 1; grid-row: span 1; }
  .gallery .g-wide{ grid-column: span 2; }
}
@media (max-width: 560px){
  .gallery{ grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery .g-wide, .gallery .g-tall, .gallery .g-med, .gallery .g-sm{ grid-column: span 1; grid-row: span 1; }
}

/* ---------- prev/next nav — oversized links, full-burnt block ---------- */
.project-nav-section{
  background: var(--signal);
  padding: 64px 0;
}
.project-nav{
  display:flex;
  justify-content:space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.project-nav a{
  font-family: var(--ff-head);
  font-weight: 900;
  font-size: clamp(1.6rem, 8vw, 4.2rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--navy-deep);
  position: relative;
  line-height: 1.05;
  transition: color .25s ease;
}
.project-nav a .dir{
  display:block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.75rem;
  color: rgba(15,28,46,0.65);
  margin-bottom: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-nav a::after{
  content:"";
  position:absolute; left:0; bottom:-8px; width:0; height:4px;
  background: var(--lime);
  transition: width .3s ease;
}
.project-nav a:hover{ color: var(--navy-deep); }
.project-nav a:hover::after{ width: 100%; }
.project-nav .next{ text-align:right; margin-left:auto; }
.project-nav .next::after{ right:0; left:auto; }
@media (max-width: 640px){
  .project-nav{ flex-direction:column; gap:36px; }
  .project-nav .next{ text-align:left; }
  .project-nav .next::after{ left:0; right:auto; }
}

/* ---------- about page ---------- */
.timeline{
  list-style:none;
  margin:0; padding:0;
}
.timeline li{
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-family: var(--ff-head);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.cap-list{
  list-style:none;
  margin:0; padding:0;
  columns: 2;
  column-gap: 32px;
}
.cap-list li{
  padding: 10px 0;
  border-top: 1px solid var(--line);
  break-inside: avoid;
  font-size: 0.95rem;
}
@media (max-width:600px){ .cap-list{ columns:1; } }

/* ---------- services page ---------- */
.services-detail{
  display:grid;
  gap: 0;
}
.service-row{
  display:grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.service-row .idx{
  font-family: var(--ff-head);
  font-size: 1.4rem;
  color: var(--signal-dark);
}
.service-row h3{ font-size: 1.3rem; margin-bottom: 8px; }
@media (max-width:600px){
  .service-row{ grid-template-columns: 1fr; gap:8px; }
}

/* ==========================================================================
   Custom cursor — spec item 8 (desktop, pointer:fine only)
   ========================================================================== */
@media (pointer: fine){
  html.has-cursor, html.has-cursor body{ cursor: none; }
  html.has-cursor a, html.has-cursor button{ cursor: none; }
}
.cursor-dot,
.cursor-ring{
  position: fixed;
  top:0; left:0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  will-change: transform;
}
.cursor-dot{
  width:10px; height:10px;
  background: var(--signal);
  mix-blend-mode: difference; /* auto-adapts so it stays visible on ivory too */
}
.cursor-ring{
  width:40px; height:40px;
  border: 1px solid var(--signal);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--ff-head);
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--signal);
  opacity: 0;
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease, opacity .2s ease;
}
.cursor-ring.is-active{
  width:64px; height:64px;
  opacity: 1;
  background: rgba(232,71,42,0.08);
}

/* ==========================================================================
   Reduced motion — media query kill-switch (paired with JS early exit)
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  html{ scroll-behavior: auto; }
  .preloader{ display:none !important; }
  .cursor-dot, .cursor-ring{ display:none !important; }
  .marquee-track{ animation: none !important; }
  body{ animation: none !important; }
}
html.no-motion .preloader{ display:none !important; }
html.no-motion .cursor-dot, html.no-motion .cursor-ring{ display:none !important; }

/* generic */
.mb-0{ margin-bottom:0; }
.center{ text-align:center; }
