/**
 * Visi Išvien — Design tokens
 *
 * Single source of truth for color, type, photo treatment and the
 * stripe motif. Loaded before tailwind.css and custom.css.
 *
 * @package VisiiSvien
 */

/* ==========================================================================
   Fonts — self-hosted (latin, latin-ext, cyrillic, cyrillic-ext)
   ========================================================================== */

/* Vollkorn (heading) — OFL 1.1, self-hosted. Split by subset with
   unicode-range so a LT visitor loads latin+latin-ext only, a UK visitor
   loads cyrillic. Lithuanian diacritics (ą č ę ė į š ų ū ž) live in
   latin-ext; Ukrainian (і ї є ґ) in cyrillic — ship all three or headings
   silently fall back for those characters. */
@font-face {
    font-family: 'Vollkorn';
    src: url('../fonts/vollkorn-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: 'Vollkorn';
    src: url('../fonts/vollkorn-600-latin-ext.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;
}

@font-face {
    font-family: 'Vollkorn';
    src: url('../fonts/vollkorn-600-cyrillic.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Vollkorn';
    src: url('../fonts/vollkorn-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: 'Vollkorn';
    src: url('../fonts/vollkorn-700-latin-ext.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: 'Vollkorn';
    src: url('../fonts/vollkorn-700-cyrillic.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    /* Latin + latin-ext in one file: Lithuanian diacritics live in
       latin-ext, so every LT visitor would need both anyway. */
    unicode-range: U+0000-00FF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0131, U+0152-0153, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2113, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400-cyrillic.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+00AB, U+00BB, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2019, U+2116;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    /* Latin + latin-ext in one file: Lithuanian diacritics live in
       latin-ext, so every LT visitor would need both anyway. */
    unicode-range: U+0000-00FF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0131, U+0152-0153, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2113, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500-cyrillic.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+00AB, U+00BB, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2019, U+2116;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600-latin.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    /* Latin + latin-ext in one file: Lithuanian diacritics live in
       latin-ext, so every LT visitor would need both anyway. */
    unicode-range: U+0000-00FF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0131, U+0152-0153, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2113, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600-cyrillic.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+00AB, U+00BB, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2019, U+2116;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    /* Latin + latin-ext in one file: Lithuanian diacritics live in
       latin-ext, so every LT visitor would need both anyway. */
    unicode-range: U+0000-00FF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0131, U+0152-0153, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2113, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700-cyrillic.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+00AB, U+00BB, U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2019, U+2116;
}

/* ==========================================================================
   Color / type tokens
   ========================================================================== */

:root {
    /* Brand */
    --vi-blue: #1E4E8C;
    --vi-blue-deep: #14335D;
    --vi-amber: #E9A820;
    --vi-amber-hover: #C98D12;
    --vi-green: #33695D;
    --vi-red: #A6373F;

    /* Neutrals */
    --vi-cream: #FAF6EF;
    --vi-warm: #F1E9DB;
    --vi-paper: #FFFDF9;
    --vi-ink: #23241F;
    --vi-muted: #6B6A63;

    /* Type */
    --vi-font-heading: 'Vollkorn', Georgia, 'Times New Roman', serif;
    --vi-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Base layer
   ========================================================================== */

body {
    background-color: var(--vi-cream);
    color: var(--vi-ink);
    font-family: var(--vi-font-body);
}

h1, h2, h3, h4, h5, h6,
.vi-font-heading {
    font-family: var(--vi-font-heading);
}

/* ==========================================================================
   Photo treatment
   Every <img> the theme prints is wrapped: <div class="vi-photo">...</div>
   ========================================================================== */

.vi-photo {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--vi-warm);
}

.vi-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.88) contrast(1.05) sepia(.07);
}

/* Dark gradient overlay — hero / text-over-photo slots. Darkened across the
   whole frame (not just the bottom) so headline text sitting mid-height —
   like the front-page hero — keeps enough contrast against busy photos. */
.vi-photo--overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20, 51, 93, 0.35) 0%,
        rgba(20, 51, 93, 0.55) 45%,
        rgba(20, 51, 93, 0.85) 100%
    );
    pointer-events: none;
}

/* Blue-deep duotone — counters band */
.vi-photo--duotone img {
    filter: saturate(.88) contrast(1.05) sepia(.07) grayscale(1);
}

.vi-photo--duotone::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--vi-blue-deep);
    mix-blend-mode: color;
    pointer-events: none;
}

.vi-photo--duotone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 51, 93, .55) 0%, rgba(20, 51, 93, .78) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   Stripe motif — logo's yellow / green / red / blue / yellow hard stops.
   Left half (0-50%) = Lithuania (yellow, green, red, equal thirds);
   right half (50-100%) = Ukraine (blue, yellow, equal halves). The 50% mark
   is deliberately where the Lithuanian stripes end and the Ukrainian ones
   begin — do not rebalance to 5 equal stripes, the split must stay exactly
   symmetrical so each flag reads as half the bar.
   Use sparingly: max one full-bleed per viewport, never beside a progress bar.
   ========================================================================== */

.vi-stripe {
    display: block;
    width: 100%;
    height: 6px;
    background: linear-gradient(
        90deg,
        var(--vi-amber) 0%,
        var(--vi-amber) 16.6667%,
        var(--vi-green) 16.6667%,
        var(--vi-green) 33.3333%,
        var(--vi-red) 33.3333%,
        var(--vi-red) 50%,
        var(--vi-blue) 50%,
        var(--vi-blue) 75%,
        var(--vi-amber) 75%,
        var(--vi-amber) 100%
    );
}

/* On phones the default 4:3 photo crop eats ~268px of every stacked card —
   3:2 keeps the documentary framing (16:9 would behead people at tables and
   loaded vehicles) while returning ~30px per card to the content. The warm
   filter/overlay treatment above is untouched; object-fit:cover means this
   only changes the crop. ≥640px stays 4:3 exactly as designed. */
@media (max-width: 639.98px) {
  .vi-photo {
    aspect-ratio: 3 / 2;
  }
}
