/* Word Sprig marketing site: one stylesheet, cozy storybook palette from the game (Theme.swift). */
:root {
  --leaf-dark: #1f5a2e;
  --leaf: #2e7d3b;
  --leaf-light: #8cc75c;
  --cream: #fff8e6;
  --parchment: #f5ebd1;
  --gold: #e8b547;
  --gold-deep: #c8902a;
  --ink: #2b3a29;
  --ink-soft: #5b6b57;
  --lavender: #b39ae0;
  --night: #1d2457;
  --card: #fffdf6;
  --shadow: 0 10px 30px rgba(43, 58, 41, 0.14);
  --radius: 22px;
  --head: "Fredoka", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", "Hiragino Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(1200px 600px at 85% -10%, #fde9b8 0%, transparent 60%),
                    radial-gradient(900px 500px at -10% 30%, #e3f1d2 0%, transparent 60%);
  overflow-x: clip;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); }
a:hover { color: var(--leaf-dark); }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0 0 0.5em; color: var(--leaf-dark); font-weight: 700; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.grad { background: linear-gradient(90deg, var(--leaf) 0%, var(--gold-deep) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: var(--gold-deep); margin-bottom: 0.6em; }

/* Ambient canvas: fireflies and petals drifting behind everything. */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 48px; padding: 0.7em 1.4em;
  font-family: var(--head); font-weight: 600; font-size: 1.05rem; text-decoration: none;
  color: var(--cream); background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-dark) 100%);
  border: 2px solid var(--gold); border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(31, 90, 46, 0.25), var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { color: var(--cream); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(31, 90, 46, 0.25); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 44px; padding: 0.45em 1.1em; font-size: 0.95rem; white-space: nowrap; }
.btn-ghost { color: var(--leaf-dark); background: var(--card); border-color: rgba(232, 181, 71, 0.8); }
.btn-ghost:hover { color: var(--leaf-dark); }

/* ---------- Top bar ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(255, 248, 230, 0.86);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(232, 181, 71, 0.35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--leaf-dark); font-family: var(--head); font-weight: 700; font-size: 1.25rem; margin-right: auto; white-space: nowrap; }
.brand img { border-radius: 10px; }
header.nav nav { display: flex; gap: 2px; align-items: center; }
header.nav nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 10px 10px; border-radius: 10px; white-space: nowrap; }
header.nav nav a:hover { background: rgba(140, 199, 92, 0.2); color: var(--leaf-dark); }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(232, 181, 71, 0.6); background: var(--card); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 2.5px; border-radius: 2px; background: var(--leaf-dark); transition: transform 0.2s ease, opacity 0.2s ease; }
/* Language menus (only present once tools/website/site.json lists more languages). */
.lang-pick { position: relative; }
.lang-pick summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 4px; padding: 0 10px; border-radius: 12px; font-weight: 800; color: var(--leaf-dark); }
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover { background: rgba(140, 199, 92, 0.2); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid rgba(232, 181, 71, 0.5); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 150px; display: grid; }
.lang-menu a { padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: rgba(140, 199, 92, 0.2); }
.menu-langs { display: none; }
.lang-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: var(--leaf-dark); color: var(--cream); font-weight: 700; }
.lang-banner a { color: var(--gold); }
.lang-banner button { background: none; border: 0; color: var(--cream); font-size: 1.4rem; width: 44px; height: 44px; cursor: pointer; }

@media (max-width: 1080px) {
  .menu-toggle { display: flex; }
  header.nav nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--cream);
    border-bottom: 1px solid rgba(232, 181, 71, 0.4); box-shadow: var(--shadow);
    display: none;
  }
  header.nav.open nav { display: flex; }
  .lang-pick { display: none; }
  .menu-langs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 8px 0; font-weight: 800; }
  .menu-langs a { border-bottom: 0 !important; padding: 8px 10px !important; }
  header.nav nav a { padding: 12px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(43, 58, 41, 0.07); }
  header.nav.open .menu-toggle span:nth-child(1) { transform: translateY(9.75px) rotate(45deg); }
  header.nav.open .menu-toggle span:nth-child(2) { opacity: 0; }
  header.nav.open .menu-toggle span:nth-child(3) { transform: translateY(-9.75px) rotate(-45deg); }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}

