/*
Theme Name: FiksuSijoitus Custom
Theme URI: https://fiksusijoitus.fi
Author: FiksuSijoitus
Author URI: https://fiksusijoitus.fi
Description: Ultra-premium cinematic dark-mode WordPress theme for fiksusijoitus.fi — Finland's elite investment comparison platform.
Version: 2.0.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fiksusijoitus
Tags: dark-mode, premium, fintech, investment, finnish, custom-logo
*/

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap; /* Prevents invisible text flash (FOIT) */
    src: local('Inter'),
         url('assets/fonts/Inter-VariableFont_slnt,wght.woff2') format('woff2-supports-variations'),
         url('assets/fonts/Inter-VariableFont_slnt,wght.woff2') format('woff2');
}

:root {
  /* ==========================================================================
     1. LIGHT MODE (Default - Clean, Spacious, High-Contrast)
     ========================================================================== */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --shadow-premium: rgba(0, 0, 0, 0.03) 0px 10px 30px;

  /* --- Palette (Light Mode Default) --- */
  --bg-main:           #F8FAFC;
  --bg-surface:        #FFFFFF;
  --bg-surface-hover:  #F0F2F5;
  --bg-elevated:       #FFFFFF;
  --border-subtle:     rgba(15, 23, 42, 0.06);
  --border-medium:     rgba(15, 23, 42, 0.12);
  --text-primary:      #0F172A;
  --text-secondary:    #475569;
  --text-muted:        #64748B;
  --accent:            #3B82F6;
  --accent-neon:       #3B82F6;
  --accent-neon-hover: #2563EB;
  --accent-glow:       transparent;
  --accent-blue:       #3B82F6;
  --card-border:       rgba(15, 23, 42, 0.06);
  --bg-base:           #F8FAFC;
  --surface:           #FFFFFF;
  --border:            1px solid rgba(15, 23, 42, 0.06);
  --header-bg:         rgba(248, 250, 252, 0.8);
  --btn-bg:            #0F172A;
  --btn-text:          #FFFFFF;
  --btn-hover:         #1E293B;
  /* Legacy aliases (search/404 templates) */
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-bg-card: var(--bg-surface);
  --color-border: var(--border-subtle);
  --color-border-subtle: var(--border-subtle);
  --color-accent: var(--accent-neon);
  --font-size-xs: var(--fs-xs);
  --font-size-sm: var(--fs-sm);

  /* --- Typography (Fluid via clamp) --- */
  --font-family:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-xs:             0.75rem;
  --fs-sm:             0.875rem;
  --fs-base:           1rem;
  --fs-lg:             1.125rem;
  --fs-xl:             1.25rem;
  --fs-2xl:            1.5rem;
  --fs-3xl:            2rem;
  --fs-4xl:            2.5rem;
  --fs-5xl:            3.25rem;
  --fs-6xl:            4rem;
  --lh-tight:          1.1;
  --lh-snug:           1.25;
  --lh-normal:         1.6;
  --lh-relaxed:        1.7;
  --fw-regular:        400;
  --fw-medium:         500;
  --fw-semibold:       600;
  --fw-bold:           700;
  --fw-extrabold:      800;
  --ls-tight:          -0.04em;
  --ls-normal:         0;
  --ls-wide:           0.06em;
  --ls-text:           -0.02em;
  --ls-heading:        -0.05em;

  /* --- Spacing --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Layout --- */
  --container-max:     1100px;
  --container-narrow:  680px;
  --container-article: 760px;
  --container-reading: 680px;

  /* --- Borders & Radii --- */
  --radius-sm:   8px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:  none;
  --shadow-md:  none;
  --shadow-lg:  none;
  --shadow-neon: none;

  /* --- Transitions --- */
  --transition-fast:   0.15s ease-in-out;
  --transition-normal: 0.2s ease-in-out;
  --transition-slow:   0.35s ease-in-out;

  color-scheme: light dark;
}

