/* WordSpin landing — calm word-cross puzzle. */

:root {
  color-scheme: light dark;

  --bg: #F5EFE2;
  --bg-tint: #ECE3D1;
  --surface: #FFFFFF;
  --ink: #1A1714;
  --ink-soft: #3A332C;
  --mute: #6E665B;
  --rule: rgba(26, 23, 20, 0.10);
  --rule-strong: rgba(26, 23, 20, 0.22);
  --accent: #E84B3C;
  --accent-soft: #FCDDD8;
  --shadow-1: 0 1px 2px rgba(26, 23, 20, 0.05), 0 8px 24px rgba(26, 23, 20, 0.06);
  --shadow-2: 0 1px 3px rgba(26, 23, 20, 0.08), 0 18px 40px rgba(26, 23, 20, 0.10);

  /* world signature accents (single-color readouts; full gradients live on .world.wN) */
  --w3: #ffb98c;
  --w4: #5fb279;
  --w5: #e6b53d;
  --w6: #c25085;
  --w7: #3a4ea1;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-display: "Instrument Serif", "Newsreader", Georgia, "Times New Roman", serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  --container: 1120px;
}

[data-theme="dark"] {
  --bg: #1A1714;
  --bg-tint: #211D19;
  --surface: #28231E;
  --ink: #F5EFE2;
  --ink-soft: #DACFC0;
  --mute: #9F968A;
  --rule: rgba(245, 239, 226, 0.10);
  --rule-strong: rgba(245, 239, 226, 0.22);
  --accent: #ED6857;
  --accent-soft: #4A2218;
  --shadow-1: 0 1px 2px rgba(0,0,0,.45), 0 12px 24px rgba(0,0,0,.45);
  --shadow-2: 0 1px 3px rgba(0,0,0,.55), 0 20px 44px rgba(0,0,0,.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1714;
    --bg-tint: #211D19;
    --surface: #28231E;
    --ink: #F5EFE2;
    --ink-soft: #DACFC0;
    --mute: #9F968A;
    --rule: rgba(245, 239, 226, 0.10);
    --rule-strong: rgba(245, 239, 226, 0.22);
    --accent: #ED6857;
    --accent-soft: #4A2218;
    --shadow-1: 0 1px 2px rgba(0,0,0,.45), 0 12px 24px rgba(0,0,0,.45);
    --shadow-2: 0 1px 3px rgba(0,0,0,.55), 0 20px 44px rgba(0,0,0,.55);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
h3 {
  font-family: var(--font-sans);
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.08; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }

p { margin: 0; color: var(--ink-soft); }

em, i, cite, .lede em, .section-sub em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
code { font-family: "SF Mono", ui-monospace, "Menlo", monospace; font-size: 0.92em; background: var(--bg-tint); padding: 0.05em 0.4em; border-radius: 6px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--mute);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; outline: none; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.9rem max(1rem, 4vw);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 0;
  color: var(--ink);
  font-weight: 400;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: baseline;
}
.brand-dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.1em;
  align-self: flex-end;
  margin-bottom: 0.08em;
}

.site-nav {
  margin-left: auto;
  display: flex; gap: 1.4rem; align-items: center;
}
.site-nav a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 760px) {
  .site-nav { display: none; }
}

.theme-toggle {
  appearance: none; border: 1px solid var(--rule-strong); background: var(--surface);
  width: 46px; height: 26px; border-radius: 999px; padding: 0; cursor: pointer; position: relative;
  transition: background-color .2s ease, border-color .2s ease;
}
.theme-toggle-track {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); transition: transform .25s ease;
}
[data-theme="dark"] .theme-toggle-track { transform: translateX(20px); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-track { transform: translateX(20px); }
}

/* ---------- hero ---------- */

main { display: block; }

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) max(1rem, 4vw) clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; } }

.hero-copy h1 { margin-bottom: 1.1rem; }
.hero-copy .lede { font-size: 1.075rem; margin-bottom: 0.6rem; max-width: 36ch; }
.hero-copy .lede strong { color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.6rem 0 0.9rem; }
.cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.cta:hover { text-decoration: none; transform: translateY(-1px); }

