/* ==========================================================================
   Fivable — company site
   Ink and bone, one accent color (the spark in the mark).
   ========================================================================== */
:root {
  --ink: #0E0F12;
  --ink-2: #16181D;
  --ink-3: #1F2228;
  --bone: #F4EFE6;
  --bone-2: #EAE3D6;
  --on-ink: #F4EFE6;
  --on-ink-muted: #A29C92;
  --on-ink-faint: #6E6A63;
  --on-ink-line: rgba(244, 239, 230, .12);
  --on-bone: #16181D;
  --on-bone-muted: #5E5A53;
  --on-bone-line: rgba(22, 24, 29, .14);
  --accent: #E23B54;        /* rubric red */
  --accent-ink: #A8102D;    /* text-safe accent on bone */

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1400px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; }
a { color: inherit; text-underline-offset: 4px; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--bone); color: var(--ink); padding: 10px 14px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1, h2 { font-family: var(--display); letter-spacing: -.02em; line-height: .98; }
h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
h3 { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
em { font-style: italic; }
.serif-em { font-family: var(--display); font-style: italic; color: var(--on-ink-muted); }
.label {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--on-ink-muted); max-width: 56ch; text-wrap: pretty; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-ink); }
.brand img { width: 30px; height: 30px; }
.brand span { font-family: var(--sans); font-weight: 650; font-size: 1.32rem; letter-spacing: -.035em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn--down:hover .arrow { transform: translateY(3px); }
.btn--solid { background: var(--bone); color: var(--ink); }
.btn--solid:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--on-ink-line); color: var(--on-ink); }
.btn--ghost:hover { border-color: var(--on-ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-hidden:not(:focus-within) { transform: translateY(-100%); }
.site-header.is-scrolled {
  background: rgba(14, 15, 18, .78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-color: var(--on-ink-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; color: var(--on-ink-muted); font-size: .95rem; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--on-ink); }
.nav .btn { padding: 10px 16px; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 clamp(48px, 7vw, 88px); overflow: hidden; isolation: isolate; }
/* The hero is a flex container, so its wrap must claim the full width or it shrinks to its text and centers. */
.hero > .wrap { width: 100%; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 15% 85%, rgba(14, 15, 18, .92), transparent 70%),
    linear-gradient(to top, var(--ink) 0%, transparent 35%);
}
.hero h1 { font-size: clamp(3.4rem, min(8vw, 11.5svh), 7.6rem); max-width: 11ch; }
.hero h1 .serif-em { display: block; }
.hero .lede { margin-top: clamp(24px, 3vw, 36px); color: #C9C2B6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: clamp(48px, 7vw, 88px); padding-top: 22px;
  border-top: 1px solid var(--on-ink-line);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-faint);
}
.hero-meta b { color: var(--on-ink-muted); font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(96px, 13vw, 180px); position: relative; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 7vw, 88px); }
.section--bone { background: var(--bone); color: var(--on-bone); }
.section--bone .label { color: var(--on-bone-muted); }
.section--bone .lede { color: var(--on-bone-muted); }
.section--bone .serif-em { color: var(--on-bone-muted); }

/* ---------- Story ---------- */
/* Call and response: the second line answers the first at the same size, set off to the right. */
.story-intro { display: grid; gap: 22px; margin-bottom: clamp(72px, 10vw, 136px); }
.story-intro h2, .story-intro .pull { font-size: clamp(2.6rem, 6.2vw, 5.6rem); line-height: 1; max-width: 15ch; }
.story-intro .pull { justify-self: end; text-align: right; margin-top: clamp(4px, 1.5vw, 20px); }
/* As the intro scrolls up, its words light up in reading order: the claim, then the answer. */
.js [data-unfold] .w { display: inline-block; transition: opacity .5s var(--ease), filter .5s var(--ease), transform .5s var(--ease); }
.js [data-unfold] .w:not(.is-lit) { opacity: .12; filter: blur(3px); transform: translateY(.08em); }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--on-bone-line); }
.timeline li {
  display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: clamp(20px, 5vw, 80px);
  padding-block: clamp(32px, 4.5vw, 56px); border-bottom: 1px solid var(--on-bone-line);
}
.timeline .year { font-family: var(--display); font-size: clamp(3.2rem, 7vw, 6rem); line-height: .9; letter-spacing: -.03em; }
.timeline li:last-child .year { font-style: italic; color: var(--accent-ink); }
.timeline h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 12px; }
.timeline p { color: var(--on-bone-muted); max-width: 58ch; text-wrap: pretty; }
.timeline p + p { margin-top: 12px; }
.pull {
  font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -.02em;
  max-width: 18ch; text-wrap: balance;
}
.pull .serif-em { color: var(--accent-ink); }

