/* ==========================================================================
   Ad Libitum, avalik leht. ÜKS CSS-fail. Kujundus 21.-22.11.2026, parandusring 2 (22.11.2026,
   kliendi soov): iga leht on üks ekraan, midagi ei korda (jaotis 24).

   Kujunduse alus: lava enne etendust. Kõik lehed tumedad (html.theme-stage, tokenid jaotis 2),
   lehte kannavad kliendi lavafotod (avalehel ja alamlehtedel kogu ekraani taustal).
     - Avaleht: firma nimi (logo) ja suured nupud lehtedele. Päist ega jalust pole.
     - Alamleht: päises logo ja lehe nimi, sisu ühes klaaspaneelis foto peal, all nupud
       "← Avaleht" ja "Kontakt →" (avalehe nuppude stiilis).
     - Üks font (Schibsted Grotesk), üks aktsent ("REC punane"), nurgad 0, ilma
       varjude ja kumadeta; kihid fotodel ainult loetavuse jaoks.
     - Ikoone ei ole: tekstisildid ("Helista", "Sulge") ja lingis vajadusel noolemärk.
     - Liikumine: avalehe sisenemine ja hover/focus olekud, kõik prefers-reduced-motion all.

   SISUKORD
     1. @font-face            7. Päis (logo)          19. Pildivaade (lightbox)
     2. Tokenid              11. Piltide ruudustik    20. Hooldusleht
     3. Baas                 14. Hinnakast            21. Pildi fookus, liikumine, trükk
     4. Abiklassid           15. Albumifilter         22. Tume teema (lisatokenid)
     5. Paigutus             16. Päringuvorm          23. Vorm tumedal
     6. Nupud ja lingid                               24. Üks ekraan: avaleht, alamlehed,
                                                          galerii, kontakt, tekstileht
   (Puuduvad numbrid on eemaldatud plokid: menüü, Meist, CTA, alamlehe päis, jalus jne;
   eelmised versioonid kaustas _arendus/kontseptsioonid/.)

   Murdepunktid: 40rem (640), 45rem (720, kontakti kaks veergu), 48rem (768), 56rem (896),
   64rem (1024, kontaktipaneel paremal), 72rem (1152).

   Kontrastid (WCAG 2.1, arvutatud):
     tekst #F2F2EF taustal #0E0E0F                17.6 : 1
     summutatud #A3A4A7 taustal #0E0E0F            7.9 : 1
     tekst #FAFAF8 nupul #C81E1E                   5.5 : 1   (hover #A51818: 7.3 : 1)
     paneel ja nupud fotol: jaotis 24
   ========================================================================== */

/* --- 1. Font ---------------------------------------------------------------- */
/* ?v= on fondifaili filemtime (sama, mida asset() annab). layout.php eellaadib TÄPSELT
   sama URL-i (view_font_preload), muidu laaditaks font kaks korda. Fondi uuesti
   ehitamisel (python tools/build-fonts.py) uuenda siin ?v= väärtust. */
@font-face {
    font-family: "Schibsted Grotesk";
    src: url("../fonts/schibsted-grotesk-var.woff2?v=1795282168") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
/* Varufont mõõdetud veebifondi järgi (build-fonts.py): vähem nihet, kui font laeb. */
@font-face {
    font-family: "Schibsted Grotesk Fallback";
    src: local("Arial"), local("ArialMT");
    size-adjust: 104.68%;
    ascent-override: 93.29%;
    descent-override: 24.63%;
    line-gap-override: 0%;
}

/* --- 2. Tokenid ------------------------------------------------------------- */
:root {
    /* Värvid: neutraalne paber + tint, üks aktsent. Muid toone ei kasutata. */
    --bg:           #F2F2EF;
    --surface:      #FAFAF8;
    --ink:          #141414;
    --muted:        #55575B;
    --line:         #D6D6D1;   /* eraldaja */
    --line-strong:  #77797D;   /* vormiväljade ääris (3 : 1 nõue) */
    --accent:       #C81E1E;   /* "REC punane": põhinupp, vead, väike esiletõst */
    --accent-hover: #A51818;
    --on-accent:    #FAFAF8;
    --on-photo:     #FAFAF8;
    --scrim:        20, 20, 20; /* fotokihi RGB (= --ink) */

    /* Font */
    --font: "Schibsted Grotesk", "Schibsted Grotesk Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Tüpograafia */
    --fs-xs:   0.9375rem;                                   /* 15 px: leivapuru, jaluse alumine rida */
    --fs-sm:   1rem;                                        /* 16 px */
    --fs-base: 1.125rem;                                    /* 18 px: põhitekst */
    --fs-md:   1.25rem;                                     /* 20 px */
    --fs-lead: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);     /* sissejuhatus */
    --fs-h3:   clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
    --fs-h2:   clamp(1.75rem, 1.35rem + 1.2vw, 2.375rem);
    --fs-h1:   clamp(1.875rem, 1.2rem + 3vw, 3.5rem);       /* alamlehe H1 (avalehe hero H1 on suurim) */
    --lh-body: 1.6;
    --lh-tight: 1.04;
    --track-display: -0.03em;
    --measure: 65ch;

    /* Vahed */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --section-y: clamp(3.25rem, 2rem + 4.2vw, 6.5rem);

    /* Paigutus */
    --container: 80rem;                                     /* 1280 px sisu */
    --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);          /* 390 px: 16 px */
    --container-pad: max(var(--gutter), calc((100% - var(--container)) / 2));
    /* Konteineri sisu servast akna servani (foto jookseb servani). 100vw sisaldab kerimisriba,
       seepärast lõikab plokk (overflow-x: clip) liigse osa ära. */
    --bleed: max(var(--gutter), calc((100vw - var(--container)) / 2));
    --grid-cols: repeat(12, minmax(0, 1fr));                /* ühine 12 veeru ruudustik (64rem+) */
    --grid-gap: clamp(1.25rem, 2vw, 2rem);
    --header-h: 4.25rem;                                    /* 68 px */

    /* Fookus */
    --focus: 3px solid var(--ink);
    --focus-offset: 3px;

    /* Liikumine (ainult olekumuutused) */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-fast: 140ms;
    --dur: 260ms;
    --dur-img: 520ms;

    /* Kihid (z-index skaala) */
    --z-header: 50;
    --z-menu: 49;
    --z-lightbox: 100;
    --z-skip: 200;
}
@media (max-width: 63.99rem) {
    :root { --header-h: 3.75rem; }                          /* 60 px */
}

