/* ==========================================================================
   Kasinomiljonääri 2026
   Tumma premium-ilme, isot bonusnumerot, selkeä konversiopolku.
   Tekniikat: bento-grid, natiivit scroll-driven-animaatiot (animation-timeline),
   View Transitions API, fluid type (clamp). Ei JS-animaatiokirjastoja.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --ink:        #07080a;
  --ink-2:      #0d0f13;
  --surface:    #14181e;
  --surface-2:  #1c222a;
  --line:       #242c36;
  --line-2:     #333d4a;
  --paper:      #f4f2ec;
  --muted:      #9aa3b0;
  --muted-2:    #6b7480;

  --gold:       #f0c14b;
  --gold-2:     #d19d24;
  --gold-soft:  rgba(240,193,75,.14);
  --green:      #2fb37a;
  --green-2:    #1e8f5e;
  --red:        #e05a45;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --wrap: 1200px;
  --gap: clamp(14px, 1.8vw, 20px);
  --font: "Inter", ui-sans-serif, "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--font); font-size: clamp(16px, 1vw, 17px); line-height: 1.62;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: #1a1305; }

.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.4rem, 780px); margin-inline: auto; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
p  { margin: 0 0 1.05em; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); }
.eyebrow {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: .8rem; display: block;
}

/* Scroll-driven reveal */
@supports (animation-timeline: view()) {
  .reveal { animation: rv linear both; animation-timeline: view(); animation-range: entry 6% cover 24%; }
}
@keyframes rv { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}

/* Yläpalkki */
.topbar {
  background: linear-gradient(90deg, #14100a, #1c1608, #14100a);
  color: var(--gold); font-size: .78rem; text-align: center;
  padding: .5rem 1rem; letter-spacing: .03em; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.topbar span { color: var(--muted); font-weight: 400; }

/* Navigaatio */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em; view-transition-name: brand; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--gold), var(--gold-2));
  display: grid; place-items: center; color: #1a1305; font-size: .74rem; font-weight: 900;
}
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 1.3rem; align-items: center; }
.nav-links a { font-size: .9rem; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); }
.nav-cta { padding: .5rem .95rem !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--paper); border-radius: 9px; width: 42px; height: 38px; cursor: pointer; font-size: 1.1rem; }

/* Napit */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: linear-gradient(160deg, var(--gold), var(--gold-2));
  color: #1a1305; font-weight: 800; font-size: .95rem; letter-spacing: -.01em;
  padding: .8rem 1.4rem; border-radius: var(--r-sm); border: 0; cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 20px -8px rgba(240,193,75,.5);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 32px -10px rgba(240,193,75,.6); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--paper); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.green { background: linear-gradient(160deg, var(--green), var(--green-2)); color: #04170f; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 20px -8px rgba(47,179,122,.5); }
.btn.sm { padding: .55rem 1rem; font-size: .87rem; }
.btn.lg { padding: .95rem 1.8rem; font-size: 1.02rem; }
.btn.block { width: 100%; }

/* Hero */
.hero { position: relative; padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3.5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -25% -15% auto -15%; height: 65vh;
  background: radial-gradient(55% 50% at 65% 15%, var(--gold-soft), transparent 70%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center; position: relative; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--gold), #ffe08a 55%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero-figure { position: relative; }
.hero-figure img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -45px #000; view-transition-name: hero-portrait; }
.hero-badge {
  position: absolute; right: -.6rem; bottom: 1.2rem; background: var(--surface);
  border: 1px solid var(--gold-2); border-radius: var(--r); padding: .7rem .95rem;
  box-shadow: 0 20px 50px -22px #000; max-width: 14rem;
}
.hero-badge b { color: var(--gold); display: block; font-size: 1.5rem; line-height: 1; margin-bottom: .15rem; }
.hero-badge span { font-size: .78rem; color: var(--muted); }

.trust { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.4rem; }
.chip { border: 1px solid var(--line-2); border-radius: 999px; padding: .35rem .8rem; font-size: .78rem; color: var(--muted); background: var(--ink-2); }
.chip b { color: var(--paper); font-weight: 600; }

/* Osiot */
section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-head { max-width: 60ch; margin-bottom: clamp(1.5rem, 2.6vw, 2.4rem); }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-block: 1px solid var(--line); }

/* ===== Kasinokortit (konversion ydin) ===== */
.casino-list { display: grid; gap: var(--gap); }
.casino {
  display: grid;
  grid-template-columns: 2.6rem 12rem 1fr 1.15fr auto;
  gap: clamp(.8rem, 1.6vw, 1.5rem); align-items: center;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1rem, 1.6vw, 1.4rem); position: relative;
  transition: border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.casino:hover { border-color: var(--gold-2); transform: translateY(-2px); box-shadow: 0 24px 50px -30px rgba(240,193,75,.35); }
.casino.top { border-color: var(--gold-2); box-shadow: 0 0 0 1px rgba(240,193,75,.18), 0 20px 60px -35px rgba(240,193,75,.5); }
.casino .rank { font-family: var(--serif); font-size: 1.9rem; color: var(--gold); text-align: center; line-height: 1; opacity: .85; }

.c-logo {
  border-radius: var(--r); padding: 1.1rem .8rem; text-align: center;
  font-weight: 900; font-size: .95rem; letter-spacing: .04em; color: #fff;
  display: grid; place-items: center; min-height: 76px;
  box-shadow: 0 6px 18px -10px #000 inset;
}
.c-name { font-size: .78rem; color: var(--muted-2); margin-top: .4rem; text-align: center; }

.c-offer .amount {
  font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--gold); line-height: 1; display: block; margin-bottom: .18rem;
}
.c-offer .label { font-size: .92rem; color: var(--paper); font-weight: 600; }
.c-offer .spins { font-size: .88rem; color: var(--green); font-weight: 600; margin-top: .12rem; }
.c-offer .hook { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: .45rem; }

