/* ============================================================
   Wordle Plus - site styles
   Palette grounded in the app's own tile system.
   ============================================================ */

:root {
  --cream: #FBF5E9;
  --surface: #FFFFFF;
  --surface-2: #F5EFE1;
  --ink: #2A2521;
  --ink-soft: #574F47;
  --muted: #8B8178;
  --line: rgba(42, 37, 33, .12);
  --line-strong: rgba(42, 37, 33, .22);

  --pink: #EC4899;
  --pink-600: #DB2777;
  --green: #57B368;
  --green-600: #45965A;
  --amber: #F2A72E;
  --slate: #9AA0A6;

  --tile-empty: #ECE5D6;
  --tile-empty-border: rgba(42, 37, 33, .16);

  --shadow-sm: 0 4px 14px rgba(42, 37, 33, .08);
  --shadow-md: 0 14px 36px rgba(42, 37, 33, .12);

  --r-card: 20px;
  --r-tile: 12px;
  --maxw: 1160px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --cream: #100E14;
  --surface: #1A181F;
  --surface-2: #23202A;
  --ink: #F3F0EA;
  --ink-soft: #CBC6CF;
  --muted: #968FA0;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --tile-empty: #2A2732;
  --tile-empty-border: rgba(255, 255, 255, .12);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .40);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.08; }

a { color: inherit; }

