/* ==========================================================
   Unison — landing page
   ========================================================== */

:root {
  --cream: #F8F5ED;
  --cream-deep: #F0EBDF;
  --ink: #1B1B19;
  --ink-soft: #57544C;
  --ink-faint: #8E897D;
  --rule: rgba(27, 27, 25, 0.14);
  --mint: #9FE3C1;
  --mint-glow: #6EE0A8;
  --green-deep: #1D6A4A;   /* text-safe green on cream */

  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

:focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 14vw, 180px) var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark { position: relative; width: 22px; height: 14px; }
.brand-mark i {
  position: absolute; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint-glow);
  box-shadow: 0 0 8px var(--mint-glow);
}
.brand-mark i:nth-child(1) { left: 0; }
.brand-mark i:nth-child(2) { left: 7px; opacity: .8; }
.brand-mark i:nth-child(3) { left: 14px; opacity: .6; }

.nav-links { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); font-size: .9rem; }
.nav-links a { text-decoration: none; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease) !important;
}
.nav-cta:hover { background: var(--ink); color: var(--cream) !important; }

@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
}

/* ---------- Shared type ---------- */

.eyebrow,
.kicker {
  font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.kicker .num {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.1rem; letter-spacing: 0; text-transform: none;
  color: var(--green-deep);
}
.kicker::after { content: ""; flex: 0 0 56px; height: 1px; background: var(--rule); }

.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: .92; letter-spacing: -0.005em;
  text-transform: uppercase;
}
.display em {
  display: inline-block;
  text-transform: none;
  font-size: .92em; letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink-soft);
}

.section-head { margin-bottom: clamp(48px, 8vw, 96px); }
.section-lede {
  max-width: 34rem; margin-top: 28px;
  font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--ink-soft);
}

/* ---------- Hero ---------- */

.hero {
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.hero-curve {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -1;
}
.hero-curve path {
  fill: none; stroke: var(--ink); stroke-width: 1; opacity: .16;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: draw 2.6s var(--ease) .2s forwards;
}
.hero-curve path + path { opacity: .08; animation-delay: .5s; }
.hero-dot {
  fill: var(--mint-glow);
  filter: drop-shadow(0 0 10px var(--mint-glow));
  opacity: 0; animation: fade-in 1s var(--ease) 1.8s forwards, breathe 3.2s ease-in-out 2.8s infinite;
  transform-box: fill-box; transform-origin: center;
}

.hero .eyebrow { margin-bottom: clamp(24px, 4vw, 40px); }

.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(4.2rem, 15.5vw, 15rem);
  line-height: .86; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero-title .line {
  display: block;
  opacity: 0; transform: translateY(40px);
  animation: rise 1.1s var(--ease) forwards;
}
.hero-title .line:nth-child(2) { animation-delay: .12s; }

.hero-sub {
  margin-top: clamp(8px, 1.5vw, 20px);
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  line-height: 1;
  color: var(--green-deep);
  opacity: 0; animation: fade-in 1.2s var(--ease) .55s forwards;
}

.hero-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-top: clamp(40px, 7vw, 88px);
  padding-top: 28px; border-top: 1px solid var(--rule);
  opacity: 0; animation: fade-in 1s var(--ease) .9s forwards;
}
.hero-lede { max-width: 30rem; color: var(--ink-soft); font-size: clamp(1rem, 1.3vw, 1.1rem); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 500; text-decoration: none;
}
.scroll-cue svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5;
  animation: nudge 2.4s ease-in-out infinite;
}

/* ---------- Visualization ---------- */

.viz { padding-top: clamp(64px, 10vw, 140px); }

.stage-wrap { position: relative; }