/* ==========================================================================
   2. LUXURY DARK MODE (Midnight Obsidian & Electric Sapphire)
   Triggered automatically by OS/browser dark theme preference
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0A0F1D;
    --bg-secondary: #131B2E;
    --shadow-premium: rgba(0, 0, 0, 0.3) 0px 20px 40px;
    --bg-main:           #0A0F1D;
    --bg-surface:        #131B2E;
    --bg-surface-hover:  #1A2540;
    --bg-elevated:       #1A2540;
    --border-subtle:     rgba(255, 255, 255, 0.05);
    --border-medium:     rgba(255, 255, 255, 0.10);
    --text-primary:      #F8FAFC;
    --text-secondary:    #94A3B8;
    --text-muted:        #636366;
    --accent:            #4D90FF;
    --accent-neon:       #4D90FF;
    --accent-neon-hover: #3B7BEF;
    --accent-blue:       #4D90FF;
    --card-border:       rgba(255, 255, 255, 0.05);
    --bg-base:           #0A0F1D;
    --surface:           #131B2E;
    --border:            1px solid rgba(255, 255, 255, 0.05);
    --header-bg:         rgba(10, 15, 29, 0.85);
    --btn-bg:            #FFFFFF;
    --btn-text:          #000000;
    --btn-hover:         #F1F5F9;
  }
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-text);
  color: var(--text-primary);
  background-color: var(--bg-main);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.site-main,
main {
  background-color: var(--bg-main);
  color: var(--text-primary);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

::selection {
  background: var(--accent-neon);
  color: var(--bg-main);
}


/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--article {
  max-width: var(--container-article);
}

.container--reading {
  max-width: var(--container-reading);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   HEADER — Frosted Glass Navigation
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(3, 5, 8, 0.95);
  border-bottom-color: var(--border-medium);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.site-logo-container:hover {
  transform: scale(1.02);
}

.logo-text {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.logo-text .text-accent {
  color: var(--accent, var(--accent-neon));
}

.site-logo-mark .logo-bar {
  fill: var(--text-primary);
}

.site-logo-mark .logo-bar--accent {
  fill: var(--accent, var(--accent-neon));
}

/* Desktop nav */
.primary-nav {
  display: none;
  align-items: center;
  gap: clamp(var(--space-4), 2.5vw, var(--space-8));
  list-style: none;
}

.primary-nav a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  padding-block: var(--space-1);
  position: relative;
  transition: color var(--transition-normal);
}

.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-neon);
  border-radius: 1px;
  transition: width var(--transition-normal);
}

.primary-nav a:hover {
  color: var(--text-primary);
}

.primary-nav a:hover::after {
  width: 100%;
}

/* Header CTA */
.header-cta {
  display: none;
  flex-shrink: 0;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
}

.hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #FFFFFF;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu a {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--text-primary);
}

@media (max-width: 1023px) {
    .menu-toggle { display: flex; z-index: 9999; }
    .nav-menu {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: #080B11;
        flex-direction: column;
        justify-content: center; align-items: center;
        gap: 32px; z-index: 9998;
    }
    .nav-menu.is-active { display: flex; }
    body.menu-locked { overflow: hidden; }
    
    /* Cross icon transformation when active */
    .menu-toggle.is-open .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-open .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}


/* ============================================================
   BUTTONS — Precision-Crafted Interaction States
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 22px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  transition: background var(--transition-normal),
              border-color var(--transition-normal),
              transform var(--transition-normal),
              box-shadow var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn--primary:hover {
  background: var(--btn-hover);
  transform: scale(1.015);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn--secondary:hover {
  border-color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.btn--lg {
  padding: 14px 30px;
  font-size: var(--fs-base);
  border-radius: var(--radius-lg);
}


/* ============================================================
   HERO — Cinematic Landing
   ============================================================ */
.hero {
  display: flex;
  align-items: center;
  padding-top: calc(72px + var(--space-20));
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind hero — removed for minimalism */
.hero::before {
  display: none;
}

.hero-content {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  margin-bottom: var(--space-10);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent-neon);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: var(--radius-full);
  background: rgba(0, 230, 118, 0.05);
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-neon);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: var(--ls-heading);
  margin-bottom: var(--space-6);
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.hero-title .text-accent,
.hero-title span.accent,
.hero-title span.blue-highlight {
  color: var(--accent, var(--accent-neon));
}

.hero-subtitle {
  font-size: clamp(var(--fs-base), 2vw, var(--fs-xl));
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
  max-width: 650px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

/* Trust strip */
.hero-trust {
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-subtle);
}

.hero-trust p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-5);
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color var(--transition-normal);
}

.trust-item:hover {
  color: var(--text-primary);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}


/* ============================================================
   SCROLL REVEAL — Subtle Cinematic Entry
   ============================================================ */
.reveal {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}


/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  position: relative;
  padding: 140px 0;
}

.section--divider {
  border-top: 1px solid #1E2638;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent-neon);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
}


/* ============================================================
   CARDS — Broker Comparison Matrix
   ============================================================ */
.comparison-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 80px 20px;
}

.broker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: border-color 0.2s ease-in-out,
              background 0.2s ease-in-out,
              transform 0.2s ease-in-out,
              box-shadow 0.2s ease-in-out;
}

.broker-card .card-content {
  flex-grow: 1;
}

.broker-card .btn {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.broker-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-normal),
              background var(--transition-normal),
              transform var(--transition-normal),
              box-shadow var(--transition-normal);
}

.card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: none;
}

.card--featured {
  border-color: var(--border-medium);
  background: var(--bg-surface);
}

.card--featured:hover {
  border-color: var(--accent-neon);
  box-shadow: none;
}

/* Badge */
.card-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: var(--radius-full);
  box-shadow: none;
}

/* Category label — neutral educational tag */
.card-category-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  border: none;
  background: transparent;
}

/* Logo area */
.card-logo-container {
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-4);
}

