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

:root {
  --night:    #0c1a28;
  --deep:     #152a3a;
  --forest:   #3d6b4f;
  --sage:     #7a9e7e;
  --gold:     #c9a84c;
  --gold-dim: #a68a3a;
  --lichen:   #e6ebe2;
  --paper:    #f6f5f1;
  --ink:      #1e1e1e;
  --ink-soft: #4a4a4a;
  --ink-mute: #767676;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(12, 26, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.5rem;
}
.nav-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem; color: #fff;
  text-decoration: none; letter-spacing: 0.01em;
}
.nav-brand span { color: var(--gold); }
.nav-logo-img {
  width: 32px; height: 32px;
  border-radius: 6px; object-fit: cover;
}
.hero-logo-img {
  width: 140px; height: 140px;
  border-radius: 28px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border: 2px solid var(--gold);
}
.nav-links { display: flex; gap: 1.8rem; list-style: none; flex-wrap: wrap; }
.nav-links a {
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(165deg, var(--night) 0%, var(--deep) 55%, #1a3d3a 100%);
  padding: 10rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(61,107,79,0.2), transparent),
    radial-gradient(ellipse 500px 350px at 80% 20%, rgba(201,168,76,0.08), transparent);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 680px; margin: 0 auto; }
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  color: #fff; line-height: 1.15;
  margin-bottom: 0.4rem;
}
.hero h1 span { color: var(--gold); }
.hero-tagline {
  font-size: 1.15rem; color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem; font-weight: 400;
  letter-spacing: 0.02em;
}
.hero-platforms {
  display: flex; gap: 0.6rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2rem;
}
.platform-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 0.55rem 1.1rem;
  color: rgba(255,255,255,0.8); font-size: 0.85rem; font-weight: 500;
}
.platform-badge svg { width: 18px; height: 18px; opacity: 0.9; }
.hero-stats {
  display: flex; gap: 2.5rem; justify-content: center;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem; color: var(--gold);
}
.hero-stat-label {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

/* ---- Sub-page hero ---- */
.page-hero {
  background: linear-gradient(165deg, var(--night) 0%, var(--deep) 55%, #1a3d3a 100%);
  padding: 7rem 1.5rem 3rem;
  text-align: center;
}
.page-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #fff; margin-bottom: 0.4rem;
}
.page-hero h1 span { color: var(--gold); }
.page-hero p {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
}

/* ---- SECTIONS ---- */
.section { padding: 5rem 1.5rem; }
.section-inner { max-width: 800px; margin: 0 auto; }

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.9rem; margin-bottom: 1.5rem;
  color: var(--ink);
}

.section-alt { background: var(--lichen); }

/* ---- FEATURES ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem; margin-top: 2rem;
}
.feature-card {
  background: #fff;
  border-radius: 12px; padding: 1.6rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.feature-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--forest), var(--sage));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: #fff; font-size: 1.2rem;
}
.feature-card h3 {
  font-size: 1.02rem; font-weight: 600;
  margin-bottom: 0.45rem;
}
.feature-card p {
  font-size: 0.88rem; color: var(--ink-soft);
  line-height: 1.55;
}

/* ---- PROVIDER CARDS ---- */
.provider-card {
  background: #fff;
  border-radius: 12px; padding: 1.6rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 1.2rem;
}
.provider-header {
  display: flex; align-items: center; gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.provider-logo {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff;
  flex-shrink: 0;
}
.provider-header h3 { font-size: 1.05rem; font-weight: 600; }
.provider-card ol {
  padding-left: 1.3rem; font-size: 0.9rem;
  color: var(--ink-soft); line-height: 1.7;
}
.provider-card li { margin-bottom: 0.3rem; }
.provider-card a {
  color: var(--forest); font-weight: 500;
  text-decoration: none; border-bottom: 1px solid var(--sage);
}
.provider-card a:hover { color: var(--gold-dim); border-color: var(--gold-dim); }
.provider-note {
  font-size: 0.82rem; color: var(--ink-mute);
  margin-top: 0.6rem; font-style: italic;
}
.cloud-intro {
  color: var(--ink-soft); margin-bottom: 2rem;
  font-size: 0.95rem; line-height: 1.7;
}

/* ---- LANGUAGE TOGGLE ---- */
[data-lang] { display: none; }
html[lang-mode="en"] [data-lang="en"] { display: revert; }
html[lang-mode="fi"] [data-lang="fi"] { display: revert; }

.lang-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  overflow: hidden;
  margin-left: 0.5rem;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--night);
}
.lang-toggle button:hover:not(.active) {
  color: #fff;
}

