/* Auto-Reader landing page — palette locked to the app's dark-gold theme. */
:root {
  --bg: #0D0907;
  --bg-elev: #15100D;
  --bg-elev-2: #1F1813;
  --ink: #F5E6D3;
  --ink-dim: #BDA88E;
  --ink-faint: #7A6A57;
  --accent: #D4A574;
  --accent-hi: #E7C49C;
  --accent-glow: rgba(212, 165, 116, 0.15);
  --border: rgba(245, 230, 211, 0.08);
  --border-strong: rgba(245, 230, 211, 0.18);
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; border-top: 1px solid var(--border); scroll-margin-top: 64px; }
section:first-of-type { border-top: none; }

.eyebrow {
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.5px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 6px; }
.section-blurb { color: var(--ink-dim); max-width: 560px; margin-bottom: 28px; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 9, 7, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.5px; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px 2px var(--accent-glow);
}
/* Small app icon in the top bar (replaces the bare dot when present). */
.appicon {
  width: 26px; height: 26px; border-radius: 7px; display: block;
  box-shadow: 0 0 0 1px var(--border-strong), 0 4px 12px rgba(0,0,0,0.4);
}
.brand small { color: var(--ink-dim); font-weight: 400; }
.nav a { color: var(--ink-dim); margin-left: 22px; font-size: 14px; transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--accent); }
/* A soft shadow appears under the bar once the page is scrolled. */
.topbar { transition: box-shadow 0.25s ease; }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); }
[dir="rtl"] .nav a { margin-left: 0; margin-right: 22px; }
@media (max-width: 640px) { .nav { display: none; } }

/* ---- Hero ---- */
.hero { text-align: center; padding: 88px 0 80px; position: relative; }
/* Soft breathing gold halo behind the hero. */
.hero::before {
  content: ""; position: absolute; inset: -10% 0 auto 0; height: 520px;
  margin: 0 auto; max-width: 760px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 72%);
  filter: blur(8px); z-index: -1; pointer-events: none;
  animation: halo 7s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
