/* ==========================================================================
   Eko — site styles
   Edgepoint Software
   --------------------------------------------------------------------------
   Everything the site needs is in this one file. To change a colour across
   the whole site, edit the token in :root below — don't hunt through pages.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Brand palette — from the live app */
  --ink:            #0B1120;   /* dark navy: headers, primary text, dark bands */
  --ink-soft:       #15203a;   /* a half-step up from ink, for layered dark    */
  --teal:           #1BDBDB;   /* primary accent                               */
  --teal-deep:      #0d9488;   /* teal that passes contrast on white           */
  --teal-wash:      #f0fdfa;   /* tinted surface                               */
  --teal-line:      #99f6e4;   /* tinted border                                */
  --purple:         #7c3aed;   /* secondary accent — tips and highlights       */
  --purple-wash:    #faf5ff;
  --purple-line:    #e9d5ff;
  --green:          #16a34a;   /* success / connected                          */
  --red:            #ef4444;   /* error / warning                              */

  --bg:             #ffffff;
  --bg-sunk:        #f8fafc;   /* alternating section wash                     */
  --body:           #1e293b;
  --muted:          #64748b;
  --faint:          #94a3b8;
  --rule:           #e2e8f0;

  /* Type */
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Scale — 1.25 minor third, clamped for small screens */
  --t-hero:  clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem);
  --t-h1:    clamp(2.1rem, 1.5rem + 2.6vw, 3.1rem);
  --t-h2:    clamp(1.55rem, 1.25rem + 1.3vw, 2.1rem);
  --t-h3:    clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --t-lead:  clamp(1.08rem, 1rem + 0.4vw, 1.28rem);
  --t-body:  1.0rem;
  --t-small: 0.875rem;

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band:   clamp(3.5rem, 8vw, 7rem);
  --wide:   1200px;
  --measure: 66ch;

  --radius:    14px;
  --radius-lg: 22px;
}

/* --- Reset ---------------------------------------------------------------- */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }

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

code, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-sunk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* --- Layout --------------------------------------------------------------- */

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

.band { padding-block: var(--band); }
.band--sunk { background: var(--bg-sunk); }
.band--dark { background: var(--ink); color: #cbd5e1; }
.band--dark h1, .band--dark h2, .band--dark h3 { color: #fff; }
.band--tight { padding-block: calc(var(--band) * 0.6); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 0.95fr; }
  .split--narrow-first { grid-template-columns: 0.9fr 1.1fr; }
  .split--flip > :first-child { order: 2; }
}

.stack > * + * { margin-top: 1.1rem; }

/* Two columns of prose should start at the same baseline, not centre on
   each other — centring is only right when one side is an image. */
.split--top { align-items: start; }

/* A self-balancing row for 2–4 short blocks. */
.cols {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  align-items: start;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--body);
}
.band--dark .lead { color: #cbd5e1; }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo svg { width: 1.05em; height: 1.05em; }

.nav { display: flex; align-items: center; gap: 0.35rem; }

.nav a {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}
.nav a:hover { background: var(--bg-sunk); color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--teal);
  border-radius: 0;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 0.5rem 0.7rem;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.7rem 0.25rem; border-radius: 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal); padding-left: 0.75rem; }
}

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

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--ink-soft); color: #fff; }
.btn--accent { background: var(--teal); color: var(--ink); }
.btn--accent:hover { background: #4fe8e8; color: var(--ink); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.band--dark .btn--ghost { border-color: #334155; color: #fff; }
.band--dark .btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

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

.hero {
  background: var(--ink);
  color: #cbd5e1;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero h1 {
  font-size: var(--t-hero);
  color: #fff;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

/* The hero is a dark surface, so body copy and outline buttons need the
   same treatment they get inside .band--dark. */
.hero .lead { max-width: 46ch; color: #cbd5e1; }
.hero p { color: #cbd5e1; }
.hero .btn--ghost { border-color: #334155; color: #fff; background: transparent; }
.hero .btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

/* The hero's one piece of motion: a spoken line resolving into text. */
.dictation {
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.25rem;
}

.dictation__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  flex: none;
}
.dictation__wave span {
  display: block;
  width: 3px;
  height: 20%;
  border-radius: 2px;
  background: var(--teal);
  animation: pulse 1.1s ease-in-out infinite;
}
.dictation__wave span:nth-child(1) { animation-delay: 0s; }
.dictation__wave span:nth-child(2) { animation-delay: 0.12s; }
.dictation__wave span:nth-child(3) { animation-delay: 0.24s; }
.dictation__wave span:nth-child(4) { animation-delay: 0.36s; }
.dictation__wave span:nth-child(5) { animation-delay: 0.18s; }
.dictation__wave span:nth-child(6) { animation-delay: 0.06s; }
.dictation__wave span:nth-child(7) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 100% { height: 18%; opacity: 0.55; }
  50%      { height: 100%; opacity: 1; }
}

.dictation__text {
  font-family: var(--display);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
  font-weight: 500;
  color: var(--teal);
  margin: 0;
}
.dictation__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--teal);
  vertical-align: -0.16em;
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* When the dictation finishes, the wave stands down. */
.dictation[data-state="done"] .dictation__wave span { animation: none; height: 18%; opacity: 0.35; }
.dictation[data-state="done"] .dictation__caret { display: none; }

@media (prefers-reduced-motion: reduce) {
  .dictation__wave span { animation: none; height: 55%; }
  .dictation__caret { display: none; }
}

/* --- Value props ---------------------------------------------------------- */

.props {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .props { grid-template-columns: repeat(3, 1fr); } }

.prop { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.prop h3 { font-size: var(--t-h3); margin-bottom: 0.4rem; }
.prop p { font-size: 0.98rem; color: var(--muted); max-width: 38ch; }

/* --- Steps (How It Works — genuinely sequential, so numbered) ------------- */

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.4rem;
  padding-bottom: 2.4rem;
  position: relative;
}
.step::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  background: var(--teal);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  grid-row: span 2;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 2.9rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--rule);
}
.step h3 { margin-bottom: 0.3rem; font-size: var(--t-h3); align-self: center; }
.step p { grid-column: 2; color: var(--muted); }

