/* ============================================================
   NINE PAST NINE — shaping brands, sharpening stories
   Brand system: heavy grotesque + monospace, orange on cream/black
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --orange:      #F65009;
  --orange-dark: #D8430A;
  --black:       #0A0A0A;
  --ink:         #121212;
  --cream:       #FFFEF3;
  --cream-2:     #F4F2E6;
  --white:       #FFFFFF;
  --grey:        #EEEEEE;
  --line:        rgba(10,10,10,0.14);
  --line-dark:   rgba(255,254,243,0.16);
  --muted:       #6E6D63;
  --muted-dark:  #8C8B83;

  --maxw: 1320px;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.4, 0, 0.15, 1);

  --grotesk: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', 'SF Mono', ui-monospace, Menlo, monospace;
}

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

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

body {
  font-family: var(--grotesk);
  background: var(--cream);
  color: var(--black);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--orange); color: var(--cream); }

/* Visible keyboard focus (accessibility) — only for keyboard users, not mouse clicks */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 1px; }
.dark :focus-visible, .site-foot :focus-visible, .site-head.on-dark :focus-visible { outline-color: var(--orange); }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(72px, 11vw, 160px) 0; }
.section--tight { padding: clamp(54px, 7vw, 96px) 0; }

section.dark { background: var(--black); color: var(--cream); }
section.cream { background: var(--cream); color: var(--black); }
section.white { background: var(--white); color: var(--black); }
section.grey { background: var(--grey); color: var(--black); }

/* ---------- Mono labels ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--orange);
  display: inline-block;
}
.dark .eyebrow { color: var(--muted-dark); }
.eyebrow--plain::before { display: none; }
.num { color: var(--orange); }

/* ---------- Typography ---------- */
.display {
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 9vw, 8.2rem);
}
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; text-transform: uppercase; }
h2.big { font-size: clamp(2rem, 5.5vw, 4.6rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 2rem); }
.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 30ch;
}
p.body { font-size: clamp(1rem, 1.15vw, 1.18rem); line-height: 1.65; max-width: 62ch; color: #2a2a28; }
.dark p.body { color: #cfcec6; }

/* ---------- 9:09 mark ---------- */
.nine {
  font-family: var(--mono);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  white-space: nowrap;
}
.nine .ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.09em solid currentColor;
  border-radius: 50%;
  width: 1.55em; height: 1.55em;
  font-size: 0.86em;
}
.nine--orange { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid transparent;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn--orange { background: var(--orange); color: var(--cream); }
.btn--orange:hover { background: var(--orange-dark); }
.btn--outline { border-color: currentColor; background: transparent; }
.btn--outline:hover { background: var(--black); color: var(--cream); border-color: var(--black); }
.dark .btn--outline:hover { background: var(--cream); color: var(--black); border-color: var(--cream); }

/* ---------- Header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.scrolled {
  background: rgba(255,254,243,0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.site-head.on-dark { color: var(--cream); }
.site-head.on-dark.scrolled { background: rgba(10,10,10,0.82); border-bottom-color: var(--line-dark); }

.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 46px; width: auto; }
.brand .logo-white { display: none; }
.on-dark .brand .logo-black { display: none; }
.on-dark .brand .logo-white { display: block; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--orange); transition: width 0.3s var(--ease);
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--orange); }
.nav .btn { padding: 12px 22px; }

.menu-btn { display: none; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px;
  background: none; border: none; cursor: pointer; font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: inherit; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 99; background: var(--black); color: var(--cream);
  display: flex; flex-direction: column; justify-content: center; padding: var(--pad);
  transform: translateY(-100%); transition: transform 0.5s var(--ease); }
.drawer.open { transform: translateY(0); }
.drawer a { font-family: var(--grotesk); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 9vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; padding: 6px 0; }
.drawer a:hover { color: var(--orange); }
.drawer .drawer-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-dark); margin-top: 40px; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px; padding-bottom: 60px; position: relative; }
.hero .display .nine { font-size: 0.42em; vertical-align: 0.32em; margin: 0 0.12em; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 30px; margin-top: clamp(36px, 6vw, 72px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Motif strip ---------- */
.motif { font-family: var(--grotesk); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; font-size: clamp(1rem, 2.1vw, 1.7rem); line-height: 1.35; }
.motif .dim { color: var(--muted-dark); }
.motif .hl { background: var(--orange); color: var(--cream); padding: 0.04em 0.32em; }
.motif .o { color: var(--orange); }

.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark); padding: 22px 0; }
.marquee-track { display: inline-flex; gap: 50px; animation: scroll-x 32s linear infinite;
  font-family: var(--grotesk); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2.4rem); letter-spacing: -0.01em; }
