/* Third Layer — landing page
   Ice-blue base, near-black navy ink, electric blue accent. */

/* ---------- Fonts (self-hosted, GDPR-safe) ---------- */
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f2f6fa;
  --bg-raise: #eaf1f7;
  --ink: #071226;
  --ink-soft: #47546b;
  --ink-faint: #8b96a9;
  --accent: #1f5eff;
  --accent-soft: #dbe7ff;
  --dark: #060f22;
  --dark-ink: #eef3fa;
  --dark-ink-soft: #9fb0c9;
  --line: rgba(7, 18, 38, 0.1);

  --font: "Inter", system-ui, -apple-system, sans-serif;

  --text-hero: clamp(2.6rem, 6.5vw, 5.6rem);
  --text-h2: clamp(1.8rem, 3.6vw, 3.2rem);
  --text-h3: clamp(1.15rem, 1.6vw, 1.4rem);
  --text-body: clamp(1rem, 1.15vw, 1.125rem);

  --space-section: clamp(6rem, 12vw, 11rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 76px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
p,
blockquote {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.container--narrow {
  width: min(860px, 100% - 2 * var(--gutter));
}
.section {
  padding-block: var(--space-section);
}
.section__title {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 21ch;
  text-wrap: balance;
}
.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.index {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
}

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__visual { transform: none !important; }
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.pill:hover {
  transform: translateY(-2px);
}
.pill--dark {
  background: var(--ink);
  color: #fff;
}
.pill--dark:hover {
  background: var(--accent);
}
.pill--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}
.pill--ghost:hover {
  border-color: var(--ink);
}
.pill--light {
  background: #fff;
  color: var(--ink);
}
.pill--light:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  z-index: 50;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.header.is-scrolled {
  background: rgba(242, 246, 250, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header__nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  flex: 1;
}
.header__nav--right {
  justify-content: flex-end;
}
.header__nav a:not(.pill) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}
.header__nav a:not(.pill):hover {
  color: var(--ink);
}
.header__logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-mark {
  width: 26px;
  height: auto;
  fill: var(--ink);
  flex: none;
}
.header__wordmark {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

/* Mobile nav */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-btn.is-open span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.menu-btn.is-open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}
.mobile-nav[hidden] {
  display: none;
}
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(242, 246, 250, 0.96);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.mobile-nav a:not(.pill) {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  will-change: transform;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-top: var(--header-h);
  max-width: none;
}
.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.hero__title {
  font-size: var(--text-hero);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 13ch;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 1.75rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
}
.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.hero__scrollcue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 2;
}
.hero__scrollcue span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink-soft);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scrollcue span { animation: none; }
}

/* ---------- Layers ---------- */
.layers__grid {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
}
.layer {
  padding-top: 2rem;
}
.layer h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0.9rem 0 0.6rem;
}
.layer p {
  color: var(--ink-soft);
  max-width: 34ch;
}
.layer--accent {
  position: relative;
}
.layer--accent::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--draw, 1));
  transform-origin: left;
}