/* Tume palett: kõik lehed (html.theme-stage, jaotis 22). Samad tokenid tumedate väärtustega,
   seega komponendid (päis, nupud, vorm, pildivaade) järgivad ise.
   --focus kirjutatakse siin uuesti, et see arvutataks heleda --ink-iga (muidu jääks tume rõngas).
     tekst #F2F2EF taustal #0E0E0F                 17.6 : 1
     summutatud #A3A4A7 taustal #0E0E0F             7.9 : 1
     joon #6E7074 taustal #0E0E0F                   3.9 : 1   (ainult suur tekst ja UI)
     aktsent #C81E1E taustal #0E0E0F                3.3 : 1   (ainult täidis ja suured pinnad;
                                                               väike tekst ei lähe punaseks) */
:root.theme-stage {
    --bg:          #0E0E0F;
    --surface:     #18181A;
    --ink:         #F2F2EF;
    --muted:       #A3A4A7;
    --line:        #2C2C2F;
    --line-strong: #6E7074;
    --focus:       3px solid var(--ink);
}

/* --- 3. Baas ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + var(--space-4));
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.site-main { flex: 1 0 auto; }
.site-main:focus { outline: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-wrap: balance;
    overflow-wrap: break-word;   /* pikk eesti sõna ei lükka kitsal ekraanil (suure kirjaga) lehte laiemaks */
}
h1 { font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-tight); letter-spacing: var(--track-display); }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); }
p, li, dd { text-wrap: pretty; }
img, picture, video { display: block; max-width: 100%; }
img { height: auto; }
a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
strong, b { font-weight: 700; }
:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--surface); }

/* --- 4. Abiklassid ---------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: var(--z-skip);
    padding: var(--space-3) var(--space-4);
    background: var(--ink);
    color: var(--surface);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: var(--space-3); outline: 3px solid var(--accent); outline-offset: 0; }
.skip-link:hover { color: var(--surface); }
.visually-hidden {
    position: absolute !important;
    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;
}
/* Meepott (csrf.php honeypot_field): inimesele nähtamatu */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- 5. Paigutus ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(48rem + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); }
/* Kaks järjestikust sektsiooni: vahe on üks --section-y, mitte kaks. */
.section + .section { padding-top: 0; }
.section__title { margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.75rem); max-width: 24ch; }
.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3) var(--space-6);
    margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.75rem);
}
.section__head .section__title { margin-bottom: 0; }

/* Sisutekst (rich_text väljund) */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-7); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
.prose h3 { margin-top: var(--space-6); font-size: var(--fs-md); }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-3); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--muted); }
.prose a { text-decoration-thickness: 1.5px; }
.lead {
    max-width: 46ch;
    font-size: var(--fs-lead);
    line-height: 1.45;
    letter-spacing: -0.01em;
}
.lead > * + * { margin-top: var(--space-4); }

/* --- 6. Nupud ja lingid ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 3rem;
    padding: 0.625rem 1.375rem;
    border: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.005em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn--secondary { border-color: var(--ink); color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--surface); }
.btn--lg { min-height: 3.5rem; padding-inline: 1.75rem; font-size: 1.125rem; }
.btn--sm { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }
/* Väga kitsas aken või suur kiri (320 px, telefoni kirja suurendus): silt võib murduda,
   et nupp ei ulatuks üle ekraani serva. Arvutis jääb silt alati ühele reale. */
@media (max-width: 22rem) { .btn { white-space: normal; } }

/* Tekstilink noolega ("Vaata galeriid →", "Ava kaardil →") */
.link-arrow {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4em;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.28em;
}
.link-arrow__mark { display: inline-block; text-decoration: none; transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover .link-arrow__mark { transform: translateX(3px); }

/* --- 7. Päis ja menüü ------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    height: var(--header-h);
}
/* Logo võib kitsal ribal kahaneda (min-width 0), et "Menüü" nupp mahuks alati ära
   (320 px aken, telefoni suurendatud kiri). Laius rem-ides, kõrgus tuleb kuvasuhtest. */
.site-header__logo { display: inline-flex; flex: 0 1 auto; min-width: 0; margin-right: auto; padding-block: var(--space-2); }
.site-header__logo-img { width: 8.75rem; max-width: 100%; height: auto; }
.site-header__logo .logo-text { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }

/* --- 11. Galerii riba (avaleht) ja piltide ruudustik ---------------------------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; }
.gallery-grid__figure { margin: 0; }
.gallery-grid__link { position: relative; display: block; overflow: hidden; background: var(--line); }
.gallery-grid__picture, .gallery-grid__img { width: 100%; height: 100%; }
.gallery-grid__img { object-fit: cover; transition: transform var(--dur-img) var(--ease), opacity var(--dur-fast) var(--ease); }
.gallery-grid__link:hover .gallery-grid__img { transform: scale(1.03); }
.gallery-grid__caption { margin-top: var(--space-2); color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }

/* Avalehe eelvaade: horisontaalne riba (keritav, joondatud konteineri servaga) */
.gallery-grid--preview {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--container-pad);
    padding: 0 var(--container-pad) var(--space-3);
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
.gallery-grid--preview .gallery-grid__item { flex: 0 0 auto; scroll-snap-align: start; }
.gallery-grid--preview .gallery-grid__link { height: clamp(13rem, 6rem + 18vw, 22rem); }
.gallery-grid--preview .gallery-grid__picture { width: auto; }
.gallery-grid--preview .gallery-grid__img { width: auto; max-width: none; }

/* Galerii leht ja teenuselehe pildiplokk: ühtlane ruudustik 4:3 */
.gallery-grid--full,
.gallery-grid--page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.5rem, 0.3rem + 0.8vw, 1rem);
}
.gallery-grid--full .gallery-grid__link,
.gallery-grid--page .gallery-grid__link { aspect-ratio: 4 / 3; }
@media (min-width: 48rem) {
    .gallery-grid--full, .gallery-grid--page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 80rem) {
    .gallery-grid--full { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- 14. Hinnakast (teenuse leht, jaotis 24.4) ----------------------------------- */
/* Hinnakast: suur number, joonega raam (HANDOFF: hind esile tõstetud), sisu veerus teksti all */
.price-box {
    max-width: 30rem;
    margin-top: var(--space-6);
    padding: var(--space-5) var(--space-5) var(--space-6);
    border: 2px solid var(--ink);
    background: var(--surface);
}
.price-box__label { font-size: var(--fs-sm); font-weight: 700; }
.price-box__amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.price-box__value {
    font-size: clamp(3.25rem, 2.6rem + 2.4vw, 4.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
}
.price-box__unit { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); font-weight: 700; letter-spacing: -0.01em; }
.price-box__note { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--muted); font-size: 1.0625rem; line-height: 1.5; }

/* --- 15. Albumifilter (galerii) ------------------------------------------------------------- */
.album-filter { margin-bottom: var(--space-6); }
.album-filter__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); border-bottom: 1px solid var(--line); }
.album-filter__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    margin-bottom: -1px;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.album-filter__link:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.album-filter__link.is-active { color: var(--ink); border-bottom-color: var(--accent); }