/* Stats rows */
.card-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-6);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-sm);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-value {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.stat-value.stat-highlight {
  color: var(--text-primary);
}

/* Bullet pros */
.card-pros {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-align: left;
  list-style: none;
  padding: 0;
}

.card-pros li {
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.card-pros li::before {
  content: '✓';
  color: var(--accent-neon);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Card CTA */
.card-cta-btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  font-size: var(--fs-sm);
  padding-block: 13px;
}


/* ============================================================
   GUIDES — Dynamic Post Grid
   ============================================================ */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-6);
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--transition-normal),
              border-color var(--transition-normal),
              background var(--transition-normal),
              box-shadow var(--transition-normal);
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  background: var(--bg-surface-hover);
  box-shadow: none;
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.guide-date {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.guide-meta-divider {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.guide-category {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--accent-neon);
}

.guide-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.guide-excerpt {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent-neon);
  margin-top: auto;
  transition: color var(--transition-fast), gap var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.guide-card:hover .guide-link {
  color: var(--accent-neon-hover);
  gap: var(--space-2);
}


/* ============================================================
   NEWSLETTER — Conversion Section
   ============================================================ */
.newsletter-section {
  padding-bottom: var(--space-32);
}

.newsletter-card {
  padding: var(--space-12) var(--space-10);
  text-align: center;
  border-color: var(--border-subtle);
  background: var(--bg-surface);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  margin-inline: auto;
}

.newsletter-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  text-align: center;
}

.newsletter-input:focus {
  border-color: #FFFFFF;
  box-shadow: none;
}

.newsletter-input::placeholder {
  color: var(--text-muted);
}


/* ============================================================
   ARTICLE / SINGLE POST — Elite Reading Layout
   ============================================================ */
.article-header {
  padding-top: calc(72px + var(--space-16));
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-12);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.article-meta-divider {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
}

.article-title {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  max-width: 720px;
}

.article-featured-image {
  margin-bottom: var(--space-12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.article-featured-image img {
  width: 100%;
  display: block;
}

/* ============================================================
   PROSE — Distraction-Free Article Typography
   ============================================================ */
.prose {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}

.prose > * + * {
  margin-top: var(--space-6);
}

.prose h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
}

.prose h4 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.prose p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
}

.prose a {
  color: var(--accent-neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 230, 118, 0.3);
  transition: text-decoration-color var(--transition-fast);
}

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

.prose strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

.prose ul,
.prose ol {
  padding-left: var(--space-6);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  padding-left: var(--space-2);
  margin-bottom: var(--space-2);
}

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

.prose blockquote {
  border-left: 3px solid var(--accent-neon);
  padding-left: var(--space-6);
  color: var(--text-primary);
  font-style: italic;
}

.prose img {
  border-radius: var(--radius-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.prose pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow-x: auto;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.prose code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-12) 0;
}


/* ============================================================
   ARTICLE CTA — High-Visibility Conversion Box
   ============================================================ */
.article-cta {
  margin-top: var(--space-16);
  padding: var(--space-10) var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--accent-neon);
  margin-bottom: var(--space-3);
}

.article-cta-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-3);
}

.article-cta-desc {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}


/* ============================================================
   POST NAVIGATION
   ============================================================ */
.post-nav {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
}

.post-nav-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.post-nav-title {
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.post-nav-title:hover {
  color: var(--text-primary);
}


/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.page-header {
  padding-top: calc(72px + var(--space-16));
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}

.page-content {
  padding-bottom: var(--space-24);
}


/* ============================================================
   FOOTER — Clean Grid
   ============================================================ */
.site-footer {
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-main);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand .site-logo {
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-normal);
  max-width: 280px;
}

.footer-col-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-neon);
}


/* ============================================================
   GLOSSARY PAGE — Sijoitussanasto
   ============================================================ */
.glossary-page {
  background: var(--bg-main);
}

.glossary-container {
  max-width: 900px;
  margin-inline: auto;
  padding: 120px 20px 80px 20px;
}

.glossary-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.glossary-header h1 {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}

.glossary-intro {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 640px;
  margin-inline: auto;
}

.glossary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.glossary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glossary-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.glossary-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: var(--radius-md);
  color: var(--accent-neon);
  margin-bottom: var(--space-5);
}

.glossary-term {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.glossary-aka {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.glossary-definition {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-4);
}

.glossary-example {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-normal);
  background: rgba(0, 230, 118, 0.04);
  border-left: 3px solid var(--accent-neon);
  padding: var(--space-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.glossary-cta {
  text-align: center;
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-subtle);
}

.glossary-cta p {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}


/* ============================================================
   FAQ PAGE — Usein Kysytyt
   ============================================================ */
.faq-page {
  background: var(--bg-main);
}

.faq-container {
  max-width: 760px;
  margin-inline: auto;
  padding: 120px 20px 80px 20px;
}

.faq-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.faq-header h1 {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}

.faq-intro {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 580px;
  margin-inline: auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.faq-item.is-open {
  border-color: rgba(0, 230, 118, 0.2);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent-neon);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-normal), color var(--transition-normal);
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-neon);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 var(--space-6) var(--space-6) var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.faq-answer-inner p {
  margin-bottom: var(--space-4);
}