.marquee-track span { display: inline-flex; align-items: center; gap: 50px; }
.marquee-track .star { color: var(--orange); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Grids ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.split--lede { grid-template-columns: 0.85fr 1.15fr; }

/* services / numbered list */
.svc-row { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 64px);
  align-items: start; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line);
  transition: background 0.3s var(--ease); }
.dark .svc-row { border-top-color: var(--line-dark); }
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.dark .svc-row:last-child { border-bottom-color: var(--line-dark); }
.svc-row .svc-no { font-family: var(--mono); font-size: 14px; color: var(--orange); padding-top: 0.4em; }
.svc-row h3 { font-size: clamp(1.7rem, 4.4vw, 3.4rem); line-height: 0.98; }
.svc-row .svc-desc { font-size: clamp(0.95rem, 1.1vw, 1.1rem); line-height: 1.6; max-width: 46ch; color: #3a3a37; }
.dark .svc-row .svc-desc { color: #cfcec6; }
.svc-row:hover h3 { color: var(--orange); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); }
.dark .cards { background: var(--line-dark); border-color: var(--line-dark); }
.card { background: var(--cream); padding: clamp(28px, 3vw, 44px); min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between; transition: background 0.3s var(--ease); }
.dark .card { background: var(--black); }
.card:hover { background: var(--orange); color: var(--cream); }
.card:hover .eyebrow, .card:hover .eyebrow::before, .card:hover .card-meta { color: var(--cream); }
.card:hover .eyebrow::before { background: var(--cream); }
.card h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin-top: 14px; }
.card p { font-size: 0.98rem; line-height: 1.55; margin-top: 12px; color: #3a3a37; }
.dark .card p { color: #c7c6be; }
.card:hover p { color: var(--cream); }
.card-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 24px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: clamp(24px,4vw,48px); }
.stat .n { font-weight: 900; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.03em; }
.stat .n .num { color: var(--orange); }
.stat .l { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-dark); margin-top: 12px; }

/* big quote / story */
.story p { font-size: clamp(1.15rem, 1.9vw, 1.7rem); line-height: 1.5; font-weight: 500;
  letter-spacing: -0.01em; max-width: 24ch; }
.pull { font-weight: 800; text-transform: uppercase; line-height: 1.05; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 5vw, 4rem); }
.pull .o { color: var(--orange); }

.prose p { font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.7; max-width: 60ch; margin-bottom: 1.3em; color: #2c2c29; }
.dark .prose p { color: #cfcec6; }
.prose p:first-letter { }

/* contact form */
.form { display: grid; gap: 22px; max-width: 620px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dark); }
.field input, .field textarea, .field select {
  background: transparent; border: none; border-bottom: 1.5px solid var(--line-dark);
  color: var(--cream); font-family: var(--grotesk); font-size: 1.15rem; padding: 12px 0; font-weight: 500;
  min-height: 44px; box-sizing: border-box;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--orange); }
.field textarea { resize: vertical; min-height: 90px; }
.field select option { color: #000; }
.form #f-submit { justify-self: start; margin-top: 6px; }
.form-done h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; margin-top: 18px; }
.form-done p { font-family: var(--grotesk); font-size: 1.05rem; color: #cfcec6; margin-top: 14px; max-width: 36ch; }

.contact-list { list-style: none; display: grid; gap: 28px; }
.contact-list .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 6px; }
.contact-list .val { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
.contact-list a.val:hover { color: var(--orange); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--orange); z-index: 1002; transform-origin: 0 50%;
  will-change: width;
}