/* ---------- Flow ---------- */
.flow {
  background: var(--bg-raise);
}
.flow__inner {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.flow__media {
  position: sticky;
  top: calc(var(--header-h) + 3rem);
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
}
.flow__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.flow__media img:first-child {
  opacity: 1;
}
.flow__steps {
  position: relative;
  display: flex;
  flex-direction: column;
}
.flow-step {
  padding-block: clamp(3.5rem, 8vh, 6rem);
  border-bottom: 1px solid var(--line);
}
.flow-step:last-child {
  border-bottom: 0;
}
.flow__progress {
  display: none;
}

/* Pinned flow (set by JS on desktop without reduced motion) */
@media (min-width: 901px) {
.flow--pinned {
  padding-block: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.flow--pinned .flow__inner {
  margin-top: clamp(1.5rem, 4vh, 3rem);
  align-items: center;
}
.flow--pinned .flow__media {
  position: relative;
  top: auto;
  aspect-ratio: 1;
  max-height: 56vh;
  width: auto;
  max-width: 100%;
  align-self: center;
}
.flow--pinned .flow__steps {
  height: clamp(280px, 44vh, 400px);
  padding-left: 2.25rem;
}
.flow--pinned .flow-step {
  position: absolute;
  inset: 0 0 0 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 0;
  border-bottom: 0;
  opacity: 0;
}
.flow--pinned .flow-step:first-of-type {
  opacity: 1;
}
.flow--pinned .flow__progress {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.flow--pinned .flow__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
}
.flow-step h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.8rem 0 0.7rem;
}
.flow-step p {
  color: var(--ink-soft);
  max-width: 44ch;
}
.flow-step__img {
  display: none;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

/* ---------- Build ---------- */
.build__list {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
}
.build-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 1.5rem 4rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  transition: background-color 0.4s var(--ease);
}
.build-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
  transform: scaleX(var(--draw, 1));
  transform-origin: left;
}
.build-item:hover {
  background: linear-gradient(90deg, transparent, rgba(31, 94, 255, 0.045), transparent);
}
.build-item h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.build-item p {
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ---------- Matters (dark full-bleed) ---------- */
.matters {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
  color: var(--dark-ink);
}
.matters__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.matters__content {
  position: relative;
  z-index: 2;
  padding-block: var(--space-section);
}
.matters h2 {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 24ch;
  text-wrap: balance;
}
.matters p {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--dark-ink-soft);
  max-width: 52ch;
}

/* ---------- Use cases (accordion) ---------- */
.accordion {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.accordion details {
  border-bottom: 1px solid var(--line);
}
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary:hover {
  color: var(--accent);
}
.chev {
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease);
  margin-right: 4px;
}
details[open] .chev {
  transform: rotate(225deg);
}
.accordion__body {
  padding-bottom: 1.6rem;
}
.accordion__body p {
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Founders ---------- */
.founders {
  padding-top: 0;
}
.founders__quote p {
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}
.founders__quote footer {
  margin-top: 1.75rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

/* ---------- CTA ---------- */
.cta {
  background: var(--accent);
  color: #fff;
}
.cta__content {
  padding-block: var(--space-section);
  text-align: left;
}
.cta h2 {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 24ch;
  text-wrap: balance;
}
.cta p {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.82);
}
.cta .pill {
  margin-top: 2.4rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: 3rem;
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-soft);
}
.footer__brand .logo-mark {
  width: 22px;
}
.footer__nav,
.footer__legal {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  color: var(--ink-soft);
}
.footer__nav a:hover,
.footer__legal a:hover {
  color: var(--ink);
}
.footer__legal span {
  color: var(--ink-faint);
}

/* ---------- Legal pages ---------- */
.legal-page {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: var(--space-section);
}
.legal-page h1 {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
}
.legal-page p {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  max-width: 70ch;
}
.legal-note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-raise);
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .flow__inner {
    grid-template-columns: 1fr;
  }
  .flow__media {
    display: none;
  }
  .flow-step__img {
    display: block;
  }
  .flow-step {
    padding-block: 2.5rem;
  }
  .build-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .layers__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .layer {
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--line);
  }
  .layer:last-child {
    border-bottom: 0;
  }
}
@media (max-width: 760px) {
  .header__nav {
    display: none;
  }
  .menu-btn {
    display: flex;
  }
  .header__logo {
    position: static;
    transform: none;
  }
  .header {
    justify-content: space-between;
  }
  .hero {
    align-items: flex-end;
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(242, 246, 250, 0) 28%, rgba(242, 246, 250, 0.85) 72%);
    pointer-events: none;
    z-index: 1;
  }
  .hero__visual {
    object-position: 62% 24%;
  }
  .hero__content {
    padding-bottom: 7rem;
    padding-top: calc(var(--header-h) + 2rem);
  }
  .hero__scrollcue {
    display: none;
  }
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
