/* ─── Tokens ────────────────────────────────────────────────── */
:root {
  --ink:        #0E1117;
  --ink-2:      #161A22;
  --ivory:      #F4EFE6;
  --ivory-2:    #EDE7DA;
  --sandstone:  #B79268;
  --sandstone-2:#8E6E4D;
  --ash:        #5C5F66;
  --ash-2:      #8A8C92;
  --line-dark:  rgba(244, 239, 230, 0.10);
  --line-light: rgba(14, 17, 23, 0.12);

  --ff-display: 'Geist', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
  --ff-body:    'Geist', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
  --ff-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --container: 1280px;
  --pad-x: clamp(20px, 4vw, 48px);

  --section-y: clamp(96px, 12vw, 160px);
  --section-y-tight: clamp(64px, 8vw, 112px);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ─── Reset / base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Selection */
::selection { background: var(--sandstone); color: var(--ink); }

/* Grain overlay everywhere (subtle) */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: multiply;
  z-index: 999;
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

.hairline {
  border: 0;
  height: 1px;
  background: var(--line-light);
  margin: 0;
  width: 100%;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-light);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.wordmark {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.wordmark__t { font-style: normal; font-size: 12px; line-height: 1; }
.wordmark__rule {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--sandstone);
}
.wordmark__rest { font-family: inherit; letter-spacing: inherit; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav a { color: var(--ash); transition: color .2s var(--ease); position: relative; }
.nav a:hover { color: var(--ink); }
.nav a:not(.nav__cta)::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--sandstone);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s var(--ease);
}
.nav a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta {
  padding: 6px 12px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--ivory); }

@media (max-width: 720px) {
  .nav a:not(.nav__cta) { display: none; }
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(72px, 10vw, 128px) clamp(48px, 6vw, 80px);
  background: var(--ivory);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
}

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0 0 32px 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--sandstone);
}

.display {
  font-family: var(--ff-display);
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0;
  font-feature-settings: 'ss01', 'cv11';
}
.display em {
  font-style: normal;
  font-weight: 300;
  color: var(--sandstone-2);
}
.nowrap { white-space: nowrap; }
@media (max-width: 720px) {
  .nowrap { white-space: normal; }
}

h1.display {
  font-size: clamp(38px, 4.8vw, 68px);
  margin-bottom: 32px;
}

.lede {
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.45;
  color: var(--ash);
  max-width: 44ch;
  margin: 0 0 40px 0;
  letter-spacing: -0.005em;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease), gap .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--sandstone);
  transform: translateX(-101%);
  transition: transform .4s var(--ease);
  z-index: 0;
}
.cta > * { position: relative; z-index: 1; }
.cta:hover { gap: 18px; color: var(--ink); }
.cta:hover::before { transform: translateX(0); }
.cta__arrow { transition: transform .25s var(--ease); }
.cta:hover .cta__arrow { transform: translateX(3px); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.cta--ghost::before { background: var(--ink); }
.cta--ghost:hover { color: var(--ivory); }

/* Hero frame (video) */
.hero__frame { display: block; }
.frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  overflow: hidden;
  border: 1px solid var(--ink);
}
@media (max-width: 960px) {
  .frame { aspect-ratio: 16 / 9; }
}
.frame__video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05) brightness(0.85);
}
.frame__grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.45;
}
.frame__corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--ivory);
  border-style: solid; border-width: 0;
}
.frame__corner--tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.frame__corner--tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.frame__corner--bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.frame__corner--br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }

.frame__meta {
  position: absolute;
  left: 16px; bottom: 16px; right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ivory);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.frame__dot {
  width: 6px; height: 6px;
  background: var(--sandstone);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--sandstone);
  animation: pulse 2.4s var(--ease) infinite;
}
.frame__sep { opacity: 0.4; }
.frame__ts { margin-left: auto; opacity: 0.7; font-variant-numeric: tabular-nums; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--sandstone) 60%, transparent); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0   transparent; }
}

/* Metrics under hero */
.hero__metrics { margin-top: clamp(48px, 6vw, 96px); }
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  padding: 24px 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-right: 1px solid var(--line-light);
  padding-inline: 16px;
}
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 720px) {
  .metric { padding-inline: 12px; }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid var(--line-light); }
}
.metric__num {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.metric__lbl {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
}

/* ─── Section common ────────────────────────────────────────── */
section[id] { padding-block: var(--section-y); scroll-margin-top: 80px; }

.section-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.section-tag::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--sandstone);
  display: inline-block;
}

.h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  margin: 28px 0 0 0;
  max-width: 22ch;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.body {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--ash);
  max-width: 60ch;
  margin: 28px 0 0 0;
  font-weight: 400;
}

