/*
 * TassuTie — kaikkien sivujen yhteiset tyylit
 *
 * Fontit, värit, perustypografia, painikkeet, kauppamerkit, ylä- ja
 * alatunniste sekä hintakortit. Etusivu lisää päälle home.css:n ja
 * alasivut pages.css:n.
 *
 * Visuaalinen ajatus: metsän vihreä pohja, treenidamin oranssi toimintoihin.
 */

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('fonts/bricolage-grotesque-latin-wght.woff2') format('woff2');
    font-weight: 300 800;
    font-display: swap;
}

@font-face {
    font-family: 'Figtree';
    src: url('fonts/figtree-latin-wght.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
}

:root {
    color-scheme: light;

    --pine: #1d3a2d;
    --pine-soft: #2c5341;
    --mist: #ecf1ec;
    --paper: #fafbf8;
    --ink: #17211b;
    --muted: #4f5c54;
    --line: #d3ddd5;
    --dummy: #c4421c;
    --dummy-dark: #a33614;
    --on-dark: #f3f6f2;
    --on-dark-muted: #bccbc1;

    --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
    --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --wrap: 72rem;
    --gutter: 1rem;
    --radius-lg: 1.5rem;
    --radius-sm: 0.6rem;
}

@media (min-width: 48rem) {
    :root { --gutter: 2rem; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* i18n.js poistaa luokan, kun käännökset on asetettu (estää suomenkielisen välähdyksen) */
html.i18n-loading body { visibility: hidden; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
}

@media (min-width: 48rem) {
    body { font-size: 1.125rem; }
}

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

a { color: var(--pine-soft); }

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--pine);
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 750; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; }

p { margin: 0; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.lead {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    color: var(--muted);
    max-width: 36em;
}

.section { padding: 4.5rem 0; }

@media (min-width: 64rem) {
    .section { padding: 7rem 0; }
}

.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head p { margin-top: 1rem; }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    background: var(--pine);
    color: var(--on-dark);
    padding: 0.6rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

/* ── Painikkeet ───────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary { background: var(--dummy); color: #fff; }
.btn-primary:hover { background: var(--dummy-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { border-color: var(--line); color: var(--pine); background: transparent; }
.btn-ghost:hover { border-color: var(--pine); }

.btn-light { background: var(--on-dark); color: var(--pine); }
.btn-light:hover { background: #fff; }

.btn-small { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

.cta-note {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 0.85rem;
}

/* ── Sovelluskauppojen merkit ─────────────────────────────── */

.stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.store-label { font-size: 0.95rem; color: var(--muted); width: 100%; }

.play-badge-link img { height: 3rem; width: auto; }
.play-badge { display: none; }
html[lang="fi"] .play-badge-fi,
html[lang="en"] .play-badge-en,
html[lang="sv"] .play-badge-sv { display: block; }

.appstore-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 0.6rem;
    background: #000;
    color: #fff;
    text-decoration: none;
}
.appstore-badge-logo { width: 1.3rem; height: 1.3rem; }
.appstore-badge-text { display: flex; flex-direction: column; line-height: 1.05; }
.appstore-badge-small { font-size: 0.68rem; }
.appstore-badge-large { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

/* ── Ylätunniste ──────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 251, 248, 0.92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--pine);
    font-family: var(--font-display);
    font-weight: 750;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    margin-right: auto;
}
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--dummy); }

.header-nav { display: none; gap: 1.75rem; }
.header-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
}
.header-nav a:hover { color: var(--dummy-dark); }

.lang-toggle { display: flex; gap: 0.15rem; }
.lang-btn {
    background: none;
    border: 0;
    padding: 0.35rem 0.4rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-radius: 6px;
}
.lang-btn.active { color: var(--pine); text-decoration: underline; text-underline-offset: 4px; }

.header-cta { display: none; }

@media (min-width: 60rem) {
    .header-nav { display: flex; }
    .header-cta { display: inline-flex; }
}

/* ── Hinnoittelu ──────────────────────────────────────────── */

.pricing { background: var(--mist); }

.plans { display: grid; gap: 1.5rem; }

@media (min-width: 52rem) {
    .plans { grid-template-columns: 1fr 1fr; align-items: stretch; }
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--paper);
    border: 1px solid var(--line);
}
@media (min-width: 48rem) {
    .plan { padding: 2.5rem; }
}
.plan-pro { border: 2px solid var(--pine); }

.plan h3 { font-size: 1.6rem; }
.plan-price {
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--pine);
    line-height: 1;
}
.plan-price small { font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-sub { margin-top: 0.6rem; color: var(--muted); }
.plan-offer {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    background: #fbe9e1;
    color: var(--dummy-dark);
    font-weight: 600;
    font-size: 0.98rem;
}

.plan ul {
    list-style: none;
    margin: 1.75rem 0 2rem;
    padding: 0;
    display: grid;
    gap: 0.65rem;
    align-content: start;
    flex: 1;
}
.plan li { position: relative; padding-left: 1.75rem; }
.plan li::before {
    content: '';
    position: absolute;
    left: 0.1rem;
    top: 0.45em;
    width: 0.8rem;
    height: 0.45rem;
    border-left: 2.5px solid var(--pine-soft);
    border-bottom: 2.5px solid var(--pine-soft);
    transform: rotate(-45deg);
}
.plan .btn { align-self: flex-start; }

.pricing-note { margin-top: 2rem; color: var(--muted); font-size: 0.98rem; max-width: 46em; }

/* ── Alatunniste ──────────────────────────────────────────── */

.site-footer {
    padding: 3rem 0 6.5rem;
    font-size: 0.95rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
@media (min-width: 60rem) {
    .site-footer { padding-bottom: 3rem; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.site-footer p + p { margin-top: 0.6rem; }
.footer-disclaimer { font-size: 0.85rem; max-width: 48em; }

