/* joulukirje.fi – design tokens (docs/DESIGN.md).
   Ainoa paikka, jossa värit, fonttikoot, välit ja komponenttien mitat määritellään.
   Muut tyylit (assets/site.css, consent.js) käyttävät vain näitä muuttujia. */

/* Fontit: Google Fontsin tapaan kaksi osajoukkoa per leikkaus. *-latin.woff2 sisältää
   perusmerkit (a–z, ä, ö, numerot, välimerkit), *.woff2 laajennetut latinalaiset merkit.
   Selain lataa vain tarvitsemansa tiedoston (unicode-range). Lisenssit: assets/*-LICENSE.txt (OFL). */

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/cinzel-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/cinzel-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/cinzel-900-latin.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/cinzel-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-400-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/lora-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Värit */
  --night: #15100C;
  --night-deep: #0C0907;
  --gold: #D4AF63;
  --gold-bright: #E9CD8B;
  --starlight: #F2EDE1;
  --mist: #B8AC9C;
  --paper: #EDE3CC;
  --ink: #2B2119;
  --ink-soft: #5C4D40;
  --error-dark: #F0A090;
  --error-paper: #9E3324;

  /* Johdetut pinnat (DESIGN.md: komponentit ja tarkennukset) */
  --field-bg: rgba(12, 9, 7, 0.6);
  --field-border: rgba(212, 175, 99, 0.45);
  --paper-field: #F6F0E2;
  --card-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  /* Ylläpidon kaavio: viikon korostus hoverissa. */
  --chart-hover: rgba(212, 175, 99, 0.08);
  --banner-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  /* Paperitekstuuri: inline SVG -kohina, peittävyys 0.05 (≤ .06). */
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");

  /* Typografia */
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-text: 'Lora', Georgia, 'Times New Roman', serif;

  --fs-name: clamp(2.4rem, 7vw, 4.75rem);
  --fs-h1: clamp(1.75rem, 4vw, 2.5rem);
  --fs-h2: 1.5625rem;
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-chart: 0.75rem; /* vain ylläpidon kaavion akselit */

  --lh-name: 1.05;
  --lh-h1: 1.15;
  --lh-h2: 1.25;
  --lh-lead: 1.6;
  --lh-body: 1.65;
  --lh-small: 1.5;

  --ls-name: 0.08em;

  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-display: 700;
  --fw-name: 900;

  --measure-form: 34rem;
  --measure-text: 40rem;

  /* Välit */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  /* Komponentit */
  --control-height: 48px;
  --radius-control: 6px;
  --radius-checkbox: 3px;
  --radius-card: 2px;
  --checkbox-size: 20px;
  --border-thin: 1px;
  --border-checkbox: 1.5px;
  --focus-width: 2px;
  --focus-offset: 2px;
  --underline-thin: 1px;
  --underline-thick: 2px;
  --underline-offset: 3px;
  --card-tilt: -0.6deg;
  --disabled-opacity: 0.5;
  --page-max: 72rem;
  --elias-max-mobile: 22rem;
  --elias-fade-start: 78%;

  /* Liike */
  --fade-duration: 600ms;
  --fade-easing: ease-out;

  /* Taitekohta: ≥ 900px työpöytä (media queryissä ei voi käyttää muuttujia,
     arvo toistuu site.css:ssä ja consent.js:ssä). */
}