/* --- 16. Päringuvorm (kontaktileht) ------------------------------------------------- */
/* Vormi põhistiilid. Kontaktileht on tume (jaotis 23): samad tokenid tumedate väärtustega,
   tumeda lava erisused (tärn, veatekst, teated) on jaotises 23.3. Kontaktilehe paigutus on
   jaotises 23 (endised .contact__*, .contact-card* eemaldati 22.11.2026). */
.inquiry-form { display: grid; gap: var(--space-5); }
.inquiry-form__note { color: var(--muted); font-size: var(--fs-sm); }
.form-row { display: grid; gap: var(--space-5); }
@media (min-width: 40rem) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.form-field__label { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.form-field__req { color: var(--accent); }
.form-field__help { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.form-field__input,
.form-field__select,
.form-field__textarea {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.75rem 0.875rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.125rem;
    line-height: 1.4;
    transition: border-color var(--dur-fast) var(--ease);
}
.form-field__input:hover,
.form-field__select:hover,
.form-field__textarea:hover { border-color: var(--ink); }
.form-field__input:focus-visible,
.form-field__select:focus-visible,
.form-field__textarea:focus-visible { border-color: var(--ink); outline: 3px solid var(--ink); outline-offset: 1px; }
.form-field__input::placeholder,
.form-field__textarea::placeholder { color: var(--muted); opacity: 1; }
.form-field__select { cursor: pointer; }
.form-field__textarea { min-height: 10rem; resize: vertical; }
.form-field--checkbox { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); }
.form-field__checkbox {
    flex-shrink: 0;
    width: 1.375rem;
    height: 1.375rem;
    margin: 0.1rem 0 0;
    accent-color: var(--ink);
    cursor: pointer;
}
.form-field--checkbox .form-field__label { flex: 1; min-width: 0; font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }
.form-field--checkbox .form-field__error { flex-basis: 100%; }
.form-field--error .form-field__input,
.form-field--error .form-field__select,
.form-field--error .form-field__textarea,
.form-field__input[aria-invalid="true"],
.form-field__select[aria-invalid="true"],
.form-field__textarea[aria-invalid="true"] {
    border-color: var(--accent);
    border-width: 2px;
}
.form-field--error .form-field__checkbox,
.form-field__checkbox[aria-invalid="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-field--error .form-field__checkbox:focus-visible,
.form-field__checkbox[aria-invalid="true"]:focus-visible { outline: var(--focus); outline-offset: 3px; }
.form-field__error { color: var(--accent); font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; }
.inquiry-form__submit { width: 100%; }
@media (min-width: 40rem) { .inquiry-form__submit { width: auto; justify-self: start; min-width: 14rem; } }

.form-message {
    margin-bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
    border: 2px solid var(--ink);
    background: var(--surface);
}
.form-message:focus { outline: var(--focus); outline-offset: 3px; }
.form-message p + p { margin-top: var(--space-2); }
.form-message--success { font-size: var(--fs-md); font-weight: 600; }
.form-message--error { border-color: var(--accent); }
.form-message__title { color: var(--accent); }
.form-message__list { margin-top: var(--space-2); padding-left: 1.2em; }
.form-message__list li + li { margin-top: var(--space-1); }
.form-message__more { font-size: var(--fs-base); font-weight: 400; }

/* --- 19. Pildivaade (lightbox, main.js; mall layout.php-s) ------------------------------- */
html.lightbox-open { overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-lightbox);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 7.5rem 1.5rem;
    color: var(--on-photo);
    animation: al-fade-in 0.18s var(--ease) both;
}
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(var(--scrim), 0.96); }
.lightbox__figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    pointer-events: none;
}
.lightbox__stage {
    position: relative;
    pointer-events: auto;
    touch-action: pan-y pinch-zoom;
    transform: translateX(var(--lb-dx, 0px));
    transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.lightbox__stage.is-dragging { transition: none; }
.lightbox__stage.is-loading { opacity: 0.55; }
.lightbox__stage picture { display: block; }
.lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 6.5rem);
    max-height: calc(100svh - 6.5rem);
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox.has-caption .lightbox__img { max-height: calc(100vh - 10rem); max-height: calc(100svh - 10rem); }
.lightbox__caption { max-width: 60ch; margin-top: var(--space-3); font-size: var(--fs-sm); text-align: center; pointer-events: auto; }
.lightbox__counter {
    position: absolute;
    top: 1.5rem;
    left: 1.25rem;
    z-index: 2;
    font-size: var(--fs-sm);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.lightbox__btn {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(250, 250, 248, 0.7);
    border-radius: 0;
    background: rgba(var(--scrim), 0.7);
    color: var(--on-photo);
    font-size: var(--fs-sm);
    font-weight: 700;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lightbox__btn:hover { background: var(--on-photo); color: var(--ink); }
.lightbox :focus-visible { outline-color: var(--on-photo); }
.lightbox__btn--close { top: 0.75rem; right: 0.75rem; }
.lightbox__btn--prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox__btn--prev,
.lightbox.is-single .lightbox__btn--next,
.lightbox.is-single .lightbox__counter { display: none; }
@media (max-width: 47.99rem) {
    .lightbox { padding: 4.25rem 0.75rem 5.25rem; }
    .lightbox.is-single { padding-bottom: 1.5rem; }
    .lightbox__btn--prev,
    .lightbox__btn--next { top: auto; bottom: 0.75rem; transform: none; min-width: 8rem; }
    .lightbox__btn--prev { left: 0.75rem; }
    .lightbox__btn--next { right: 0.75rem; }
    .lightbox__img { max-height: calc(100vh - 10.5rem); max-height: calc(100svh - 10.5rem); }
    .lightbox.has-caption .lightbox__img { max-height: calc(100vh - 14rem); max-height: calc(100svh - 14rem); }
}
@keyframes al-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* --- 20. Hooldusleht ("Leht on valmimisel", iseseisev) ----------------------------------- */
.maintenance {
    display: grid;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--space-7) var(--gutter);
}
.maintenance__inner { width: 100%; max-width: 40rem; margin-inline: auto; }
.maintenance__logo-img { width: auto; height: 2.25rem; }
.maintenance__title { margin-top: var(--space-7); font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); }
.maintenance__text { margin-top: var(--space-4); color: var(--muted); font-size: var(--fs-md); line-height: 1.5; }
.maintenance__contact { list-style: none; margin: var(--space-6) 0 0; padding: var(--space-4) 0 0; border-top: 2px solid var(--ink); display: grid; gap: var(--space-2); }
.maintenance__contact a { font-size: var(--fs-md); font-weight: 700; }
.maintenance__form { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.maintenance__label { display: block; margin-bottom: var(--space-2); font-weight: 600; }
.maintenance__row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.maintenance__input {
    flex: 1 1 14rem;
    min-height: 3rem;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 0;
    background: var(--surface);
    font-size: 1.125rem;
}
.maintenance__input:focus-visible { border-color: var(--ink); outline: 3px solid var(--ink); outline-offset: 1px; }
.maintenance__error { margin-top: var(--space-3); color: var(--accent); font-weight: 600; }

/* --- 21. Pildi fookus (images.json "focus"), liikumine, trükk ------------------------------ */
/* picture() lisab <img>-le klassi img-focus-<top|center|bottom>; lõikab object-fit: cover pilti
   nii, et oluline osa (nt näod ülemises kolmandikus) jääb nähtavale. */
.img-focus-top { object-position: 50% 22%; }
.img-focus-center { object-position: 50% 50%; }
.img-focus-bottom { object-position: 50% 78%; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    /* Avalehe (24) liikumine on ise prefers-reduced-motion: no-preference all. */
    .gallery-grid__link:hover .gallery-grid__img,
    .link-arrow:hover .link-arrow__mark,
    .btn:active { transform: none; }
}

@media print {
    .skip-link, .lightbox, .page-bg, .portal__media, .screen-nav { display: none !important; }
    .site-header { position: static; }
    :root.theme-stage { color-scheme: light; --bg: #FFFFFF; --ink: #141414; --muted: #55575B; --line: #D6D6D1; --surface: #FFFFFF; }
    body { background: none; color: var(--ink); }
    .screen, .portal { min-height: 0 !important; padding: var(--space-5) 0 !important; }
    .screen__panel, .portal-buttons__link { background: none !important; color: var(--ink) !important; }
    .site-header__logo-img, .portal__logo { filter: brightness(0); }
}

/* --- 22. Tume teema (html.theme-stage) ------------------------------------------------------ */
/* Kõigil lehtedel (layout.php → <html class="theme-stage">). Tumedad põhitokenid on jaotises 2;
   siin fotokihi värv (--scrim), liikumise kõver ja tumeda teema erisused. */
:root.theme-stage {
    color-scheme: dark;
    --on-photo:  #F2F2EF;
    --scrim:     14, 14, 15;   /* = --bg RGB */
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}
/* Tumedal ei saa väike tekst punaseks minna (3.3 : 1): hover on joon, mitte värv. */
:where(.theme-stage) a:hover { color: inherit; }
.theme-stage ::selection { background: var(--ink); color: var(--bg); }

/* --- 23. Vorm tumedal (kontaktileht, jaotis 24.6) ------------------------------------ */
/* 23.3 Vorm tumedal laval: tärn ja veatekst heledad (punane väike tekst oleks 3.3 : 1), vea
   tunnus on punane joon teksti ees ja punane välja ääris (UI, 3.1-3.3 : 1). */
.contact-panel__form .form-field__req { color: var(--ink); }
.contact-panel__form .form-field__error { padding-left: var(--space-3); border-left: 3px solid var(--accent); color: var(--ink); }
.contact-panel__form .form-message__title { color: var(--ink); }
.contact-panel__form .form-message__list a { text-decoration-thickness: 1.5px; }
.contact-panel__form .form-message--error { border-width: 2px 2px 2px 6px; }
.contact-panel__form .form-message--success { padding: var(--space-6); font-size: var(--fs-lead); line-height: 1.45; }
.contact-panel__form .form-message--success .form-message__more { margin-top: var(--space-4); font-size: var(--fs-base); }
/* Veakokkuvõtte lingilt (#f-<nimi>) kerib brauser välja akna ülaossa: lisavaru (html
   scroll-padding-top + see), et välja silt jääks kleepuva päise alt nähtavale. */
.contact-panel__form :is(.form-field__input, .form-field__select, .form-field__textarea, .form-field__checkbox) { scroll-margin-top: 2.5rem; }

/* --- 24. Üks ekraan (parandusring 2, 22.11.2026) ------------------------------------------ */
/* Kliendi soov: "Ühtegi lehte ei peaks saama scrollida, ühtegi asja ei peaks dubleerima.
   Avalehel on firma nimi ja nupud. Alamlehtedel on ainult asjasse puutuv info. Kontakti lehel on
   kontaktid." Iga leht täidab ekraani (100svh) ja tavalistel ekraanidel (telefon alates
   360 x 640, sülearvuti, lauaarvuti) mahub sisu ära. Sisu ei lõigata kunagi ära: väga madalal
   ekraanil või suurendatud kirjaga kerib leht nagu tavaliselt (min-height, mitte height +
   overflow: hidden). Erand: privaatsuspoliitika (pikk õigustekst) kerib alati.
   Kontrastid: tekst #F2F2EF paneelil rgba(14,14,15,0.84) halvimal juhul (valge piksel paneeli
   all, taust #353536) 11 : 1, summutatud #A3A4A7 4,9 : 1; nuppudel (0,62 + hägu) vähemalt 7 : 1. */

/* 24.1 Alus ja päis: päis (ainult logo) on foto kohal läbipaistev, mitte kleepuv. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.site-main { flex: 1 0 auto; display: flex; flex-direction: column; }
.site-header {
    position: absolute;
    inset: 0 0 auto;
    background: linear-gradient(180deg, rgba(var(--scrim), 0.72), rgba(var(--scrim), 0));
    border-bottom: 0;
}
/* Lehe nimi (H1) logoga samal real paremal, logoga sama suur (kliendi soov 26.11.2026): taustafoto
   jääb terviklikuks. Kitsal ekraanil murdub kahele reale (paremale joondatud). */
.site-header__title {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 58%;
    margin: 0;
    color: var(--on-photo);
    font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-align: right;
    text-wrap: balance;
    overflow-wrap: break-word;
}

/* 24.2 Taustapilt kogu lehe ulatuses (page-bg.php): foto ekraani taga paigal (position: fixed
   element, mitte background-attachment, mis iOS-is ei tööta). .page-bg on <main>-i sees: main
   on oma kihistuskontekst, foto selle sees -1, seega sisu all ja ometi mitte body tausta taga.
   Kiht: üleval päise logo jaoks, all paneeli jaoks (telefonis on paneel ekraani alaosas). */
.has-page-bg .site-main { position: relative; z-index: 0; }
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    height: 100vh;
    height: 100lvh;
    pointer-events: none;
    background: var(--bg);
}
.page-bg__picture, .page-bg__img { width: 100%; height: 100%; }
.page-bg__img { object-fit: cover; }
.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(var(--scrim), 0.55) 0, rgba(var(--scrim), 0) 9rem, rgba(var(--scrim), 0) 50%, rgba(var(--scrim), 0.55) 100%);
}

