:root {
  --bg: #E8F4F2;
  --bg2: #D5EBE7;
  --ink: #2C3E50;
  --muted: #5A6E7A;
  --accent: #1A7A6D;
  --accent2: #E85A4F;
  --card: #F7FBFA;
  --foam: #ffffff;
  --radius: 28px;
  --shadow: 14px 18px 36px rgba(90, 110, 122, 0.14), -8px -10px 24px rgba(255, 255, 255, 0.88);
  --shadow-soft: 8px 10px 22px rgba(90, 110, 122, 0.1), -4px -6px 16px rgba(255, 255, 255, 0.8);
  --inset: inset 6px 8px 16px rgba(90, 110, 122, 0.08), inset -4px -6px 12px rgba(255, 255, 255, 0.75);
  --max: 1140px;
  --head: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Nunito Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.cookies-set .cookie {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.7) 0 140px, transparent 180px),
    radial-gradient(circle at 88% 18%, rgba(232, 90, 79, 0.08) 0 90px, transparent 140px),
    radial-gradient(circle at 50% 100%, rgba(26, 122, 109, 0.08) 0 220px, transparent 320px),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent2);
}

:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 3px;
  border-radius: 12px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--card);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
}

.skip:focus {
  top: 16px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  width: min(var(--max), calc(100% - 28px));
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 16px;
  background: rgba(247, 251, 250, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--head);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav a:hover {
  background: var(--bg2);
  color: var(--accent);
}

.burger {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--inset);
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(40deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-40deg);
}

.hero {
  position: relative;
  margin-top: 28px;
  padding: 28px 0 12px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg2);
  min-height: 520px;
}

.hero-photo {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
}

.hero-mist {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(232, 244, 242, 0.92) 0%, rgba(232, 244, 242, 0.78) 38%, rgba(232, 244, 242, 0.12) 72%),
    linear-gradient(180deg, transparent 55%, rgba(232, 244, 242, 0.55) 100%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(560px, 92%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.kicker {
  font-family: var(--head);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
  margin: 0 0 8px;
}

h1,
h2,
h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.1rem);
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}

h3 {
  font-size: 1.45rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 42ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: var(--foam);
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(26, 122, 109, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent2);
  color: var(--foam);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(232, 90, 79, 0.24);
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.btn-ghost:hover {
  background: var(--foam);
  color: var(--accent2);
}

.rings {
  position: absolute;
  right: 8%;
  bottom: 12%;
  width: 180px;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

.rings i {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(26, 122, 109, 0.35);
  border-radius: 50%;
}

.rings i:nth-child(2) {
  inset: 22px;
  border-color: rgba(232, 90, 79, 0.4);
}

.rings i:nth-child(3) {
  inset: 44px;
  border-color: rgba(44, 62, 80, 0.28);
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg2);
  border-block: 1px solid rgba(255, 255, 255, 0.55);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 22px;
  align-items: end;
  margin-bottom: 32px;
}

.section-index {
  font-family: var(--head);
  font-size: 3rem;
  line-height: 0.8;
  color: rgba(26, 122, 109, 0.28);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.wave-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.wave-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.wave-card:hover {
  transform: translateY(-6px);
  box-shadow: 18px 22px 40px rgba(90, 110, 122, 0.16), -6px -6px 20px rgba(255, 255, 255, 0.92);
}

.game-logo {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent2);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: var(--inset);
}

.wave-card h3 {
  margin: 0;
}

.wave-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.wave-card .btn {
  width: 100%;
}

.reco {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.reco-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}

.reco-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.reco-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 34px;
}

.reco-card p {
  color: var(--muted);
  margin: 0 0 16px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px 26px;
  position: relative;
}

.step em {
  font-family: var(--head);
  font-style: italic;
  font-size: 2.2rem;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.valinta-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}

.valinta-mosaic {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}

.valinta-mosaic img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.kind {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.kind p {
  margin: 0;
  color: var(--muted);
}

.tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tip {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}

.tip h3 {
  font-style: italic;
}

.tip p {
  margin: 0;
  color: var(--muted);
}

.shore {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
}

.shore li {
  list-style: none;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--inset);
  padding: 22px 20px;
}

.shore strong {
  display: block;
  font-family: var(--head);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.shore span {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  padding: 48px 0 120px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legal-links a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--accent2);
}

.disclaimer {
  font-size: 0.92rem;
  margin: 0;
}

.code-chip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.code-chip code {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--bg);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: var(--inset);
}

.copy {
  font-size: 0.9rem;
  margin: 18px 0 0;
}

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 760px;
  margin-inline: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.cookie p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.page-hero {
  padding: 56px 0 12px;
}

.page-stack {
  padding-bottom: 64px;
}

.page-hero h1 {
  max-width: 16ch;
}

.prose {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 42px;
  max-width: 760px;
}

.prose h2 {
  font-size: 1.7rem;
  margin-top: 28px;
}

.prose p,
.prose li {
  color: var(--muted);
}

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

.updated {
  font-family: var(--head);
  font-style: italic;
  color: var(--accent);
}

@media (max-width: 1100px) {
  .wave-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .wave-card {
    flex: 0 0 min(270px, 82vw);
    scroll-snap-align: start;
  }

  .valinta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .valinta-mosaic {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .valinta-mosaic img {
    min-height: 260px;
  }
}

@media (max-width: 860px) {
  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 86px 14px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
  }

  .nav.is-open {
    display: flex;
  }

  .hero-panel,
  .hero-photo {
    min-height: 460px;
    height: 460px;
  }

  .hero-copy {
    padding: 28px 22px;
    width: 100%;
  }

  .hero-mist {
    background:
      linear-gradient(180deg, rgba(232, 244, 242, 0.2) 0%, rgba(232, 244, 242, 0.88) 62%);
  }

  .reco,
  .steps,
  .tips,
  .shore,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .cookie {
    flex-direction: column;
    align-items: stretch;
  }

  .prose {
    padding: 26px 22px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(var(--max), calc(100% - 24px));
  }

  .valinta-grid,
  .steps,
  .tips {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .hero-photo {
    min-height: 520px;
    height: 520px;
  }

  .wordmark {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .wave-card:hover {
    transform: none;
  }
}
