/* ==========================================================================
   Mannael — landing page styles
   Scope: index.html ONLY. Legal pages (privacy/terms/support) use style.css.
   Mobile-first. No element may exceed the viewport width.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --primary:      #4F3FD6;
  --primary-deep: #3B2FB0;
  --gold:         #F5B942;
  --coral:        #FF6B6B;
  --mint:         #4ECDC4;
  --cream:        #FDFBF4;
  --ink:          #1B1733;
  --ink-soft:     #46415f;
  --line:         rgba(27, 23, 51, 0.10);
  --card:         #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1100px;
  --gutter: clamp(1.25rem, 4vw, 2rem);

  --shadow-card:  0 2px 6px rgba(27, 23, 51, 0.05), 0 14px 34px -18px rgba(27, 23, 51, 0.18);
  --shadow-phone: 0 3px 8px rgba(27, 23, 51, 0.10), 0 28px 56px -24px rgba(27, 23, 51, 0.35);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / safety net ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

html, body {
  max-width: 100%;
  overflow-x: clip; /* hard guarantee: nothing scrolls the page sideways */
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, figure { margin: 0; }

a { color: var(--primary); }

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Typography ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2.35rem, 4.5vw + 1.1rem, 4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: clamp(1.65rem, 2.5vw + 0.9rem, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-kicker {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 244, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 60px;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.2rem;
  line-height: 1;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--primary); }

@media (max-width: 359px) {
  .site-nav { gap: 0.6rem; }
  .site-nav a { font-size: 0.8rem; }
  .brand { font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 8vw, 5.5rem);
  overflow: clip;
}

/* one very quiet wash of light behind the lamp — not a gradient festival */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto;
  height: 130%;
  background:
    radial-gradient(42rem 26rem at 50% 0%, rgba(245, 185, 66, 0.13), transparent 68%),
    radial-gradient(50rem 30rem at 50% 10%, rgba(79, 63, 214, 0.06), transparent 70%);
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 46rem;
}

.hero-icon {
  width: clamp(76px, 16vw, 96px);
  height: auto;
  border-radius: 22.4%;
  box-shadow: var(--shadow-card);
}

.hero h1 { margin-top: 1.5rem; }

.hero-sub {
  margin-top: 1.15rem;
  max-width: 38rem;
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.15rem);
  color: var(--ink-soft);
}

.hero-verse {
  margin-top: 1.35rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem);
  color: var(--primary-deep);
}

.hero-verse .ref {
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.85em;
  color: var(--ink-soft);
}

.hero-cta {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

/* The primary CTA: big, official App Store badge */
.store-badge {
  display: inline-block;
  border-radius: 13px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.store-badge img {
  /* official lockup is 119.66 × 40 — keep the ratio, render it large */
  width: clamp(200px, 52vw, 252px);
  height: auto;
}

.store-badge:hover,
.store-badge:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -12px rgba(27, 23, 51, 0.45);
}

.hero-cta-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-lede {
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 0.95rem;
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-icon.is-primary { background: rgba(79, 63, 214, 0.10);  color: var(--primary); }
.feature-icon.is-gold    { background: rgba(245, 185, 66, 0.18); color: #b07d17; }
.feature-icon.is-mint    { background: rgba(78, 205, 196, 0.16); color: #1f9a91; }
.feature-icon.is-coral   { background: rgba(255, 107, 107, 0.14); color: #e0492e; }

.feature h3 {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.15rem;
  line-height: 1.25;
}

.feature p {
  margin-top: 0.5rem;
  font-size: 0.925rem;
  color: var(--ink-soft);
}

.free-note {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: rgba(78, 205, 196, 0.10);
  border: 1px solid rgba(78, 205, 196, 0.35);
  border-radius: 16px;
  padding: 1.05rem 1.2rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.free-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  color: #1f9a91;
}

/* ---------- Screenshot showcase ---------- */
/* Horizontal scroll-snap gallery at every width: the strip itself scrolls
   (overflow-x: auto), the page NEVER scrolls sideways. The next card always
   peeks past the edge; JS adds arrows + progress dots as enhancement. */

.showcase { overflow: clip; } /* belt-and-braces: clips any strip overdraw */

.shots-shell { position: relative; }

/* soft edge fades hint that the strip continues past the viewport */
.shots-shell::before,
.shots-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(1.25rem, 4vw, 3.5rem);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.shots-shell::before {
  left: 0;
  background: linear-gradient(to right, var(--cream), transparent);
  opacity: 0; /* hidden while at the start — JS flips it on once scrolled */
}

.shots-shell::after {
  right: 0;
  background: linear-gradient(to left, var(--cream), transparent);
}

.shots-shell.off-start::before { opacity: 1; }
.shots-shell.at-end::after     { opacity: 0; }

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 280px);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; /* momentum scrolling */
  scroll-snap-type: x mandatory;
  /* align the first/last card with the page gutter, allow edge-to-edge scroll */
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  padding-block: 0.5rem 1rem;
}

/* with JS the dots + arrows carry the affordance, so hide the scrollbar;
   without JS keep a thin one as the honest fallback */
html.js .shots { scrollbar-width: none; }
html.js .shots::-webkit-scrollbar { display: none; }
html:not(.js) .shots {
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 23, 51, 0.22) transparent;
  padding-bottom: 1.4rem;
}

.shot {
  scroll-snap-align: start;
  min-width: 0;
}

.phone {
  background: var(--ink);
  border-radius: 34px;
  padding: 9px;
  box-shadow: var(--shadow-phone);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 26px;
  object-fit: cover;
  background: var(--cream); /* shows while lazy-loading, no dark flash */
}

.shot figcaption {
  margin-top: 0.85rem;
  text-align: center;
  padding-inline: 0.4rem;
}

.shot-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

.shot-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* prev/next arrows — JS-only, and only where a pointer makes them useful */
.shots-arrow {
  display: none;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), opacity 0.25s ease, color 0.25s ease;
}

.shots-arrow svg { width: 20px; height: 20px; }

.shots-arrow.is-prev { left:  clamp(0.5rem, 2vw, 1.5rem); }
.shots-arrow.is-next { right: clamp(0.5rem, 2vw, 1.5rem); }

.shots-arrow:not(:disabled):hover {
  transform: translateY(-50%) scale(1.08);
  color: var(--primary-deep);
}

.shots-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

@media (min-width: 720px) {
  html.js .shots-arrow { display: grid; }
}

/* progress dots — purely decorative (aria-hidden), JS builds one per card */
.shots-dots {
  display: none;
  justify-content: center;
  gap: 0.45rem;
  padding-top: 0.5rem;
}

html.js .shots-dots { display: flex; }

.shots-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(27, 23, 51, 0.18);
  transition: width 0.3s var(--ease-out), background 0.3s ease;
}