/* ---------- HubSpot form ---------- */
.hs-panel {
  background: var(--cream); color: var(--black);
  padding: clamp(28px, 4vw, 48px); border-radius: 4px;
  min-height: 360px;
}
.hs-fallback { font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--muted); }
.hs-fallback a { color: var(--orange); font-weight: 700; }
/* Theme the inline HubSpot form to match the brand (overrides HubSpot's own CSS) */
.hs-panel ul, .hs-panel .inputs-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.hs-panel .hs-form-field { margin-bottom: 18px !important; }
.hs-panel form label,
.hs-panel .hs-form-field > label {
  font-family: var(--mono) !important; font-size: 12px !important; letter-spacing: 0.06em !important;
  text-transform: uppercase !important; color: var(--muted) !important; font-weight: 400 !important;
  display: block !important; margin-bottom: 8px !important;
}
.hs-panel .hs-form-required { color: var(--orange) !important; }
.hs-panel .hs-input:not([type=checkbox]):not([type=radio]) {
  width: 100% !important; box-sizing: border-box !important;
  background: #fff !important; border: 1px solid var(--line) !important; border-radius: 2px !important;
  color: var(--black) !important; font-family: var(--grotesk) !important; font-size: 1rem !important;
  padding: 12px 14px !important; box-shadow: none !important;
}
.hs-panel .hs-input:focus { outline: none !important; border-color: var(--orange) !important; }
.hs-panel textarea.hs-input { min-height: 110px !important; resize: vertical !important; }
.hs-panel .hs-error-msg, .hs-panel .hs-error-msgs label { color: var(--orange) !important; font-family: var(--mono) !important; font-size: 12px !important; }
.hs-panel .hs-button,
.hs-panel input[type=submit].hs-button {
  font-family: var(--mono) !important; font-weight: 700 !important; font-size: 13px !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  background: var(--orange) !important; color: var(--cream) !important; border: none !important;
  border-radius: 0 !important; padding: 16px 32px !important; cursor: pointer !important;
  box-shadow: none !important; transition: background 0.3s var(--ease) !important; margin-top: 6px !important;
}
.hs-panel .hs-button:hover,
.hs-panel input[type=submit].hs-button:hover { background: var(--orange-dark) !important; }

/* ---------- Footer ---------- */
.site-foot { background: var(--black); color: var(--cream); padding: clamp(64px,9vw,120px) 0 40px; }
.foot-top { display: grid; grid-template-columns: 1fr auto auto; gap: clamp(40px, 8vw, 110px); padding-bottom: 70px; }
.foot-top img { height: 64px; width: auto; margin-bottom: 26px; }
.foot-col h4 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-dark); margin-bottom: 20px; }
.foot-col ul { list-style: none; display: grid; gap: 12px; }
.foot-col a { font-weight: 600; text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.01em; }
.foot-col a:hover { color: var(--orange); }
.foot-tagline { font-weight: 800; text-transform: uppercase; font-size: clamp(1.1rem,1.6vw,1.4rem);
  letter-spacing: -0.01em; line-height: 1.15; max-width: 18ch; }
.foot-bottom { border-top: 1px solid var(--line-dark); padding-top: 28px; display: flex;
  flex-wrap: wrap; gap: 16px; justify-content: flex-end; align-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-dark); }
.foot-bottom .gg { color: var(--cream); }
.foot-bottom .gg span { color: var(--orange); }

/* ---------- Reveal animation ---------- */
html.js .reveal { opacity: 0; transform: translateY(34px); }
/* CSS-driven reveal (IntersectionObserver fallback when GSAP is unavailable) */
html.js.io .reveal { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js.io .reveal.in { opacity: 1; transform: none; }
/* When GSAP drives the reveals it sets inline styles; nothing else needed here. */
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* Desktop-only line break */
.br-desk { display: none; }
@media (min-width: 861px) { .br-desk { display: inline; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .split, .split--lede { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .svc-row { grid-template-columns: auto 1fr; }
  .svc-row .svc-desc { grid-column: 1 / -1; }
  /* Larger tap targets for footer nav on touch devices */
  .foot-col a { display: flex; align-items: center; min-height: 44px; }
  .foot-col ul { gap: 2px; }
}
@media (max-width: 560px) {
  .foot-top { grid-template-columns: 1fr; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .nav .btn, .drawer .btn { width: auto; }
}
