/* ============================================================
   MIRI MEDIA — styles.css
   Sections:
     1.  Design tokens (:root)
     2.  Fonts (@font-face)
     3.  Reset & base
     4.  Background line system
     5.  Typography helpers (eyebrow, section head, links)
     6.  Layout (wrap / grid)
     7.  Nav + mobile menu
     8.  Hero
     9.  Stats
     10. Selected work
     11. Services
     12. Process
     13. About & team
     14. Contact
     15. Footer
     16. Motion (reveal)
     17. Reduced motion + responsive
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --black:      #000000;                    /* page background            */
  --off-black:  #0A0A0A;                    /* section separation, sparing */
  --white:      #FFFFFF;                     /* primary text               */
  --white-dim:  rgba(255, 255, 255, 0.62);  /* body copy, captions        */
  --white-line: rgba(255, 255, 255, 0.10);  /* hairline rules             */
  --red:        #E4002B;                     /* accent — confirmed vs brand highlights (~#E92B30 in JPG, brand spec value used) */

  --maxw: 1440px;
  --gutter: clamp(20px, 5vw, 80px);
  --pad-section: clamp(80px, 12vw, 140px);

  --font-display: "Miri Display", "Söhne Breit", "Helvetica Neue",
                  "Arial Narrow", Arial, sans-serif;
  --font-body: "Miri Text", "Söhne", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Fonts (self-hosted — drop woff2 into /assets/fonts) ---------- */
@font-face {
  font-family: "Miri Display";
  src: url("assets/fonts/display.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Miri Text";
  src: url("assets/fonts/text.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- 3. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.15vw, 19px);
  line-height: 1.7;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

::selection { background: var(--red); color: var(--white); }

/* Focus states — always visible, always red */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--red); color: var(--white);
  padding: 10px 16px; font-size: 14px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- 4. Background line system ---------- */
/* The black plate never moves, never transforms. */
.bg-plate {
  position: fixed; inset: 0; z-index: 0;
  background: var(--black);
}
/* Only this layer animates. */
.bg-lines {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  will-change: transform;
  opacity: 1;
}
/* Each traced set fades in/out; JS drives opacity + transform. */
.bg-lines > svg > svg[id^="lines-"] {
  opacity: 0;
  transition: opacity .6s var(--ease);
}
/* Vignette so lines fade toward the viewport edges. */
.bg-vignette {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 50%,
              rgba(0,0,0,0) 42%, rgba(0,0,0,0.55) 78%, rgba(0,0,0,0.92) 100%);
}

/* Content sits above the lines and is transparent so lines show through. */
main { position: relative; z-index: 2; background: transparent; }

/* ---------- 5. Typography helpers ---------- */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
  font-weight: 500;
}

.section-head { margin-bottom: clamp(48px, 7vw, 96px); }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-top: 18px;
}

/* Animated red-underline text link */
.ul-link {
  position: relative;
  display: inline-block;
  color: var(--white);
  padding-bottom: 3px;
}
.ul-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.ul-link:hover::after,
.ul-link:focus-visible::after { transform: scaleX(1); }

/* ---------- 6. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--pad-section); }
/* Hairline rules between sections */
.stats, .work, .services, .process, .about, .contact {
  border-top: 1px solid var(--white-line);
}

/* ---------- 7. Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease),
              border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--white-line);
}
.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
}
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.nav__links a { font-size: 15px; color: var(--white-dim); transition: color .25s var(--ease); }
.nav__links a:hover { color: var(--white); }
.nav__links a.nav__cta {
  color: var(--white);
  border: 1px solid var(--red);
  padding: 9px 18px;
  border-radius: 2px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav__cta:hover { background: var(--red); }

/* Hamburger (mobile only) */
.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
  padding: 8px;
}
.nav__toggle span {
  display: block; height: 1.5px; width: 100%;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile overlay menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 39;
  background: var(--black);
  align-items: center; justify-content: center;
  opacity: 0; transition: opacity .35s var(--ease);
}
/* [hidden] keeps it display:none; only lay it out when open */
.mobile-menu:not([hidden]) { display: flex; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.mobile-menu__links a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
  display: flex; align-items: baseline; gap: 16px;
}
.mobile-menu__links .idx { font-size: 13px; font-family: var(--font-body); color: var(--red); letter-spacing: 0; }
.mobile-menu__links a.mobile-menu__cta { color: var(--red); font-size: 1.4rem; margin-top: 24px; }