/* ---------- Layout ---------- */
main { display: block; }
.section { padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 48px); max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.sub { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 1180px; margin: 0 auto; padding: clamp(36px, 6vw, 80px) clamp(16px, 5vw, 48px) clamp(24px, 4vw, 48px);
}
.hero-logo { width: min(320px, 70%); margin: 0 0 6px -6px; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.hero-art { position: relative; min-height: 520px; }
.hero-art .phone { position: absolute; width: min(250px, 46%); }
.hero-art .tilt-l { left: 6%; top: 0; transform: rotate(-5deg); z-index: 2; }
.hero-art .tilt-r { right: 6%; top: 46px; transform: rotate(5deg); }
.hero-art .mascot { position: absolute; width: 150px; left: 40%; bottom: -10px; z-index: 3; filter: drop-shadow(0 8px 12px rgba(43, 58, 41, 0.25)); }
.quick-facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-facts li { background: var(--card); border: 1px solid rgba(232, 181, 71, 0.5); border-radius: 999px; padding: 6px 14px; font-size: 0.95rem; }
.quick-facts b { font-family: var(--head); color: var(--leaf); }

/* Phone mockup: a rounded frame around a real screenshot (no drawn hardware details). */
.phone { border-radius: 34px; padding: 7px; background: #1e2a1f; box-shadow: 0 24px 50px rgba(31, 60, 35, 0.28); }
.phone img, .phone video { border-radius: 27px; width: 100%; }

/* ---------- Sign-up ---------- */
#get { scroll-margin-top: 90px; }
.notify-wrap { margin: 22px 0 6px; max-width: 520px; }
.coming { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--leaf-dark); margin-bottom: 10px; }
form.notify { display: flex; gap: 8px; flex-wrap: wrap; }
form.notify input[type="email"] {
  flex: 1 1 220px; min-height: 50px; padding: 0 18px; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: #fff; border: 2px solid rgba(46, 125, 59, 0.35); border-radius: 999px;
}
form.notify input[type="email"]:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(140, 199, 92, 0.3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notify-msg { min-height: 1.6em; margin: 8px 4px 0; font-weight: 800; color: var(--leaf); }
.notify-msg.bad { color: #b0412e; }
.notify-note { font-size: 0.9rem; color: var(--ink-soft); margin: 2px 4px 0; }
.see-inside { margin-top: 8px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 14px 0; background: var(--leaf-dark); color: var(--cream); border-block: 3px solid var(--gold); }
.marquee .track { display: flex; gap: 38px; width: max-content; animation: marquee 50s linear infinite; font-family: var(--head); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.marquee span::before { content: "✦"; color: var(--gold); margin-right: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* ---------- Story ---------- */
.story { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.page { margin: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(232, 181, 71, 0.45); }
.page img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.page figcaption { padding: 14px 18px 18px; font-size: 0.98rem; color: var(--ink); }
.page figcaption b { display: block; font-family: var(--head); color: var(--gold-deep); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Features ---------- */
.feature { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 70px); align-items: center; margin-bottom: clamp(56px, 8vw, 96px); }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-art { display: flex; justify-content: center; }
.feature-art .phone { width: min(290px, 100%); }
.chip { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; background: rgba(140, 199, 92, 0.25); color: var(--leaf-dark); margin-bottom: 10px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%; background: var(--leaf-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ---------- Friends ---------- */
.friends { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.friend { text-align: center; margin: 0; }
.friend img { width: 100%; max-width: 150px; margin: 0 auto 6px; filter: drop-shadow(0 8px 10px rgba(43, 58, 41, 0.18)); transition: transform 0.25s ease; }
.friend:hover img { transform: translateY(-6px) rotate(-3deg); }
.friend h3 { font-size: 1.05rem; margin: 0; }
.friend p { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }

/* ---------- Worlds ---------- */
.worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.world { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 4; }
.world img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.world:hover img { transform: scale(1.05); }
.world figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(16, 32, 20, 0.85)); }
.world h3 { color: #fff; margin: 0; font-size: 1.15rem; }
.world p { margin: 0; font-size: 0.88rem; opacity: 0.92; }
.world .key { display: inline-block; margin-top: 4px; font-family: var(--head); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--gold); }

/* ---------- Modes ---------- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mode { background: var(--card); border: 1px solid rgba(232, 181, 71, 0.45); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.mode-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(140, 199, 92, 0.22); margin-bottom: 12px; }
.mode-icon svg { width: 28px; height: 28px; color: var(--leaf); }
.mode h3 { margin-bottom: 0.3em; }
.mode p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Garden species strip ---------- */
.species { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.species img { width: 76px; height: 76px; object-fit: contain; padding: 6px; background: var(--card); border-radius: 18px; border: 1px solid rgba(232, 181, 71, 0.45); }

/* ---------- Beyond the app ---------- */
.beyond { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.widgets { display: grid; grid-template-columns: 1fr; gap: 16px; }
.widgets img { border-radius: 26px; box-shadow: var(--shadow); }
.widget-pair { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: center; }
/* Rounded like the real widgets, which also trims the wallpaper left in the screenshot corners. */
.widget-pair img { box-shadow: var(--shadow); }
.widget-pair img:first-child { border-radius: 14%; }
.widget-pair img:last-child { border-radius: 7% / 15%; }
.share-card { width: 100%; max-width: 340px; margin: 0 auto; border-radius: 28px; box-shadow: var(--shadow); }
figure { margin: 0; }
figcaption.cap { text-align: center; font-weight: 800; color: var(--ink-soft); margin-top: 10px; font-size: 0.95rem; }

/* ---------- Duo ---------- */
.duo-card { background: linear-gradient(135deg, var(--leaf-dark), #2a6b45); color: var(--cream); border-radius: 30px; padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow); }
.duo-card h2 { color: var(--cream); }
.duo-card .sub { color: rgba(255, 248, 230, 0.86); }
.duo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.duo-list li { background: rgba(255, 248, 230, 0.1); border: 1px solid rgba(232, 181, 71, 0.45); border-radius: 14px; padding: 10px 14px; font-weight: 700; }

/* ---------- Promise ---------- */
.promise .mode { text-align: center; }
.promise .big { font-family: var(--head); font-size: 3rem; color: var(--leaf); line-height: 1; margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid rgba(232, 181, 71, 0.45); border-radius: 18px; padding: 4px 22px; margin: 0 auto 12px; max-width: 820px; box-shadow: 0 4px 14px rgba(43, 58, 41, 0.06); }
.faq summary { cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 1.12rem; color: var(--leaf-dark); padding: 14px 28px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.5rem; color: var(--gold-deep); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); }

/* ---------- Final CTA ---------- */
.final { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 16px; }
.final img { margin: 0 auto 10px; }
.final .notify-wrap { margin: 18px auto 0; text-align: left; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 40px 16px 50px; background: var(--leaf-dark); color: var(--cream); }
.footer a { color: var(--cream); }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--head); font-size: 1.2rem; font-weight: 700; }
.footer-brand img { border-radius: 8px; }
.footer nav { display: flex; justify-content: center; gap: 22px; margin: 14px 0; flex-wrap: wrap; }
.footer nav a { font-weight: 800; text-decoration: none; padding: 10px 4px; }
.credit { margin: 6px 0 0; opacity: 0.9; }
.fine { font-size: 0.85rem; opacity: 0.75; margin: 8px 0 0; }
.lang-switch { margin: 8px 0 0; }
.lang-switch a { margin: 0 4px; }

/* ---------- Plain pages (support, privacy, 404) ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 5vw, 32px); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc h2 { font-size: 1.45rem; margin-top: 1.6em; }
.doc .card { background: var(--card); border: 1px solid rgba(232, 181, 71, 0.45); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 20px 0; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.5em; }
.lost { text-align: center; }
.lost img { margin: 0 auto 16px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.bob { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .bob { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .hero-art { min-height: 0; height: clamp(380px, 95vw, 560px); max-width: 520px; width: 100%; margin: 0 auto; }
  .feature, .beyond { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .story { grid-template-columns: repeat(2, 1fr); }
  .friends { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .story { grid-template-columns: 1fr; }
  .friends { grid-template-columns: repeat(3, 1fr); }
  .hero-art .phone { width: 48%; }
  .hero-art .mascot { width: 110px; left: 36%; }
  .widget-pair { grid-template-columns: 1fr; justify-items: center; }
  .widget-pair img:first-child { max-width: 220px; }
  form.notify .btn { flex: 1 1 100%; }
}
