/* ============================================================
   Sataxi Labs - design system
   Reference: a high-end financial publication crossed with a
   spare architecture portfolio. Authoritative, hairline-ruled,
   text-forward. No shadows. No gradients. Radius 0.
   ============================================================ */

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

:root {
  /* Palette - Option A, dark refined */
  --bg:        #0C0C0A;   /* warm near-black */
  --surface:   #141412;   /* cards, recessed sections */
  --text:      #F0EDE6;   /* warm off-white */
  --text-2:    #7A7870;   /* muted warm grey, supporting copy */
  --gold:      #B8942A;   /* instrument-panel gold */
  --gold-soft: rgba(184,148,42,0.34);
  --green:     #4A7C59;   /* "in production" only */
  --border:    rgba(240,237,230,0.10);
  --border-2:  rgba(240,237,230,0.18);

  /* Type */
  --display: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  /* Layout */
  --maxw: 1440px;
  --gutter: clamp(24px, 5.5vw, 80px);
  --section-y: clamp(80px, 11vw, 120px);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--bg); }

a { color: inherit; }

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

/* Shared section rhythm */
section { padding-block: var(--section-y); }
.ruled { border-top: 0.5px solid var(--border); }

/* ---- Type primitives -------------------------------------- */
.eyebrow, .section-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--text);
  max-width: 40ch;
}

.section-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 62ch;
}
.section-body.muted { color: var(--text-2); }
.section-body + .section-body { margin-top: 1.5rem; }

/* ---- NAV --------------------------------------------------- */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  border-bottom: 0.5px solid var(--border);
  background: rgba(12,12,10,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  color: var(--gold) !important;
  border: 0.5px solid var(--gold-soft);
  padding: 9px 16px;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--gold); color: var(--bg) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); }

/* ---- Buttons ---------------------------------------------- */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border: 0.5px solid var(--gold);
}
.btn-primary:hover { transform: translateY(-1px); background: #c9a338; border-color: #c9a338; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 0.5px solid var(--border-2);
}
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ---- HERO -------------------------------------------------- */
.hero {
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-block: 132px 96px;
  overflow: hidden;
}
.hero .wrap { width: 100%; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,237,230,0.035) 0.5px, transparent 0.5px),
    linear-gradient(90deg, rgba(240,237,230,0.035) 0.5px, transparent 0.5px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 100%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 100%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-headline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.8rem, 7.2vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 54ch;
  margin-bottom: 40px;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

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

/* ---- POSITIONING ------------------------------------------ */
.positioning-statement {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 20ch;
  margin-bottom: 64px;
}

/* ---- FUNNEL STRIP ----------------------------------------- */
.funnel { border-block: 0.5px solid var(--border); }
.funnel .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.funnel-item { padding: 8px 48px; border-left: 0.5px solid var(--border); }
.funnel-item:first-child { padding-left: 0; border-left: none; }
.funnel-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.funnel-text {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.4;
  color: var(--text);
}

/* ---- SERVICE ---------------------------------------------- */
.service-head { max-width: 64ch; margin-bottom: 56px; }
.service-head .section-title { margin-bottom: 24px; }

.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--border);
  gap: 1px;
  border: 0.5px solid var(--border);
}
.stage-card { background: var(--bg); padding: clamp(32px, 4vw, 56px); }
.stage-card:nth-child(2) { background: var(--surface); }
.stage-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.stage-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  margin-bottom: 8px;
}
.stage-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.stage-desc { font-size: 1.0625rem; line-height: 1.7; color: var(--text); }

/* Capabilities */
.cap-head { margin-top: clamp(72px, 9vw, 104px); margin-bottom: 48px; }
.cap-head .section-tag { margin-bottom: 16px; }
.cap-head .section-title { font-size: clamp(1.6rem, 3vw, 2.25rem); }

/* Capabilities as a spectrum: two poles on one axis */
.spectrum-track {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, var(--gold) 100%);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.spectrum-node {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
}
.spectrum-node.start { left: 0;   background: var(--bg); border: 1px solid var(--border); }
.spectrum-node.end   { left: 100%; background: var(--gold); }

.spectrum-poles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(48px, 10vw, 140px);
}
.pole.start { text-align: left; }
.pole.end   { text-align: right; }
.pole.end .cap-desc { margin-left: auto; }

.pole-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 18px;
}
.cap-letter {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
}
.cap-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.15;
  margin-bottom: 14px;
}
.cap-desc { font-size: 1rem; line-height: 1.7; color: var(--text-2); }

.service-cta { margin-top: 56px; }

/* ---- THINKING ---------------------------------------------- */
.thinking-head { max-width: 60ch; margin-bottom: 40px; }
.thinking-head .section-title { margin-bottom: 24px; }