/* ---------- 8. Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: clamp(120px, 18vh, 200px) var(--pad-section);
  border-top: 0;
}
.hero__inner { width: 100%; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin: 22px 0 0;
}
.hero__title em {
  font-style: italic;
  color: var(--red);
  font-weight: 600;
}
.hero__lede {
  color: var(--white-dim);
  max-width: 52ch;
  margin-top: 32px;
}
.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px;
  margin-top: 40px;
}
.hero__actions .ul-link { font-size: 16px; }

/* Animated phrase rotator — word-by-word roll, service noun in brand red */
.rotator { display: inline; }
.rotator__word { display: inline; }
.rotator__word .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.8em);
  filter: blur(7px);
  transition: opacity .5s var(--ease), transform .55s var(--ease), filter .5s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
.rotator__word .w.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* leaving: whole phrase rolls up together, no per-word stagger */
.rotator__word.is-out .w {
  opacity: 0;
  transform: translateY(-0.8em);
  filter: blur(7px);
  transition-duration: .32s;
  transition-delay: 0ms;
}
.rotator .hl {
  color: var(--red);
  font-style: italic;
  font-weight: 600;
}

/* Hero service pills */
.hero__services {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 52px 0 0;
  padding: 0;
}
.hero__services a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--white-line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--white-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.hero__services a:hover,
.hero__services a:focus-visible {
  color: var(--white);
  border-color: var(--red);
  background: rgba(228, 0, 43, 0.08);
}

/* Primary button (solid red pill) */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(228, 0, 43, 0.35);
}

/* Visually hidden (screen-reader only) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- 9. Stats ---------- */
.stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 5vw, 72px);
}
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__num sup { font-size: 0.5em; color: var(--red); }
.stat__label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white-dim);
}

/* ---------- 10. Selected work ---------- */
.project {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(56px, 9vw, 112px);
}
.project + .project { border-top: 1px solid var(--white-line); }
.project--rev .project__media { order: 2; }
.project--rev .project__body { order: 1; }

.project__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.project__media img { width: 100%; height: 100%; object-fit: cover; }
.project__media video, .project__video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--black); }
/* Missing-image placeholder: black with red hairline frame */
.project__media img.is-missing {
  visibility: hidden;
}
.project__media:has(img.is-missing)::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--red);
  background: var(--black);
}
.project__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.project__idx {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--red);
  font-weight: 700;
}
.project__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.project__desc { color: var(--white-dim); max-width: 46ch; }
.project__meta {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white-dim);
}
.project__meta li:not(:last-child)::after {
  content: "·"; color: var(--red); margin-left: 20px;
}
.project__links {
  display: flex; flex-wrap: wrap; gap: 24px;
  margin-top: 20px;
}
.project__links .ul-link { font-size: 15px; }

/* Video facade — poster + play button, loads iframe/video only on click */
.video-embed {
  position: relative; display: block;
  width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0;
  background: var(--black); color: inherit; font: inherit;
  cursor: pointer; overflow: hidden;
}
.video-embed__poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-embed__play {
  position: absolute; top: 50%; left: 50%;
  width: 74px; height: 74px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.28);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.video-embed__play::after {
  content: ""; position: absolute; top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--white);
}
.video-embed:hover .video-embed__play,
.video-embed:focus-visible .video-embed__play {
  background: var(--red); border-color: var(--red);
  transform: translate(-50%, -50%) scale(1.06);
}
.video-embed__frame { width: 100%; height: 100%; border: 0; display: block; background: var(--black); }