/* 24.3 Avaleht: logo ja aastad üleval, kuus nuppu all. Nuppudel pilte pole (kliendi soov), need
   on tumedad klaaspaneelid; hiire ja klaviatuuriga muutub nupp heledaks ja all süttib punane joon.
   Nime suurus nupu laiuse järgi (cqi), nii et "Põsemikrofonide rent" mahub igal laiusel. */
.portal {
    position: relative;
    isolation: isolate;
    flex: 1 0 auto;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    overflow: clip;
    padding-block: clamp(1.25rem, 0.5rem + 3.5vh, 3.5rem);
    color: var(--on-photo);
}
.portal__media { position: absolute; inset: 0; z-index: -2; background: var(--bg); }
.portal__picture, .portal__img { width: 100%; height: 100%; }
.portal__img { object-fit: cover; }
.portal--has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(var(--scrim), 0.72) 0%, rgba(var(--scrim), 0.2) 34%, rgba(var(--scrim), 0.3) 58%, rgba(var(--scrim), 0.88) 100%);
}
.portal__inner { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(1.5rem, 0.75rem + 4vh, 4rem); width: 100%; }
.portal__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.portal__brand { margin: 0; }
.portal__logo {
    display: block;
    width: clamp(15rem, 6rem + 36vw, 46rem);
    width: min(100%, clamp(15rem, 6rem + 36vw, 46rem), 80svh);
    height: auto;
}