/* ─── About ─────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 960px) { .about__grid { grid-template-columns: 1fr; } }

/* ─── Build (capabilities) ──────────────────────────────────── */
.build__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 960px) { .build__grid { grid-template-columns: 1fr; } }
.build__heading { position: sticky; top: 88px; }
@media (max-width: 960px) { .build__heading { position: static; } }

.rows {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--line-light);
}
.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-light);
  position: relative;
  transition: padding-left .35s var(--ease);
}
.row::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  width: 0; height: 1px;
  background: var(--sandstone);
  transform: translateY(-50%);
  transition: width .35s var(--ease);
}
.row:hover { padding-left: 16px; }
.row:hover::before { width: 16px; }
.row:hover .row__title { color: var(--sandstone-2); }

.row__num {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}
.row__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.row__desc {
  font-size: 16px;
  color: var(--ash);
  margin: 0;
  max-width: 48ch;
}
@media (max-width: 720px) {
  .row { grid-template-columns: 40px 1fr; row-gap: 8px; }
  .row__desc { grid-column: 1 / -1; padding-left: 64px; }
}

/* ─── Why us ────────────────────────────────────────────────── */
.why__heading { max-width: 720px; margin-bottom: 80px; }
.why__heading .h2 { margin-top: 24px; max-width: 16ch; }

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
@media (max-width: 960px) { .proof { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .proof { grid-template-columns: 1fr; } }

.proof__item {
  padding: 40px 24px;
  border-right: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proof__item:last-child { border-right: 0; }
@media (max-width: 960px) {
  .proof__item:nth-child(2n) { border-right: 0; }
  .proof__item:nth-child(-n+2) { border-bottom: 1px solid var(--line-light); }
}
@media (max-width: 520px) {
  .proof__item { border-right: 0; border-bottom: 1px solid var(--line-light); }
  .proof__item:last-child { border-bottom: 0; }
}

.proof__num {
  font-family: var(--ff-display);
  font-weight: 200;
  font-size: clamp(64px, 7vw, 96px);
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
}
.proof__unit {
  font-family: var(--ff-mono);
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sandstone-2);
  font-weight: 400;
}
.proof__lbl {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ash);
  max-width: 26ch;
}

/* ─── Unimatch + Seal ───────────────────────────────────────── */
.unimatch {
  background: var(--ink);
  color: var(--ivory);
}
.unimatch .section-tag { color: var(--ash-2); }
.unimatch .h2 { color: var(--ivory); }
.unimatch .body { color: rgba(244, 239, 230, 0.8); }
.unimatch .hairline { background: var(--line-dark); }

.unimatch__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
@media (max-width: 960px) {
  .unimatch__grid { grid-template-columns: 1fr; }
}

.seal-link {
  margin-top: 40px;
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sandstone);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sandstone);
  transition: color .2s var(--ease), letter-spacing .25s var(--ease);
}
.seal-link:hover {
  color: var(--ivory);
  letter-spacing: 0.26em;
  border-bottom-color: var(--ivory);
}

.seal {
  position: relative;
  display: block;
  width: clamp(240px, 30vw, 360px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  color: var(--ivory);
  transition: color .3s var(--ease);
}
.seal::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--sandstone);
  opacity: 0.55;
}
.seal::after {
  content: '';
  position: absolute; inset: 6%;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--sandstone) 70%, transparent);
  opacity: 0.5;
}
.seal__ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  animation: seal-spin 60s linear infinite;
  color: var(--sandstone);
}
.seal:hover .seal__ring { animation-duration: 14s; color: var(--ivory); }

.seal__core {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ivory);
  box-shadow:
    0 0 0 1px var(--sandstone),
    0 0 0 6px var(--ink),
    0 0 0 7px var(--sandstone),
    inset 0 0 24px rgba(0,0,0,0.06);
}
.seal__core img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8%;
}

.seal__hint {
  position: absolute;
  bottom: -32px; left: 0; right: 0;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash-2);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.seal:hover .seal__hint { opacity: 1; }

@keyframes seal-spin {
  to { transform: rotate(360deg); }
}

/* ─── Contact ───────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 960px) { .contact__grid { grid-template-columns: 1fr; } }

.contact__heading .h2 { max-width: 14ch; }

.contact__list { margin: 0; padding: 0; }
.contact__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line-light);
  align-items: baseline;
}
.contact__row:last-child { border-bottom: 1px solid var(--line-light); }
.contact__row dt {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
}
.contact__row dd {
  margin: 0;
  font-family: var(--ff-body);
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink);
}
.contact__row dd a { border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.contact__row dd a:hover { border-bottom-color: var(--sandstone); }

.contact__primary {
  font-family: var(--ff-display);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(26px, 2.6vw, 34px) !important;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--ash-2);
  padding-block: 32px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.footer__mark { color: var(--ivory); }

/* ─── Reveal animation ─────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
