/* skilltreejunction — Järvenranta-ilta */
@import url('https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,500;7..72,600;7..72,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0C2430;
  --surface: #123040;
  --surface-light: #1A3D4F;
  --surface-deep: #081820;
  --ink: #E8E0D0;
  --muted: rgba(232, 224, 208, 0.68);
  --accent: #FF6B4A;
  --accent-glow: rgba(255, 107, 74, 0.35);
  --teal: #5BA4B0;
  --teal-soft: rgba(91, 164, 176, 0.18);
  --teal-glow: rgba(91, 164, 176, 0.35);
  --border: rgba(91, 164, 176, 0.35);
  --border-strong: rgba(91, 164, 176, 0.55);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Literata', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open { overflow: hidden; }

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

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ── Wave dividers ── */
.wave-divider {
  position: relative;
  height: 64px;
  margin-top: -1px;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 64px;
}

.wave-divider--flip { transform: scaleY(-1); }

.section-curve {
  position: relative;
}

.section-curve::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: inherit;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 36, 48, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-link:hover { color: var(--teal); }
.logo-link img { width: 42px; height: 42px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.main-nav a:hover,
.main-nav a.active { color: var(--teal); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.player-badge {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.player-badge.visible { display: flex; }

.player-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:hover {
  color: #fff;
  background: #ff8266;
  box-shadow: 0 10px 32px rgba(255, 107, 74, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}

.btn-outline:hover {
  background: var(--teal-soft);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 0.5rem 0.85rem;
}

.btn-ghost:hover { color: var(--teal); background: var(--teal-soft); }

.btn-teal {
  background: var(--teal);
  color: var(--bg);
  border: 2px solid var(--teal);
  box-shadow: 0 6px 24px var(--teal-glow);
}

.btn-teal:hover {
  background: #6db8c4;
  color: var(--bg);
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 4rem 0 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% 20%, rgba(255, 107, 74, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(91, 164, 176, 0.1), transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  padding-bottom: 3rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--teal);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-text {
  font-size: 1.06rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 480px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-wave {
  position: relative;
  margin-top: -2px;
}

/* ── Section ── */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-label {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--teal-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin-bottom: 0.65rem;
}

.section-header p { color: var(--muted); }

/* ── Game cards grid ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: var(--shadow), 0 0 30px var(--teal-glow);
}

.game-card-img {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--surface-deep);
}

.game-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-img img { transform: scale(1.05); }

.game-num {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 36, 48, 0.85);
  border: 1px solid var(--teal);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal);
}

.game-card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.game-card-body p {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.55;
}

.game-card-body .btn { align-self: flex-start; }

/* ── About split ── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-visual img {
  width: 100%;
  aspect-ratio: 5/4;
  object-fit: cover;
}

.about-content .section-header {
  text-align: left;
  margin: 0 0 1.25rem;
}

.about-content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-content .btn { margin-top: 0.5rem; }

/* ── Why us ── */
.why-section {
  background: var(--surface);
  position: relative;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why-card {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.why-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 32px var(--teal-glow);
}

.why-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  border-radius: 50%;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.why-card h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── CTA ── */
.cta-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cta-banner img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  opacity: 0.5;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(12, 36, 48, 0.88), rgba(8, 24, 32, 0.82));
}

.cta-overlay h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.cta-overlay p {
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 1.25rem;
}

/* ── Page Hero ── */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg));
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
  color: var(--teal);
}

.page-hero p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Content ── */
.content-block {
  padding: 3rem 0 4rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
  color: var(--teal);
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
}

.prose p, .prose li {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.prose strong { color: var(--ink); }

.prose ul, .prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.prose li::marker { color: var(--teal); }

.prose a { text-decoration: underline; color: var(--teal); }
.prose a:hover { color: var(--accent); }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info {
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-info h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--teal);
}

.contact-info p { color: var(--muted); margin-bottom: 0.75rem; }

.contact-form {
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group { margin-bottom: 1.15rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(232, 224, 208, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { min-height: 130px; resize: vertical; }

.form-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-msg.success {
  background: rgba(91, 164, 176, 0.15);
  color: var(--teal);
  border: 1px solid var(--border);
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  background: var(--surface-deep);
  color: var(--muted);
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img { width: 36px; margin-bottom: 0.75rem; }

.footer-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.footer-brand p { font-size: 0.88rem; line-height: 1.6; }

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 0.85rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--teal); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(232, 224, 208, 0.55);
}

/* ── Overlays & Modals ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 24, 32, 0.9);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--teal), var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header {
  padding: 1.75rem 1.75rem 0;
  text-align: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.modal-header p { font-size: 0.9rem; color: var(--muted); }

.modal-body { padding: 1.25rem 1.75rem 1.75rem; }

.age-gate .modal-header img { width: 56px; margin: 0 auto 0.75rem; }

.age-gate .age-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.age-gate .age-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.85rem;
}

.age-gate .age-note a { text-decoration: underline; }

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 0 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: 0.85rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.auth-tab.active {
  color: var(--teal);
  border-bottom-color: var(--accent);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-form .form-group { margin-bottom: 0.9rem; }

.auth-error {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: none;
}

.auth-error.visible { display: block; }

.auth-form .btn { width: 100%; margin-top: 0.25rem; }

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  padding: 1.15rem 0;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 240px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cookie-text a { text-decoration: underline; font-weight: 600; color: var(--teal); }

.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .hero-grid,
  .about-split,
  .contact-grid,
  .footer-grid,
  .why-grid { grid-template-columns: 1fr; }

  .hero-content { text-align: center; }
  .hero-text { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .about-content .section-header { text-align: center; }

  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.25rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle { display: flex; }
  .header-actions .btn-ghost { display: none; }

  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero { padding: 2rem 0 0; }
  .section { padding: 2.5rem 0; }
  .games-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}
