/* Inter, served from this site; only used where SF Pro isn't available (Windows, Android). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); }

:root {
  --bg: #F5F4F1;
  --fg: #111112;
  --muted: #63625E;
  --signal: #FF5A1F;
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* Nav: frosted glass that takes the page colour */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav__logo { font-family: var(--font); font-weight: 700; font-size: 20px; letter-spacing: -0.04em; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav__links > a:not(.pill) { color: var(--muted); transition: color 0.3s var(--ease); }
.nav__links > a:not(.pill):hover { color: var(--fg); }

/* Buttons */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.pill:hover { transform: scale(1.03); }
.pill--small { padding: 9px 16px; font-size: 13px; }
.pill--large { padding: 20px 32px; font-size: 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

.eyebrow { margin: 0; font-size: 15px; color: var(--muted); }

/* Hero */
.hero {
  min-height: 100svh;
  padding: 140px var(--gutter) 12vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
}
.hero__title {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(56px, 9.5vw, 156px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  max-width: none;
}
.hero__sub { margin: 0; max-width: 34ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--muted); }

/* Split text */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.08em 0.08em; margin: 0 -0.08em; }
.split .w > span { display: inline-block; will-change: transform; }

/* Film: pinned, expands from a card to full bleed */
.film { height: 430vh; position: relative; }
.film__sticky { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.film__frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #0E0E10;
  will-change: transform, border-radius;
}
#film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.film__lines {
  position: absolute;
  inset: auto var(--gutter) 14vh var(--gutter);
  font-family: var(--font);
  color: #F5F4F1;
}
.film__line {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
  opacity: 1;
}
.anim .film__line { opacity: 0; }
.film__line--strong { margin-top: 0.4em; }

