/* ==========================================================================
   eSheep Beta landing page
   Mobile-first. Dark purple base, soft pink-purple accent, white text.
   ========================================================================== */

:root {
  --bg: #120727;
  --bg-deep: #0b0418;
  --bg-lift: #1b0d38;
  --text: #ffffff;
  --muted: #c6bad9;
  --muted-soft: #9c8fb4;
  --accent: #c9a4ff;
  --accent-2: #ffa6d5;
  --accent-ink: #170a2c;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --ok: #9ef2c4;
  --err: #ffb4c4;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --pad: clamp(20px, 5vw, 40px);
  --wrap: 1120px;
  --wrap-narrow: 720px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* two static, low-key glows — no animation on purpose */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70ch 50ch at 15% -10%, rgba(201, 164, 255, 0.22), transparent 70%),
    radial-gradient(60ch 45ch at 92% 8%, rgba(255, 166, 213, 0.14), transparent 70%),
    linear-gradient(180deg, #170a33 0%, var(--bg) 38%, var(--bg-deep) 100%);
  pointer-events: none;
}

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

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  font-weight: 650;
  z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

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

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

.site-header {
  padding-block: 18px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand__logo {
  height: 19px;
  width: auto;
  max-width: 170px;
  opacity: 0.92;
}

.brand__word {
  font-size: 1.06rem;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.brand__state {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201, 164, 255, 0.35);
  background: rgba(201, 164, 255, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

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

.hero {
  padding-block: clamp(20px, 5vw, 44px) clamp(36px, 7vw, 72px);
}

.hero__inner {
  max-width: var(--wrap-narrow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  margin: 0 0 clamp(14px, 3vw, 22px);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201, 164, 255, 0.32);
  background: rgba(201, 164, 255, 0.09);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.hero__title {
  margin: 0;
  font-size: clamp(1.95rem, 8.2vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 690;
  max-width: 20ch;
}

.hero__lede {
  margin: clamp(14px, 3vw, 20px) 0 0;
  font-size: clamp(1rem, 3.9vw, 1.19rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}

/* -------------------------------------------------------------------- form */

.form-slot {
  width: 100%;
  margin-top: clamp(20px, 4.5vw, 30px);
}

.beta-form { width: 100%; }

.field__label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: 8px;
}

.field__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 1rem; /* 16px min: stops iOS zoom-on-focus */
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input::placeholder { color: rgba(255, 255, 255, 0.34); }

.input:hover { border-color: rgba(255, 255, 255, 0.2); }

.input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(201, 164, 255, 0.18);
}

.input[aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(255, 180, 196, 0.14);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 680;
  letter-spacing: -0.005em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }

.btn[disabled] {
  cursor: progress;
  opacity: 0.72;
  filter: none;
}

.btn__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(23, 10, 44, 0.3);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  margin: 12px 0 0;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--muted-soft);
  max-width: 52ch;
}

.hint--weak {
  margin-top: 8px;
  font-size: 0.81rem;
  color: rgba(198, 186, 217, 0.62);
}

.hint--warn { color: var(--err); }

.hint strong { color: var(--muted); font-weight: 600; }

/* honeypot: off-screen, never user-visible */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
}

.form-status:empty { display: none; }

.form-status--error {
  color: var(--err);
  background: rgba(255, 120, 150, 0.09);
  border: 1px solid rgba(255, 120, 150, 0.24);
  padding: 11px 14px;
}

.form-status--error .retry {
  color: var(--err);
  font-weight: 650;
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.dev-note {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #ffd28a;
  background: rgba(255, 200, 90, 0.07);
  border: 1px dashed rgba(255, 200, 90, 0.34);
  border-radius: 10px;
  padding: 9px 12px;
}

.dev-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
  color: #ffe1ac;
}

/* ----------------------------------------------------------- success state */

.success {
  border: 1px solid rgba(158, 242, 196, 0.26);
  background: rgba(158, 242, 196, 0.07);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 26px);
}

.success__title {
  margin: 0 0 10px;
  font-size: clamp(1.12rem, 4.4vw, 1.32rem);
  font-weight: 680;
  letter-spacing: -0.015em;
}

.success p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 50ch;
}

.success p:last-of-type { margin-bottom: 0; }

.success strong {
  color: var(--text);
  font-weight: 640;
  word-break: break-all;
}

.success__sender { font-size: 0.87rem; }

/* ------------------------------------------------------------------ legal */

.legal {
  padding-block: clamp(24px, 5vw, 56px) clamp(40px, 8vw, 72px);
}

.legal__wrap {
  max-width: 68ch;
}

.legal__title {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 690;
}

.legal__updated {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted-soft);
}

.legal__lede {
  margin: 20px 0 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
}

.legal h2 {
  margin: clamp(28px, 5vw, 38px) 0 10px;
  font-size: 1.08rem;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.legal p {
  margin: 0 0 12px;
  font-size: 0.96rem;
  line-height: 1.68;
  color: var(--muted);
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.legal li {
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--muted);
}

.legal a { color: var(--accent); }

.legal__back {
  margin-top: clamp(32px, 6vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.92rem;
}

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

.section {
  padding-block: clamp(40px, 9vw, 84px);
  border-top: 1px solid var(--line-soft);
}

.section__title {
  margin: 0;
  font-size: clamp(1.5rem, 5.6vw, 2.3rem);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 680;
  max-width: 24ch;
}

.section__lede {
  margin: 12px 0 0;
  font-size: 1rem;
  color: var(--muted);
  max-width: 46ch;
}

/* ----------------------------------------------------------------- samples */

.samples__grid {
  display: grid;
  gap: clamp(20px, 4vw, 28px);
  margin-top: clamp(22px, 4.5vw, 32px);
}

.sample {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.sample__caption {
  margin-top: 12px;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.sample__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0414;
  border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sample__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0414;
  display: block;
}

/* clear, unmissable play affordance */
.play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: linear-gradient(180deg, rgba(10, 4, 20, 0.1), rgba(10, 4, 20, 0.55));
  border: 0;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  transition: background-color 0.15s ease;
}

.play:hover { background: rgba(10, 4, 20, 0.42); }

.play__ring {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 28px rgba(201, 164, 255, 0.32);
}

.play__ring svg { width: 24px; height: 24px; margin-left: 3px; fill: var(--accent-ink); }

.play__label {
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.sample__fallback {
  margin: 0;
  padding: 24px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-soft);
  max-width: 40ch;
}

.sample__fallback strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.sample__fallback code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: #ffd28a;
  word-break: break-all;
}

/* --------------------------------------------------------------- benefits */

.benefits {
  list-style: none;
  margin: clamp(24px, 5vw, 40px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(24px, 4.5vw, 34px);
}

.benefit__title {
  margin: 0 0 6px;
  font-size: 1.06rem;
  font-weight: 660;
  letter-spacing: -0.012em;
}

.benefit__body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 38ch;
}

/* ------------------------------------------------------------------ steps */

.steps {
  list-style: none;
  margin: clamp(24px, 5vw, 40px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  counter-reset: step;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.88rem;
  font-weight: 680;
  color: var(--accent);
  border: 1px solid rgba(201, 164, 255, 0.34);
  background: rgba(201, 164, 255, 0.08);
}

.step__text {
  font-size: 1rem;
  color: var(--text);
}

.nudge {
  margin: clamp(24px, 5vw, 34px) 0 0;
  font-size: clamp(1rem, 4vw, 1.1rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
  border-left: 2px solid rgba(201, 164, 255, 0.5);
  padding-left: 16px;
}

/* -------------------------------------------------------------------- faq */

.faq .section__title { margin-bottom: clamp(16px, 3vw, 24px); }

.qa {
  border-top: 1px solid var(--line-soft);
  padding-block: 4px;
}

.qa:last-of-type { border-bottom: 1px solid var(--line-soft); }

.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.008em;
  cursor: pointer;
  list-style: none;
}

.qa__q::-webkit-details-marker { display: none; }

.qa__q::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.16s ease;
}

.qa[open] .qa__q::after { transform: rotate(45deg); }

.qa__a {
  margin: 0;
  padding: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 58ch;
}

/* ----------------------------------------------------------------- closing */

.closing {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(201, 164, 255, 0.05), transparent 65%);
}

.closing__inner {
  max-width: var(--wrap-narrow);
}

.closing .form-slot { margin-top: clamp(20px, 4vw, 28px); }

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

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 26px 34px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted-soft);
}

.site-footer__copy,
.site-footer__links { margin: 0; }

/* gap, not source whitespace: Astro's compressHTML strips the space between links */
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer__links a { color: var(--muted); }

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

@media (min-width: 560px) {
  .field__row {
    flex-direction: row;
    align-items: stretch;
  }
  .input { flex: 1 1 auto; }
  .btn { flex: 0 0 auto; }
}

@media (min-width: 768px) {
  body { font-size: 18px; }

  .brand__logo { height: 26px; }

  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .step { flex-direction: column; align-items: flex-start; gap: 10px; }

  .hero__inner { max-width: 780px; }
}

@media (min-width: 900px) {
  .samples__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (min-width: 1024px) {
  .samples__grid { gap: 32px; }
}

/* short viewports: keep hero compact so the form stays above the fold */
@media (max-height: 720px) and (max-width: 767px) {
  .hero { padding-block: 12px 28px; }
  .hero__title { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  .hero__lede { font-size: 0.98rem; }
  .form-slot { margin-top: 16px; }
}

@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;
  }
}
