/* Ear to Eye — site for eartoeye.com (landing, support, privacy, terms, 404).
   Same font pair as rick3.dev (Instrument Serif + DM Sans); palette pulled
   from the app itself: deep navy, glass panels, iOS-blue highlight.
   Font sizes are in rem so the reader's own browser text size scales the page.
   Text colors on --bg (#070a12): --text 16.7:1, --dim 7.8:1, --faint 5.9:1,
   --accent 9.6:1 (all stay above 4.5:1 on the raised panels too). */

:root {
  --bg: #070a12;
  --bg-raise: rgba(255, 255, 255, 0.04);
  --bg-raise-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.36);
  --text: #e8ecf4;
  --dim: #9aa3b5;
  --faint: #848da0;
  --accent: #8db8e8;
  --accent-deep: #4a7fc0;
  --warm: #d9a06b;
  --live: #7ec9a0;
  --serif: "Instrument Serif", "New York", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Soft radial glow behind the hero, echoing the app's bottom glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% -5%, rgba(74, 127, 192, 0.16), transparent 70%),
    radial-gradient(50% 35% at 50% 105%, rgba(74, 127, 192, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Links inside running text are underlined, so they don't rely on color alone. */
.lede a,
.facts a,
.notes a,
.why-works a,
.prose p a,
.prose li a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* One visible focus style for everything you can tab to. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 18px 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}
.mark .dim { color: var(--faint); }
.mark:hover { text-decoration: none; color: var(--accent); }
.mark-icon {
  width: 28px;
  height: 28px;
  border-radius: 22%;
  flex: none;
  display: block;
}

.top-nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 0.9375rem; }
.top-nav a { color: var(--dim); padding: 10px 0; }
.top-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 32px 0 12px;
}

.app-icon {
  width: 108px;
  height: 108px;
  border-radius: 24%;
  box-shadow: 0 8px 40px rgba(74, 127, 192, 0.35);
  margin-bottom: 24px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.5rem + 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.3125rem, 1rem + 1.4vw, 1.6875rem);
  color: var(--dim);
  margin: 14px auto 0;
  max-width: 560px;
  line-height: 1.35;
}
.tagline em { color: var(--accent); font-style: italic; }

.audience {
  max-width: 34em;
  margin: 16px auto 0;
  font-size: 1.0625rem;
  color: var(--text);
}

.status-pill {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raise);
  color: var(--dim);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-pill .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warm);
  margin-right: 8px;
  vertical-align: 1px;
}
/* Shipped: the pending amber dot turns live green */
.status-pill.live { color: var(--text); }
.status-pill.live .dot {
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(126, 201, 160, 0.18);
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* Apple's official App Store badge — artwork is used unmodified
   (min 40px tall; clear space >= 1/4 badge height, provided by the row gap). */
.store-badge { display: inline-flex; align-items: center; }
.store-badge:hover { text-decoration: none; }
.store-badge img { display: block; height: 48px; width: auto; }
.get-row { margin: 26px 0 26px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(180deg, #3f72b0, #35629c); /* white text >= 4.9:1 */
  color: #fff;
  box-shadow: 0 4px 24px rgba(74, 127, 192, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-raise-2); }

/* ---------- buying facts (under each App Store badge) ---------- */

.facts { margin-top: 14px; }
.facts-list {
  list-style: none;
  font-size: 0.9375rem;
  color: var(--dim);
}
.facts-list li { display: inline; white-space: nowrap; }
/* Separator dots sit after each item, so a wrapped line never starts with one;
   the "/ ''" alt text keeps screen readers from reading them out. */
.facts-list li:not(:last-child)::after {
  content: "·";
  content: "·" / "";
  margin: 0 0.2em 0 0.45em;
  color: var(--faint);
}
.facts-platforms {
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--faint);
}

.buy {
  margin-top: 36px;
  padding: 26px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raise);
  text-align: center;
}
.buy .store-badge { justify-content: center; }

/* ---------- live demo ---------- */

.demo {
  margin: 44px auto 0;
  max-width: 640px;
}

.demo-scenario {
  text-align: center;
  color: var(--dim);
  font-size: 1rem;
  margin-bottom: 12px;
}
.demo-scenario strong { color: var(--text); font-weight: 600; }

.demo-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 60%),
    var(--bg-raise);
  padding: 66px 20px 50px;
  overflow: hidden;
}

.demo-label {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

/* The fixed spot. Its height holds two lines so a long phrase that wraps on a
   narrow phone doesn't make the page jump. */
.rsvp-word {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.25rem + 4vw, 3.625rem);
  line-height: 1.15;
  min-height: 2.4em;
}
.demo-stage.is-phrase .rsvp-word { font-size: clamp(2rem, 1.1rem + 3.6vw, 3.375rem); }

.rsvp-phrase { text-align: center; }

/* One word: the marked letter sits at the exact centre (the two halves share
   the rest of the line equally) and is shown by color, an underline, and a
   tick above and below. */
.rsvp-line {
  display: flex;
  align-items: baseline;
  width: 100%;
  white-space: pre;
}
.rsvp-pre  { flex: 1 1 0; text-align: right; }
.rsvp-post { flex: 1 1 0; text-align: left; }
.rsvp-orp {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
}
.rsvp-line { position: relative; }
.rsvp-line::before,
.rsvp-line::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--accent);
}
.rsvp-line::before { top: -20px; }
.rsvp-line::after { bottom: -20px; }

