/* WordTap marketing site — shared styles.
   Palette mirrors the in-game palette.gd (teal accent on slate). */

:root {
  color-scheme: dark light;
  --bg: #0f172a;
  --bg-alt: #111827;
  --card: #1e293b;
  --card-border: #334155;
  --teal: #1d9e75;
  --teal-bright: #2eb88a;
  --cyan: #06b6d4;
  --amber: #fbbf24;
  --text: #f8fafc;
  --text-body: #e2e8f0;
  --text-dim: #cbd5e1;
  --text-faint: #94a3b8;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f1f5f9;
    --card: #f8fafc;
    --card-border: #dbe2ea;
    --teal: #157a5a;
    --teal-bright: #10704f;
    --text: #0f172a;
    --text-body: #1e293b;
    --text-dim: #334155;
    --text-faint: #5b6b80;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

a { color: var(--teal-bright); }
a:hover { color: var(--teal); }

h1, h2, h3 { color: var(--text); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.01em; margin-top: 0; }
h3 { font-size: 1.1rem; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 62px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: .93rem; }
.site-nav a:hover { color: var(--teal-bright); }

/* Language switcher — a segmented control, deliberately not styled like the nav
   links next to it, so it doesn't read as one more menu entry. */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 14px; padding: 3px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}
.lang-switch svg {
  width: 15px; height: 15px; margin: 0 3px 0 6px;
  fill: none; stroke: var(--text-faint); stroke-width: 1.6;
}
.lang-switch a {
  padding: 4px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .03em;
  color: var(--text-faint); text-decoration: none; line-height: 1.45;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current] { background: var(--teal); color: #fff; }
.lang-switch a[aria-current]:hover { color: #fff; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.18rem; color: var(--text-dim); max-width: 46ch; }
.hero-shot { justify-self: center; max-width: 300px; width: 100%; }
.hero-shot img {
  width: 100%; height: auto; border-radius: 26px;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--teal-bright);
  margin-bottom: 12px;
}

/* --- Store buttons ------------------------------------------------------ */
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .97rem;
  background: var(--teal); color: #ffffff;
  border: 1px solid transparent;
}
.store-btn:hover { background: var(--teal-bright); color: #fff; }
.store-btn.alt {
  background: transparent; color: var(--text);
  border-color: var(--card-border);
}
.store-btn.alt:hover { background: var(--card); color: var(--text); }
.store-btn svg { width: 20px; height: 20px; fill: currentColor; }
.price-note { font-size: .88rem; color: var(--text-faint); margin: 0; }

/* --- Sections ----------------------------------------------------------- */
section { padding: 52px 0; border-top: 1px solid var(--card-border); }
section.plain { border-top: none; }
.section-intro { color: var(--text-dim); max-width: 60ch; margin-top: -.3em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 30px; }
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--text-dim); font-size: .95rem; }
.card .ico { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: 10px; }

/* --- Steps -------------------------------------------------------------- */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 26px 0 0; }
ol.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 18px 52px; color: var(--text-dim);
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal); color: #fff; font-weight: 700; font-size: .95rem;
}
ol.steps li strong { color: var(--text); }

/* Tile demo row */
.tiles { display: flex; gap: 8px; margin: 22px 0 4px; flex-wrap: wrap; }
.tile {
  width: 46px; height: 46px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.15rem; color: #fff;
  background: #334155; border: 2px solid #3b4b63;
}
.tile.green { background: var(--teal); border-color: var(--teal); }
.tile.yellow { background: var(--amber); border-color: var(--amber); color: #0f172a; }
.tiles-legend { font-size: .88rem; color: var(--text-faint); margin: 0; }

/* --- Screenshot strip --------------------------------------------------- */
.shots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px; margin-top: 28px;
}
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; border-radius: 18px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.shots figcaption { font-size: .85rem; color: var(--text-faint); text-align: center; margin-top: 10px; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { margin-top: 26px; }
.faq details {
  border: 1px solid var(--card-border); border-radius: var(--radius);
  background: var(--card); padding: 16px 20px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal-bright); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-dim); margin: 12px 0 0; }

/* --- CTA band ----------------------------------------------------------- */
.cta { text-align: center; }
.cta .stores { justify-content: center; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 34px 0 48px; margin-top: 20px;
  color: var(--text-faint); font-size: .9rem;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer p { margin: 0 0 6px; }
.views[hidden] { display: none; }
.views b { color: var(--text-dim); font-weight: 600; font-variant-numeric: tabular-nums; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--teal-bright); }

/* --- Article pages (privacy, support) ----------------------------------- */
.article { padding: 48px 0 72px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.article h2 { font-size: 1.22rem; margin-top: 2.2rem; }
.article ul { padding-left: 22px; }
.article li { margin-bottom: .5em; }
.muted { color: var(--text-faint); font-size: .9rem; }
.callout {
  background: var(--card); border: 1px solid var(--card-border);
  border-left: 3px solid var(--teal); border-radius: 10px;
  padding: 16px 20px; margin: 22px 0;
}
.callout p { margin: 0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 820px) {
  .hero { padding: 40px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-shot { max-width: 250px; }
  section { padding: 40px 0; }
}

@media (max-width: 700px) {
  /* A wrapped nav makes a sticky header eat half the viewport — let it scroll away. */
  .site-header { position: static; }
  .site-header .wrap { min-height: 0; padding-block: 12px; gap: 10px; }
  /* Brand and the language switcher share the first row; the menu wraps below. */
  .site-nav { order: 3; gap: 8px 14px; margin-left: 0; width: 100%; }
  .site-nav a { font-size: .86rem; }
  .lang-switch { order: 2; margin-left: auto; }
  .store-btn { width: 100%; justify-content: center; }
  .cta .store-btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