.hero-icon {
  width: 104px; height: 104px; border-radius: 24px; display: block; margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.55));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  margin: 22px auto 0;
  max-width: 12ch;
}
.hero h1 em { color: var(--accent); font-style: italic; font-weight: 400; }
/* A gold light sweeps across the accent words every few seconds. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 em {
    background: linear-gradient(110deg,
      var(--accent) 42%, var(--accent-hi) 50%, #FFF3E2 53%, var(--accent-hi) 56%, var(--accent) 64%);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: shine 6.5s ease-in-out infinite;
  }
  @keyframes shine {
    0%, 52%, 100% { background-position: 115% 0; }
    72% { background-position: -15% 0; }
  }
}
.hero .tagline {
  color: var(--ink-dim);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 620px;
  margin: 22px auto 0;
}

/* ---- Store buttons ---- */
.badges, .stores { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 12px 18px; color: var(--ink); font-weight: 500;
}
.badge.soon { color: var(--ink-faint); }
.badge .store-sub { display: block; color: var(--ink-faint); font-size: 11px; font-weight: 400; }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 11px 20px; color: var(--ink);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.store-btn:hover {
  color: var(--ink); border-color: var(--accent);
  background: var(--accent-glow); transform: translateY(-2px);
}
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .label { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
[dir="rtl"] .store-btn .label { text-align: right; }
.store-btn .label small { font-size: 11px; letter-spacing: 0.5px; color: var(--ink-dim); text-transform: uppercase; }
.store-btn .label b { font-size: 17px; font-weight: 600; }
.store-btn.soon { opacity: 0.6; cursor: default; }
.store-btn.soon:hover { border-color: var(--border-strong); background: var(--bg-elev); transform: none; }

/* ---- Trust chips ---- */
.trust { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.trust span {
  font-size: 13px; color: var(--ink-dim);
  border: 1px solid var(--border); border-radius: 50px; padding: 6px 14px;
  background: rgba(245, 230, 211, 0.02);
}
.trust span b { color: var(--accent); font-weight: 600; }

/* ---- Card grids ---- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  border-color: var(--border-strong); transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-glow); color: var(--accent);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 14px;
}
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: 0; }
.card p { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }

/* ---- Feature highlights ---- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feature {
  padding: 22px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature h3 { font-family: var(--serif); font-size: 20px; }
.feature p { color: var(--ink-dim); margin-top: 8px; font-size: 15px; }

/* ---- Screenshots ---- */
.shots { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot figcaption { color: var(--ink-dim); font-size: 13px; text-align: center; }
.phone {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 19.5; border-radius: 26px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shot:hover .phone { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- FAQ ---- */
.faq details {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 18px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
/* The + pivots into an × as the answer opens. */
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
/* Animate the answer's height where the browser supports it (newer Chrome/Edge);
   elsewhere it simply opens instantly, as before. */
@supports (interpolate-size: allow-keywords) {
  .faq details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}
:root { interpolate-size: allow-keywords; }
.faq p { color: var(--ink-dim); padding: 0 0 16px; font-size: 15px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--ink-faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
footer a { color: var(--ink-dim); margin-left: 18px; }
[dir="rtl"] footer a { margin-left: 0; margin-right: 18px; }

.center { text-align: center; }

/* ---- Auto-hiding language toggle ---- */
.langfab {
  position: fixed; top: 14px; left: 14px; z-index: 50;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-glow);
  border: 1px solid rgba(212, 165, 116, 0.45);
  color: var(--accent); border-radius: 50px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  opacity: 0.92; transition: opacity 0.45s ease; backdrop-filter: blur(6px);
}
.langfab.idle { opacity: 0; pointer-events: none; }
.langfab:hover { opacity: 1; }
[dir="rtl"] .langfab { left: auto; right: 14px; }
[dir="rtl"] body { text-align: right; }

/* ---- Scroll-reveal entrance ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
/* Stagger children as a grid/list reveals. */
.grid > .reveal:nth-child(2), .features > .reveal:nth-child(2), .shots > .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid > .reveal:nth-child(3), .features > .reveal:nth-child(3), .shots > .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid > .reveal:nth-child(4), .features > .reveal:nth-child(4), .shots > .reveal:nth-child(4) { transition-delay: 0.18s; }
.grid > .reveal:nth-child(5), .features > .reveal:nth-child(5), .shots > .reveal:nth-child(5) { transition-delay: 0.24s; }
.grid > .reveal:nth-child(6), .features > .reveal:nth-child(6) { transition-delay: 0.30s; }
.grid > .reveal:nth-child(7), .features > .reveal:nth-child(7) { transition-delay: 0.36s; }
.grid > .reveal:nth-child(8) { transition-delay: 0.42s; }

/* ---- Hero load entrance ---- */
.hero .hero-icon { animation: float 6s ease-in-out infinite, rise 0.8s ease both; }
.hero .eyebrow, .hero h1, .hero .tagline, .hero .stores, .hero .badges, .hero .trust { animation: rise 0.7s ease both; }
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero .tagline { animation-delay: 0.20s; }
.hero .stores, .hero .badges { animation-delay: 0.30s; }
.hero .trust { animation-delay: 0.40s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- Closing call-to-action ---- */
.cta { text-align: center; }
.cta .section-blurb { margin: 10px auto 0; }
.cta .stores { margin-top: 26px; }
.cta .note { color: var(--ink-faint); font-size: 13px; margin-top: 16px; }

/* ---- Keyboard focus ---- */
a:focus-visible, summary:focus-visible, .store-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* ---- Respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before, .hero-icon, .phone::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .hero-icon, .hero .eyebrow, .hero h1, .hero .tagline, .hero .stores, .hero .badges, .hero .trust { animation: none; }
  .hero h1 em { animation: none; }
  .faq details::details-content { transition: none; }
}