.rsvp-hint {
  font-family: var(--sans);
  font-size: 1.125rem;
  color: var(--dim);
}

/* Controls: at least 44px tall, 16px text. */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.ctl {
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-raise-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.ctl:hover { background: rgba(255, 255, 255, 0.12); }
.ctl-play { min-width: 96px; }

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-raise);
}
.seg .ctl {
  border: 0;
  background: transparent;
  color: var(--dim);
  font-weight: 500;
}
.seg .ctl:hover { color: var(--text); }
.seg .ctl[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.demo-script {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raise);
  padding: 18px 22px 20px;
}
.demo-script-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.demo-script-text p {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.4;
  color: var(--text);
}
.demo-script-text p + p { margin-top: 8px; }
/* The phrase on screen right now, like the app's transcript highlight */
.demo-script-text .is-now {
  background: rgba(141, 184, 232, 0.22);
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.demo-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--dim);
}

/* No-JavaScript fallback, shown only inside <noscript> in the demo stage.
   (Reduced motion is handled in app.js: a Play button and the full text.) */
.demo-static {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1rem + 2vw, 2rem);
  text-align: center;
  color: var(--text);
  line-height: 1.4;
}

/* ---------- sections ---------- */

section { padding: 64px 0 0; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.875rem, 1.25rem + 2.5vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 18px;
}

.lede {
  color: var(--dim);
  max-width: 640px;
  font-size: 1.125rem;
}
.lede + .lede { margin-top: 14px; }
.lede strong { color: var(--text); font-weight: 600; }

.section-note {
  color: var(--dim);
  font-size: 0.9375rem;
  margin-top: -6px;
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.step {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raise);
  padding: 24px 22px;
}
.step .num {
  font-family: var(--serif);
  font-size: 1.875rem;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 1rem; color: var(--dim); }

/* screenshots: a wrapping grid, no sideways scrolling */
.shots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.shot { min-width: 0; }
.shot a { display: block; border-radius: 22px; }
.shot a:hover { text-decoration: none; }
.shot img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  display: block;
}
.shot a:hover img { border-color: var(--line-strong); }
.shot figcaption {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--dim);
  margin-top: 10px;
  line-height: 1.35;
}

/* feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raise);
  padding: 24px 22px;
}
/* A lone card on the last row spans it instead of sitting in a corner */
.feature:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.feature h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 7px; }
.feature h3 .glyph { color: var(--accent); margin-right: 8px; }
.feature p { font-size: 1rem; color: var(--dim); }

/* scrolling captions vs Ear to Eye */
.compare {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-raise);
  font-size: 1rem;
  line-height: 1.5;
}
.compare th {
  text-align: left;
  font-weight: 600;
  padding: 14px 18px;
  background: var(--bg-raise-2);
  color: var(--dim);
}
.compare th:last-child { color: var(--accent); }
.compare td {
  vertical-align: top;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--dim);
}
.compare td:last-child,
.compare th:last-child { border-left: 1px solid var(--line); }
.compare td:last-child { color: var(--text); }
.compare-note { margin-top: 20px; }

/* "Why this works" */
.why-works {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raise);
  max-width: 680px;
}
.why-works summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}
.why-works summary::-webkit-details-marker { display: none; }
.why-works summary::before {
  content: "";
  flex: none;
  border-left: 8px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: transform 0.15s ease;
}
.why-works[open] summary::before { transform: rotate(90deg); }
.why-works summary:hover { color: var(--accent); }
.why-works p {
  padding: 0 20px;
  color: var(--dim);
}
.why-works p + p { margin-top: 12px; }
.why-works p:last-child { padding-bottom: 20px; }
.why-works strong { color: var(--text); font-weight: 600; }

/* honest notes */
.notes {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  border-radius: 14px;
  background: var(--bg-raise);
  padding: 22px 26px;
  font-size: 1rem;
  color: var(--dim);
}
.notes strong { color: var(--text); }
.notes p + p { margin-top: 10px; }

/* prose pages (support / privacy / terms / 404) */
.prose { max-width: 680px; padding-top: 40px; }
.prose h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3rem); margin-bottom: 8px; }
.prose .updated { color: var(--faint); font-size: 0.9375rem; margin-bottom: 34px; }
.prose h2 { font-size: 1.6875rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--dim); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 24px; margin-top: 10px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose .card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raise);
  padding: 20px 24px;
  margin: 22px 0;
}

/* ---------- footer ---------- */

footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  font-size: 0.9375rem;
  color: var(--faint);
}
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { color: var(--dim); }
footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .steps, .features { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .app-icon { width: 88px; height: 88px; margin-bottom: 20px; }
  .top { gap: 4px 12px; }
  .mark { gap: 8px; }
  .top-nav { gap: 0 14px; font-size: 0.875rem; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
  /* 5 shots in 2 columns: centre the odd one out */
  .shot:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 8px);
  }
  .compare th, .compare td { padding: 12px; }
  .demo-stage { padding: 62px 14px 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