/* ---- LEGAL ---- */
.legal-section { padding: 4rem 1.5rem 3rem; }
.legal-inner { max-width: 800px; margin: 0 auto; }
.legal-inner h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.7rem; margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.legal-inner h3 {
  font-size: 1.05rem; font-weight: 600;
  margin: 1.8rem 0 0.5rem; color: var(--ink);
}
.legal-inner p, .legal-inner ul {
  font-size: 0.92rem; color: var(--ink-soft);
  margin-bottom: 0.8rem; line-height: 1.7;
}
.legal-inner ul { padding-left: 1.3rem; }
.legal-inner li { margin-bottom: 0.35rem; }
.legal-date {
  font-size: 0.82rem; color: var(--ink-mute);
  margin-bottom: 1.5rem;
}

/* ---- SUPPORT ---- */
.support-box {
  background: linear-gradient(135deg, var(--deep), var(--night));
  border-radius: 16px; padding: 3rem;
  text-align: center; color: #fff;
  margin-top: 2rem;
}
.support-box h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; margin-bottom: 0.6rem;
}
.support-box p {
  color: rgba(255,255,255,0.6); margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.support-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gold); color: var(--night);
  text-decoration: none; font-weight: 600;
  padding: 0.75rem 1.8rem; border-radius: 8px;
  font-size: 0.92rem;
  transition: background 0.2s;
}
.support-link:hover { background: var(--gold-dim); }

/* ---- HELP PAGE ---- */
.toc {
  max-width: 800px; margin: -1.5rem auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 1.8rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
  position: relative; z-index: 10;
}
.toc h2 {
  font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute); margin-bottom: 1rem;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}
.toc-grid a {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink);
  font-size: 0.92rem; font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.toc-grid a:hover {
  background: var(--lichen);
  color: var(--forest);
}
.toc-icon {
  width: 28px; height: 28px;
  background: var(--lichen);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}

.help-section {
  max-width: 800px; margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.help-section:last-of-type { border-bottom: none; }

.help-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem; margin-bottom: 0.3rem;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.6rem;
}
.help-section h2 .h-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--forest), var(--sage));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; flex-shrink: 0;
}
.help-section .section-sub {
  font-size: 0.88rem; color: var(--ink-mute);
  margin-bottom: 1.5rem;
}
.help-section h3 {
  font-size: 1.02rem; font-weight: 600;
  margin: 1.6rem 0 0.4rem; color: var(--ink);
}
.help-section p {
  font-size: 0.92rem; color: var(--ink-soft);
  margin-bottom: 0.7rem; line-height: 1.7;
}
.help-section a {
  color: var(--forest); text-decoration: none;
  border-bottom: 1px solid var(--sage);
}
.help-section a:hover { color: var(--gold-dim); border-color: var(--gold-dim); }
.help-section ul, .help-section ol {
  font-size: 0.92rem; color: var(--ink-soft);
  padding-left: 1.3rem; margin-bottom: 0.8rem;
  line-height: 1.7;
}
.help-section li { margin-bottom: 0.35rem; }

.tip-box {
  background: var(--lichen);
  border-left: 3px solid var(--forest);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.tip-box strong { color: var(--forest); }

.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
.step-list li {
  counter-increment: step;
  padding-left: 2.2rem;
  position: relative;
  margin-bottom: 0.8rem;
}
.step-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.05rem;
  width: 1.5rem; height: 1.5rem;
  background: var(--forest);
  color: #fff; font-size: 0.78rem; font-weight: 600;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.back-to-top {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.82rem; color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s;
}
.back-to-top:hover { color: var(--gold); }

/* ---- FOOTER ---- */
footer {
  background: var(--night);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(201,168,76,0.1);
}
.footer-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem; color: #fff; margin-bottom: 0.5rem;
}
.footer-brand span { color: var(--gold); }
.footer-links {
  display: flex; gap: 1.5rem; justify-content: center;
  list-style: none; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.45); text-decoration: none;
  font-size: 0.82rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-size: 0.78rem; color: rgba(255,255,255,0.25);
}

/* ---- MOBILE ---- */
@media (max-width: 640px) {
  .hero { padding: 8rem 1.2rem 3.5rem; }
  .page-hero { padding: 6.5rem 1.2rem 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-num { font-size: 1.4rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
  .section { padding: 3.5rem 1.2rem; }
  .legal-section { padding: 3rem 1.2rem 2rem; }
  .support-box { padding: 2rem 1.5rem; }
  .toc { margin: -1rem 1rem 0; padding: 1.4rem 1.2rem; }
  .toc-grid { grid-template-columns: 1fr; }
  .help-section { padding: 2.5rem 1.2rem 1.5rem; }
}

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