/* hinnavoit.ee design system — ink & gold editorial */

:root {
  --ink: #0d0b07;
  --panel: #171310;
  --panel-2: #1e1914;
  --hairline: #2c251c;
  --hairline-gold: rgba(201, 169, 97, 0.35);
  --bone: #efe9dc;
  --bone-strong: #f7f2e7;
  --muted: #8f8878;
  --faint: #6d6759;
  --gold: #c9a961;
  --gold-bright: #e3c98a;
  --bronze: #b08d57;
  --silver: #b9c0c9;
  --danger: #d47a6a;
  --ok: #9dbb8f;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13, 11, 7, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 19px; font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
}
.wordmark span { color: var(--bone-strong); }
.head-right { display: flex; align-items: center; gap: 20px; }
.head-nav {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.head-nav:hover { color: var(--bone); }
.head-nav[aria-current="page"] { color: var(--gold-bright); }
.lang-switch { display: flex; gap: 2px; border: 1px solid var(--hairline); border-radius: 8px; padding: 2px; }
.lang-switch button {
  background: none; border: 0; border-radius: 6px;
  color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; padding: 5px 10px; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-switch button.on { background: var(--panel-2); color: var(--gold-bright); }
.lang-switch button:hover:not(.on) { color: var(--bone); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 104px 0 88px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto;
  height: 130%;
  background: radial-gradient(ellipse 60% 55% at 50% 8%, rgba(201, 169, 97, 0.14), transparent 65%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--hairline-gold);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--bone-strong);
  max-width: 820px;
  margin: 0 auto 24px;
}
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero .lead {
  font-size: 19px; line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 40px;
}
.hero .lead b { color: var(--bone); font-weight: 600; }
.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
  font-size: 13px; color: var(--faint);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head .kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700; color: var(--bone-strong);
}
.section-head .sub { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- chest cards ---------- */
.chest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.chest-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 36px 28px 28px;
  display: flex; flex-direction: column; align-items: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.chest-card:hover { border-color: var(--hairline-gold); transform: translateY(-3px); }
.chest-card.gold-tier { border-color: var(--hairline-gold); }
.chest-card.gold-tier::before {
  content: attr(data-popular);
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.chest-art { width: 96px; height: 84px; margin-bottom: 20px; }
.chest-name {
  font-family: var(--serif);
  font-size: 24px; font-weight: 700; color: var(--bone-strong);
  margin-bottom: 4px;
}
.chest-odds {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.chest-prize {
  font-family: var(--serif);
  font-size: 44px; font-weight: 700; color: var(--gold-bright);
  line-height: 1;
}
.chest-prize-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 8px 0 24px; }
.chest-includes {
  width: 100%;
  border-top: 1px solid var(--hairline);
  padding-top: 18px; margin-bottom: 22px;
  font-size: 14px; color: var(--muted);
  text-align: center; line-height: 1.7;
}
.chest-includes b { color: var(--bone); font-weight: 600; }
.slots { width: 100%; margin-bottom: 24px; }
.slots-label {
  display: flex; justify-content: space-between;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 8px;
}
.slots-label b { color: var(--gold-bright); font-weight: 600; }
.slots-bar {
  height: 6px; border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}
.slots-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s;
  border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--ink); padding: 14px 30px; width: 100%; }