/* Awards sub-block — small, credential not hero */
.awards { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.award { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.award a { display: block; line-height: 0; }
.award img {
  width: 150px; height: auto; max-width: 100%;
  object-fit: contain; display: block;
  /* Certificates are black-on-white; invert so the laurel + text read white on the dark page. */
  filter: invert(1);
  opacity: 0.85;
  transition: opacity .3s var(--ease);
}
.award a:hover img, .award a:focus-visible img { opacity: 1; }
.award img.is-missing { visibility: hidden; }
.award:has(img.is-missing) {
  width: 210px; height: 148px;
  border: 1px solid var(--red);
  align-items: center; justify-content: center;
  position: relative;
}
.award:has(img.is-missing)::before {
  content: "GMIFF"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 10px; letter-spacing: 0.1em; color: var(--red);
}
.award figcaption { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white-dim); }

/* ---------- 10b. Music break (AI-composed audio) ---------- */
.music {
  /* full-bleed band that breaks out of the .wrap gutter */
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-block: clamp(56px, 8vw, 104px);
  margin-block: clamp(48px, 7vw, 88px);
  border-block: 1px solid var(--white-line);
  background: var(--black);
  overflow: hidden;
}
.music__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.music .eyebrow { margin: 0; }
.music__title {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 10px 0 28px;
}
.eq {
  display: block;
  width: 100%;
  height: clamp(90px, 14vw, 150px);
  margin-bottom: 34px;
}
.tracklist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--white-line);
}
.track {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--white-line);
}
.track__toggle {
  width: 44px; height: 44px;
  flex: none;
  border: 1px solid var(--white-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.track__toggle:hover, .track__toggle:focus-visible { border-color: var(--red); }
/* play triangle */
.track__ico {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-40%, -50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--white);
  transition: border-color .3s var(--ease);
}
.track__toggle:hover .track__ico, .track__toggle:focus-visible .track__ico {
  border-left-color: var(--red);
}
/* pause bars when playing */
.track.is-playing .track__toggle { border-color: var(--red); }
.track.is-playing .track__ico {
  transform: translate(-50%, -50%);
  width: 12px; height: 14px;
  border: 0;
  background:
    linear-gradient(var(--red), var(--red)) left / 4px 100% no-repeat,
    linear-gradient(var(--red), var(--red)) right / 4px 100% no-repeat;
}
.track__num { font-size: 12px; letter-spacing: 0.12em; color: var(--white-dim); font-variant-numeric: tabular-nums; }
.track__name { font-size: clamp(16px, 2.4vw, 20px); letter-spacing: -0.01em; }
.track.is-playing .track__name { color: var(--red); }
.track__time { font-size: 13px; color: var(--white-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .track { grid-template-columns: auto 1fr auto; gap: 14px; }
  .track__num { display: none; }
}

/* ---------- 11. Services ---------- */
.svc-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--white-line);
  border-left: 1px solid var(--white-line);
}
.svc {
  padding: clamp(28px, 3vw, 44px);
  border-right: 1px solid var(--white-line);
  border-bottom: 1px solid var(--white-line);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 220px;
}
.svc__idx {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--red); font-weight: 700; font-size: 1.1rem;
}
.svc h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  letter-spacing: -0.01em;
  margin-top: auto;
}
.svc p { color: var(--white-dim); font-size: 15px; }

/* ---------- 12. Process ---------- */
.proc { position: relative; }
.proc__line {
  position: absolute; top: 22px; left: 0;
  width: 100%; height: 4px;
  overflow: visible;
}
.proc__steps {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 56px);
  position: relative;
}
.proc__step { display: flex; flex-direction: column; gap: 12px; padding-top: 44px; position: relative; }
.proc__step::before {
  content: ""; position: absolute; top: 19px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red);
}
.proc__idx {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--red); font-weight: 700;
}
.proc__step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
}
.proc__step p { color: var(--white-dim); font-size: 15px; }

