/* ===========================================================
   Adventist Hymnal — modern site styles
   Dependency-free. Light + dark mode.
   =========================================================== */

:root {
  --brand: #3d5a99;
  --brand-2: #5b7fc7;
  --brand-soft: #e8eefb;
  --ink: #1a2235;
  --ink-soft: #5a647a;
  --bg: #f6f8fd;
  --surface: #ffffff;
  --surface-2: #f1f4fb;
  --border: rgba(20, 30, 60, 0.08);
  --shadow: 0 18px 50px -20px rgba(33, 52, 99, 0.35);
  --shadow-sm: 0 8px 24px -12px rgba(33, 52, 99, 0.30);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7a9be0;
    --brand-2: #5b7fc7;
    --brand-soft: rgba(122, 155, 224, 0.14);
    --ink: #eaf0fb;
    --ink-soft: #9aa6c0;
    --bg: #0c1018;
    --surface: #141a26;
    --surface-2: #1b2230;
    --border: rgba(160, 180, 230, 0.12);
    --shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 10px 30px -16px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 14px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(150deg, #2b3a5c, #11161f);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand .logo img { width: 26px; height: 26px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem !important;
}
.nav-cta:hover { background: var(--brand-2); text-decoration: none !important; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(91,127,199,0.30), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(122,155,224,0.18), transparent 55%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin: 22px 0 32px;
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.store-badges img { height: 54px; transition: transform .15s ease; }
.store-badges a:hover img { transform: translateY(-2px); }

/* Phone mockup */
.phone {
  position: relative;
  width: 300px;
  margin: 0 auto;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #d7def0, #aeb9d6);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,0.4);
}
@media (prefers-color-scheme: dark) {
  .phone { background: linear-gradient(160deg, #2a3142, #161b26); }
}
.phone::before {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #0d111a;
  border-radius: 999px;
  z-index: 3;
}
.phone img {
  border-radius: 34px;
  width: 100%;
  display: block;
}
.phone-stack { position: relative; display: grid; place-items: center; }
.phone.secondary {
  position: absolute;
  width: 220px;
  right: -6%;
  bottom: -8%;
  transform: rotate(7deg);
  opacity: .96;
  z-index: -1;
}

/* ---------- Languages strip ---------- */
.langs { padding: 8px 0 8px; }
.langs .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}
.lang-pill span.flag { font-size: 1.1rem; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; margin-top: 14px; }

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ic {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

/* ---------- Showcase ---------- */
.showcase { background: var(--surface-2); }
.shots {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.shot {
  flex: 0 0 auto;
  width: 232px;
  scroll-snap-align: center;
  text-align: center;
}
.shot .frame {
  border-radius: 32px;
  padding: 9px;
  background: linear-gradient(160deg, #d7def0, #aeb9d6);
  box-shadow: var(--shadow-sm);
}
@media (prefers-color-scheme: dark) {
  .shot .frame { background: linear-gradient(160deg, #2a3142, #161b26); }
}
.shot img { border-radius: 25px; }
.shot .cap { margin-top: 14px; font-weight: 600; color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Multilingual gallery ---------- */
.multi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.multi-grid .shot { width: auto; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  border-radius: 32px;
  padding: 64px 28px;
  margin: 0 24px;
  background: linear-gradient(135deg, #3d5a99, #6f93d6);
  box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
.cta p { color: rgba(255,255,255,0.9); font-size: 1.12rem; margin: 14px auto 30px; max-width: 560px; }
.cta .store-badges { justify-content: center; }
.cta-wrap { padding: 40px 0 84px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 40px;
  background: var(--surface);
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.footer .brand { font-size: 1rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.footer-links a:hover { color: var(--ink); text-decoration: none; }
.social { display: flex; gap: 12px; }
.social a {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}
.social a:hover { color: var(--brand); border-color: var(--brand); }
.social svg { width: 20px; height: 20px; }
.copyright {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 30px;
}

/* ---------- Legal (privacy) page ---------- */
.legal { padding: 56px 0 84px; }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(28px, 5vw, 60px);
  max-width: 860px;
  margin: 0 auto;
}
.legal-card h1 { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; }
.legal-card .updated { color: var(--ink-soft); margin: 10px 0 30px; font-size: 0.95rem; }
.legal-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 10px;
  padding-top: 8px;
}
.legal-card p, .legal-card li { color: var(--ink-soft); font-size: 1rem; }
.legal-card ul { padding-left: 22px; }
.legal-card a { font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .store-badges { justify-content: center; }
  .phone-stack { margin-top: 12px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .multi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .phone.secondary { display: none; }
  .footer .container { flex-direction: column; text-align: center; }
}