/* Statement: words light up as you scroll */
.statement { padding: 26vh var(--gutter); max-width: 1440px; margin: 0 auto; }
.statement__text {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(32px, 4.6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 22ch;
}
.anim .words .w { opacity: 0.16; transition: none; }

/* Sectors: one word at a time */
.sectors { height: 415vh; position: relative; }
.sectors__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; font-family: var(--font); }
.sectors__media { position: absolute; inset: 0; }
.sectors__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.sectors__tint { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,12,16,0.75) 0%, rgba(10,12,16,0.35) 55%, rgba(10,12,16,0.15) 100%); }
.sectors__inner { position: relative; height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.sectors__close { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); margin: 0; font-size: clamp(44px, 7vw, 120px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.98; max-width: 12ch; opacity: 0; }
.sectors__credit { position: absolute; right: var(--gutter); bottom: 20px; margin: 0; font-family: var(--text); font-size: 11px; color: rgba(245,244,241,0.55); opacity: 0; }
.sectors__lead { margin: 0 0 0.2em; font-size: clamp(28px, 3.6vw, 56px); font-weight: 600; letter-spacing: -0.04em; color: var(--muted); }
.sectors__words { position: relative; height: 1.1em; font-size: clamp(64px, 12vw, 200px); font-weight: 700; letter-spacing: -0.055em; line-height: 1; }
.sectors__word { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }

/* Logos */
.logos { padding: 22vh 0 16vh; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font-family: var(--font); font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.03em; color: var(--muted); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Quote */
.quote { padding: 16vh var(--gutter) 22vh; max-width: 1200px; margin: 0 auto; }
.quote figure { margin: 0; display: flex; flex-direction: column; gap: 32px; }
.quote blockquote { margin: 0; font-family: var(--font); font-size: clamp(30px, 3.8vw, 58px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; }
.quote figcaption { font-size: 16px; color: var(--muted); }

/* Contact */
.contact { min-height: 100svh; padding: 18vh var(--gutter) 40px; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
.contact__title { margin: 0; font-family: var(--font); font-size: clamp(56px, 9vw, 148px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; max-width: 10ch; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; }
.link { font-size: 17px; color: var(--muted); border-bottom: 1px solid currentColor; padding: 6px 0; transition: color 0.3s var(--ease); }
.link:hover { color: var(--fg); }
.footer { margin-top: auto; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); padding-top: 24px; }

.anim .reveal { opacity: 0; transform: translateY(24px); }

@media (max-width: 640px) {
  .nav__links { gap: 18px; }
  .nav__links > a:not(.pill) { font-size: 15px; padding: 12px 0; }
  .nav .pill--small { min-height: 44px; padding: 0 18px; font-size: 14px; }
  .film__frame { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .film__line, .sectors__word { opacity: 1 !important; transform: none !important; }
  .words .w { opacity: 1; }
  .sectors { height: auto; }
  .sectors__sticky { position: static; height: auto; padding: 20vh 0; }
  .sectors__close { position: static; transform: none; opacity: 1 !important; margin-top: 0.6em; }
  .sectors__video[data-beat="4"] { opacity: 1; }
  .sectors__words { height: auto; display: flex; flex-direction: column; }
  .sectors__word { position: static; }
  .film { height: 100svh; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

/* Client logos: one tone, one optical height */
.marquee__track { align-items: center; }
.logo { display: inline-flex; align-items: center; gap: 8px; height: 34px; }
.logo img { height: 100%; width: auto; filter: grayscale(1) brightness(0); opacity: 0.55; }
.logo--pair img:first-child { height: 90%; }
.logo--text { font-family: var(--font); font-size: 26px; font-weight: 700; letter-spacing: 0.08em; color: #000; opacity: 0.55; }
.logo img[src*="equalexperts"] { height: 130%; }

/* Quotes: one at a time, crossfading */
.quotes { display: grid; gap: 40px; }
.quotes__item { grid-area: 1 / 1; margin: 0; display: flex; flex-direction: column; gap: 32px; opacity: 0; transform: translateY(12px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); pointer-events: none; }
.quotes__item.is-active { opacity: 1; transform: none; pointer-events: auto; }
.quotes__item blockquote { margin: 0; font-family: var(--font); font-size: clamp(28px, 3.4vw, 52px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.14; }
.quotes__item figcaption { font-size: 16px; color: var(--muted); }
.quotes__dots { grid-area: 2 / 1; display: flex; gap: 6px; }
.quotes__dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.quotes__dots button::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); opacity: 0.2; transition: opacity 0.4s var(--ease), width 0.4s var(--ease); }
.quotes__dots button.is-active::after { opacity: 0.8; width: 22px; border-radius: 4px; }

/* Holding footage: the black-and-white grade is baked into the file; revealed as the grain clears */
.film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
#film { z-index: 1; }
.film__scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to top, rgba(14,14,16,0.85) 0%, rgba(14,14,16,0.2) 45%, rgba(14,14,16,0) 70%); }
.film__lines { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .film__video { opacity: 1; } #film { opacity: 0; } }

/* Review fixes, 3 Nov */
.marquee__track > * { margin-right: 96px; }
.sectors__word { will-change: transform, opacity; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
.pill:focus-visible { outline-offset: 3px; }
@media (max-width: 640px) {
  .sectors__words { height: 2.1em; font-size: clamp(52px, 15vw, 96px); }
  .sectors__word { white-space: normal; right: 0; }
}

/* Round 2 fixes */
.hero__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; margin-top: 7vh; padding-top: 28px; border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); width: 100%; }
.hero__logos-label { font-size: 13px; color: var(--muted); }
.hero__logos-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.hero__logos-row .logo { height: 22px; }
.hero__logos-row .logo--text { font-size: 17px; }
.logo img[src*="gallos"] { height: 85%; }
.quotes__pause { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--fg); opacity: 0.6; }
.quotes__pause::after { content: ""; width: 8px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; box-sizing: border-box; }
.quotes__pause[aria-pressed="true"]::after { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
@media (max-width: 640px) { .hero__logos-row { gap: 14px 24px; } .hero__logos-row .logo { height: 18px; } }
.contact__note { margin: -16px 0 0; max-width: 46ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.contact__note a { color: var(--fg); border-bottom: 1px solid currentColor; }
.footer span:first-child { max-width: 70ch; line-height: 1.5; }

/* Round 3: full-width logo row, hero field, quiet signal pulse */
.hero { position: relative; }
.hero > *:not(.hero__field) { position: relative; z-index: 1; }
.hero__field { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.hero__logos-row { flex: 1; justify-content: space-between; }
@media (max-width: 1100px) { .hero__logos-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); align-items: center; } }
@keyframes signal { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.75; } }
.pill .dot { animation: signal 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pill .dot { animation: none; } }

/* Intro starts hidden only when animation is available (see the inline script in <head>) */
.anim .hero__title .w > span { transform: translateY(110%); }
.anim .hero__field { opacity: 0; }
.anim .hero__logos-row .logo { opacity: 0; }
.hero__title .w > span { will-change: transform; }

/* Round 4: the film and sector visuals are a fixed backdrop that never moves.
   Their sections are just scroll distance; nothing pins, catches or releases. */
main { position: relative; z-index: 0; }
.stage { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.stage--film { display: grid; place-items: center; }
.stage--film .film__frame { opacity: 0; }
.stage--sectors { font-family: var(--font); }
.stage--sectors .sectors__media { opacity: 0; }
html:not(.anim) .stage { position: relative; z-index: auto; height: 100svh; }
html:not(.anim) .stage--film .film__frame, html:not(.anim) .stage--sectors .sectors__media { opacity: 1; }
html:not(.anim) .film, html:not(.anim) .sectors { height: auto; }
@media (prefers-reduced-motion: reduce) { .stage--sectors { height: auto; } }

.hero__line { display: block; }
@media (max-width: 640px) {
  .hero__logos-row { flex-basis: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
}
@media (max-width: 640px) {
  .hero__logos-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .hero__logos-row .logo { min-width: 0; }
  .hero__logos-row .logo img { max-width: 100%; object-fit: contain; object-position: left center; }
}

.sectors__close { max-width: 15ch; }
.film__line { max-width: 26ch; }

/* The paragraph after the film sits on a fixed layer too, so the dark middle of the page is one continuous piece */
.anim .statement { height: 260vh; padding: 0; max-width: none; }
.stage--statement { display: flex; align-items: center; }
.statement__inner { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.anim .stage--statement { opacity: 0; visibility: hidden; }
html:not(.anim) .stage--statement { height: auto; padding: 26vh 0; }

.film__drift { position: absolute; inset: 0; will-change: transform; }
.statement__inner, .sectors__inner { will-change: transform; }
.logo img[src*="insig"] { height: 105%; }

/* Copy reset: two-part statement, sector words without a lead line */
.statement__text--small { margin-top: 0.9em; font-size: clamp(22px, 2.4vw, 36px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; max-width: 36ch; }
.contact__title { max-width: none; font-size: clamp(44px, 7vw, 120px); }
.contact__line { display: block; }
@media (max-width: 640px) { .footer { flex-direction: column; } }

/* Keyboard focus that shows on every button colour */
.pill:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* Text for screen readers and crawlers 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; }

/* Back to top */
.to-top { position: fixed; right: var(--gutter); bottom: 24px; z-index: 9; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; background: var(--fg); color: var(--bg); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.footer { padding-bottom: 72px; }

/* Phones: headline on two lines, bigger tap targets, tighter gaps between scenes */
@media (max-width: 640px) {
  .hero__title { font-size: 11.4vw; }
  .hero__title .hero__line { display: block; }
  .quotes__dots button { width: 40px; height: 44px; }
  .contact__actions .link { display: inline-block; padding: 10px 0; }
  .footer a { display: inline-block; padding: 12px 0; }
  .logos { padding: 12vh 0 8vh; gap: 36px; }
}

/* Phones: hero logos as one drifting line */
@media (max-width: 640px) {
  .hero__logos { width: 100%; }
  .hero__logos-row.is-marquee { display: block; overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .hero__logos-track { display: flex; align-items: center; width: max-content; animation: heroLogos 32s linear infinite; }
  .hero__logos-track .logo { height: 20px; margin-right: 40px; flex: none; }
  .hero__logos-track .logo img { max-width: none; }
}
@keyframes heroLogos { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero__logos-track { animation: none; flex-wrap: wrap; width: auto; row-gap: 16px; } }