.c-plus { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.c-plus li { color: var(--muted); padding-left: 1.15rem; position: relative; margin-bottom: .22rem; }
.c-plus li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.c-plus li.neg { color: var(--muted-2); }
.c-plus li.neg::before { content: "!"; color: var(--red); }

.c-act { text-align: center; min-width: 9.5rem; }
.c-act .facts { display: flex; flex-direction: column; gap: .1rem; font-size: .72rem; color: var(--muted-2); margin-top: .5rem; }
.c-act .facts b { color: var(--muted); font-weight: 600; }
.c-terms { font-size: .68rem; color: var(--muted-2); margin-top: .35rem; }

.badge-top {
  position: absolute; top: -.65rem; left: 3.2rem;
  background: linear-gradient(100deg, var(--gold), var(--gold-2)); color: #1a1305;
  font-size: .64rem; font-weight: 800; letter-spacing: .09em;
  padding: .2rem .6rem; border-radius: 999px;
}

/* Placeholder-huomautus */
.ph-note {
  border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: .85rem 1.1rem; font-size: .84rem; color: var(--muted-2);
  background: var(--ink-2); margin-top: 1.1rem;
}
.ph-note b { color: var(--gold); }

/* Bento */
.bento { display: grid; gap: var(--gap); grid-template-columns: repeat(6, 1fr); }
.bento .cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.1rem, 1.8vw, 1.6rem); position: relative; overflow: hidden;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.bento a.cell:hover, .bento .cell:hover { border-color: var(--line-2); transform: translateY(-3px); }
.bento a.cell:hover h3 { color: var(--gold); }
.cell-6 { grid-column: span 6; } .cell-4 { grid-column: span 4; }
.cell-3 { grid-column: span 3; } .cell-2 { grid-column: span 2; }
.cell .num { font-family: var(--serif); font-size: 2.3rem; color: var(--gold); line-height: 1; display: block; margin-bottom: .35rem; }
.cell h3 { margin-bottom: .3rem; transition: color .2s; }
.cell p { color: var(--muted); font-size: .93rem; margin: 0; }
.cell .glow { position: absolute; inset: auto -25% -65% auto; width: 65%; aspect-ratio: 1; background: radial-gradient(circle, var(--gold-soft), transparent 70%); pointer-events: none; }

/* CTA-lohko */
.cta-block {
  background: radial-gradient(75% 130% at 20% 0%, rgba(47,179,122,.15), transparent 60%), var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: clamp(1.8rem, 3.5vw, 2.8rem); text-align: center;
}
.cta-block h2 { margin-bottom: .35rem; }
.cta-block p { color: var(--muted); max-width: 54ch; margin-inline: auto; }

/* Sisältösivut */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.15rem; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .65rem .8rem; text-align: left; }
.prose th { background: var(--ink-2); color: var(--gold); font-weight: 700; }
.prose blockquote {
  margin: 1.5rem 0; padding: .1rem 0 .1rem 1.1rem; border-left: 2px solid var(--gold);
  font-family: var(--serif); font-style: italic; color: var(--paper); font-size: 1.08rem;
}
details.faq { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 1.05rem; margin: .55rem 0; }
details.faq summary { cursor: pointer; font-weight: 650; padding: .9rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--gold); font-size: 1.15rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 0 0 .9rem; }

/* Vastuullisuus + footer */
.responsible { background: #050607; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .8rem; text-align: center; padding: .85rem 1.2rem; }
.responsible a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.age { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--red); color: var(--red); border-radius: 50%; font-weight: 800; font-size: .66rem; margin-right: .4rem; vertical-align: middle; }
.site-footer { background: #050607; border-top: 1px solid var(--line); padding: clamp(2rem, 3.5vw, 3rem) 0 1.4rem; color: var(--muted); font-size: .88rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 1.8rem; }
.site-footer h4 { color: var(--paper); font-size: .92rem; margin: 0 0 .6rem; }
.site-footer a { display: block; color: var(--muted); padding: .15rem 0; transition: color .2s; }
.site-footer a:hover { color: var(--gold); }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 1.8rem; padding-top: 1.1rem; font-size: .75rem; color: var(--muted-2); line-height: 1.7; }

/* Responsiivinen */
@media (max-width: 1080px) {
  .casino { grid-template-columns: 2.2rem 10rem 1fr auto; }
  .casino .c-plus { display: none; }
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 440px; }
  .hero-badge { right: 0; }
  .cell-4, .cell-3, .cell-2 { grid-column: span 6; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 100%; right: 1.2rem; left: 1.2rem; flex-direction: column; align-items: stretch; gap: .15rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: .55rem; box-shadow: 0 24px 60px -20px #000; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .6rem .65rem; border-radius: 8px; }
  .nav-toggle { display: grid; place-items: center; }
  .casino { grid-template-columns: 2rem 1fr; row-gap: .8rem; }
  .casino .c-logo-box { grid-column: 2; }
  .casino .c-offer { grid-column: 1 / -1; }
  .casino .c-act { grid-column: 1 / -1; min-width: 0; }
  .badge-top { left: 2.6rem; }
  .foot-grid { grid-template-columns: 1fr; }
}