.stage {
  position: relative;
  height: clamp(440px, 52vw, 600px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  touch-action: pan-y;
}
@media (max-width: 640px) { .stage { height: 560px; } }

.network { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.link-center {
  fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round;
}
.link-pair {
  fill: none; stroke: var(--green-deep); stroke-width: 1; stroke-dasharray: 2 6; stroke-linecap: round;
}

.node-halo { fill: url(#halo); }
.node-core { fill: var(--mint-glow); filter: url(#glow); }
.node-ring {
  fill: none; stroke: var(--mint-glow); stroke-width: 1;
  transform-box: fill-box; transform-origin: center;
  animation: ripple 2.8s ease-out infinite;
}
.node:nth-child(2) .node-ring { animation-delay: .9s; }
.node:nth-child(3) .node-ring { animation-delay: 1.8s; }

.center-ring { fill: var(--cream); stroke: var(--ink); stroke-width: 1; }
.center-word {
  font-family: var(--font-serif); font-style: italic; font-size: 22px;
  fill: var(--ink); text-anchor: middle;
}

.labels { position: absolute; inset: 0; pointer-events: none; }
.label {
  position: absolute; left: 0; top: 0;
  width: max-content; max-width: 200px;
  will-change: transform, opacity;
}
.label-team {
  display: block;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.label-reading {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.05;
  color: var(--ink);
}
.label-source { display: block; margin-top: 4px; font-size: .75rem; color: var(--ink-faint); }

.stage-caption {
  position: absolute; left: 50%; top: calc(50% + 34px);
  transform: translateX(-50%); white-space: nowrap;
  font-size: .8rem; letter-spacing: .04em; color: var(--ink-soft);
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.stage-caption strong { color: var(--green-deep); font-weight: 600; }

.readout {
  position: absolute; right: 0; bottom: 18px; text-align: right;
}
.readout dt {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.readout dd {
  font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.readout small { font-size: .45em; margin-left: 2px; color: var(--ink-soft); }

/* Slider */

.slider-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(12px, 2vw, 24px);
  margin-top: 36px;
}
.slider-end { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.slider-end:last-child { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--ink); }

.slider {
  position: relative; height: 48px; margin: 0 14px;
  cursor: pointer; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.slider-track {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--rule);
}
.slider-fill {
  position: absolute; left: 0; top: -0.5px; height: 2px; width: 0;
  background: var(--ink);
}
.slider-thumb {
  position: absolute; top: 50%; left: 0;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: grid; place-items: center;
  border-radius: 50%;
  cursor: grab; touch-action: none;
}
.slider-thumb:focus-visible { outline-offset: 0; border-radius: 50%; }
.thumb-core {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 0 0 rgba(110, 224, 168, .5), 0 4px 14px rgba(27,27,25,.12);
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.thumb-core::after {
  content: ""; display: block; width: 6px; height: 6px; margin: 6.5px auto 0;
  border-radius: 50%; background: var(--mint-glow);
}
.slider:hover .thumb-core,
.slider-thumb:focus-visible .thumb-core { transform: scale(1.12); }
.slider.is-dragging .slider-thumb { cursor: grabbing; }
.slider.is-dragging .thumb-core {
  transform: scale(1.2);
  box-shadow: 0 0 0 10px rgba(110, 224, 168, .22), 0 6px 18px rgba(27,27,25,.16);
}
.slider.is-idle .thumb-core { animation: invite 2.2s ease-in-out 1s infinite; }

.slider-hint { margin-top: 10px; text-align: center; font-size: .8rem; color: var(--ink-faint); }

/* Insight */

.insight { min-height: 1px; }
.insight-inner {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--ink);
  animation: reveal .9s var(--ease) both;
}
.insight-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-deep);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint-glow);
  box-shadow: 0 0 10px var(--mint-glow);
  animation: breathe 2.4s ease-in-out infinite;
}
.insight-quote {
  margin-top: 20px; max-width: 22ch;
  font-family: var(--font-serif); font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.04;
  letter-spacing: -0.01em;
}
.insight-quote em { color: var(--green-deep); }

.insight-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(32px, 5vw, 56px);
}
@media (max-width: 760px) { .insight-grid { grid-template-columns: 1fr; } }

.mini-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}
.tag {
  font-size: .65rem; letter-spacing: .08em; font-weight: 500;
  padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-faint);
}
.question { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; }
.copy-btn {
  margin-top: 20px;
  font: inherit; font-size: .85rem; font-weight: 500;
  background: none; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 9px 18px; min-height: 40px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.copy-btn:hover { background: var(--ink); color: var(--cream); }

.evidence li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
  font-size: .92rem; color: var(--ink-soft);
}
.evidence li:first-child { border-top: 1px solid var(--rule); }
.evidence b { color: var(--ink); font-weight: 600; }
.evidence span { margin-left: auto; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Why ---------- */

.reasons li {
  display: grid; grid-template-columns: minmax(80px, 200px) 1fr;
  gap: clamp(16px, 4vw, 64px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--rule);
}
.reasons li:last-child { border-bottom: 1px solid var(--rule); }
.reason-num {
  font-family: var(--font-display); font-size: clamp(3rem, 7vw, 6rem); line-height: .85;
  color: transparent; -webkit-text-stroke: 1px var(--ink);
}
.reasons h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.01em;
}
.reasons p { margin-top: 12px; max-width: 36rem; color: var(--ink-soft); font-size: clamp(1rem, 1.3vw, 1.1rem); }

@media (max-width: 560px) {
  .reasons li { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- How ---------- */

.how-curve {
  position: absolute; left: 0; right: 0; top: 52%; width: 100%; height: 220px;
  pointer-events: none; z-index: -1;
}
.how-curve path {
  fill: none; stroke: var(--green-deep); stroke-width: 1; opacity: .25;
  vector-effect: non-scaling-stroke;
}

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 72px);
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step { position: relative; padding-top: 36px; }
.step-dot {
  position: absolute; top: 0; left: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--mint-glow); box-shadow: 0 0 14px var(--mint-glow);
}
.step::before {
  content: ""; position: absolute; top: 5.5px; left: 22px; right: 0; height: 1px; background: var(--rule);
}
.step-verb {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1; text-transform: uppercase;
}
.step p { margin-top: 14px; color: var(--ink-soft); max-width: 26rem; }

/* ---------- Access ---------- */

.access { text-align: center; padding-bottom: clamp(96px, 14vw, 200px); }
.access-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 11rem); line-height: .88; text-transform: uppercase;
}
.access-title em {
  display: inline-block; text-transform: none; color: var(--green-deep);
  font-size: .9em; line-height: 1.05; letter-spacing: -0.02em;
}
.access-lede { margin: 28px auto 0; max-width: 30rem; color: var(--ink-soft); font-size: 1.1rem; }

.access-form {
  display: flex; gap: 8px;
  max-width: 520px; margin: 44px auto 0;
  padding: 6px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--cream);
  transition: box-shadow .3s var(--ease);
}
.access-form:focus-within { box-shadow: 0 0 0 6px rgba(110, 224, 168, .3); }
.access-form input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; padding: 0 18px; min-height: 48px;
}
.access-form input:focus { outline: none; }
.access-form input::placeholder { color: var(--ink-faint); }
.access-form button {
  font: inherit; font-size: .95rem; font-weight: 500;
  background: var(--ink); color: var(--cream);
  border: 0; border-radius: 999px; padding: 0 24px; min-height: 48px;
  cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s;
}
.access-form button:hover { background: #000; transform: translateY(-1px); }
.access-form.is-invalid { border-color: #A23B2A; }
.access-form.is-done { border-color: var(--green-deep); }

@media (max-width: 480px) {
  .access-form { flex-direction: column; border-radius: 24px; }
  .access-form input { text-align: center; }
}

.form-msg { margin-top: 16px; font-size: .88rem; color: var(--ink-soft); min-height: 1.6em; }
.form-msg.is-error { color: #A23B2A; }
.form-msg.is-success { color: var(--green-deep); font-weight: 500; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  font-size: .8rem; color: var(--ink-faint);
}

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */

@keyframes draw    { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise    { to { opacity: 1; transform: none; } }
@keyframes reveal  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .7; } }
@keyframes ripple  { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes nudge   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes invite  {
  0%, 100% { transform: translateX(0); box-shadow: 0 0 0 0 rgba(110,224,168,.5), 0 4px 14px rgba(27,27,25,.12); }
  50%      { transform: translateX(10px); box-shadow: 0 0 0 8px rgba(110,224,168,0), 0 4px 14px rgba(27,27,25,.12); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .node-ring { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