/* "30 aastat kogemust": number suurelt, silt kahel real kõrval, punane joon vahel (REC). */
.hero__years { display: flex; align-items: center; gap: 0.875rem; margin: 0; }
.hero__years-num {
    font-size: clamp(2.75rem, 1.75rem + 3.2vw, 5.5rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}
.hero__years-label {
    padding-left: 0.875rem;
    border-left: 3px solid var(--accent);
    max-width: 9ch;
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.375rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.hero__years-num + .hero__years-label { align-self: stretch; display: flex; align-items: center; }

.portal-buttons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.5rem, 0.3rem + 0.6vw, 0.875rem);
}
.portal-buttons--count-1 { grid-template-columns: minmax(0, 1fr); }
.portal-buttons--count-3 > :last-child,
.portal-buttons--count-5 > :last-child { grid-column: 1 / -1; }
.portal-buttons__item { display: flex; flex-direction: column; container-type: inline-size; }
.portal-buttons__link {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    min-height: clamp(4.75rem, 1.5rem + 10vh, 10rem);
    padding: clamp(0.875rem, 0.55rem + 1vw, 1.5rem);
    border: 1px solid rgba(242, 242, 239, 0.42);
    background: rgba(var(--scrim), 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--on-photo);
    text-decoration: none;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.portal-buttons__link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease-out);
}
.portal-buttons__link:hover,
.portal-buttons__link:focus-visible { background: var(--on-photo); border-color: var(--on-photo); color: var(--bg); }
.portal-buttons__link:hover::after,
.portal-buttons__link:focus-visible::after { transform: none; }
.portal-buttons__label {
    min-width: 0;
    font-size: clamp(0.9375rem, 0.7rem + 1.2vw, 2rem);
    font-size: clamp(0.9375rem, 8.6cqi, 2.125rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    hyphens: auto;
}
/* Nool paremas ülanurgas: nimi saab kogu laiuse (kitsal telefonil mahub "Põsemikrofonide"). */
.portal-buttons__mark {
    position: absolute;
    top: clamp(0.75rem, 0.5rem + 0.9vw, 1.375rem);
    right: clamp(0.75rem, 0.5rem + 0.9vw, 1.375rem);
    font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.875rem);
    line-height: 1;
    transition: transform var(--dur) var(--ease-out);
}
.portal-buttons__link:hover .portal-buttons__mark,
.portal-buttons__link:focus-visible .portal-buttons__mark { transform: translateX(0.18em); }
@media (min-width: 48rem) {
    .portal-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-buttons--count-2,
    .portal-buttons--count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-buttons--count-3 > :last-child,
    .portal-buttons--count-5 > :last-child { grid-column: auto; }
}
/* Telefon rõhtsalt / madal aken: logo väiksem, nupud madalamad, et kõik mahuks ühele ekraanile. */
@media (max-height: 34rem) and (min-width: 40rem) {
    .portal-buttons__link { min-height: 3.5rem; padding-block: 0.625rem; }
}

