/* ============================================================
   Arvokello — base.css
   Design-tokenit, reset, typografia, saavutettavuus, liikkeen perusteet.
   ============================================================ */

:root {
  /* ---- Pääpaletti — sama kuin mobiilisovelluksessa ---- */
  --slate:      #4F7391;   /* pääväri, otsikkopalkki */
  --slate-deep: #3C5A73;   /* napit, korostukset */
  --navy:       #2C3F52;   /* 2. arvo, syvät otsikot */
  --gold:       #C08A2E;   /* 1. arvo, huippukohta */
  --gold-soft:  #D8A64A;   /* viisarin gradientti */
  --teal:       #6FA6A0;   /* aksentti, ikoneista */
  --terra:      #B4553F;   /* varoitus, virheilmoitus */

  /* ---- Logon värit ----
     Minttu on logon ikoniruudun vaalea keskiosa. Se on tekstinä liian vaalea,
     joten tekstiin, linkkeihin ja nappeihin käytetään tummaa turkoosia
     (kontrasti valkoista vastaan 6,2:1). Ruudun liukuväriä ei käytetä:
     pinnat ovat tasavärisiä. */
  --mint:           #A3DCD3;
  --mint-soft:      #E4F2EF;   /* isot pinnat: hero, sävytetyt osiot */
  --teal-ink:       #2E6B66;   /* päänapit, linkit, ikonit */
  --teal-ink-deep:  #24534F;   /* päänapin hover */
  --syva:           #24475E;   /* tumma pinta: työsivujen otsikko ja loppukehotus */

  /* Vanhat nimet osoittavat palettiin, jotta muut tyylitiedostot seuraavat */
  --teal-dark:  var(--teal-ink);

  --bg:         #FFFFFF;
  --bg-2:       #EEF5F3;   /* hyvin vaalea minttu, ei harmaa */
  --text:       #2C3F52;
  --text-muted: #4A5A6A;
  --border:     rgba(44,63,82,0.15);

  /* ---- Osiovärit — logon väriperheestä ----
     Vahva sävy (--c-*) näkyy ikoneissa, viivoissa ja korostuksissa, joten
     osion tunnistaa. Pohjasävy (--c-*-soft) on kaikilla osioilla sama minttu:
     heron väri ei vaihdu sivulta toiselle (17.10.2026). */
  --c-kaytto:        #6FA6A0;   /* minttu */
  --c-kaytto-soft:   var(--mint-soft);
  --c-ammatti:       #41637D;   /* logon sanamerkin sininen */
  --c-ammatti-soft:  var(--mint-soft);
  --c-org:           #2C3F52;   /* navy */
  --c-org-soft:      var(--mint-soft);
  --c-tutkimus:      #2E6B66;   /* tumma turkoosi */
  --c-tutkimus-soft: var(--mint-soft);
  --c-vaali:         #C08A2E;
  --c-vaali-soft:    var(--mint-soft);
  --c-hinta:         #D8A64A;
  --c-hinta-soft:    var(--mint-soft);
  --c-tieto:         #5F8F9C;   /* logon ikoniruudun reuna */
  --c-tieto-soft:    var(--mint-soft);

  /* ---- Fontit ---- */
  --font-heading: 'Bitter', Georgia, serif;
  --font-body:    'Schibsted Grotesk', system-ui, -apple-system, sans-serif;

  --radius:     12px;
  --radius-btn: 10px;   /* napit ja kutsut — pilleri oli liian pyöreä */
  --nav-h:      68px;
  --ease:       cubic-bezier(0.22, 0.72, 0.28, 1);
  --shadow-sm:  0 4px 14px rgba(44,63,82,0.06);
  --shadow-md:  0 14px 34px rgba(44,63,82,0.11);
  --shadow-lg:  0 22px 54px rgba(44,63,82,0.16);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.ak-no-scroll { overflow: hidden; }

/* Otsikot: Bitter pystynä (h1–h2 700, muut 600), kirjainväli lähes
   normaali. Leipäteksti, navigaatio ja napit pysyvät Schibsted Groteskina. Ohut otsikko ja yksi lihavoitu sana sen sisällä on tunnistettava
   tekoälysivun kuvio, joten <b> ja <em> eivät muuta otsikon painoa. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
}
h1, h2 { font-weight: 700; }
h1 em, h2 em, h3 em { font-style: normal; font-weight: inherit; color: inherit; }
h1 b, h2 b, h3 b { font-weight: inherit; color: inherit; }
img { max-width: 100%; }

/* Anchor targets clear the fixed nav */
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* Universal keyboard focus ring */
:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Skip link */
.ak-skip {
  position: absolute;
  left: 0;
  top: -100px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.ak-skip:focus { top: 0; }

/* Screen-reader-only text */
.ak-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; will-change: auto; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal, .ak-hero .ak-in { opacity: 1 !important; transform: none !important; }
}

/* ============ PRINT ============ */
@media print {
  nav, .ak-mobile, .ak-backdrop, .ak-top, .ak-scroll-cue, .ak-glow, .ak-ring { display: none !important; }
  body { color: #000; }
  .ak-hero { min-height: auto; padding: 2rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .ak-faq-body { height: auto !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
}