.btn-gold:hover { background: var(--gold-bright); }
.btn-gold:disabled { opacity: 0.55; cursor: wait; }
.btn-ghost {
  background: none; border-color: var(--hairline);
  color: var(--bone); padding: 12px 24px;
}
.btn-ghost:hover { border-color: var(--hairline-gold); color: var(--gold-bright); }
.chest-price-note { margin-top: 14px; font-size: 13px; color: var(--faint); }
.chest-price-note b { color: var(--bone); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { text-align: center; padding: 0 12px; }
.step-no {
  font-family: var(--serif);
  font-size: 52px; font-weight: 700; color: var(--gold);
  opacity: 0.9; line-height: 1; margin-bottom: 18px;
}
.step h3 { font-size: 17px; font-weight: 600; color: var(--bone-strong); margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ---------- fairness ---------- */
.fair-box {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 40px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  align-items: center;
}
.fair-box h3 { font-family: var(--serif); font-size: 26px; color: var(--bone-strong); margin-bottom: 14px; }
.fair-box p { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.hash-chip {
  font-family: var(--mono); font-size: 12px;
  color: var(--gold-bright);
  background: var(--ink);
  border: 1px solid var(--hairline-gold);
  border-radius: 8px;
  padding: 12px 14px;
  word-break: break-all;
  line-height: 1.5;
}
.hash-chip .lbl { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }

/* ---------- winners ---------- */
.winners-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.winner-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px 22px;
  font-size: 14px;
}
.winner-card .amt { font-family: var(--serif); font-size: 24px; color: var(--gold-bright); font-weight: 700; }
.winner-card .who { color: var(--bone); margin-top: 6px; }
.winner-card .meta { color: var(--faint); font-size: 12.5px; margin-top: 4px; }
.winners-empty {
  text-align: center; color: var(--muted); font-size: 15px;
  border: 1px dashed var(--hairline);
  border-radius: 12px; padding: 36px 20px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px;
  font-size: 16px; font-weight: 600; color: var(--bone-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 22px; color: var(--gold); flex-shrink: 0; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 4px 22px; font-size: 15px; color: var(--muted); }
.faq .a a { color: var(--gold-bright); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 40px;
  font-size: 13.5px; color: var(--faint);
}
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--gold-bright); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--muted);
  font-size: 11px; font-weight: 700; color: var(--muted);
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 6, 3, 0.78);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-back.open { display: flex; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--panel-2);
  border: 1px solid var(--hairline-gold);
  border-radius: 18px;
  padding: 34px 32px 30px;
  position: relative;
}
.modal-x {
  position: absolute; top: 14px; right: 14px;
  background: none; border: 0; cursor: pointer;
  color: var(--faint); font-size: 22px; line-height: 1; padding: 6px;
}
.modal-x:hover { color: var(--bone); }
.modal h3 { font-family: var(--serif); font-size: 24px; color: var(--bone-strong); margin-bottom: 6px; }
.modal .m-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.modal .m-sub b { color: var(--gold-bright); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.field input[type="email"], .field input[type="text"] {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--bone-strong);
  font-family: var(--sans); font-size: 15px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: var(--gold); }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check input {
  appearance: none; flex-shrink: 0;
  width: 18px; height: 18px; margin-top: 2px;
  border: 1.5px solid var(--muted); border-radius: 5px;
  cursor: pointer; position: relative;
  transition: border-color .15s, background .15s;
}
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after {
  content: ""; position: absolute; inset: 2px 5px 5px;
  border: solid var(--ink); border-width: 0 2px 2px 0;
  transform: rotate(40deg) translate(1px, -1px);
}
.check span { font-size: 13.5px; color: var(--muted); }
.check a { color: var(--gold-bright); }
.m-err { display: none; font-size: 13.5px; color: var(--danger); margin: 4px 0 12px; }
.m-err.show { display: block; }
.m-secure { margin-top: 16px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- utility pages ---------- */
.page-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 48px 44px;
  margin: 72px auto;
}
.page-card h1 { font-family: var(--serif); font-size: 32px; color: var(--bone-strong); margin-bottom: 16px; }
.page-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 14px; }
.page-card p b { color: var(--bone); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 7px 16px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--hairline);
  color: var(--muted);
  margin-bottom: 22px;
}
.status-pill.ok { color: var(--ok); border-color: rgba(157, 187, 143, 0.4); }
.status-pill.wait { color: var(--gold-bright); border-color: var(--hairline-gold); }

/* rules typography */
.legal h1 { font-family: var(--serif); font-size: 34px; color: var(--bone-strong); margin: 56px 0 10px; }
.legal .updated { font-size: 13px; color: var(--faint); margin-bottom: 40px; }
.legal h2 { font-family: var(--serif); font-size: 21px; color: var(--gold-bright); margin: 36px 0 12px; }
.legal p, .legal li { font-size: 15px; color: var(--bone); opacity: 0.92; }
.legal p { margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 14px; }
.legal li { margin-bottom: 7px; }
.legal .muted { color: var(--muted); }

/* ---------- keyboard focus ---------- */
.btn:focus-visible,
.head-nav:focus-visible,
.lang-switch button:focus-visible,
.modal-x:focus-visible,
.faq summary:focus-visible,
.check input:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
.field input:focus-visible { outline: none; border-color: var(--gold-bright); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .chest-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; gap: 32px; max-width: 420px; margin: 0 auto; }
  .fair-box { grid-template-columns: 1fr; padding: 30px 24px; }
  .winners-row { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .hero { padding: 72px 0 60px; }
  .section { padding: 60px 0; }
  .page-card { padding: 36px 24px; margin: 40px auto; }
}
@media (max-width: 520px) {
  .modal { padding: 28px 22px 24px; }
  .foot-grid { flex-direction: column; gap: 20px; }
  .site-head .wrap { padding-left: 18px; padding-right: 18px; }
  .head-right { gap: 12px; }
  .head-nav { font-size: 12px; letter-spacing: 0.02em; }
  .lang-switch button { padding: 5px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