.faq-answer-inner ul,
.faq-answer-inner ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.faq-answer-inner ul {
  list-style: disc;
}

.faq-answer-inner ol {
  list-style: decimal;
}

.faq-answer-inner li {
  margin-bottom: var(--space-2);
  padding-left: var(--space-1);
}

.faq-answer-inner li::marker {
  color: var(--accent-neon);
}

.faq-answer-inner a {
  color: var(--accent-neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 230, 118, 0.3);
}

.faq-answer-inner a:hover {
  text-decoration-color: var(--accent-neon);
}

.faq-answer-inner strong {
  color: var(--text-primary);
}

.faq-cta {
  text-align: center;
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-subtle);
}

.faq-cta p {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}


/* ============================================================
   CONTACT PAGE — Yhteystiedot
   ============================================================ */
.contact-page {
  background: var(--bg-main);
}

.contact-container {
  max-width: 1000px;
  margin-inline: auto;
  padding: 120px 20px 80px 20px;
}

.contact-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.contact-header h1 {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}

.contact-intro {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 580px;
  margin-inline: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-normal);
}

.contact-card:hover {
  border-color: var(--border-medium);
}

.contact-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 230, 118, 0.08);
  border-radius: var(--radius-sm);
  color: var(--accent-neon);
  margin-bottom: var(--space-4);
}

.contact-card h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.contact-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-3);
}

.contact-email {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent-neon);
  transition: color var(--transition-fast);
}

.contact-email:hover {
  color: var(--accent-neon-hover);
}

.contact-link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent-neon);
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--accent-neon-hover);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.contact-form-wrapper h2 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #FFFFFF;
  box-shadow: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

.contact-submit {
  align-self: flex-start;
  margin-top: var(--space-2);
}


/* ============================================================
   MEDIAKIT PAGE — Kumppanuudet
   ============================================================ */
.mediakit-page {
  background: var(--bg-main);
}

.mediakit-container {
  max-width: 900px;
  margin-inline: auto;
  padding: 120px 20px 80px 20px;
}

.mediakit-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.mediakit-header h1 {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}

.mediakit-intro {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 640px;
  margin-inline: auto;
}

.mediakit-stats {
  margin-bottom: var(--space-16);
}

.mediakit-stats h2,
.mediakit-types h2,
.mediakit-values h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-8);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stat-number {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  color: var(--accent-neon);
  line-height: 1;
}

.stat-desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

.mediakit-types {
  margin-bottom: var(--space-16);
}

.types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.type-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.type-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.type-card h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.type-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

.mediakit-values {
  margin-bottom: var(--space-16);
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.values-list li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  padding-left: var(--space-6);
  position: relative;
}

.values-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-neon);
  font-weight: var(--fw-bold);
}

.values-list li strong {
  color: var(--text-primary);
}

.mediakit-cta {
  text-align: center;
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-subtle);
}

.mediakit-cta h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.mediakit-cta p {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--text-secondary);
}


/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  padding-top: calc(72px + var(--space-20));
  padding-bottom: var(--space-24);
  text-align: center;
}

.error-404-code {
  font-size: clamp(var(--fs-6xl), 12vw, 10rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-4);
}


/* ============================================================
   RESPONSIVE — Mobile-First Progressive Enhancement
   ============================================================ */

/* Tablets & up */
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .primary-nav {
    display: flex;
  }
  .header-cta {
    display: inline-flex;
  }
  .menu-toggle {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .trust-badges {
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }
  .card {
    padding: var(--space-6);
  }
  .guide-card {
    padding: var(--space-6);
  }
  .article-cta {
    padding: var(--space-8) var(--space-6);
  }
  .newsletter-card {
    padding: var(--space-8) var(--space-6);
  }
}

/* ============================================================
   COMPOUND INTEREST CALCULATOR
   ============================================================ */
.calc-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin: var(--space-10) 0;
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.calc-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.calc-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.calc-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.calc-control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.calc-value-display {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--accent-neon);
  background: rgba(0, 230, 118, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* Custom Range Slider */
.calc-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-surface-hover);
  border-radius: var(--radius-full);
  outline: none;
  margin: 10px 0;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: none;
  transition: transform var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb:hover,
.calc-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.calc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: none;
  border: none;
  transition: transform var(--transition-fast);
}

.calc-slider::-moz-range-thumb:hover,
.calc-slider::-moz-range-thumb:active {
  transform: scale(1.15);
}

.calc-result-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.calc-result-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.calc-result-value {
  font-size: clamp(var(--fs-4xl), 5vw, var(--fs-6xl));
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-2);
  word-break: break-word;
}