/* ---------- LEAD ---------- */
.lead-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.lead-logo { width: 150px; height: auto; margin: 28px 0 32px; }
.lead-copy h2 { margin-top: 20px; }
.lead-copy .lede { margin-top: 24px; }
.pillars { list-style: none; padding: 0; margin: 40px 0 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--on-ink-line); border: 1px solid var(--on-ink-line); border-radius: 18px; overflow: hidden; }
.pillars li { background: var(--ink); padding: 22px 22px 24px; }
.pillars h3 { font-size: 1rem; margin-bottom: 6px; }
.pillars p { font-size: .93rem; color: var(--on-ink-muted); line-height: 1.5; }
.phones { position: relative; height: 640px; }
.phones::before {
  content: ""; position: absolute; inset: 10% 5%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(20px);
}
.phone {
  position: absolute; width: 46%; aspect-ratio: 640 / 1391;
  border-radius: 34px; padding: 7px; background: #2A2D33;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 80px -20px rgba(0, 0, 0, .7);
  transition: transform .8s var(--ease);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }
.phone:nth-child(1) { left: 0; top: 14%; transform: rotate(-7deg); }
.phone:nth-child(2) { left: 27%; top: 0; z-index: 2; }
.phone:nth-child(3) { right: 0; top: 14%; transform: rotate(7deg); }
.phones:hover .phone:nth-child(1) { transform: rotate(-9deg) translateX(-10px); }
.phones:hover .phone:nth-child(3) { transform: rotate(9deg) translateX(10px); }

/* ---------- Numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--on-ink-line); }
.numbers > div { padding: 32px 24px 8px 0; }
.numbers > div + div { padding-left: 24px; border-left: 1px solid var(--on-ink-line); }
.numbers .n { font-family: var(--display); font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.numbers .n sup { font-size: .45em; color: var(--accent); vertical-align: .9em; margin-left: 2px; }
.numbers p { margin-top: 14px; color: var(--on-ink-muted); font-size: .95rem; max-width: 24ch; }

/* ---------- Served ---------- */
.served { margin-top: clamp(80px, 10vw, 140px); }
.served-list {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px 0;
  font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.7rem); line-height: 1.25; letter-spacing: -.01em;
}
.served-list li { color: var(--on-ink-faint); transition: color .3s; }
.served-list li:hover { color: var(--on-ink); }
.served-list li:not(:last-child)::after { content: "·"; margin-inline: .4em; color: var(--accent); }

/* ---------- Beliefs ---------- */
.beliefs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--on-bone-line); border: 1px solid var(--on-bone-line); }
.beliefs li { background: var(--bone); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; min-height: 300px; transition: background .3s var(--ease); }
.beliefs li:hover { background: var(--bone-2); }
.beliefs .num { font-family: var(--mono); font-size: .78rem; color: var(--accent-ink); letter-spacing: .08em; }
.beliefs h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.1rem); line-height: 1.05; letter-spacing: -.015em; margin-top: auto; }
.beliefs p { color: var(--on-bone-muted); font-size: .98rem; line-height: 1.55; text-wrap: pretty; }