.shots-dots span.is-active {
  width: 22px;
  background: var(--gold);
}

.shots-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 0.25rem;
}

/* with JS the dots replace the text hint */
html.js .shots-hint { display: none; }

@media (min-width: 1000px) {
  .shots { grid-auto-columns: 300px; }
}

/* ---------- "The Bible, your way" ---------- */
.your-way {
  background: var(--primary-deep);
  color: var(--cream);
}

.your-way .section-kicker { color: var(--gold); }
.your-way .section-title  { color: #fff; }
.your-way .section-lede   { color: rgba(253, 251, 244, 0.78); }

.way-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .way-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

.way-card {
  background: rgba(253, 251, 244, 0.06);
  border: 1px solid rgba(253, 251, 244, 0.14);
  border-radius: 18px;
  padding: 1.35rem 1.3rem 1.45rem;
}

.way-card h3 {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.12rem;
  color: var(--gold);
}

.way-card p {
  margin-top: 0.5rem;
  font-size: 0.925rem;
  color: rgba(253, 251, 244, 0.82);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 44rem;
  margin-inline: auto;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-of-type {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.08rem;
  line-height: 1.3;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(79, 63, 214, 0.08);
  color: var(--primary);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.25s var(--ease-out);
}

.faq-list details[open] summary::after {
  content: "–";
  transform: rotate(180deg);
}

.faq-list details p {
  padding: 0 0.25rem 1.25rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Closing CTA ---------- */
.closing {
  text-align: center;
}

.closing .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 42rem;
}

.closing .store-badge { margin-top: 1.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(253, 251, 244, 0.8);
  padding-block: clamp(2.5rem, 6vw, 3.75rem);
  font-size: 0.9rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--cream);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 1.2rem;
}

.footer-links a {
  color: rgba(253, 251, 244, 0.85);
  text-decoration: none;
  padding-block: 0.25rem;
}

.footer-links a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer-meta {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(253, 251, 244, 0.14);
  font-size: 0.82rem;
  color: rgba(253, 251, 244, 0.6);
  max-width: 46rem;
}

.footer-meta em { color: rgba(253, 251, 244, 0.78); }

/* ---------- Motion (opt-in only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance */
  .hero-icon, .hero h1, .hero-sub, .hero-verse, .hero-cta {
    animation: rise 0.7s var(--ease-out) both;
  }
  .hero h1     { animation-delay: 0.08s; }
  .hero-sub    { animation-delay: 0.16s; }
  .hero-verse  { animation-delay: 0.24s; }
  .hero-cta    { animation-delay: 0.32s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  /* scroll reveal — only hide elements when JS is on, so no-JS never blanks */
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  }
  html.js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }
  html.js [data-reveal][data-reveal-delay="1"] { transition-delay: 0.08s; }
  html.js [data-reveal][data-reveal-delay="2"] { transition-delay: 0.16s; }
  html.js [data-reveal][data-reveal-delay="3"] { transition-delay: 0.24s; }
  html.js [data-reveal][data-reveal-delay="4"] { transition-delay: 0.32s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-badge,
  .store-badge:hover,
  .store-badge:focus-visible {
    transition: none;
    transform: none;
  }
  .faq-list summary::after { transition: none; }
  .shots { scroll-behavior: auto; }
  .shots-arrow,
  .shots-dots span,
  .shots-shell::before,
  .shots-shell::after { transition: none; }
  .shots-arrow:not(:disabled):hover { transform: translateY(-50%); }
}