.calc-result-sub {
  font-size: var(--fs-sm);
  color: var(--accent-neon);
  margin-bottom: var(--space-8);
  font-weight: var(--fw-medium);
}

.calc-cta {
  width: 100%;
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
}

.calc-cta:hover {
  background: var(--btn-hover) !important;
}

/* ============================================================
   ARCHIVE & STANDARD PAGES (Oppaat & Tietoa)
   ============================================================ */
.blog-archive-container,
.text-container {
  max-width: 1100px;
  margin-inline: auto;
  padding: 120px 20px 60px 20px;
}

.text-container {
  max-width: 760px;
}

/* Text Container Content Typography */
.text-container p,
.page-content-body p {
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.text-container h1,
.text-container h2,
.text-container h3,
.text-container h4,
.page-content-body h1,
.page-content-body h2,
.page-content-body h3,
.page-content-body h4 {
  color: var(--text-primary);
  letter-spacing: -0.04em;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.text-container .lead,
.page-content-body .lead {
  font-size: 1.25rem;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.callout-box {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin: 24px 0;
  color: var(--text-primary);
}

.callout-box p {
  margin-bottom: 0;
  color: var(--text-primary);
}

.text-container h1 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

.blog-archive-container h2 {
  color: var(--text-primary);
  letter-spacing: -0.04em;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px;
  margin-top: 40px;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out, background-color 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: scale(1.02) translateY(-4px);
}

.blog-card h3 {
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.blog-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card h3 a:hover {
  color: var(--accent);
}

.blog-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.blog-card > a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: auto;
}

.blog-card > a:hover {
  color: var(--accent-neon-hover);
}

/* ============================================================
   CALCULATOR SLIDERS
   ============================================================ */
input[type="range"].calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 12px 0;
  cursor: pointer;
}

input[type="range"].calc-slider:focus {
  outline: none;
}

/* Track */
input[type="range"].calc-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: #1E293B;
  border-radius: 2px;
}

input[type="range"].calc-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  background: #1E293B;
  border-radius: 2px;
}

/* Thumb */
input[type="range"].calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  margin-top: -8px; /* (Track Height / 2) - (Thumb Height / 2) = (4/2) - (20/2) = 2 - 10 = -8 */
  transition: transform 0.2s ease;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

input[type="range"].calc-slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border: none;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s ease;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* Hover & Active States */
input[type="range"].calc-slider:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

input[type="range"].calc-slider:hover::-moz-range-thumb {
  transform: scale(1.15);
}

input[type="range"].calc-slider:active::-webkit-slider-thumb {
  transform: scale(0.95);
}

input[type="range"].calc-slider:active::-moz-range-thumb {
  transform: scale(0.95);
}

/* ============================================================
   COMPARISON GRID REFACTOR
   ============================================================ */
.comparison-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
    box-sizing: border-box;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    width: 100%;
}

.comparison-card {
    background: var(--surface, var(--bg-surface)) !important;
    border: var(--border, 1px solid var(--border-subtle)) !important;
    border-radius: 12px !important;
    padding: 40px 32px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important; /* Perfect anchor for button */
    height: 100% !important; /* Forces identical card heights */
    box-shadow: none !important;
    box-sizing: border-box;
}

.card-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-category {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    color: var(--accent, var(--accent-neon)) !important;
}

.card-heading {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin: 0 0 8px 0 !important;
}

.card-data-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 14px 0;
}

.data-label {
    color: var(--text-secondary) !important;
    font-size: 14px;
}

.data-value {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 14px;
}

.card-description {
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
}

.card-action-btn {
    display: block !important;
    width: 100% !important;
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    text-align: center !important;
    padding: 14px 0 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-top: 32px !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
}

.card-action-btn:hover {
    background: var(--btn-hover) !important;
    transform: scale(1.015);
}


/* ============================================================
   HERO CALCULATOR — Integrated Compound Interest Engine
   ============================================================ */
.hero-calculator {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    background: var(--surface, var(--bg-surface));
    border: var(--border, 1px solid var(--border-subtle));
    border-radius: 12px;
    padding: 48px 40px;
    box-sizing: border-box;
}

.hero-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .hero-calc-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}

.hero-calc-controls {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero-calc-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-calc-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-calc-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent, var(--accent-neon));
}

.hero-calc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border-subtle, #1E293B);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
}

.hero-calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    transition: width 0.15s ease, height 0.15s ease;
    margin-top: -6px;
}

.hero-calc-slider:hover::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -8px;
}

.hero-calc-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: width 0.15s ease, height 0.15s ease;
}

.hero-calc-slider:hover::-moz-range-thumb {
    width: 20px;
    height: 20px;
}

.hero-calc-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--border-subtle, #1E293B);
    border-radius: 2px;
}

