/* Katoliku landing page — brand indigo + Lora serif, matching the mobile app's
   "Sacred & warm" theme (see mobile/lib/config/app_theme.dart). */

:root {
  --primary: #3b3f72; /* deep indigo */
  --primary-dark: #2e3159;
  --gold: #c0892d;
  --bg: #ffffff;
  --surface: #faf9f6;
  --border: #e6e6ea;
  --text: #2a2a33;
  --text-muted: #6b6b72;
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Header ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--primary-dark);
}

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--surface) 0%, #fff 60%);
  padding: 72px 0 88px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin-bottom: 20px;
}

.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 32em;
  margin-bottom: 32px;
}

/* ─── Store buttons ────────────────────────────────────── */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-buttons--center {
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.store-badge--light {
  background: #fff;
  color: var(--text);
}

.store-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-text small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.store-text strong {
  font-size: 17px;
  font-weight: 600;
}

.store-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Phone mockup (3D) ────────────────────────────────── */
.hero-art {
  display: flex;
  justify-content: center;
  perspective: 1100px;
}

/* Stage carries the mouse-parallax tilt (set via JS as CSS vars) on top of a
   gentle idle float, so the phone feels like it's hovering in 3D space. */
.phone-stage {
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, -16deg));
  transition: transform 0.2s ease-out;
  animation: phone-float 6s ease-in-out infinite;
}

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

.phone {
  position: relative;
  width: 240px;
  height: 490px;
  background: var(--primary);
  border-radius: 36px;
  padding: 12px;
  transform-style: preserve-3d;
  box-shadow: 0 40px 70px rgba(59, 63, 114, 0.4);
}

/* Soft halo behind the phone, pushed back in 3D for depth. */
.phone-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(192, 137, 45, 0.35) 0%,
    rgba(192, 137, 45, 0) 70%
  );
  transform: translateZ(-60px);
  z-index: -1;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  background: var(--primary-dark);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(165deg, #fff 0%, var(--surface) 100%);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: translateZ(20px); /* lift the screen toward the viewer */
}

.phone-logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  object-fit: cover;
  transform: translateZ(30px);
}

.phone-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--primary);
}

.phone-tag {
  font-size: 10px;
  font-style: italic;
  color: var(--text-muted);
}

/* ─── Features ─────────────────────────────────────────── */
.features {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 36px);
  text-align: center;
  max-width: 18em;
  margin: 0 auto 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1000px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transform-style: preserve-3d;
  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out;
}

.feature-card:hover {
  box-shadow: 0 20px 40px rgba(59, 63, 114, 0.14);
}

.feature-card .feature-icon,
.feature-card h3,
.feature-card p {
  transform: translateZ(28px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-muted);
}

/* ─── CTA ──────────────────────────────────────────────── */
.cta {
  background: linear-gradient(
    160deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.cta h2 {
  color: #fff;
  font-size: clamp(26px, 3.5vw, 38px);
  margin-bottom: 12px;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  margin-bottom: 32px;
}

/* ─── Reviews / Testimoni slider ───────────────────────── */
.reviews {
  padding: 80px 0;
  background: var(--surface);
}

.reviews-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-viewport {
  overflow: hidden;
  flex: 1;
}

.reviews-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s ease;
  will-change: transform;
}

.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  flex: 0 0 calc((100% - 48px) / 3); /* 3 per view (gap 24px x2) */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 12px;
}

.review-name {
  font-size: 17px;
  margin-bottom: 6px;
}

.review-stars {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.review-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.review-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}

.review-nav:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 63, 114, 0.25);
}

/* ─── Dukungan & Masukan ───────────────────────────────── */
.support {
  padding: 80px 0;
}

.support-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.support-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.support-card p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 26em;
  margin-bottom: 24px;
}

.support-btn {
  margin-top: auto;
  display: inline-block;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}

.support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(59, 63, 114, 0.18);
}

.support-btn--primary {
  background: var(--primary);
  color: #fff;
}

.support-btn--primary:hover {
  background: var(--primary-dark);
}

/* ─── Legal / Privacy page ─────────────────────────────── */
.legal {
  padding: 56px 0 72px;
}

.legal-inner {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.legal h2 {
  font-size: 22px;
  margin: 32px 0 12px;
}

.legal p {
  color: var(--text);
  margin-bottom: 14px;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
  color: var(--text);
}

.legal a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

.legal-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.legal-back a {
  text-decoration: none;
  font-weight: 600;
}

/* ─── Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 28em;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ─── Scroll reveal ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Respect users who prefer reduced motion: drop the float, tilt, and reveal
   so nothing animates or hides content. */
@media (prefers-reduced-motion: reduce) {
  .phone-stage {
    animation: none;
    transform: rotateY(-12deg);
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .hero-art {
    order: -1;
    margin-bottom: 24px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .nav a:not(.nav-cta) {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .support-inner {
    grid-template-columns: 1fr;
  }

  .review-card {
    flex-basis: 100%;
  }

  .store-badge {
    flex: 1;
    justify-content: center;
  }
}