/* 24.4 Alamlehe ekraan: sisu ühes tumedas paneelis ekraani alaosas (arvutis vasakul), foto
   ülejäänud ekraanil näha. Punane joon paneeli kohal on lehe ainus aktsent. */
.screen {
    position: relative;
    flex: 1 0 auto;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(var(--header-h) + clamp(0.75rem, 0.25rem + 2.5vh, 2.5rem));
    padding-bottom: clamp(1rem, 0.25rem + 3.5vh, 3rem);
}
.screen__inner { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; min-height: 0; }
.screen__panel {
    width: 100%;
    max-width: 46rem;
    padding: clamp(1.25rem, 0.75rem + 2vw, 2.75rem);
    border-top: 3px solid var(--accent);
    background: rgba(var(--scrim), 0.84);
}
.screen__title {
    font-size: clamp(2rem, 1.25rem + 3.2vw, 4.25rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}
.screen__lead { margin-top: clamp(0.875rem, 0.5rem + 1.4vh, 1.5rem); }
.screen__lead > * + * { margin-top: var(--space-3); }
.screen__text { margin-top: clamp(0.75rem, 0.5rem + 1.2vh, 1.25rem); }
.screen__price { margin-top: clamp(1rem, 0.6rem + 1.6vh, 1.75rem); }
.screen__kicker { margin-bottom: var(--space-3); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.screen__actions { margin-top: var(--space-6); }
/* Madalal ekraanil hinnakast kompaktsem. */
@media (max-height: 46rem) {
    .screen__price { padding: var(--space-4); }
    .screen__price .price-box__value { font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
    .screen__price .price-box__note { margin-top: var(--space-3); padding-top: var(--space-3); }
}

/* Alamlehe nupud "← Avaleht" ja "Kontakt →" (partials/screen-nav.php, kliendi soov 26.11.2026):
   avalehe nuppude väiksem vend. Foto peal klaas nagu avalehe nupud, paneeli sees (paneel on juba
   klaas) ainult hele piirjoon. Hiire ja klaviatuuriga hele täidis ja all punane joon nagu avalehel.
   Kontrast: valge tekst klaasil (0,62 + hägu) vähemalt 7 : 1; täidetud nupul #0E0E0F #F2F2EF-l 17 : 1. */
.screen-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.nav-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-height: 3rem;
    padding: 0.5rem 1.125rem;
    border: 1px solid rgba(242, 242, 239, 0.42);
    background: rgba(var(--scrim), 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--on-photo);
    font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-btn::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease-out);
}
.nav-btn:hover,
.nav-btn:focus-visible { background: var(--on-photo); border-color: var(--on-photo); color: var(--bg); }
.nav-btn:hover::after,
.nav-btn:focus-visible::after { transform: none; }
.nav-btn:active { transform: translateY(1px); }
.nav-btn__mark { line-height: 1; transition: transform var(--dur) var(--ease-out); }
.nav-btn--back:hover .nav-btn__mark,
.nav-btn--back:focus-visible .nav-btn__mark { transform: translateX(-0.18em); }
.nav-btn--next:hover .nav-btn__mark,
.nav-btn--next:focus-visible .nav-btn__mark { transform: translateX(0.18em); }
.screen__panel .nav-btn { border-color: rgba(242, 242, 239, 0.55); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.screen__panel .nav-btn:hover,
.screen__panel .nav-btn:focus-visible { background: var(--on-photo); border-color: var(--on-photo); }
.screen__panel .screen__nav { margin-top: clamp(1.25rem, 0.75rem + 1.5vh, 2rem); }

/* Klaaspaneel (teenuse leht, kliendi soov 26.11.2026): nagu avalehe nupud, poolläbipaistev tume +
   hägu + õhuke hele raam, ilma punase jooneta, et foto jääks tervikuna näha. Tekst suurem.
   Kontrast: paneel 0,6 + lehe foto alumine kiht (page-bg::after); halvimal juhul (valge piksel)
   taust #6E6E6F, tekst #F2F2EF 4,6 : 1 (sissejuhatus on suur tekst, nõue 3 : 1). */
.screen__panel--glass {
    max-width: none;
    border: 1px solid rgba(242, 242, 239, 0.34);
    background: rgba(var(--scrim), 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
/* Teenuse paneel: arvutis kaks veergu (sissejuhatus | hind ja põhitekst), et paneel jääks madal.
   Kogu tekst ühesuurune (kliendi soov 26.11.2026: ka põhitekst sama suurte tähtedega), hind
   tavalise teksti suuruses (mitte suur number). All reas nupud: "← Avaleht" sissejuhatuse
   veerus, "Kontakt →" põhiteksti veerus otse üleskutse "Saada päring ..." all. */
.service-panel {
    --service-text: clamp(1.1875rem, 0.95rem + 0.75vw, 1.625rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(0.875rem, 0.5rem + 1vw, 1.75rem) clamp(0.875rem, 0.5rem + 1.6vw, 2.75rem);
}
.service-panel__nav { grid-column: 1 / -1; }
.service-panel .screen__lead,
.service-panel .screen__text { max-width: 40ch; margin-top: 0; font-size: var(--service-text); line-height: 1.4; letter-spacing: -0.01em; }
.service-panel .screen__text > * + * { margin-top: var(--space-3); }
.service-panel__side > * + *,
.service-panel__side > .screen__price + .screen__text { margin-top: clamp(0.75rem, 0.5rem + 1vh, 1.25rem); }
/* Hind: ilma kastita, väike silt ja summa tavalise teksti suuruses. */
.service-panel .price-box { max-width: none; margin-top: 0; padding: 0; border: 0; background: none; }
.service-panel .price-box__label { color: var(--on-photo); font-size: var(--fs-sm); font-weight: 700; opacity: 0.85; }
.service-panel .price-box__amount { gap: 0 0.35em; margin-top: 0.15rem; font-size: var(--service-text); line-height: 1.3; }
.service-panel .price-box__value,
.service-panel .price-box__unit { font-size: inherit; font-weight: 700; letter-spacing: -0.01em; line-height: inherit; }
.service-panel .price-box__note { margin-top: 0.15rem; padding-top: 0; border-top: 0; color: var(--on-photo); font-size: var(--fs-base); line-height: 1.45; }
@media (min-width: 56rem) {
    .service-panel { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; }
    /* column-gap: normal = vanema veeruvahe, muidu nihkuks teine nupp lause algusest vasakule. */
    .service-panel__nav { display: grid; grid-template-columns: subgrid; column-gap: normal; align-items: center; }
    .service-panel__nav .nav-btn { justify-self: start; }
}

/* 24.5 Galerii: pealkirja riba ja ruudustik, mis täidab ülejäänud ekraani (gallery-grid--fit).
   Veergude ja ridade arv tuleb piltide arvust (gallery-grid--n-N), pisipilt kärbitakse ruudu
   järgi. Üle 24 pildi: ruudud kindla kõrgusega ja keritakse ainult ruudustiku sees. */
.screen--gallery { height: 100vh; height: 100svh; }
.screen--gallery .screen__inner { justify-content: flex-start; gap: clamp(0.75rem, 0.4rem + 1.4vh, 1.5rem); }
.screen__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-6); }
.screen__title--bar { font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.screen--gallery .screen__nav { flex: none; }
.screen--gallery .album-filter { margin: 0; }
.screen--gallery .album-filter__list { border-bottom: 0; }
.screen__empty { max-width: 24ch; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.gallery-grid--fit {
    --cols: 2;
    --rows: 3;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
    gap: clamp(0.375rem, 0.25rem + 0.4vw, 0.75rem);
}
.gallery-grid--fit .gallery-grid__item,
.gallery-grid--fit .gallery-grid__figure,
.gallery-grid--fit .gallery-grid__link { height: 100%; min-height: 0; }
.gallery-grid--fit .gallery-grid__link { aspect-ratio: auto; }
/* Telefon (püstine): 2 veergu kuni 8 pildini, siis 3 ja 4. */
.gallery-grid--n-1 { --cols: 1; --rows: 1; }
.gallery-grid--n-2 { --cols: 1; --rows: 2; }
.gallery-grid--n-3 { --cols: 1; --rows: 3; }
.gallery-grid--n-4 { --cols: 2; --rows: 2; }
.gallery-grid--n-5, .gallery-grid--n-6 { --cols: 2; --rows: 3; }
.gallery-grid--n-7, .gallery-grid--n-8 { --cols: 2; --rows: 4; }
.gallery-grid--n-9 { --cols: 3; --rows: 3; }
.gallery-grid--n-10, .gallery-grid--n-11, .gallery-grid--n-12 { --cols: 3; --rows: 4; }
.gallery-grid--n-13, .gallery-grid--n-14, .gallery-grid--n-15 { --cols: 3; --rows: 5; }
.gallery-grid--n-16, .gallery-grid--n-17, .gallery-grid--n-18, .gallery-grid--n-19, .gallery-grid--n-20 { --cols: 4; --rows: 5; }
.gallery-grid--n-21, .gallery-grid--n-22, .gallery-grid--n-23, .gallery-grid--n-24 { --cols: 4; --rows: 6; }
.gallery-grid--n-25 { --cols: 3; grid-template-rows: none; grid-auto-rows: 8rem; overflow-y: auto; overscroll-behavior: contain; }
/* Arvuti ja tahvel rõhtsalt: rohkem veerge kui ridu. */
@media (min-aspect-ratio: 1/1) {
    .gallery-grid--n-2 { --cols: 2; --rows: 1; }
    .gallery-grid--n-3 { --cols: 3; --rows: 1; }
    .gallery-grid--n-5, .gallery-grid--n-6 { --cols: 3; --rows: 2; }
    .gallery-grid--n-7, .gallery-grid--n-8 { --cols: 4; --rows: 2; }
    .gallery-grid--n-10, .gallery-grid--n-11, .gallery-grid--n-12 { --cols: 4; --rows: 3; }
    .gallery-grid--n-13, .gallery-grid--n-14, .gallery-grid--n-15 { --cols: 5; --rows: 3; }
    .gallery-grid--n-16 { --cols: 4; --rows: 4; }
    .gallery-grid--n-17, .gallery-grid--n-18, .gallery-grid--n-19, .gallery-grid--n-20 { --cols: 5; --rows: 4; }
    .gallery-grid--n-21, .gallery-grid--n-22, .gallery-grid--n-23, .gallery-grid--n-24 { --cols: 6; --rows: 4; }
    .gallery-grid--n-25 { --cols: 6; grid-auto-rows: 11rem; }
}

/* 24.6 Kontakt: üks klaaspaneel (nagu teistel alamlehtedel, ilma punase jooneta), kontaktid
   vasakul ja vorm paremal. Telefon, e-post ja vormi pealkiri "Saada päring" on ühesuurused
   (--contact-big, kliendi soov 26.11.2026); aadress ja ettevõte nende all väikselt.
   Klaasil on sildid ja väike tekst heledad (summutatud hall jääks heleda foto peal liiga nõrgaks).
   Arvutis (64rem+, ka 125 % suurendusega sülearvutis) on paneel ekraani paremas osas ja
   "← Avaleht" vasakul all, et foto vasak pool jääks vabaks (kliendi soov 26.11.2026: tekst ei
   tohi olla näo ees). Foto (4 : 3) on laial ekraanil laiuse järgi, seega on praeguse pildi nägu
   19-32 % laiusel; paneeli vasak serv on vähemalt 36 % laiusel (64vw - konteineri serv).
   Suur kiri kahaneb paneeli laiusega, et e-post mahuks veergu ka 1024 px ekraanil. Telefonis ja
   tahvlis (püstine) paneel kogu laiuses, nupp ja kodulehe tegija link selle all ühes reas. */
.screen--contact .screen__panel { max-width: 72rem; }
.screen--contact { padding-bottom: clamp(0.5rem, 0.25rem + 1.5vh, 1.25rem); }
.contact-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
@media (min-width: 64rem) {
    .screen--contact { padding-bottom: clamp(1rem, 0.25rem + 3.5vh, 3rem); }
    .screen--contact .screen__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(72rem, calc(64vw - var(--bleed)));
        align-items: end;
        column-gap: var(--space-5);
    }
    .screen--contact .screen__panel { grid-column: 2; grid-row: 1; }
    .contact-foot { display: contents; }
    .contact-foot__nav { grid-column: 1; grid-row: 1; }
}
@media (min-width: 64rem) and (max-width: 71.99rem) {
    .screen--contact .screen__panel { padding: var(--space-5); }
}
.contact-panel {
    --contact-big: clamp(1.375rem, 1rem + 1.5vw, 2.25rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 0.75rem + 2vw, 3.5rem);
}
.contact-panel__address { font-style: normal; }
.contact-panel__big { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; margin: 0; color: var(--ink); text-decoration: none; }
.contact-panel__big + .contact-panel__big { margin-top: clamp(0.75rem, 0.5rem + 1.2vh, 1.5rem); }
.contact-panel__label { color: rgba(242, 242, 239, 0.85); font-size: var(--fs-sm); font-weight: 700; }
.contact-panel__big-text {
    max-width: 100%;
    color: var(--ink);
    font-size: var(--contact-big);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.14em;
    overflow-wrap: anywhere;
}
.contact-panel__phone-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.contact-panel__phone-num--wrap { white-space: normal; }
.contact-panel__big:hover .contact-panel__big-text,
.contact-panel__email-link:hover { text-decoration-thickness: 4px; }
.contact-panel__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-5);
    margin: clamp(1rem, 0.6rem + 1.6vh, 1.75rem) 0 0;
    font-size: var(--fs-sm);
}
.contact-panel__item { min-width: 0; }
.contact-panel__item dd { margin: 0; }
.contact-panel__value { margin-top: var(--space-1) !important; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.contact-panel__map { margin-top: var(--space-1) !important; font-size: var(--fs-sm); }
.contact-panel__small { color: rgba(242, 242, 239, 0.85); font-size: var(--fs-sm); line-height: 1.4; }
.contact-panel__form-title { margin-bottom: clamp(0.75rem, 0.5rem + 1vh, 1.25rem); font-size: var(--contact-big); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.inquiry-form--mini { gap: clamp(0.75rem, 0.5rem + 1vh, 1.25rem); }
.inquiry-form--mini .form-field__textarea { min-height: 6.5rem; resize: vertical; }
.inquiry-form__foot { display: flex; align-items: center; gap: var(--space-3) var(--space-5); }
.inquiry-form--mini .inquiry-form__submit { flex: none; width: auto; min-width: 7.5rem; }
.inquiry-form__privacy { max-width: 30ch; color: rgba(242, 242, 239, 0.85); font-size: var(--fs-sm); line-height: 1.4; }
.inquiry-form__privacy a { color: var(--ink); }
/* Kaks veergu alates 45rem (ka püstine tahvel): paneel on madalam ja foto ülaosa (nägu) jääb vabaks. */
@media (min-width: 45rem) {
    .contact-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 64rem) {
    .contact-panel { --contact-big: clamp(1.25rem, 0.5rem + 2vw, 2.25rem); }
}
@media (min-width: 64rem) and (max-width: 71.99rem) {
    .contact-panel { gap: var(--space-5); }
}
/* Telefon: kompaktsem, et kontaktid ja vorm mahuksid ühele ekraanile (390 x 844 jne). */
@media (max-width: 55.99rem) {
    .contact-panel { row-gap: var(--space-4); }
    .contact-panel__list { gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
    .contact-panel__label { font-size: var(--fs-xs); }
    .contact-panel__form-title { margin-bottom: var(--space-3); }
    .inquiry-form--mini { gap: var(--space-3); }
    .inquiry-form--mini .form-field__textarea { min-height: 4.5rem; }
    /* Ruum nupu "← Avaleht" reale: väiksem "Saada" ja märkus kõrval kolmel real, mitte neljal. */
    .inquiry-form--mini .inquiry-form__submit { min-height: 3rem; padding-inline: 1.375rem; }
    .inquiry-form__privacy { max-width: none; font-size: var(--fs-xs); line-height: 1.35; }
}

/* Kodulehe tegija link kontaktilehel: telefonis ja tahvlis nupu "← Avaleht" reas paremal, arvutis
   ekraani alumises polsterduses (absoluutne), seega leht ei kasva. Hele tekst foto alumise tumeda
   kihi peal. */
.screen__credit {
    margin: 0;
    color: rgba(242, 242, 239, 0.82);
    font-size: 0.8125rem;
    line-height: 1.25;
}
.screen__credit a { color: var(--on-photo); text-decoration-thickness: 1px; }
@media (min-width: 64rem) {
    .screen__credit { position: absolute; right: var(--container-pad); bottom: 0.25rem; }
}

/* 24.7 Tekstileht (privaatsuspoliitika, kerib) ja 404 */
.screen--text .screen__inner { justify-content: flex-start; }
.screen--text .screen__panel { max-width: 52rem; }
.screen--notfound .screen__inner { justify-content: center; }

/* 24.8 Liikumine: avalehel logo, aastad ja nupud tõusevad järjest (ainult no-preference). */
@media (prefers-reduced-motion: no-preference) {
    .portal__img { animation: al-settle 2.4s var(--ease-out) both; }
    .portal__brand { animation: al-rise 0.9s var(--ease-out) 0.15s both; }
    .portal__years { animation: al-rise 0.9s var(--ease-out) 0.35s both; }
    .portal-buttons__item { animation: al-rise 0.8s var(--ease-out) both; animation-delay: calc(0.5s + var(--i, 0) * 0.07s); }
    .portal-buttons__item:nth-child(2) { --i: 1; }
    .portal-buttons__item:nth-child(3) { --i: 2; }
    .portal-buttons__item:nth-child(4) { --i: 3; }
    .portal-buttons__item:nth-child(5) { --i: 4; }
    .portal-buttons__item:nth-child(n + 6) { --i: 5; }
    .screen__panel { animation: al-rise 0.7s var(--ease-out) both; }
}
@keyframes al-settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes al-rise { from { opacity: 0; transform: translateY(1rem); } }