.hero-calc-slider::-moz-range-track {
    height: 4px;
    background: var(--border-subtle, #1E293B);
    border-radius: 2px;
}

.hero-calc-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 40px 24px;
}

.hero-calc-result-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.hero-calc-result-sum {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    word-break: break-word;
}

.hero-calc-result-sub {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-calc-result-sub span {
    color: var(--accent, var(--accent-neon));
    font-weight: 700;
}

@media (max-width: 480px) {
    .hero-calculator {
        padding: 32px 20px;
    }
    .hero-calc-result-sum {
        font-size: 36px;
    }
}


/* ============================================================
   PREMIUM EASING & HARDWARE ACCELERATION
   ============================================================ */
@keyframes premiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to major structural zones on page load */
.hero-section, 
.comparison-section,
.hero-calculator {
    animation: premiumFadeInUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Card Hover Micro-Interactions */
.comparison-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.comparison-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent) !important; /* Elegant focus indicator */
}

/* ============================================================
   MULTI-THEME ARCHITECTURE — Manual Toggle Overrides
   These class-based overrides take priority when user explicitly
   toggles theme via the header button, overriding @media defaults.
   ============================================================ */

/* Manual Light Mode Override (mirrors :root defaults) */
html.light-mode,
body.light-mode {
    --bg-base: #F8FAFC;
    --bg-main: #F8FAFC;
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #F0F2F5;
    --bg-elevated: #FFFFFF;
    --surface: #FFFFFF;
    --border-subtle: rgba(15, 23, 42, 0.06);
    --border-medium: rgba(15, 23, 42, 0.12);
    --border: 1px solid rgba(15, 23, 42, 0.06);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --accent: #3B82F6;
    --accent-neon: #3B82F6;
    --accent-neon-hover: #2563EB;
    --accent-blue: #3B82F6;
    --card-border: rgba(15, 23, 42, 0.06);
    --btn-bg: #0F172A;
    --btn-text: #FFFFFF;
    --btn-hover: #1E293B;
    --header-bg: rgba(248, 250, 252, 0.8);
    --color-text-primary: #0F172A;
    --color-text-secondary: #475569;
    --color-text-muted: #64748B;
    --color-bg-card: #FFFFFF;
    --color-border: rgba(15, 23, 42, 0.06);
    --color-border-subtle: rgba(15, 23, 42, 0.06);
    --color-accent: #3B82F6;
    color-scheme: light;
}

/* Manual Dark Mode Override */
html.dark-mode,
body.dark-mode {
    --bg-base: #0A0F1D;
    --bg-main: #0A0F1D;
    --bg-primary: #0A0F1D;
    --bg-secondary: #131B2E;
    --bg-surface: #131B2E;
    --bg-surface-hover: #1A2540;
    --bg-elevated: #1A2540;
    --surface: #131B2E;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-medium: rgba(255, 255, 255, 0.10);
    --border: 1px solid rgba(255, 255, 255, 0.05);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #636366;
    --accent: #4D90FF;
    --accent-neon: #4D90FF;
    --accent-neon-hover: #3B7BEF;
    --accent-blue: #4D90FF;
    --card-border: rgba(255, 255, 255, 0.05);
    --btn-bg: #FFFFFF;
    --btn-text: #000000;
    --btn-hover: #F1F5F9;
    --header-bg: rgba(10, 15, 29, 0.85);
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-text-muted: #636366;
    --color-bg-card: #131B2E;
    --color-border: rgba(255, 255, 255, 0.05);
    --color-border-subtle: rgba(255, 255, 255, 0.05);
    --color-accent: #4D90FF;
    color-scheme: dark;
}

/* Overwrite structural layouts to use these tokens */
body {
    background-color: var(--bg-base) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.comparison-card {
    background: var(--surface) !important;
    border: var(--border) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease !important;
}

.card-heading, .data-value { color: var(--text-primary) !important; }
.data-label, .card-description { color: var(--text-secondary) !important; }
.card-category { color: var(--accent) !important; }

.card-action-btn {
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
}
.card-action-btn:hover {
    background: var(--btn-hover) !important;
}

/* Technical blueprint lines divider */
.card-data-row {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.theme-toggle-btn {
    background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-primary);
    transition: color 0.3s ease; display: flex; align-items: center;
}
.theme-toggle-btn:hover { color: var(--accent); }

/* --- Hero: token-bound text & actions (light/dark) --- */
.hero-title,
.hero-section h1,
.hero-section .hero-title,
.hero h1,
.hero-section h1 span,
.hero h1 span {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    transition: color 0.3s ease;
}

.hero-title span.accent,
.hero-title .text-accent,
.hero-section h1 span.blue-highlight,
.hero-section h1 span.accent {
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent) !important;
}