/* ---------- Quote ---------- */
.quote { text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 22ch; font-family: var(--display); font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.quote blockquote::before { content: "\201C"; display: block; color: var(--accent); font-size: 1.6em; line-height: .6; margin-bottom: .1em; }
.quote figcaption { margin-top: 36px; color: var(--on-ink-muted); font-size: .95rem; }
.quote figcaption b { display: block; color: var(--on-ink); font-weight: 600; margin-bottom: 2px; }

/* ---------- Closing ---------- */
/* The closer and footer together fill the screen at the bottom of the page, so the Spark has room to form in full view, even on short laptop screens. */
.closing { border-top: 1px solid var(--on-ink-line); min-height: calc(100svh - 124px); padding-block: 64px; display: flex; align-items: center; }
.closing > .wrap { width: 100%; }
.closing-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.closing h2 { font-size: clamp(3rem, 6.6vw, 6.2rem); }
.closing-side { display: grid; gap: 28px; }
.closing-side .small { color: var(--on-ink-muted); font-size: .95rem; }
.closing-side .small a { color: var(--on-ink); }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--on-ink-line); color: var(--on-ink-faint); font-size: .88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { text-decoration: none; color: var(--on-ink-muted); }
.site-footer a:hover { color: var(--on-ink); }

/* ---------- Hero headline, word by word ---------- */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .14em 0; margin: 0 -.08em -.14em 0; }
[data-split] .w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  [data-split] .w > span { transform: translateY(112%); animation: word-up 1.1s var(--ease) forwards; animation-delay: calc(.1s + var(--i) * 70ms); }
}
@keyframes word-up { to { transform: none; } }

/* ---------- Story thread: a spark travels down the timeline as you read ---------- */
.timeline-wrap { position: relative; padding-left: clamp(28px, 4vw, 56px); }
.thread { position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--on-bone-line); }
.thread i { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--accent-ink); }
.thread b {
  position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 24px 4px color-mix(in srgb, var(--accent) 45%, transparent);
}
.js .timeline .year { color: color-mix(in srgb, var(--on-bone) 22%, transparent); transition: color .6s var(--ease); }
.js .timeline li.is-lit .year { color: var(--on-bone); }
.js .timeline li.is-lit:last-child .year { color: var(--accent-ink); }

/* ---------- Belief spotlight ---------- */
.beliefs li { position: relative; overflow: hidden; }
.beliefs li > * { position: relative; }
.beliefs li::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.beliefs li:hover::before { opacity: 1; }
.beliefs li .num { display: inline-flex; align-items: center; gap: 8px; }
.beliefs li .num::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .4s var(--ease); }
.beliefs li:hover .num::before { transform: scale(1); }

/* ---------- Phones lean toward the cursor ---------- */
.phones[data-tilt] { transform-style: preserve-3d; transition: transform .7s var(--ease), opacity 1s var(--ease); }
.phones[data-tilt] .phone:nth-child(2) { transform: translateZ(60px); }

/* ---------- Closing: scattered points gather into the Spark ---------- */
.closing-copy { display: grid; gap: clamp(28px, 4vw, 44px); }
.gather { width: 100%; max-width: min(440px, 54svh); aspect-ratio: 1; justify-self: end; }

/* ---------- Film grain ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); }
.lost h1 { font-size: clamp(3rem, 9vw, 7rem); margin: 20px 0 24px; }
.lost .lede { margin: 0 auto 36px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero .rise { animation: rise 1.2s var(--ease) both; animation-delay: var(--d, 0s); }
}
@keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .lead-grid, .closing-grid { grid-template-columns: 1fr; }
  .story-intro .pull { justify-self: start; text-align: left; }
  .phones { height: 560px; max-width: 520px; width: 100%; margin-inline: auto; }
  .gather { justify-self: center; max-width: 340px; }
  .beliefs { grid-template-columns: 1fr 1fr; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .numbers > div:nth-child(n+3) { border-top: 1px solid var(--on-ink-line); }
}
@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 12px; }
  .beliefs { grid-template-columns: 1fr; }
  .beliefs li { min-height: 0; }
  .beliefs h3 { margin-top: 18px; }
  .pillars { grid-template-columns: 1fr; }
  .phones { height: 440px; }
  .phone { border-radius: 26px; padding: 5px; }
  .phone img { border-radius: 22px; }
  .numbers > div { padding-right: 12px; }
  .numbers > div + div { padding-left: 16px; }
  .numbers > div:nth-child(3) { padding-left: 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
