/* ---------------------------------------------------------------------------
   Kiln — website styles

   The palette is the app's own chrome palette (constants/game-theme.ts): a
   whitewashed courtyard the morning after the tiles were washed down. Light on
   purpose. Nothing here loads from a CDN, so the site works offline and from a
   file:// path as well as from a host.
   --------------------------------------------------------------------------- */

:root {
  --bg: #faf5ec;
  --bg-deep: #f1e9da;
  --panel: #fdfffe;
  --panel-edge: rgba(31, 158, 146, 0.24);
  --ink: #17423f;
  --dim: rgba(23, 66, 63, 0.72);
  --faint: rgba(23, 66, 63, 0.5);
  --hairline: rgba(24, 72, 68, 0.12);
  --chip: rgba(24, 72, 68, 0.06);
  --gold: #bb6a0c;
  --gold-bright: #f7a928;
  --gold-soft: #ffdda0;
  --on-gold: #40230a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--bg);
  /* Limewash mottle: two barely-there washes over the flat ground. */
  background-image:
    radial-gradient(60rem 40rem at 15% -10%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(50rem 35rem at 95% 0%, rgba(241, 233, 218, 0.9), transparent 65%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

/* --- language switching --------------------------------------------------
   Every translatable node carries lang="en" or lang="tr"; the other one is
   hidden. Scoped under body so the <html lang> attribute never matches. */
html[data-lang="en"] body [lang="tr"],
html[data-lang="tr"] body [lang="en"] { display: none !important; }

img, svg { max-width: 100%; }

a { color: var(--gold); text-decoration-color: rgba(187, 106, 12, 0.35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

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

.site-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 1px 3px rgba(24, 72, 68, 0.2); }

.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--dim); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

.lang {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--chip);
  padding: 2px;
}
.lang button {
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 0;
  background: transparent;
  color: var(--faint);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(24, 72, 68, 0.14);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0 56px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1.02;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.lede { font-size: 20px; line-height: 1.55; color: var(--dim); margin: 0 0 28px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 16px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: var(--on-gold);
  border: 1px solid rgba(187, 106, 12, 0.4);
  box-shadow: 0 2px 0 rgba(187, 106, 12, 0.28);
}
.btn:hover { background: var(--gold-soft); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--chip); }

.hero-note { font-size: 14px; color: var(--faint); margin: 16px 0 0; }

.hero-art { justify-self: center; }
.hero-art svg { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 14px 28px rgba(24, 72, 68, 0.14)); }

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

section { padding: 46px 0; border-top: 1px solid var(--hairline); }

h2 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 600;
}
.section-lede { color: var(--dim); margin: 0 0 16px; max-width: 62ch; }
.section-lede:last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: 0 1px 2px rgba(24, 72, 68, 0.06);
}
.card h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 8px;
  font-weight: 600;
}
.card h3::before {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-bright);
  margin-bottom: 12px;
}
.card p { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.6; }

/* Numbered how-to-play steps. */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 26px; }
.step { position: relative; padding-left: 46px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid var(--hairline);
  font-family: var(--serif);
  font-size: 16px;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.step h3 { font-family: var(--serif); font-size: 18px; margin: 4px 0 6px; font-weight: 600; }
.step p { margin: 0; color: var(--dim); font-size: 15.5px; }

/* --- prose (privacy / support) -------------------------------------------- */

.page-head { padding: 52px 0 26px; }
.page-head h1 { font-size: clamp(34px, 5vw, 46px); }
.page-head p { color: var(--faint); font-size: 15px; margin: 10px 0 0; }

.prose { padding-bottom: 40px; }
.prose h2 {
  font-size: 24px;
  margin: 40px 0 10px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 26px; }
.prose h3 { font-family: var(--serif); font-size: 18px; margin: 24px 0 6px; font-weight: 600; }
.prose p, .prose li { color: var(--dim); }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--gold-bright);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 26px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }

details.faq {
  border-bottom: 1px solid var(--hairline);
  padding: 4px 0;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 28px 14px 0;
  position: relative;
  font-size: 17px;
  color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 20px;
  color: var(--gold);
}
details.faq[open] summary::after { content: "\2013"; }
details.faq .answer { padding: 0 0 16px; color: var(--dim); }
details.faq .answer p { margin: 0 0 10px; }
details.faq .answer p:last-child { margin-bottom: 0; }

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.meta div { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 18px; }
.meta dt { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.meta dd { margin: 4px 0 0; font-size: 16px; }

.mail {
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 30px);
  word-break: break-word;
}

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

.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 30px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  font-size: 14.5px;
  color: var(--faint);
}
.site-foot nav { display: flex; gap: 20px; margin-left: auto; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 320px; }
  body { font-size: 16px; }
  .site-foot nav { margin-left: 0; width: 100%; }
}
