/* ==========================================================================
   Leafword: Green Verse — landing page styles
   Style: Serene Botanical Zen  ·  Casual Gaming vertical
   Palette: Forest Emerald on Misty Cream
   Mobile-first: base rules target <=768px; min-width queries enhance upward.
   ========================================================================== */

:root {
  /* Color scheme — Forest Emerald on Misty Cream (WCAG AA verified) */
  --cream: #f5f8ef;          /* page background */
  --cream-soft: #eef3e4;     /* alternating section wash */
  --card: #ffffff;           /* card surface */
  --ink: #1c3326;            /* primary text — ~11:1 on cream */
  --ink-soft: #3c4d42;       /* secondary text — ~7:1 on cream */
  --emerald: #176b43;        /* brand primary — white text ~5.3:1 */
  --emerald-deep: #0f4f31;   /* hover / darker green */
  --sage: #7fa06a;           /* muted accent */
  --dew: #2f9e8f;            /* dewdrop teal accent */
  --leaf-line: rgba(23, 107, 67, 0.16); /* botanical hairlines */
  --disabled-grey: #2a2a2a;  /* Coming Soon plate (neutral, brand-independent) */

  --radius: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 28px rgba(20, 60, 40, 0.10);
  --shadow-hover: 0 14px 40px rgba(20, 60, 40, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.4em;
  font-weight: 600;
}

p { margin: 0 0 1em; }

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--emerald-deep); }

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

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

.section { padding: 56px 0; }
.section--soft { background: var(--cream-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title { font-size: 1.7rem; text-align: center; }
.section-intro {
  max-width: 620px;
  margin: 0 auto 34px;
  text-align: center;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Motion — Drifting Leaves & Gentle Fade-in
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .leaf-drift { animation: none !important; }
}

/* --------------------------------------------------------------------------
   Header — sticky, 48px mobile / 64px desktop
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 48px;
  display: flex;
  align-items: center;
  background: rgba(245, 248, 239, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--leaf-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
}

.main-nav { display: none; }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--emerald);
  color: #fff;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.header-cta svg { width: 20px; height: 20px; }
.header-cta:hover { background: var(--emerald-deep); color: #fff; }
.header-cta:active { transform: scale(0.94); }
.header-cta-text { display: none; }

/* --------------------------------------------------------------------------
   Hero — Overlapping Card on Leaf Texture
   Mobile: stacked (copy, buttons, banner). Desktop: two columns.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 56px;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(47, 158, 143, 0.10), transparent 60%),
    linear-gradient(180deg, #eef4e3 0%, var(--cream) 70%);
}
.hero .wrap { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(23, 107, 67, 0.08);
  border: 1px solid var(--leaf-line);
  color: var(--emerald);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-icon { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow-soft); margin-bottom: 18px; }

.hero h1 { font-size: 2.15rem; margin-bottom: 14px; }
.hero h1 .accent { color: var(--emerald); }

.hero-sub { font-size: 1.08rem; max-width: 540px; margin-bottom: 26px; }

.hero-banner-frame {
  margin-top: 34px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--leaf-line);
  background: var(--card);
}
.hero-banner-frame img { width: 100%; height: auto; }

/* Decorative drifting leaves */
.leaf-drift {
  position: absolute;
  z-index: 1;
  color: var(--sage);
  opacity: 0.5;
  pointer-events: none;
}
.leaf-drift svg { width: 100%; height: 100%; }
.leaf-drift--1 { top: 8%; left: -18px; width: 60px; height: 60px; animation: drift 14s ease-in-out infinite; }
.leaf-drift--2 { top: 40%; right: 4%; width: 42px; height: 42px; opacity: 0.35; animation: drift 18s ease-in-out infinite reverse; }
.leaf-drift--3 { bottom: 10%; left: 12%; width: 34px; height: 34px; opacity: 0.3; animation: drift 22s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

/* --------------------------------------------------------------------------
   Download buttons — Soft Pill Buttons with Leaf Accent
   -------------------------------------------------------------------------- */
.store-buttons { display: flex; flex-direction: column; gap: 12px; }

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  text-align: left;
  border: none;
  cursor: pointer;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-btn .label-top { display: block; font-size: 0.72rem; line-height: 1.1; opacity: 0.85; }
.store-btn .label-main { display: block; font-size: 1.12rem; font-weight: 700; line-height: 1.15; }

/* Google Play — live, brand green */
.store-btn--play {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 107, 67, 0.28);
}
.store-btn--play:hover { background: var(--emerald-deep); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.store-btn--play:active { transform: translateY(0) scale(0.98); }

/* App Store — disabled Coming Soon (neutral grey, brand-independent) */
.store-btn--soon {
  position: relative;
  background: var(--disabled-grey);
  color: #cfcfcf;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.store-btn--soon .corner-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: var(--sage);
  color: #17331f;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Features — botanical dewdrop cards
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--leaf-line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(47, 158, 143, 0.12);
  color: var(--dew);
  margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.18rem; }
.feature-card p { margin-bottom: 0; font-size: 0.97rem; }

/* --------------------------------------------------------------------------
   Download CTA — full-width green wash
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(150deg, var(--emerald-deep), var(--emerald) 70%, var(--dew));
  color: #fff;
  text-align: center;
  padding: 60px 0;
}
.cta-band h2 { color: #fff; font-size: 2rem; }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 520px; margin: 0 auto 28px; }
.cta-band .store-buttons { align-items: stretch; max-width: 340px; margin: 0 auto; }
.cta-band .store-btn--play { background: #fff; color: var(--emerald-deep); }
.cta-band .store-btn--play:hover { background: var(--cream); color: var(--emerald-deep); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.about-inner img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px; box-shadow: var(--shadow-soft); }
.about-contact { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #c9d6cc;
  padding: 40px 0 30px;
  font-size: 0.9rem;
}
.footer-top { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }
.footer-brand span { font-family: var(--font-serif); font-size: 1.05rem; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #c9d6cc; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-bottom a { color: #c9d6cc; }

/* --------------------------------------------------------------------------
   Mobile sticky bottom CTA — hidden on desktop
   -------------------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(245, 248, 239, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--leaf-line);
  transform: translateY(120%);
  transition: transform 0.35s var(--ease);
}
.sticky-cta.is-shown { transform: translateY(0); }
.sticky-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: var(--radius-pill);
  background: var(--emerald);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.sticky-cta a:active { transform: scale(0.98); }
.sticky-cta svg { width: 22px; height: 22px; }

/* ==========================================================================
   Tablet — >= 768px
   ========================================================================== */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .site-header { height: 64px; }
  .brand img { width: 34px; height: 34px; }
  .section { padding: 76px 0; }

  .main-nav { display: flex; align-items: center; gap: 26px; }
  .main-nav a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
  .main-nav a:hover { color: var(--emerald); }

  .header-cta { width: auto; height: 42px; padding: 0 20px; gap: 8px; }
  .header-cta-text { display: inline; font-weight: 700; font-size: 0.92rem; }
  .header-cta svg { display: none; }

  .hero { padding: 72px 0 88px; }
  .hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; }
  .hero h1 { font-size: 3rem; }
  .hero-banner-frame { margin-top: 0; }
  .store-buttons { flex-direction: row; flex-wrap: wrap; }
  .store-btn { flex: 0 0 auto; }

  .section-title { font-size: 2.1rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .footer-top { flex-direction: row; justify-content: space-between; align-items: center; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }

  .sticky-cta { display: none; }
}

/* ==========================================================================
   Desktop — >= 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  .hero h1 { font-size: 3.4rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-band .store-buttons { max-width: 420px; }
}