img, svg { display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* language visibility */
body.lang-tr .en { display: none; }
body.lang-en .tr { display: none; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: .2px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .plus { color: var(--pink); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a.navlink {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px;
  padding: 9px 14px; border-radius: 10px; transition: background .2s, color .2s;
}
.nav a.navlink:hover { background: var(--surface-2); color: var(--ink); }

.controls { display: flex; align-items: center; gap: 8px; margin-left: 6px; }

.toggle {
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 13px;
}
.lang-toggle { display: inline-flex; overflow: hidden; padding: 0; }
.lang-toggle button {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 12px; cursor: pointer; font-family: var(--font-body); font-weight: 800; font-size: 13px;
  transition: background .2s, color .2s;
}
.lang-toggle button.active { background: var(--pink); color: #fff; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 12px; cursor: pointer;
}
.icon-btn svg { width: 19px; height: 19px; }
html[data-theme="dark"] .icon-btn .i-sun { display: block; }
html[data-theme="dark"] .icon-btn .i-moon { display: none; }
.icon-btn .i-sun { display: none; }
.icon-btn .i-moon { display: block; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 12px; cursor: pointer; border: 0;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
}
.btn-pink { background: var(--pink); color: #fff; box-shadow: 0 8px 20px rgba(236, 72, 153, .32); }
.btn-pink:hover { background: var(--pink-600); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }

.menu-btn { display: none; }

/* ---------------- hero ---------------- */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13.5px; color: var(--green-600);
  background: color-mix(in srgb, var(--green) 16%, transparent);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
html[data-theme="dark"] .eyebrow { color: #8fe0a3; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.hero h1 { font-size: clamp(40px, 6vw, 66px); margin: 0 0 18px; letter-spacing: -.5px; }
.hero h1 .plus { color: var(--pink); }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 52ch; margin: 0 0 28px; }

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

.appstore {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: #111; color: #fff; padding: 11px 20px 11px 18px; border-radius: 14px;
  transition: transform .12s ease, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.appstore:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
html[data-theme="dark"] .appstore { background: #fff; color: #111; }
.appstore svg { width: 26px; height: 26px; }
.appstore .as-small { font-size: 11px; opacity: .82; line-height: 1; margin-bottom: 3px; letter-spacing: .2px; }
.appstore .as-big { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1; }

.hero-meta { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta .m { display: flex; flex-direction: column; }
.hero-meta .m b { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--ink); }
.hero-meta .m span { font-size: 13.5px; color: var(--muted); font-weight: 700; }

/* phone mock */
.phone {
  position: relative; width: 300px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 42px; padding: 16px 16px 22px;
  box-shadow: var(--shadow-md);
}
.phone::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 96px; height: 6px; border-radius: 999px; background: var(--line-strong); }
.phone-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 14px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--muted); }
.phone-top .plus { color: var(--pink); }

.board { display: grid; grid-template-rows: repeat(3, 1fr); gap: 7px; }
.board .brow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.tile {
  aspect-ratio: 1; border-radius: var(--r-tile); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 21px; color: #fff;
  background: var(--tile-empty); color: var(--ink);
  border: 2px solid var(--tile-empty-border);
}
.tile.green { background: var(--green); border-color: var(--green); color: #fff; }
.tile.amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.tile.slate { background: var(--slate); border-color: var(--slate); color: #fff; }

/* one orchestrated reveal on load */
.board.reveal .tile { animation: flip .5s ease both; }
.board.reveal .brow:nth-child(1) .tile { animation-delay: calc(var(--i) * .08s); }
.board.reveal .brow:nth-child(2) .tile { animation-delay: calc(.45s + var(--i) * .08s); }
.board.reveal .brow:nth-child(3) .tile { animation-delay: calc(.9s + var(--i) * .08s); }
@keyframes flip {
  0% { transform: rotateX(-90deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .board.reveal .tile { animation: none; }
}

.mini-keys { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 16px; }
.mini-keys span { height: 20px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); flex: 1 1 8%; min-width: 16px; }
.mini-keys span.g { background: var(--green); border-color: var(--green); }
.mini-keys span.a { background: var(--amber); border-color: var(--amber); }

.float-plus {
  position: absolute; right: -14px; bottom: 64px; width: 52px; height: 52px;
  background: var(--amber); border-radius: 15px; display: grid; place-items: center;
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 30px;
  box-shadow: var(--shadow-md); transform: rotate(-6deg);
}

/* ---------------- section base ---------------- */
.section { padding: 74px 0; }
.section[id] { scroll-margin-top: 84px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 14px; letter-spacing: -.3px; }
.section-head p { font-size: 17.5px; color: var(--ink-soft); margin: 0; }

.alt { background: var(--surface-2); }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 20px; margin: 16px 0 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.ftile {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff;
}
.ftile svg { width: 24px; height: 24px; }
.ftile.green { background: var(--green); }
.ftile.amber { background: var(--amber); }
.ftile.pink { background: var(--pink); }
.ftile.slate { background: var(--slate); }

/* word length band */
.lengths { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.len-tile {
  width: 74px; height: 84px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); display: grid; place-content: center; text-align: center;
  box-shadow: var(--shadow-sm);
}
.len-tile b { font-family: var(--font-display); font-weight: 600; font-size: 30px; display: block; }
.len-tile span { font-size: 12px; color: var(--muted); font-weight: 800; text-transform: none; }
.len-tile.on { background: var(--pink); border-color: var(--pink); box-shadow: 0 10px 24px rgba(236,72,153,.30); }
.len-tile.on b, .len-tile.on span { color: #fff; }

/* categories */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 14px; text-align: center; box-shadow: var(--shadow-sm);
}
.cat .cicon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center; }
.cat .cicon svg { width: 28px; height: 28px; }
.cat b { font-family: var(--font-display); font-weight: 600; font-size: 16px; }

/* stats showcase */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.stat-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px;
  box-shadow: var(--shadow-md);
}
.stat-row { display: flex; gap: 8px; margin-bottom: 22px; }
.stat-cell { flex: 1; text-align: center; }
.stat-cell b { font-family: var(--font-display); font-weight: 600; font-size: 30px; display: block; }
.stat-cell span { font-size: 12px; color: var(--muted); font-weight: 800; }
.dist { display: grid; gap: 8px; }
.dist .d { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: center; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.dist .bar { height: 26px; border-radius: 7px; background: var(--green); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: #fff; font-weight: 800; font-size: 13px; min-width: 30px; }
.dist .bar.empty { background: var(--tile-empty); color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.badge {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 10px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.badge .bico { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; }
.badge .bico svg { width: 22px; height: 22px; color: #fff; }
.badge b { font-family: var(--font-display); font-weight: 600; font-size: 14px; display: block; }
.badge span { font-size: 11.5px; color: var(--muted); font-weight: 700; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--pink), #b83aa0);
  color: #fff; border-radius: 28px; padding: 54px 40px; text-align: center;
  box-shadow: 0 24px 60px rgba(236, 72, 153, .34);
}
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; color: #fff; }
.cta-band p { font-size: 18px; margin: 0 0 26px; opacity: .95; }
.cta-band .appstore { background: #fff; color: #111; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 46px 0 34px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 19px; margin-bottom: 12px; }
.foot-brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-footer p { color: var(--muted); font-size: 14.5px; margin: 0 0 6px; max-width: 40ch; }
.foot-col h4 { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin: 4px 0 12px; }
.foot-col a { display: block; text-decoration: none; color: var(--ink-soft); font-size: 14.5px; font-weight: 700; padding: 5px 0; }
.foot-col a:hover { color: var(--pink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 700; }

/* ---------------- legal page ---------------- */
.legal-hero { padding: 54px 0 22px; }
.legal-hero h1 { font-size: clamp(32px, 5vw, 48px); margin: 8px 0 10px; }
.legal-hero p { color: var(--ink-soft); font-size: 16px; margin: 0; }
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 44px; padding-bottom: 80px; align-items: start; }
.legal-nav { position: sticky; top: 88px; }
.legal-nav a { display: block; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 14.5px; padding: 8px 12px; border-radius: 9px; border-left: 2px solid transparent; }
.legal-nav a:hover { background: var(--surface-2); color: var(--ink); }
.legal-nav a.active { color: var(--pink); border-left-color: var(--pink); background: color-mix(in srgb, var(--pink) 8%, transparent); }
.legal-body { max-width: 72ch; }
.legal-block { padding: 8px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.legal-block:last-child { border-bottom: 0; }
.legal-block h2 { font-size: 26px; margin: 24px 0 6px; scroll-margin-top: 92px; }
.legal-block h3 { font-size: 18px; margin: 22px 0 6px; }
.legal-block p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 12px; }
.legal-block ul { color: var(--ink-soft); font-size: 15.5px; padding-left: 20px; margin: 0 0 12px; }
.legal-block li { margin-bottom: 6px; }
.legal-block a { color: var(--pink); font-weight: 700; }
.updated { display: inline-block; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 5px 12px; border-radius: 999px; }
.back-link { text-decoration: none; color: var(--muted); font-weight: 800; font-size: 14px; }
.back-link:hover { color: var(--pink); }

/* ---------------- responsive ---------------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .phone { order: -1; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .legal-nav a { border-left: 0; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 14px 24px; gap: 4px;
  }
  .nav.open a.navlink { padding: 12px 14px; }
  .menu-btn { display: inline-grid; }
  .header-inner .btn-header-dl { display: none; }
  .features { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 22px; }
  .section { padding: 56px 0; }
}