.hero-actions a.btn--secondary,
.hero-actions a.btn-secondary,
.hero-actions a:nth-child(2) {
    background: transparent !important;
    border: 1px solid var(--text-primary) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.hero-actions a.btn--secondary:hover,
.hero-actions a.btn-secondary:hover,
.hero-actions a:nth-child(2):hover {
    background: var(--text-primary) !important;
    color: var(--bg-base) !important;
}

header,
.site-header {
    background-color: var(--header-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border) !important;
}

/* --- Light mode: global surfaces, header, buttons --- */
html.light-mode .site-header.scrolled,
body.light-mode .site-header.scrolled {
    background: var(--header-bg) !important;
    border-bottom: var(--border) !important;
}

html.light-mode .logo-text,
body.light-mode .logo-text {
    color: var(--text-primary);
}

html.light-mode .logo-text .text-accent,
body.light-mode .logo-text .text-accent {
    color: var(--accent);
}

html.light-mode .hamburger-bar,
body.light-mode .hamburger-bar {
    background-color: var(--text-primary);
}

html.light-mode .btn--primary,
body.light-mode .btn--primary {
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    border: none;
}

html.light-mode .btn--primary:hover,
body.light-mode .btn--primary:hover {
    background: var(--btn-hover) !important;
}

html.light-mode .btn--secondary,
body.light-mode .btn--secondary {
    background: transparent !important;
    border: 1px solid var(--text-primary) !important;
    color: var(--text-primary) !important;
}

html.light-mode .btn--secondary:hover,
body.light-mode .btn--secondary:hover {
    background: var(--text-primary) !important;
    color: var(--bg-base) !important;
}

html.light-mode .guide-card,
html.light-mode .broker-card,
html.light-mode .card,
body.light-mode .guide-card,
body.light-mode .broker-card,
body.light-mode .card {
    background: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
}

html.light-mode .guide-card:hover,
html.light-mode .broker-card:hover,
body.light-mode .guide-card:hover,
body.light-mode .broker-card:hover {
    background: var(--bg-surface-hover) !important;
    border-color: var(--border-medium) !important;
}

html.light-mode .guide-title,
html.light-mode .section-title,
body.light-mode .guide-title,
body.light-mode .section-title {
    color: var(--text-primary) !important;
}

html.light-mode .hero-subtitle,
body.light-mode .hero-subtitle {
    color: var(--text-secondary) !important;
}

html.light-mode .hero-title,
html.light-mode .hero .hero-title,
body.light-mode .hero-title,
body.light-mode .hero .hero-title {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
}

html.light-mode .hero-title .text-accent,
body.light-mode .hero-title .text-accent {
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent) !important;
}

html.light-mode .hero-calculator,
body.light-mode .hero-calculator {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
}

html.light-mode .hero-calc-result,
body.light-mode .hero-calc-result {
    background: var(--bg-surface-hover);
    border-color: var(--border-subtle);
}

html.light-mode .nav-menu,
body.light-mode .nav-menu {
    background: var(--bg-base);
}

/* --- Global typography & surfaces (all pages / devices) --- */
html.light-mode,
body.light-mode {
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted: var(--text-muted);
    --color-bg-card: var(--bg-surface);
    --color-border: var(--border-subtle);
    --color-border-subtle: var(--border-subtle);
    --color-accent: var(--accent);
}

html.light-mode main h1,
html.light-mode main h2,
html.light-mode main h3,
html.light-mode main h4,
html.light-mode main h5,
html.light-mode main h6,
body.light-mode main h1,
body.light-mode main h2,
body.light-mode main h3,
body.light-mode main h4,
body.light-mode main h5,
body.light-mode main h6,
html.light-mode .article-title,
html.light-mode .page-title,
body.light-mode .article-title,
body.light-mode .page-title {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
}

html.light-mode .prose p,
html.light-mode .text-container p,
html.light-mode .page-content-body p,
body.light-mode .prose p,
body.light-mode .text-container p,
body.light-mode .page-content-body p {
    color: var(--text-secondary) !important;
}

html.light-mode .prose h2,
html.light-mode .prose h3,
html.light-mode .prose h4,
html.light-mode .text-container h1,
html.light-mode .text-container h2,
html.light-mode .text-container h3,
html.light-mode .page-content-body h2,
html.light-mode .page-content-body h3,
html.light-mode .blog-archive-container h2,
body.light-mode .prose h2,
body.light-mode .prose h3,
body.light-mode .prose h4,
body.light-mode .text-container h1,
body.light-mode .text-container h2,
body.light-mode .text-container h3,
body.light-mode .page-content-body h2,
body.light-mode .page-content-body h3,
body.light-mode .blog-archive-container h2 {
    color: var(--text-primary) !important;
}

html.light-mode .blog-card,
body.light-mode .blog-card {
    background: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
}

html.light-mode .blog-card h3 a,
body.light-mode .blog-card h3 a {
    color: var(--text-primary) !important;
}

html.light-mode .blog-card p,
body.light-mode .blog-card p {
    color: var(--text-secondary) !important;
}

html.light-mode .blog-card > a,
body.light-mode .blog-card > a {
    color: var(--accent) !important;
}

