/* Ecdotic site styles: tokens, base, layout, sections, contact form.
   The replay component lives in replay.css. All colors come from the tokens below. */

:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --card: #ffffff;
  --ink: #15171c;
  --ink-2: #3a3f4a;
  --ink-3: #626873;
  --line: #e0dbd0;
  --line-2: #cdc7ba;

  --accent: #0f6b5f;
  --accent-strong: #0a5249;
  --accent-soft: #ddeee8;
  --accent-on-dark: #7fcfbb;

  --matches: #0f6b5f;
  --matches-soft: #ddeee8;
  --diverged: #9a4312;
  --diverged-line: #b5541b;
  --diverged-soft: #f6e5d8;
  --unknown: #4a566c;
  --unknown-soft: #e5e9f0;

  --dark: #121614;
  --dark-2: #1b211f;
  --on-dark: #eef0ec;
  --on-dark-2: #b9c0bc;

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 64px;

  --shadow-1: 0 1px 2px rgba(21, 23, 28, 0.06), 0 1px 1px rgba(21, 23, 28, 0.04);
  --shadow-2: 0 18px 40px -22px rgba(21, 23, 28, 0.28), 0 2px 6px rgba(21, 23, 28, 0.05);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.08;
  text-wrap: balance;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Not in use, but could be useful for a narrower container in the future. */
.container--narrow {
  max-width: calc(820px + 2 * var(--gutter));
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.fineprint {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- Buttons ---------- */

.button {
  --button-bg: var(--card);
  --button-fg: var(--ink);
  --button-border: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-fg);
  font: 600 1rem/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  color: var(--button-fg);
  border-color: var(--ink-3);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  --button-bg: var(--ink);
  --button-fg: #ffffff;
  --button-border: var(--ink);
}

.button--primary:hover {
  --button-bg: #2a2f37;
  border-color: #2a2f37;
}

.button--quiet {
  --button-bg: transparent;
}

.button--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.button--block {
  width: 100%;
}

.button[disabled] {
  cursor: progress;
  opacity: 0.8;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 239, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -18px rgba(21, 23, 28, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--ink);
  background: rgba(21, 23, 28, 0.05);
}

.nav-list a.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon--close,
.nav-toggle[aria-expanded="true"] .icon--open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon--close {
  display: block;
}

@media (max-width: 880px) {
  .header-inner {
    gap: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(21, 23, 28, 0.45);
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.0625rem;
  }

  .nav-list li:last-child a {
    border-bottom: 0;
  }

  .nav-list a.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 14px;
  }
}

@media (max-width: 400px) {
  .header-actions .button--small {
    padding: 0 12px;
    font-size: 0.875rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }
}

/* ---------- Sections ---------- */

main > section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section--band {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 8px 48px;
}

/* Lift the eyebrow into its own row so the title and intro share a top edge. */
.section-head--split > div {
  display: contents;
}

.section-head--split .eyebrow {
  grid-column: 1 / -1;
}

.section-intro {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 1.125rem;
}

@media (max-width: 820px) {
  .section-head--split {
    grid-template-columns: 1fr;
  }
}

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

.hero {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(16px, 3vw, 28px);
}

.hero .eyebrow {
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.04;
}

.hero-line {
  display: block;
}

.hero-lede {
  max-width: 60ch;
  margin-top: 24px;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions .icon {
  width: 18px;
  height: 18px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.975rem;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts .icon {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

/* ---------- Demo section ---------- */

.section--demo {
  position: relative;
  padding-top: clamp(32px, 4vw, 48px);
  overflow: hidden;
}

.section--demo .section-head {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section--demo .section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.section--demo .section-intro {
  font-size: 1rem;
}

.section--demo::before {
  content: "";
  position: absolute;
  inset: 22% -10% auto;
  height: 70%;
  background: radial-gradient(60% 55% at 50% 45%, rgba(15, 107, 95, 0.14), transparent 70%);
  pointer-events: none;
}

.section--demo .container {
  position: relative;
}

/* ---------- Cards (problem) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.card p {
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Steps (how it works) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px;
  border-top: 3px solid var(--ink);
  border-radius: 4px 4px var(--radius) var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.step-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.step-num {
  font-size: 1.5rem;
  letter-spacing: 0;
  color: var(--ink);
}

.step h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
}

.step p {
  color: var(--ink-2);
}

.result-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 650;
}

.result::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.result--matches {
  background: var(--matches-soft);
  color: var(--matches);
}

.result--diverged {
  background: var(--diverged-soft);
  color: var(--diverged);
}

.result--unknown {
  background: var(--unknown-soft);
  color: var(--unknown);
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Trust ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 32px;
}

.trust-item {
  display: grid;
  align-content: start;
  gap: 10px;
}

.trust-item p {
  color: var(--ink-2);
}

.trust-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.trust-icon .icon {
  width: 22px;
  height: 22px;
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.trust-levels {
  display: grid;
  gap: 12px;
  margin-top: 56px;
}

.trust-levels-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.trust-levels-intro {
  max-width: 62ch;
  margin-bottom: 12px;
  color: var(--ink-2);
}

.founder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: clamp(48px, 7vw, 72px);
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.founder-photo {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), #c8e1d9);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
}

.founder-body {
  display: grid;
  gap: 8px;
}

.founder-body h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
}

.founder-body p {
  max-width: 62ch;
  color: var(--ink-2);
}

.founder-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 600;
  font-size: 0.975rem;
}

@media (max-width: 600px) {
  .founder {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .founder-photo {
    width: 80px;
    height: 80px;
    font-size: 1.6rem;
  }
}

/* ---------- Evidence ledger ---------- */

.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ledger-col {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.ledger-col h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
}

.ledger-col ul {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.ledger-col li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 1rem;
}

.ledger-col li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--line-2);
}

.state {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.state--shown {
  background: var(--matches-soft);
  color: var(--matches);
}

.state--open {
  background: var(--unknown-soft);
  color: var(--unknown);
}

.state--next {
  background: var(--diverged-soft);
  color: var(--diverged);
}

.ledger + .fineprint {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .ledger {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line-2);
}

.faq details {
  border-bottom: 1px solid var(--line-2);
}

.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: transform 0.25s ease;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--accent-strong);
}

.faq details p {
  max-width: 68ch;
  padding: 0 0 24px;
  color: var(--ink-2);
}

/* ---------- Walkthrough + booking ---------- */

.section--walkthrough {
  background: var(--dark);
  color: var(--on-dark);
  background-image:
    radial-gradient(70% 60% at 0% 0%, rgba(127, 207, 187, 0.12), transparent 60%),
    radial-gradient(60% 50% at 100% 100%, rgba(181, 84, 27, 0.12), transparent 60%);
}

.walkthrough-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.walkthrough-copy {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.walkthrough-copy .eyebrow {
  color: var(--accent-on-dark);
}

.walkthrough-copy h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  color: #ffffff;
}

.walkthrough-intro {
  color: var(--on-dark-2);
  font-size: 1.125rem;
}

.expect {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
  counter-reset: expect;
}

.expect li {
  position: relative;
  padding-left: 44px;
  color: var(--on-dark-2);
  counter-increment: expect;
}

.expect li::before {
  content: counter(expect, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-on-dark);
}

.expect strong {
  color: #ffffff;
  font-weight: 600;
}

.booking-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.booking-frame {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
}

.booking-fallback {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
  text-align: center;
}

.booking-fallback a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 900px) {
  .walkthrough-grid {
    grid-template-columns: 1fr;
  }
}

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

.site-footer {
  padding-block: 48px 40px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 10px;
}

.footer-brand p,
.footer-legal {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
