/* ==========================================================================
   Word in Heart — shared site styles
   Palette derived from the app icon (sapling on orange gradient).
   NOTE: swap the hex values below once the real icon file is available —
   these are a close approximation, not sampled from the actual asset.
   ========================================================================== */

:root {
  --color-orange-1: #ff9152;
  --color-orange-2: #ff5e3a;
  --color-green: #2e7d4f;
  --color-green-light: #4caf7d;
  --color-soil: #5b3a24;
  --color-bg: #fff8f1;
  --color-bg-alt: #fdece0;
  --color-text: #2a2420;
  --color-text-muted: #6b6058;
  --color-white: #ffffff;
  --shadow-soft: 0 4px 20px rgba(91, 58, 36, 0.08);
  --radius: 16px;
  --max-width: 1080px;
  --font-main: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

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

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

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(91, 58, 36, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.brand img { width: 36px; height: 36px; border-radius: 50%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
}

.nav-links a { color: var(--color-text); }

.lang-toggle {
  display: flex;
  border: 1px solid rgba(91, 58, 36, 0.2);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--color-text-muted);
}

.lang-toggle button.active {
  background: linear-gradient(135deg, var(--color-orange-1), var(--color-orange-2));
  color: white;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-orange-1), var(--color-orange-2));
  color: white;
  box-shadow: 0 8px 24px rgba(255, 94, 58, 0.28);
}

.btn-primary:hover { text-decoration: none; opacity: 0.92; }

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid rgba(91, 58, 36, 0.18);
}

.btn-secondary:hover { text-decoration: none; border-color: var(--color-soil); }

.btn-disabled {
  background: #efe6dc;
  color: var(--color-text-muted);
  cursor: not-allowed;
  border: 1px dashed rgba(91, 58, 36, 0.25);
}

.btn-disabled:hover { text-decoration: none; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.badge-soon {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-green);
  background: rgba(46, 125, 79, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

/* ---- Hero ---- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero-logo { width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 50%; box-shadow: var(--shadow-soft); }

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  line-height: 1.15;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero .cta-row { justify-content: center; }

/* ---- Sections ---- */
section { padding: 64px 0; }

.section-alt { background: var(--color-bg-alt); }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-orange-1), var(--color-orange-2));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.3rem;
  margin-bottom: 16px;
}

.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

/* ---- Community ladder ---- */
.ladder {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.ladder-step {
  background: var(--color-white);
  border: 1px solid rgba(91, 58, 36, 0.12);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

.ladder-arrow { align-self: center; color: var(--color-text-muted); }

/* ---- Screenshots ---- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.screenshot-shot {
  margin: 0;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.screenshot-shot img {
  width: 100%;
  aspect-ratio: 9 / 20;
  object-fit: cover;
  object-position: top;
  display: block;
}

.screenshot-shot figcaption {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ---- Signup / final CTA ---- */
.cta-band {
  background: linear-gradient(135deg, var(--color-orange-1), var(--color-orange-2));
  color: white;
  border-radius: 28px;
  padding: 56px 32px;
  text-align: center;
}

.cta-band h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { margin: 0 0 28px; opacity: 0.92; }
.cta-band .btn-secondary { background: white; }
.cta-band .cta-row { justify-content: center; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid rgba(91, 58, 36, 0.1);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--color-text-muted); }

/* ---- Legal pages (privacy.html / terms.html) ---- */
.legal-page { padding: 48px 0 80px; }

.legal-page h1 { font-size: 1.9rem; margin-bottom: 4px; }

.legal-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  border-bottom: 2px solid var(--color-bg-alt);
  padding-bottom: 8px;
}

.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 8px; }

.legal-callout {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
}

/* ---- Language visibility ---- */
/* !important guards against more specific component rules (e.g. .screenshot-shot img)
   that also set `display`, so the language toggle always wins. */
[data-lang-block] { display: none !important; }
[data-lang-block].active { display: block !important; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  .nav-links span.nav-text { display: none; }
  .hero { padding: 48px 0 40px; }
  section { padding: 48px 0; }
}
