/* ---------------------------------------------------------------------------
   Convertcy landing page.

   Hand-written, no framework. The palette is taken from the app itself
   (../RNconverter/app/constants/Colors.js) so the site and the product look
   like one thing:

     app fontColor / selectedItem  #462759  -> --brand
     app buttonColor / header      #9171A5  -> --brand-soft
     app focusedLine               #dbd0e1  -> --wash-2
     app focusedTextArea           #f7e8ff  -> --wash
     app buttonSuccessColor        #52B249  -> --accent (checkmarks only:
                                               it is too light for text)

   Contrast was checked against WCAG AA: body text 12:1, muted text 7.4:1,
   links 7.2:1. --brand-soft is 4.1:1, so it is only used for large text,
   icons and borders, never for body copy.
   --------------------------------------------------------------------------- */

:root {
  --brand: #462759;
  --brand-mid: #6b4a80;
  --brand-soft: #9171a5;
  --ink: #2c2136;
  --ink-muted: #5c5168;
  --accent: #52b249;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --wash: #f7f3fa;
  --wash-2: #dbd0e1;
  --line: rgba(70, 39, 89, 0.12);
  --shadow: 0 1px 2px rgba(70, 39, 89, 0.06), 0 8px 24px rgba(70, 39, 89, 0.08);
  --radius: 16px;
  --measure: 62ch;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e6dcee;
    --brand-mid: #cdb6dd;
    --brand-soft: #a98cbd;
    --ink: #ece7f1;
    --ink-muted: #b6acc0;
    --surface: #17121c;
    --surface-raised: #211a28;
    --wash: #1d1723;
    --wash-2: #2b2233;
    --line: rgba(230, 220, 238, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  /* 18px/1.7 rather than the 16px default: this is a page people skim standing up,
     and the whole point of the product is not having to squint at numbers. */
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--brand);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--brand-mid); }
a:hover { color: var(--brand); }

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

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: clamp(48px, 7vw, 88px) 0; }

.section-head { max-width: var(--measure); margin-bottom: clamp(24px, 4vw, 40px); }
.section-head p { color: var(--ink-muted); margin-bottom: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* --brand-soft would be 4.1:1 here, below AA for 13px text. */
  color: var(--brand-mid);
  margin-bottom: 10px;
}
/* A 22px rule in front of every eyebrow: enough to mark where a section starts,
   not enough to become decoration in its own right. */
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-soft);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-header nav { display: flex; gap: 22px; font-size: 0.9375rem; }
.site-header nav a { color: var(--ink-muted); text-decoration: none; }
.site-header nav a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 640px) {
  .site-header nav { display: none; }
}

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

.hero {
  background:
    radial-gradient(52% 46% at 78% 62%, rgba(145, 113, 165, 0.30), transparent 70%),
    linear-gradient(170deg, var(--wash) 0%, var(--wash-2) 100%);
  padding-bottom: 0;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-copy { padding-bottom: clamp(40px, 6vw, 72px); }
.hero-copy p {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.hero-art {
  align-self: end;
  justify-self: center;
  max-width: 320px;
  margin-bottom: -8px;
  filter: drop-shadow(0 18px 40px rgba(70, 39, 89, 0.28));
}
/* .hero-art is a <picture> (WebP with a PNG fallback). A <picture> is inline and has no
   intrinsic size of its own, so the width/height on the inner <img> cannot reserve the
   space — without the explicit aspect-ratio here the hero collapses until the image
   loads and everything below it jumps (measured: CLS 0.194). */
.hero-art {
  display: block;
  width: 100%;
  aspect-ratio: 640 / 1137;
}
.hero-art img { width: 100%; height: 100%; }

/* --- store buttons -------------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.stores a {
  display: block;
  border-radius: 10px;
  transition: transform 0.15s ease;
}
.stores a:hover { transform: translateY(-2px); }

/* Official store artwork, unmodified. The two badges are built differently, so they
   are sized to make the black pill itself ~44px tall in both:
     Apple  — SVG, 119.66x40, no clear space baked in -> padding adds it here.
     Google — PNG, 646x250, of which the pill is only 67.2% of the height; the rest
              is the clear space Google requires, so the image is rendered taller. */
.badge-apple { padding: 10px 14px; }
.badge-apple img { height: 44px; width: auto; }
.badge-google img { height: 64px; width: auto; }

/* Specific enough to win over `.hero-copy p`, which sets the larger lead size. */
.hero-copy .note-under-cta,
.note-under-cta {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin: 0;
}

/* --- facts strip ---------------------------------------------------------- */

.facts {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.facts ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .facts ul { grid-template-columns: repeat(4, 1fr); }
}
.facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}
.facts li svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--brand-soft);
}
.facts li b { margin-right: 4px; }
.facts b {
  color: var(--brand);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

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

.steps {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}
.steps li {
  counter-increment: step;
  position: relative;
}
/* The rail joins the three numbers so the eye reads them as one sequence.
   It stops at the last step and is hidden when the steps stack on mobile. */
@media (min-width: 760px) {
  .steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 52px;
    right: -36px;
    height: 2px;
    background: linear-gradient(90deg, var(--wash-2), transparent);
  }
}
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface);
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 14px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; }

/* --- feature cards -------------------------------------------------------- */

.features {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow);
}
.card.lead { border-color: var(--brand-soft); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--wash);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }
.card p { margin-bottom: 0; }
.card .tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-mid);
  background: var(--wash);
  border-radius: 999px;
  padding: 4px 12px;
}

/* --- screenshots ---------------------------------------------------------- */

.screens { background: var(--wash); }
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 20px 22px;
  margin: 0 -20px;
  scroll-snap-type: x mandatory;
  list-style: none;
  scrollbar-width: thin;
}
.shots li { scroll-snap-align: center; }
@media (min-width: 1000px) {
  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
  }
}
/* Same reason as .hero-art: the <picture> needs the ratio, not just the <img>. */
.shots picture {
  display: block;
  aspect-ratio: 280 / 566;
}
.shots img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.shots figcaption {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* --- pricing -------------------------------------------------------------- */

.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.plan { display: flex; flex-direction: column; }
.plan h3 {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.plan-glyph { width: 20px; height: 20px; color: var(--brand-soft); }
.plan .plan-sub { color: var(--ink-muted); font-size: 0.9375rem; margin-bottom: 18px; }
.plan ul { margin: 0; padding: 0; list-style: none; }
.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.plan li:first-child { border-top: 0; }
.plan svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 4px; }
.tick { color: var(--accent); }
.dash { color: var(--brand-soft); }

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

/* The FAQ column is narrower than the rest of the page, but it must still start on the
   same left edge — constrain the questions, not the wrapper, or the whole section slides
   to the middle and reads as a different page. */
.faq details { max-width: 780px; }
.faq summary:hover { color: var(--brand-mid); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  color: var(--brand);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--brand-soft);
  border-bottom: 2px solid var(--brand-soft);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq p { padding-bottom: 8px; }

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

.cta-band {
  background: linear-gradient(135deg, #462759 0%, #6b4a80 100%);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.86); margin-left: auto; margin-right: auto; }
.cta-band .stores { justify-content: center; margin-top: 26px; margin-bottom: 0; }

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: clamp(36px, 5vw, 56px) 0 28px;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}
.site-footer h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-soft);
  margin-bottom: 12px;
}
.site-footer p { color: var(--ink-muted); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--brand); }
.legal-line {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
}
.legal-line p { margin: 0; max-width: none; }

/* --- small utilities ------------------------------------------------------ */

.pt0 { padding-top: 0; }
.footer-about { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