html.light-mode .callout-box,
body.light-mode .callout-box {
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

html.light-mode .callout-box p,
html.light-mode .callout-box strong,
body.light-mode .callout-box p,
body.light-mode .callout-box strong {
    color: var(--text-primary) !important;
}

html.light-mode .footer-links a,
body.light-mode .footer-links a {
    color: var(--text-secondary) !important;
}

html.light-mode .footer-links a:hover,
body.light-mode .footer-links a:hover {
    color: var(--accent) !important;
}

html.light-mode .site-footer,
body.light-mode .site-footer {
    background: var(--bg-main) !important;
    border-top-color: var(--border-subtle) !important;
}

html.light-mode .newsletter-input:focus,
body.light-mode .newsletter-input:focus {
    border-color: var(--accent) !important;
}

/* ============================================================
   LUXURY NAVIGATION
   ============================================================ */

/* Desktop Nav Replacement */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 2.5vw, var(--space-8));
  list-style: none;
}

.desktop-nav a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  padding-block: var(--space-1);
  position: relative;
  transition: color var(--transition-normal);
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-neon);
  border-radius: 1px;
  transition: width var(--transition-normal);
}

.desktop-nav a:hover {
  color: var(--text-primary);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.desktop-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 22px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  background: var(--btn-bg);
  color: var(--btn-text);
  transition: background var(--transition-normal),
              transform var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary-sm:hover {
  background: var(--btn-hover);
  transform: scale(1.015);
}

/* Mobile Trigger Styling */
.mobile-menu-trigger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 9999;
    position: relative;
}

.hamburger-box {
    display: inline-block;
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary, #ffffff);
    position: absolute;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before { content: ""; top: -8px; left: 0; }
.hamburger-inner::after { content: ""; bottom: -8px; left: 0; }

/* Hamburger to X Morph State */
body.menu-open .hamburger-inner {
    background-color: transparent !important;
}
body.menu-open .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
}
body.menu-open .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Fullscreen Glassmorphism Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--header-bg); /* Dynamic blurred background */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 990; /* Must be lower than site-header z-index 1000 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Remove header background and blur when overlay is active */
body.menu-open .site-header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
}

/* Luxury Link Typography Stack */
.overlay-content {
    text-align: center;
    width: 100%;
    padding: 0 40px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 48px;
}

.mobile-link {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for high-end feeling */
body.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
body.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }

/* Menu Action Button Container */
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Menu Action Button */
.mobile-menu-actions .btn-menu-cta {
    display: inline-block;
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.mobile-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 99px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.mobile-theme-toggle:hover {
    background: var(--bg-surface-hover);
}

/* Responsive Trigger Breakpoint */
@media (max-width: 768px) {
    .desktop-nav, .desktop-actions { display: none !important; }
    .mobile-menu-trigger { display: block !important; }
}

/* Background scrolling lock */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   APPLE-STYLE NEWSLETTER SECTION (Ultra Minimalist)
   ========================================================================== */
.premium-newsletter-section {
    padding: var(--space-16) 0;
    position: relative;
    background: var(--bg-main);
}

.premium-newsletter-card {
    position: relative;
    background: transparent;
    padding: var(--space-8) 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Removed the glow completely */
.premium-newsletter-glow {
    display: none;
}

.premium-newsletter-badge {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.premium-newsletter-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.premium-newsletter-desc {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto var(--space-8) auto;
    line-height: 1.5;
    font-weight: 400;
}

.premium-newsletter-form {
    max-width: 440px;
    margin: 0 auto;
}

.premium-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.premium-input-wrapper {
    position: relative;
    width: 100%;
}

.premium-input-icon {
    display: none; /* Hide icon for Apple minimalist look */
}

.premium-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 17px;
    transition: border-color 0.2s ease;
}

.premium-input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.premium-submit {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    border: none;
    background: var(--text-primary);
    color: var(--bg-main);
    cursor: pointer;
    transition: opacity 0.2s ease;
    width: 100%;
}

.premium-submit:hover {
    opacity: 0.85;
}

/* Success Message Morph */
.premium-success-message {
    text-align: center;
    padding: var(--space-8) 0;
}

.premium-success-icon {
    display: none; /* Hide icon for ultra-minimalism */
}

.premium-success-title {
    font-size: 40px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.04em;
    animation: premiumPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.premium-success-desc {
    font-size: 20px;
    color: var(--text-secondary);
    animation: premiumPop 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Newsletter AJAX Transitions */
#newsletter-card-wrapper {
    transition: opacity 0.3s ease;
}

.newsletter-success-message .newsletter-heading {
    animation: premiumPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.footer-newsletter#homepage-newsletter-section {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                border 0.6s ease;
    max-height: 500px; /* Safe upper limit for smooth collapse */
    overflow: hidden;
}

.footer-newsletter.newsletter-fade-out {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

@keyframes premiumPop {
    0% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
