/* Kelime Zinciri Düello — landing page
   Palette: Ink & Lime (docs/design.md) */

:root {
  /* Frozen tokens — never flip in dark mode.
     Used wherever the surface BENEATH the color is fixed (lime fills, dark indigo blocks). */
  --ink-deep: #1E1B4B;     /* always deep indigo */
  --on-lime: #1E1B4B;      /* text on lime fills — never flips */
  --on-ink: #A3E635;       /* lime monogram on deep indigo */

  /* Flipping tokens — invert in dark mode for body chrome */
  --ink: #1E1B4B;          /* heading/body accent — flips */
  --ink-soft: #312E81;
  --lime: #84CC16;
  --lime-text: #4D7C0F;
  --lime-bright: #A3E635;
  --surface: #FAFAF7;
  --surface-card: #FFFFFF;
  --text: #1E1B4B;
  --text-muted: #52525B;
  --border: rgba(30, 27, 75, 0.08);
  --danger: #DC2626;
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, 0.04), 0 1px 3px rgba(30, 27, 75, 0.06);
  --shadow-md: 0 4px 6px rgba(30, 27, 75, 0.05), 0 10px 20px rgba(30, 27, 75, 0.08);
  --shadow-lg: 0 20px 40px rgba(30, 27, 75, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --maxw: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* --ink-deep, --on-lime, --on-ink intentionally NOT overridden:
       they sit on fixed-color surfaces (lime fills, dark indigo blocks)
       and must keep their contrast in both modes. */
    --ink: #A5B4FC;
    --ink-soft: #C7D2FE;
    --lime: #A3E635;
    --lime-text: #A3E635;
    --lime-bright: #BEF264;
    --surface: #0B0B14;
    --surface-card: #16162A;
    --text: #E4E4E7;
    --text-muted: #A1A1AA;
    --border: rgba(165, 180, 252, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
               "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { color: var(--text-muted); }

a {
  color: var(--lime-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

a:hover { border-bottom-color: var(--lime-text); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Nav --- */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  border: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink-deep);
  display: grid;
  place-items: center;
  color: var(--on-ink);
}

.brand-mark svg { width: 18px; height: 18px; }

.lang-toggle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.lang-toggle:hover {
  background: var(--ink-deep);
  color: var(--on-ink);
  border-color: var(--ink-deep);
}

/* --- Hero --- */
.hero { padding: 5rem 0 3rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 820px) {
  .hero { padding: 3rem 0 2rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-text);
  background: color-mix(in srgb, var(--lime) 18%, transparent);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 { margin-bottom: 1rem; }

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 32ch;
  margin-bottom: 2rem;
}

@media (max-width: 820px) {
  .hero-sub { margin-left: auto; margin-right: auto; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 820px) {
  .cta-row { justify-content: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--lime);
  color: var(--on-lime);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--lime-bright);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-card);
  border-color: var(--ink);
}

.btn-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Game card mockup (hero right) --- */
.game-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% -10%, color-mix(in srgb, var(--lime) 20%, transparent), transparent 60%);
  pointer-events: none;
}

.gc-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
}

.gc-player { display: flex; align-items: center; gap: 0.4rem; }
.gc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
}

.gc-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.6rem;
  position: relative;
}

.gc-hero-letter {
  width: 110px;
  height: 110px;
  margin: 0 auto 1rem;
  background: var(--lime);
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--on-lime);
  position: relative;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--lime) 40%, transparent);
}

.gc-prev {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
}

.gc-input {
  border: 2px solid var(--lime);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
  background: var(--surface);
  position: relative;
}

.gc-input::after {
  content: "▏";
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
  color: var(--lime-text);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Sections --- */
section { padding: 4rem 0; }
section.alt { background: var(--surface-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head p {
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.section-head .cta-row {
  justify-content: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--lime) 18%, transparent);
  color: var(--lime-text);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.card p { color: var(--text-muted); font-size: 0.95rem; }

.card-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card-meta strong { color: var(--ink); }

/* "What's NOT inside" list */
.not-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  max-width: 720px;
  margin: 0 auto;
}

.not-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.not-list .x {
  color: var(--danger);
  font-weight: 700;
}

/* Privacy block — frozen deep-indigo surface in both modes */
.privacy-block {
  background: var(--ink-deep);
  color: var(--on-ink);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.privacy-block h2 { color: var(--on-ink); }
.privacy-block p {
  color: color-mix(in srgb, var(--on-ink) 70%, white);
  margin: 1rem auto 1.5rem;
  max-width: 50ch;
}

.privacy-block .btn-primary {
  background: var(--lime);
  color: var(--on-lime);
}

/* --- Content pages (privacy, support) --- */
.page {
  padding: 3.5rem 0 4rem;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.prose .lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.prose p,
.prose ul {
  margin-bottom: 1rem;
  color: var(--text);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose ul li {
  margin-bottom: 0.4rem;
}

.prose strong { color: var(--ink); }

.prose .updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.contact-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.contact-card .value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1rem;
  color: var(--ink);
}

/* --- Footer --- */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.site-footer .links a { color: var(--text-muted); }
.site-footer .links a:hover { color: var(--ink); }

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}