/* --- Channel grid --------------------------------------------------------- */

/* Cell borders are drawn by each tile and pulled together with a negative
   margin, so a row that isn't full doesn't leave a coloured gap behind. */
.channels {
  display: grid;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .channels { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .channels { grid-template-columns: repeat(4, 1fr); } }

.channel {
  background: #fff;
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  display: block;
  transition: background-color 0.16s ease;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin: -1px 0 0 -1px;
}
.channel:hover { background: var(--teal-wash); }
.channel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.channel h3 svg { width: 20px; height: 20px; flex: none; color: var(--ink); }
.channel p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* --- Mockup frames -------------------------------------------------------- */

.mock {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.mock img, .mock svg { width: min(100%, 320px); }
.mock figcaption {
  font-size: var(--t-small);
  color: var(--muted);
  text-align: center;
  max-width: 34ch;
}
.band--dark .mock figcaption { color: var(--faint); }

.mock-row {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

/* Placeholder slot — shown until a drawn mockup replaces it. */
.mock--pending {
  width: min(100%, 320px);
  aspect-ratio: 420 / 880;
  border: 2px dashed var(--teal-line);
  border-radius: var(--radius-lg);
  background: var(--teal-wash);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: var(--t-small);
}

/* --- Notes and callouts --------------------------------------------------- */

.note {
  border-left: 3px solid var(--purple);
  background: var(--purple-wash);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: 1.75rem;
}
.note p { max-width: none; }
.note strong { color: var(--purple); }

.note--warn { border-left-color: var(--red); background: #fef2f2; }
.note--warn strong { color: #b91c1c; }

.note--safe { border-left-color: var(--green); background: #f0fdf4; }
.note--safe strong { color: #15803d; }

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

.faq { border-top: 1px solid var(--rule); max-width: 78ch; }

.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
  cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 1.55rem;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > div { padding-bottom: 1.4rem; }
.faq summary:hover { color: var(--teal-deep); }

/* --- Form ----------------------------------------------------------------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--text);
  font-size: 1rem;
  color: var(--body);
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--teal-deep); outline-offset: 1px; }
.field textarea { min-height: 8rem; resize: vertical; }
.field__hint { font-size: var(--t-small); color: var(--muted); margin-top: 0.35rem; }
.hp { position: absolute; left: -9999px; }

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

.foot {
  background: var(--ink);
  color: #94a3b8;
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
  font-size: 0.93rem;
}
.foot a { color: #e2e8f0; text-decoration: none; }
.foot a:hover { color: var(--teal); text-decoration: underline; }

.foot__cols {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid #1e293b;
}
@media (min-width: 760px) { .foot__cols { grid-template-columns: 1.4fr 1fr 1fr; } }

.foot h4 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li + li { margin-top: 0.45rem; }
.foot__base {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
}
.foot .logo { color: #fff; }

/* --- Page head ------------------------------------------------------------ */

.pagehead { padding-block: clamp(2.75rem, 6vw, 4.5rem) 0; }
.pagehead h1 { font-size: var(--t-h1); max-width: 20ch; }
.pagehead .lead { max-width: 56ch; }

.crumb {
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }

/* --- Utility -------------------------------------------------------------- */

.hr { border: 0; border-top: 1px solid var(--rule); margin-block: var(--band); }
.tight { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }
