/* Palavr — landing site. Neon-on-indigo, straight from docs/BRAND.md.
   Two families: Quicksand (display) + Manrope (everything readable). */

/* Self-hosted (no third-party font requests), from the same variable fonts the
   app bundles in app/assets/fonts. Manrope is subset to Latin; Quicksand is
   served whole, because subsetting a font with a Reserved Font Name counts as
   modifying it under the OFL. See assets/fonts/README.md. */
@font-face {
  font-family: 'Quicksand';
  src: url('assets/fonts/Quicksand-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/Manrope-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand spectrum */
  --mint: #2CE8C4;
  --periwinkle: #5F8CF6;
  --violet: #9A52FD;
  --purple: #C06BFF;

  /* Ground & text */
  --bg0: #0C0B18;
  --bg1: #15141F;
  --bg2: #1D1B2A;
  --text: #F3F1FB;
  --dim: #AAA4D4;
  --faint: #6F6A9C;
  --card: rgba(255, 255, 255, 0.045);
  --card2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-hi: rgba(255, 255, 255, 0.18);
  --error: #FF6B8A;

  /* Signature gradient */
  --grad: linear-gradient(120deg, #2CE8C4, #5F8CF6, #9A52FD);
  --grad-soft: linear-gradient(120deg, #58EDD2, #7F9AF5, #A86BFD);

  /* Watching / margins accent wash */
  --watch-bg: rgba(192, 107, 255, 0.15);
  --watch-border: rgba(192, 107, 255, 0.38);
  --watch-text: #E3B6FF;
  --margin-bg: rgba(192, 107, 255, 0.08);
  --margin-border: rgba(192, 107, 255, 0.40);

  --max: 1080px;
  --radius-card: 20px;
  --radius-btn: 16px;
  --radius-input: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link: off-screen until a keyboard user tabs to it. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text);
}
.skip-link:focus { top: 12px; }

body {
  margin: 0;
  color-scheme: dark;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Screen ground: indigo gradient + two soft corner glows, pinned to the
   viewport via a fixed layer (avoids background-attachment: fixed, which janks
   on mobile and is ignored by older iOS Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(60% 50% at 12% 8%, rgba(44, 232, 196, 0.20), transparent 60%),
    radial-gradient(60% 55% at 88% 92%, rgba(154, 82, 253, 0.22), transparent 60%),
    linear-gradient(160deg, #15141F, #0C0B18 62%, #08070F);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---- Type ---------------------------------------------------------------- */

h1, h2, h3, .display {
  font-family: 'Quicksand', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0; }

.eyebrow {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.lead { font-size: 1.12rem; color: var(--dim); }
.muted { color: var(--dim); }
.faint { color: var(--faint); }

/* Gradient-filled type — the signature treatment. */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 26px;
  border-radius: var(--radius-btn);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  color: var(--bg0);
  background: var(--grad);
  box-shadow: 0 10px 26px rgba(123, 120, 240, 0.40);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(123, 120, 240, 0.52); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.btn-ghost {
  background: var(--card2);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--stroke-hi);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.10); box-shadow: none; }

.btn-sm { height: 42px; padding: 0 18px; font-size: 0.92rem; }

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

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(12, 11, 24, 0.55);
  border-bottom: 1px solid var(--stroke);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup img { width: 30px; height: 30px; }
.wordmark {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
/* Trademark mark. Deliberately NOT gradient-filled and not part of .wordmark:
   at lockup scale a gradient ™ reads as noise on the mark itself. aria-hidden
   in the markup so it isn't announced on every lockup.
   .mark-lockup wraps the pair so the ™ sits tight against the wordmark instead
   of inheriting .brand-lockup's 10px flex gap. */
.mark-lockup { display: inline-flex; align-items: flex-start; }
.tm {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 0.62rem;
  color: var(--faint);
  align-self: flex-start;
  margin-left: 2px;
  margin-top: 4px;
  line-height: 1;
}
.tm-sm { font-size: 0.55rem; margin-top: 3px; }

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

.hero { padding: 64px 0 28px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { margin: 14px 0 0; }
.hero .lead { margin-top: 18px; max-width: 30ch; }

.glowmark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}
.glowmark::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 110, 245, 0.45), transparent 65%);
  filter: blur(18px);
}
.glowmark img {
  position: relative;
  width: 188px;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(122, 110, 245, 0.45));
  animation: float 6s ease-in-out infinite;
}

/* Decorative floating mini-threads (NOT the mark — safe to render). */
.mini {
  position: absolute;
  width: 210px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.78rem;
  color: var(--dim);
}
.mini .av {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--bg0);
}
.mini .txt { flex: 1; line-height: 1.35; } /* wraps: an ellipsis mid-quote read as a bug */
.mini-1 { top: 26px; left: -6px; transform: rotate(-5deg); animation: float 7s ease-in-out infinite; }
.mini-2 { top: 130px; right: -10px; transform: rotate(5deg); animation: float 6.5s ease-in-out infinite 0.4s; }
.mini-3 { bottom: 30px; left: 8px; transform: rotate(3deg); animation: float 7.5s ease-in-out infinite 0.8s; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* Watch pill — the eye + count, the brand keystone. */
.watchpill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
  background: var(--watch-bg);
  border: 1px solid var(--watch-border);
  color: var(--watch-text);
  font-size: 0.8rem;
  font-weight: 600;
}
.watchpill svg { width: 15px; height: 15px; stroke: currentColor; }
.livedot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: breathe 1.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

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

.waitlist {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  max-width: 460px;
  flex-wrap: wrap;
}
.waitlist input[type="email"] {
  flex: 1;
  min-width: 220px;
  height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--stroke-hi);
  background: var(--card);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
}
.waitlist input::placeholder { color: var(--dim); }
.waitlist input:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(44, 232, 196, 0.18);
}
.form-note { margin-top: 12px; font-size: 0.84rem; color: var(--dim); }
.form-status { margin-top: 12px; font-size: 0.92rem; min-height: 1.2em; }
.form-status.ok { color: var(--mint); }
.form-status.err { color: var(--error); }

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

section { padding: 56px 0; }
/* Keep in-page anchors (#how, #waitlist) clear of the 66px sticky header. */
section[id] { scroll-margin-top: 84px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .lead { margin-top: 12px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: 24px;
}
.step .ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--watch-bg);
  border: 1px solid var(--watch-border);
  margin-bottom: 16px;
}
.step .ico svg { width: 24px; height: 24px; stroke: var(--watch-text); }
.step .num {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--dim); /* faint fails AA at this size (BRAND §10) */
}
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--dim); font-size: 0.95rem; }

/* Margin-note callout — dashed purple border, distinct from bubbles. */
.marginnote {
  margin: 28px auto 0;
  max-width: 520px;
  background: var(--margin-bg);
  border: 1.5px dashed var(--margin-border);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
}
.marginnote .who { color: var(--watch-text); font-weight: 600; font-size: 0.78rem; }
.marginnote .body { color: var(--text); font-size: 0.95rem; margin-top: 4px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
}
.feature h3 { font-size: 1.02rem; }
.feature p { color: var(--dim); font-size: 0.9rem; margin-top: 6px; }

/* ---- CTA band ------------------------------------------------------------ */

.cta {
  text-align: center;
  background: var(--card2);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 48px 24px;
}
.cta .waitlist { margin: 24px auto 0; justify-content: center; }

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

footer.site {
  border-top: 1px solid var(--stroke);
  padding: 40px 0;
  margin-top: 24px;
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.footlinks { display: flex; gap: 20px; flex-wrap: wrap; }
.footlinks a { color: var(--dim); font-size: 0.9rem; }
footer .tag { color: var(--dim); font-size: 0.84rem; }
/* Mailboxes, one per purpose. Full row, under the links. */
footer.site .footmail {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--dim);
  font-size: 0.84rem;
}
.footmail a { color: var(--watch-text); }

/* Ownership + copyright. Takes the full footer row so it reads as a colophon
   under the links rather than competing with them. */
footer.site .legal {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--stroke);
  color: var(--dim);
  font-size: 0.8rem;
}

/* ---- Long-form (privacy / terms) ---------------------------------------- */

/* Horizontal padding restated here: .doc shares an element with .wrap, and a
   shorthand `padding` on .doc would otherwise zero .wrap's 22px sides. */
.doc { max-width: 804px; margin: 0 auto; padding: 56px 22px 24px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--dim); margin: 10px 0; }
.doc strong { color: var(--text); }
.doc .updated { color: var(--dim); font-size: 0.9rem; margin-top: 10px; }
.doc a { color: var(--watch-text); }
/* Links inside running text are underlined: colour alone (#E3B6FF in #AAA4D4)
   isn't enough contrast to tell them apart. */
.doc p a, .doc li a, .lead a, .form-note a, .form-status a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc .btn, .doc p .btn { color: var(--bg0); text-decoration: none; }
.doc ul, .doc ol { padding-left: 22px; }
.callout {
  background: var(--margin-bg);
  border: 1px solid var(--margin-border);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 22px 0;
}
.callout p { color: var(--text); margin: 0; font-size: 0.92rem; }

.platforms { margin-top: 18px; color: var(--text); font-weight: 600; }

/* ---- Store badges ("Coming soon") ----------------------------------------
   Plain text, not links, until the store listings are live. */

.stores {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}
.doc .stores { padding-left: 0; margin-top: 22px; }
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 148px;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--stroke-hi);
}
.store-name {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text);
}
.store-soon {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--dim);
}

/* ---- App screenshots ("How it works") ------------------------------------ */
.shots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.shot { margin: 0; text-align: center; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1300;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--bg0);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(123, 120, 240, 0.08);
}
.shot figcaption { margin-top: 12px; color: var(--dim); font-size: 0.9rem; font-weight: 600; }
.shots:focus-visible { outline: 2px solid var(--watch-text); outline-offset: 6px; border-radius: 12px; }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 420px) {
  /* The hero form is the same action. Hiding this keeps the lockup on screen at 320px. */
  header.site .btn { display: none; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: none; }
  .glowmark { min-height: 240px; order: -1; }
  /* Decorative collage clutters the narrow hero — let the mark stand alone. */
  .mini { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 32px 0 12px; }
  /* Phones/tablets: a swipeable row that peeks the next screenshot. */
  .shots {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 40px -22px 0;
    padding: 6px 22px 18px;
    scrollbar-width: thin;
  }
  .shot { flex: 0 0 62vw; max-width: 280px; scroll-snap-align: center; }
}

@media (max-width: 640px) {
  .steps, .features { grid-template-columns: 1fr; }
  /* Smaller mark so the headline and form reach the first screen. */
  .glowmark { min-height: 150px; }
  .glowmark::before { width: 180px; height: 180px; }
  .glowmark img { width: 116px; }
}

@media (max-width: 480px) {
  .waitlist .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* Visible focus for keyboard users across interactive elements. */
a:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