.essay-list { border-top: 0.5px solid var(--border); }
.essay-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: clamp(20px, 4vw, 48px);
  padding: 36px 8px;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  transition: padding-left 0.25s ease, background 0.25s ease;
}
.essay-row:hover { background: var(--surface); padding-left: 24px; }
.essay-num { font-family: var(--mono); font-size: 13px; color: var(--gold); letter-spacing: 0.08em; }
.essay-title {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.15;
  margin-bottom: 10px;
}
.essay-dek { display: block; font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); max-width: 70ch; }
.essay-arr { align-self: center; font-size: 1.4rem; color: var(--text-2); transition: transform 0.2s, color 0.2s; }
.essay-row:hover .essay-arr { color: var(--gold); transform: translateX(4px); }

/* ---- ABOUT ------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-head .section-title { margin-bottom: 28px; }
.about-sub {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 42ch;
  margin-bottom: 36px;
}
.arc { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.arc li {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.arc li::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  display: block;
  margin-left: 4px;
}
.about-body .section-body + .section-body { margin-top: 1.5rem; }

/* ---- CTA / CONTACT ---------------------------------------- */
.cta { border-top: 0.5px solid var(--border); }
.cta .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
}
.cta-book, .cta-news { background: var(--bg); padding: clamp(40px, 6vw, 88px); }
.cta-book {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cta-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 8px 0 20px;
}
.cta-sub { color: var(--text-2); max-width: 38ch; margin: 0 auto 36px; font-size: 1.0625rem; line-height: 1.6; }

.cta-news { display: flex; flex-direction: column; justify-content: center; }
.news-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 16px;
}
.news-body { color: var(--text-2); max-width: 44ch; margin-bottom: 28px; font-size: 1.0625rem; line-height: 1.6; }
.news-form { display: flex; gap: 12px; flex-wrap: wrap; max-width: 460px; }
.news-input {
  flex: 1;
  min-width: 220px;
  background: transparent;
  border: 0.5px solid var(--border-2);
  border-radius: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 16px;
  transition: border-color 0.2s;
}
.news-input-full { flex-basis: 100%; }
.news-input::placeholder { color: var(--text-2); }
.news-input:focus { outline: none; border-color: var(--gold); }
.news-status {
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 16px;
  min-height: 1.2em;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.news-status.ok { color: var(--green); }
.news-status.err { color: #C2724B; }

/* ---- FOOTER ------------------------------------------------ */
footer { border-top: 0.5px solid var(--border); padding-block: 44px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-family: var(--mono); font-size: 12px; color: var(--text-2); letter-spacing: 0.06em; }

/* ---- ESSAY PAGES ------------------------------------------ */
.essay-page { padding-top: 88px; }
.essay-wrap { max-width: 680px; margin-inline: auto; padding: clamp(48px, 7vw, 88px) var(--gutter) 32px; }
.essay-back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.essay-back:hover { color: var(--gold); }
.essay-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 40px 0 20px;
}
.essay-h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}
.essay-lede {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 0.5px solid var(--border);
}
.essay-body p { font-size: 1.1875rem; line-height: 1.78; color: var(--text); margin-bottom: 1.6rem; }
.essay-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 48px 0 20px;
}
.essay-body .pull {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--text);
  border-left: 2px solid var(--gold);
  padding-left: 28px;
  margin: 44px 0;
}
.essay-foot { margin-top: 56px; padding-top: 40px; border-top: 0.5px solid var(--border); }
.essay-foot .kicker { color: var(--text-2); font-size: 1.0625rem; line-height: 1.6; margin-bottom: 28px; max-width: 60ch; }
.essay-next { margin-top: 28px; display: flex; gap: 24px; flex-wrap: wrap; }
.essay-next a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.essay-next a:hover { color: var(--gold); }

/* ---- Reveal (imperceptible, once) -------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

.fade-up { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.18s; }
.delay-3 { animation-delay: 0.32s; }
.delay-4 { animation-delay: 0.46s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .fade-up { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 32px;
    background: rgba(12,12,10,0.98);
    backdrop-filter: blur(16px);
    border-left: 0.5px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.28s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 18px; }
  .nav-toggle { display: flex; z-index: 101; }

  .funnel .wrap { grid-template-columns: 1fr; }
  .funnel-item { padding: 0; border-left: none; border-top: 0.5px solid var(--border); padding-top: 32px; }
  .funnel-item:first-child { border-top: none; padding-top: 0; }
  .funnel-item + .funnel-item { margin-top: 32px; }
  .stage-grid { grid-template-columns: 1fr; }
  .spectrum-track { display: none; }
  .spectrum-poles { grid-template-columns: 1fr; row-gap: 40px; }
  .pole.end { text-align: left; }
  .pole.end .cap-desc { margin-left: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .cta .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .essay-arr { display: none; }
}