/* ---------- 13. About & team ---------- */
.about__lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 30ch;
  color: var(--white);
  margin-bottom: clamp(56px, 8vw, 96px);
}
.team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 6vw, 88px);
  max-width: 900px;
}
.member__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 20px;
}
.member__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s var(--ease), transform .6s var(--ease);
}
.member:hover .member__photo img {
  filter: grayscale(0) sepia(0.3) saturate(2.4) hue-rotate(-15deg) contrast(1.05);
  transform: scale(1.02);
}
.member__photo img.is-missing { visibility: hidden; }
.member__photo:has(img.is-missing)::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid var(--red); background: var(--black);
}
.member h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
}
.member__role { color: var(--red); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 6px; }
.member__bio { color: var(--white-dim); font-size: 15px; margin-top: 10px; max-width: 34ch; }

/* Agency-level About (no names/photos) */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.about__text .about__lede { margin-bottom: 28px; max-width: 26ch; }
.about__text p { color: var(--white-dim); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; max-width: 52ch; }
.about__text p + p { margin-top: 20px; }
.about__facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--white-line); }
.about__facts li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 0; border-bottom: 1px solid var(--white-line);
}
.about__facts-k { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.about__facts-v { color: var(--white); font-size: clamp(15px, 1.5vw, 18px); }

/* Section lede (Work page intro paragraph) */
.section-lede {
  color: var(--white-dim);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  max-width: 56ch;
  margin-top: 16px;
}

/* Work-as-page: extra top padding to clear the fixed nav (no hero) */
.work--page { padding-top: clamp(120px, 16vh, 200px); }

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 44px; }
  .about__text p, .about__text .about__lede { max-width: none; }
}

/* ---------- 14. Contact ---------- */
.contact {
  min-height: 100svh;
  display: flex; align-items: center;
}
.contact__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-top: 8px;
}
.contact__email {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-top: 16px;
  word-break: break-word;
}
.contact__phone { color: var(--white-dim); font-size: 18px; }
.contact__phone:hover { color: var(--white); }
.contact__lede { color: var(--white-dim); font-size: 18px; max-width: 46ch; margin-top: 4px; }
.contact .btn-primary { margin-top: 20px; }

/* ---------- 15. Footer ---------- */
.footer {
  border-top: 1px solid var(--white-line);
  padding-block: clamp(48px, 6vw, 72px);
  position: relative; z-index: 2;
}
.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 32px;
}
.footer__logo { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.footer__tag { color: var(--white-dim); }
.footer__social { order: 1; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.footer__legal { order: 2; grid-column: 1 / -1; font-size: 13px; color: var(--white-dim); border-top: 1px solid var(--white-line); padding-top: 20px; margin-top: 8px; }
.footer__top { justify-self: end; font-size: 14px; }

/* ---------- 16. Motion (reveal) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 900px) {
  .stats__inner { grid-template-columns: 1fr; gap: 40px; }
  .project,
  .team { grid-template-columns: 1fr; }
  .project--rev .project__media,
  .project--rev .project__body { order: initial; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .proc__steps { grid-template-columns: repeat(2, 1fr); }
  .proc__line { display: none; }
  .proc__step { padding-top: 28px; }
  .proc__step::before { top: 4px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__top { justify-self: start; }
}

@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
  .proc__steps { grid-template-columns: 1fr; }
  .hero__disciplines span:not(:last-child)::after { margin: 0 10px; }
}

/* ---------- Reduced motion: freeze everything ----------
   JS fully disables scroll-binding, parallax and the idle loop under
   prefers-reduced-motion; here we only need to reveal content and hold
   the lines in a static drawn state. No !important required. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Lines rendered in final drawn state, no drift. */
  .bg-lines > svg > svg[id^="lines-"] { opacity: 0.12; transition: none; }
  .bg-lines #lines-1 { opacity: 0.24; }
  .member__photo img { transition: none; }
}