.cta-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-1);
}
.cta-primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); box-shadow: var(--shadow-2); }
.cta-primary[aria-disabled="true"] { opacity: .85; cursor: default; }
.cta-text { display: inline-flex; flex-direction: column; line-height: 1.05; text-align: left; }
.cta-small { font-size: 0.7rem; opacity: .8; letter-spacing: 0.04em; }
.cta-big { font-size: 1.05rem; }
.cta-icon { display: inline-flex; }

.cta-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.cta-secondary:hover { background: var(--surface); }

.hero-foot { color: var(--mute); font-size: 0.92rem; margin-top: 0.4rem; }

.hero-art {
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hero-illo { width: 100%; max-width: 360px; height: auto; color: var(--ink); }
.hero-illo .grid-tiles rect { fill: var(--surface); }
.hero-illo .grid-tiles .crossed rect { fill: var(--accent-soft); }
.hero-illo .grid-tiles .empty rect { fill: transparent; stroke: var(--rule-strong); stroke-dasharray: 4 4; }
.hero-illo .grid-tiles text {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  fill: var(--ink); text-anchor: middle;
}
.hero-illo .wheel-ring { fill: var(--surface); stroke: var(--rule); stroke-width: 1; }
.hero-illo .wheel-trace { fill: none; stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 2 5; }
.hero-illo .wheel-letter circle { fill: var(--ink); }
.hero-illo .wheel-letter text {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  fill: var(--bg); text-anchor: middle;
}
.hero-illo .wheel-stroke {
  fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: trace 2.4s ease-in-out 0.4s forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }

.hero-art figcaption {
  font-size: 0.85rem; color: var(--mute); text-align: center;
}

/* ---------- sections ---------- */

.section {
  padding: clamp(3rem, 6vw, 5rem) max(1rem, 4vw);
}
.section > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.section-tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-head { margin: 0 auto 2rem; max-width: 640px; text-align: center; }
.section-head h2 { margin-bottom: 0.6rem; }
.section-sub { color: var(--mute); font-size: 1.02rem; }

/* steps */

.steps {
  list-style: none; padding: 0; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem;
  counter-reset: step;
}
.steps > li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.3rem;
  box-shadow: var(--shadow-1);
  position: relative;
}
.steps > li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 1.2rem; right: 1.2rem;
  font-family: var(--font-display); font-weight: 600;
  color: var(--mute); font-size: 0.78rem; letter-spacing: 0.12em;
}
.steps h3 { margin-bottom: 0.35rem; }
.steps p { font-size: 0.97rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* worlds */

.worlds-grid {
  list-style: none; padding: 0; margin: 0 auto 1.4rem;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.9rem;
}
.world {
  --world-ink: #1A1714;
  --world-soft: rgba(26, 23, 20, 0.72);
  --world-meta: rgba(26, 23, 20, 0.55);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.2rem 1.5rem;
  min-height: 160px;
  display: flex; flex-direction: column; gap: 0.4rem;
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  position: relative; overflow: hidden;
  color: var(--world-ink);
}
.world.w3 { background: linear-gradient(160deg, #FFD1D8 0%, #FFB98C 100%); }
.world.w4 { background: linear-gradient(160deg, #6FBA84 0%, #CDD86A 100%); }
.world.w5 { background: linear-gradient(160deg, #F4CE4A 0%, #F7E9C8 100%); }
.world.w6 {
  background: linear-gradient(160deg, #EA4E90 0%, #F48A3C 45%, #6E3AAB 100%);
  --world-ink: #F5EFE2;
  --world-soft: rgba(245, 239, 226, 0.86);
  --world-meta: rgba(245, 239, 226, 0.7);
}
.world.w7 {
  background: linear-gradient(165deg, #3A4EA1 0%, #6A3A85 50%, #181538 100%);
  --world-ink: #F5EFE2;
  --world-soft: rgba(245, 239, 226, 0.86);
  --world-meta: rgba(245, 239, 226, 0.7);
}

.world-id {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--world-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}
.world h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.05;
  color: var(--world-ink);
  margin-top: auto;
}
.world-count {
  font-size: 0.92rem;
  color: var(--world-soft);
  margin: 0;
}

@media (max-width: 1000px) { .worlds-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .worlds-grid { grid-template-columns: repeat(2, 1fr); } }

.worlds-foot { max-width: 720px; margin: 0 auto; text-align: center; color: var(--ink-soft); font-size: 0.98rem; }

/* nopes */

.nope-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
@media (max-width: 880px) { .nope-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nope-grid { grid-template-columns: 1fr; } }

.nope {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.15rem;
}
.nope-mark {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; line-height: 1;
  margin-top: 0.15rem;
}
.nope h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.nope p { font-size: 0.93rem; }

/* ads & premium */

.ads-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: stretch;
}
@media (max-width: 880px) { .ads-row { grid-template-columns: 1fr; } }

.ads-card,
.premium-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-1);
}

.ads-card h3 { margin-bottom: 0.8rem; }
.ads-list { padding-left: 1.1rem; margin: 0 0 0.9rem; }
.ads-list li { margin-bottom: 0.55rem; color: var(--ink-soft); }
.ads-list li strong { color: var(--ink); }
.ads-card > p { color: var(--mute); font-size: 0.94rem; }

.premium-card {
  border-top: 4px solid var(--accent);
  display: flex; flex-direction: column;
}
.premium-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}
.premium-prices {
  display: flex; gap: 1.1rem; align-items: baseline;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.premium-price { display: flex; flex-direction: column; gap: 0.1rem; }
.premium-amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1;
}
.premium-amount strong { font-weight: 600; }
.premium-period { font-size: 0.85rem; color: var(--mute); margin: 0; }
.premium-or { font-size: 0.85rem; color: var(--mute); margin: 0; align-self: center; }
.premium-foot { font-size: 0.92rem; color: var(--ink-soft); margin-top: auto; }
.premium-foot strong { color: var(--ink); }

/* dictionary */

.dict-row {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 880px) { .dict-row { grid-template-columns: 1fr; } }

.dict-copy h2 { margin-bottom: 0.8rem; }
.dict-copy p { margin-bottom: 0.85rem; max-width: 56ch; }
.dict-copy strong { color: var(--ink); }

.dict-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.1rem;
}
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.stat-label { font-size: 0.88rem; color: var(--mute); margin-top: 0.15rem; }

/* maker */

.maker { max-width: 760px; margin: 0 auto; text-align: center; }
.maker h2 { margin-bottom: 0.8rem; }
.maker p { font-size: 1.02rem; }

/* faq */

.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.faq details[open] { box-shadow: var(--shadow-1); border-color: var(--rule-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600; color: var(--ink);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-weight: 600; font-size: 1.2rem; line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 0.7rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem max(1rem, 4vw) 3rem;
  margin-top: 2rem;
}
.footer-row {
  max-width: var(--container);
  margin: 0 auto 1.2rem;
  display: flex; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  align-items: center;
}
.footer-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin: 0; }
.footer-tag { font-size: 0.92rem; color: var(--mute); margin-top: 0.2rem; }
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); text-decoration: none; }
.footer-credits { max-width: var(--container); margin: 0 auto 0.4rem; font-size: 0.92rem; color: var(--ink-soft); }
.footer-credits a { color: var(--ink); }
.footer-copy { max-width: var(--container); margin: 0 auto; font-size: 0.84rem; color: var(--mute); }

/* ---------- 404 / utility pages ---------- */

.page-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) max(1rem, 4vw);
}
.page-narrow h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.6rem; }
.page-narrow h2 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; }
.page-narrow p { margin: 0 0 0.8rem; }
.page-narrow ul { padding-left: 1.2rem; margin: 0 0 0.8rem; }
.page-narrow ul li { margin-bottom: 0.3rem; color: var(--ink-soft); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* impressum / legal disclosure tables */

.impressum {
  display: grid;
  grid-template-columns: minmax(140px, 12rem) 1fr;
  gap: 0.45rem 1.2rem;
  margin: 0 0 1.2rem;
  padding: 0;
}
.impressum dt {
  font-weight: 600;
  color: var(--ink);
}
.impressum dd {
  margin: 0;
  color: var(--ink-soft);
}
@media (max-width: 560px) {
  .impressum { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .impressum dd { margin-bottom: 0.6rem; }
}
