/* Koormakate OÜ — kontseptsioon B "Kataloog"
   Disainikeel: valge, tint, signaalkollane. Space Grotesk.
   Murdepunktid: 1180 / 900 / 640 px

   Kogu kujundus on siin. Värvi, vahe või kirjasuuruse muutmiseks piisab
   allpool olevast muutujate plokist. */

/* Space Grotesk on serveris kaasas: Google'i poole päringut ei tehta, kiri on alati kohal. */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/space-grotesk-latin-400-normal.woff2) format('woff2'); 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: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/space-grotesk-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/space-grotesk-latin-500-normal.woff2) format('woff2'); 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: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/space-grotesk-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/space-grotesk-latin-600-normal.woff2) format('woff2'); 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: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/space-grotesk-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/space-grotesk-latin-700-normal.woff2) format('woff2'); 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: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/space-grotesk-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Värvid */
  --ink: #0E1116;
  --ink-soft: #5B6470;
  --ink-faint: #8A929C;
  --line: #E4E6EA;
  --line-strong: #8A929C;   /* vormiväljade ja nuppude piir, 3:1 valgel */
  --line-soft: #D6D9DE;     /* ainult dekoratiivne joon */
  --surface: #F4F5F7;
  --paper: #FFFFFF;
  --signal: #FFC61A;
  --signal-deep: #8A6400;
  --signal-tint: #FFF8E3;
  --signal-tint-line: #F0DFA8;
  --danger: #A9301F;
  --danger-tint: #FBEFEC;
  --ok: #1E6B45;
  --ok-tint: #EFF6F1;
  --ink-line: #262A30;      /* joon tumedal taustal */

  /* Mõõdud */
  --wrap: 1344px;
  --gut: 48px;

  /* Vaheastmik, baas 4 px. Kõik polstrid ja vahed tulevad siit. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px; --s11: 80px; --s12: 96px;

  /* Sektsiooniriba kolm kõrgust. Lehe peaplokk saab kõige rohkem õhku,
     tugiplokid vähem — nii leiab silm peaploki üles ka detaile nägemata. */
  --band-lead: clamp(72px, 8vw, 128px);
  --band: clamp(56px, 6vw, 96px);
  --band-tight: clamp(40px, 3.6vw, 56px);

  /* Kirjasuuruse aste, suhe ligikaudu 1,3 */
  --t-micro: 12px;
  --t-sm: 14px;
  --t-base: 16px;
  --t-h4: 20px;
  --t-h3: clamp(20px, 2vw, 26px);
  --t-h2: clamp(26px, 3.2vw, 38px);
  --t-h1: clamp(34px, 5vw, 62px);
  --t-lead: clamp(16px, 1.4vw, 19px);

  /* Liikumine. Värvid vahetuvad pehme ease-iga, kõik mis liigub või
     ilmub, kasutab tugevat ease-out'i: algus kohe, lõpp rahulik. */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur: 140ms;      /* värv, joon */
  --press: 140ms;    /* vajutus */
  --quick: 180ms;    /* väike paneel, hover-nihe */
  --panel: 240ms;    /* menüü, valguskast */
  --reveal: 480ms;   /* sisenemine kerimisel */
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
button, a, [role="button"], summary { touch-action: manipulation; }
button, .chip, .shot, .nav__toggle { -webkit-user-select: none; user-select: none; }

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

/* --- Brauseri enda pinnad: valik, kursor, kerimisriba, allakriipsutus --- */
::selection { background: var(--signal); color: var(--ink); }
html { scrollbar-color: var(--ink-faint) var(--surface); }
input, textarea, select { caret-color: var(--ink); accent-color: var(--ink); }
a {
  color: var(--ink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.025em; line-height: 1.2; }
h4 { font-size: var(--t-h4); letter-spacing: -0.02em; line-height: 1.25; }
p  { margin: 0; }

/* Fookusrõngas: tume joon kannab igal taustal, kollane oreool hoiab
   selle brändi sees. Kollane üksi ei anna valgel 3:1 kontrasti. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(255, 198, 26, 0.45);
}
.section--ink :focus-visible,
.stats :focus-visible,
.foot :focus-visible,
.topbar :focus-visible,
.cookies :focus-visible,
.split__half--ink :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--signal);
  box-shadow: 0 0 0 6px rgba(255, 198, 26, 0.25);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 0; color: #fff; }

/* Sisuserv on ainult üks: .wrap sisemine serv. Täislaiuses plokid panevad
   oma sisu sama konteinerisse, et vasak serv oleks igal laiusel üks joon. */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }

.stack > * + * { margin-top: var(--s4); }
.stack > h1, .stack > h2, .stack > h3 { margin-top: var(--s7); }
.stack > h1 + *, .stack > h2 + *, .stack > h3 + * { margin-top: var(--s3); }
.stack > :first-child { margin-top: 0; }
.muted { color: var(--ink-soft); }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-soft); max-width: 68ch; }
.label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.section { padding-block: var(--band); }
.section--lead { padding-block: var(--band-lead); }
.section--tight { padding-block: var(--band-tight); }
.section--flush { padding-bottom: 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink .lead, .section--ink .muted { color: #B9BEC5; }
.section-head {
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6);
  justify-content: space-between; align-items: baseline;
  margin-bottom: var(--s8);
}
.section-head h2 { max-width: 22ch; }

/* --- Nupud --- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-size: var(--t-base); font-weight: 600; letter-spacing: -0.01em;
  padding: var(--s4) var(--s7); border: 2px solid transparent; cursor: pointer;
  font-family: inherit; min-height: 48px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }   /* vajutus peab kohe tunda andma */
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--signal { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--sm { padding: var(--s3) var(--s5); font-size: 15px; min-height: 44px; }
.btn--block { display: block; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--surface); border-color: var(--line-soft); color: var(--ink-faint);
  cursor: not-allowed; transform: none;
}

.link-underline {
  display: inline-block; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--signal); padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

@media (pointer: coarse) {
  .link-underline { padding-top: 11px; padding-bottom: 8px; }
}

/* --- Päis --- */
.topbar { background: var(--ink); color: #fff; font-size: var(--t-sm); }
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6);
  justify-content: space-between; align-items: center;
  min-height: 40px; padding-block: var(--s2);
}
.topbar a { color: #fff; text-decoration: none; }
.topbar__right { display: flex; flex-wrap: wrap; gap: var(--s6); align-items: center; }
.topbar__tel { font-variant-numeric: tabular-nums; }

.langs { display: flex; gap: var(--s3); }
.langs a { color: #9AA0A9; text-decoration: none; font-weight: 500; }
.langs a[aria-current="true"] { color: var(--signal); }

.nav { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; }
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6); min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
/* Märk: originaallogo kotkas tõuseb kollaselt ruudult. Ruut on sama kollane,
   mis mujal lehel; kotkas on tint ja jaluses valge. */
.brand__mark { width: 46px; height: 36px; flex: 0 0 auto; display: block; overflow: visible; }
.brand__name { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.brand__name b { font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: var(--s7); }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; }
.nav__links a[aria-current="page"] { border-bottom: 3px solid var(--signal); padding-bottom: 3px; }

.nav__toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  width: 48px; height: 48px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav__toggle span { display: block; width: 20px; height: 2px; background: var(--ink); }

/* --- Avalehe hero ---
   Sisenemine ilma JS-ita: @starting-style. Tekst tuleb astmeliselt üles,
   foto avaneb alt üles, silt libiseb servast sisse. */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); align-items: stretch; min-height: min(72vh, 680px); }
.hero__text > * { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.hero__text > :nth-child(2) { transition-delay: 60ms; }
.hero__text > :nth-child(3) { transition-delay: 120ms; }
.hero__text > :nth-child(4) { transition-delay: 180ms; }
.hero__text > :nth-child(5) { transition-delay: 240ms; }
.hero__title { font-size: clamp(36px, 4.3vw, 62px); line-height: 1.04; letter-spacing: -0.035em; max-width: 15ch; }
.hero__text .lead { max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero__pick { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--line); margin-top: var(--s2); }
.hero__media img { transition: clip-path 900ms var(--ease-out); }
.hero__caption { transition: transform 500ms var(--ease-out) 500ms, opacity 500ms var(--ease-out) 500ms; }
@starting-style {
  .hero__text > * { opacity: 0; transform: translateY(12px); }
  .hero__media img { clip-path: inset(100% 0 0 0); }
  .hero__caption { transform: translateX(-24px); opacity: 0; }
}
.hero__text {
  padding: clamp(48px, 6vw, 96px) var(--gut);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s6);
  max-width: calc(var(--wrap) * 6 / 13);
  margin-left: auto;
}
.hero__media { position: relative; min-height: 420px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 45%; }
.hero__caption {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: var(--s3);
  background: var(--signal); color: var(--ink);
  padding: var(--s3) var(--s5); font-size: 13px; font-weight: 500;
}
.hero__caption b { font-weight: 700; letter-spacing: 0.02em; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-block; text-decoration: none;
  border: 1px solid var(--line-strong); padding: var(--s3) var(--s4);
  font-size: 15px; font-weight: 500; min-height: 44px; line-height: 1.4;
  background: var(--paper); color: var(--ink); font-family: inherit; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--press) var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] {
  background: var(--signal); border-color: var(--signal); color: var(--ink); font-weight: 600;
}

/* --- Aasarida: tendi serv ---
   Ainus muster lehel. Rõngad tendi serval on see, mida iga klient tunneb;
   siin joonistab neid rida täislaiuses plokkide ülaservas. */
.eyelets { position: relative; }
.eyelets::before {
  content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 14px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='14' viewBox='0 0 32 14'%3E%3Ccircle cx='16' cy='7' r='3.2' fill='none' stroke='%23FFC61A' stroke-opacity='0.42' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center top; background-size: 32px 14px;
}
.eyelets--ink::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='14' viewBox='0 0 32 14'%3E%3Ccircle cx='16' cy='7' r='3.2' fill='none' stroke='%230E1116' stroke-opacity='0.28' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* --- Embleem (firmast): märk suurelt, aasarida serval, ilma fotota --- */
.emblem {
  background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s6); padding: clamp(48px, 7vw, 96px) var(--gut) clamp(40px, 5vw, 64px);
}
.emblem__mark { width: clamp(220px, 28vw, 360px); height: auto; overflow: visible; }
.emblem__since { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* --- Numbririba --- */
.stats { background: var(--ink); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: var(--s8) var(--s7); border-right: 1px solid var(--ink-line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; border-right: 0; }
.stat__n {
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums;
}
.stat__n--signal { color: var(--signal); }
.stat__t { font-size: var(--t-sm); line-height: 1.4; color: #9AA0A9; margin-top: var(--s2); }

/* --- Ruudustikud ja kaardid --- */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.svc {
  border: 1px solid var(--line); border-top: 4px solid var(--signal);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s2);
  background: var(--paper);
}
.svc h3 { max-width: 16ch; }
.svc { transition: box-shadow var(--quick) var(--ease-out); }
.svc p { max-width: 42ch; }

.cat {
  background: var(--paper); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; border: 1px solid transparent; overflow: hidden;
  transition: box-shadow var(--quick) var(--ease-out), transform var(--press) var(--ease-out);
}
.cat:active { transform: scale(0.99); }
.cat img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); transition: transform 360ms var(--ease-out); }
.cat__body { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s1); }
.cat__name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.cat__count { font-size: var(--t-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Hinnategurid: loetelu, mitte kaardid — see on seletus, mitte valik */
.pricelist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s9); }
.pricelist__row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s4);
  padding: var(--s5) 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.pricelist__row dt { font-weight: 600; font-size: var(--t-base); }
.pricelist__row dd { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 44ch; }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split__half { padding-block: clamp(48px, 6vw, 88px); display: flex; }
.split__half:first-child { justify-content: flex-end; }
.split__inner {
  width: 100%; max-width: calc(var(--wrap) / 2); padding-inline: var(--gut);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s4);
}
.split__half--ink { background: var(--ink); color: #fff; }
.split__half--ink .lead { color: #B9BEC5; }
.split__half--ink .link-underline { color: #fff; }
.split__half + .split__half:not(.split__half--ink) { border-left: 1px solid var(--line); }

/* --- Galerii --- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.shot {
  display: block; border: 0; padding: 0; background: none; cursor: pointer;
  font-family: inherit; text-align: left; width: 100%; overflow: hidden;
  transition: transform var(--press) var(--ease-out);
}
.shot:active { transform: scale(0.985); }
.shot img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface);
  transition: outline-color var(--dur) var(--ease), transform 360ms var(--ease-out);
  outline: 3px solid transparent; outline-offset: -3px;
}
.shot__cap { font-size: var(--t-sm); color: var(--ink-soft); padding-top: var(--s2); }

.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s7); }

.lightbox {
  position: fixed; inset: 0; background: rgba(14, 17, 22, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s6); z-index: 90;
  visibility: hidden; opacity: 0;
  transition: opacity 160ms var(--ease-out), visibility 0s linear 160ms;
}
.lightbox.is-open { visibility: visible; opacity: 1; transition: opacity var(--panel) var(--ease-out), visibility 0s; }
/* Pilt saabub materjalina: skaala ja hägu koos, mitte hüppega */
.lightbox__fig { transform: scale(0.96); filter: blur(6px); opacity: 0; transition: transform var(--panel) var(--ease-out), filter var(--panel) var(--ease-out), opacity var(--panel) var(--ease-out); }
.lightbox.is-open .lightbox__fig { transform: none; filter: none; opacity: 1; }
.lightbox__img { max-width: min(1200px, 92vw); max-height: 78vh; object-fit: contain; transition: opacity 120ms var(--ease), filter 120ms var(--ease); }
.lightbox__img.is-swapping { opacity: 0.4; filter: blur(4px); }
.lightbox__cap { color: #fff; text-align: center; font-size: 15px; margin-top: var(--s4); max-width: 60ch; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; background: none; border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff; width: 52px; height: 52px; cursor: pointer;
  font-family: inherit; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), scale var(--press) var(--ease-out);
}
.lightbox__close:active, .lightbox__prev:active, .lightbox__next:active { scale: 0.93; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox svg { width: 22px; height: 22px; display: block; }

/* --- Vorm --- */
/* Vorm: kolm rühma, iga rühma ees pealkiri ja õhk, mitte jooned.
   Ainsad jooned on väljade endi piirid. */
.form-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.form { display: flex; flex-direction: column; gap: var(--s10); }
.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.fieldset__head { display: flex; flex-direction: column; gap: var(--s1); padding: 0; margin-bottom: var(--s2); }
.fieldset__name { font-weight: 700; font-size: var(--t-h3); letter-spacing: -0.025em; line-height: 1.2; }
.fieldset__hint { font-size: 15px; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.form__send .muted { font-size: 15px; max-width: 34ch; }
.form-aside { display: flex; flex-direction: column; gap: var(--s4); padding-top: var(--s2); }
.form-aside h3 { margin-bottom: var(--s1); }
.plainlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); font-size: 17px; }
.plainlist a { text-decoration: none; font-weight: 600; }
.plainlist .muted { font-size: 15px; margin-left: var(--s2); }

.field { display: flex; flex-direction: column; gap: var(--s2); }
.field > label, .field__legend { font-size: 15px; font-weight: 600; }
.field__hint { font-size: var(--t-sm); color: var(--ink-soft); }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  font-family: inherit; font-size: var(--t-base); color: var(--ink);
  border: 1px solid var(--line-soft); background: var(--paper);
  padding: var(--s3) var(--s4); width: 100%; min-height: 50px; border-radius: 0;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input[type="number"], .field input[type="tel"] { font-variant-numeric: tabular-nums; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px rgba(255, 198, 26, 0.4); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); border-width: 2px; }
.field__err { font-size: var(--t-sm); color: var(--danger); font-weight: 500; }
.field__err:empty { display: none; }
.req { color: var(--danger); }

.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px solid var(--line-soft); padding: var(--s5) var(--s3); min-height: 64px;
  font-size: 15px; font-weight: 500; line-height: 1.25;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--press) var(--ease-out);
}
.choice input:active + span { transform: scale(0.97); }
.choice input:checked + span { border-color: var(--ink); background: var(--signal-tint); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(255, 198, 26, 0.45); }

.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }

/* Failide lisamine: nupp ja lause, mitte katkendjoonega kast. Lohistamine töötab kogu real. */
.upload {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4);
  padding: var(--s4); background: var(--surface); cursor: pointer; position: relative;
  transition: background-color var(--dur) var(--ease), box-shadow var(--quick) var(--ease-out);
}
.upload__btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  transition: transform var(--press) var(--ease-out);
}
.upload:active .upload__btn { transform: scale(0.97); }
.upload__text { font-size: var(--t-sm); color: var(--ink-soft); flex: 1 1 220px; line-height: 1.45; }
.upload.is-over { background: var(--signal-tint); box-shadow: inset 0 0 0 2px var(--signal); }
.upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filelist { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-sm); list-style: none; margin: 0; padding: 0; }
.filelist:empty { display: none; }
.filelist li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; }
.filelist span:last-child { font-variant-numeric: tabular-nums; }

.consent { display: flex; gap: var(--s3); align-items: flex-start; font-size: 15px; line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.aside-card { background: var(--surface); padding: var(--s7); display: flex; flex-direction: column; gap: var(--s4); }
.aside-card__row { display: flex; justify-content: space-between; gap: var(--s3); border-bottom: 1px solid var(--line-soft); padding-bottom: var(--s3); font-size: 15px; }

.notice { background: var(--signal-tint); border: 1px solid var(--signal-tint-line); padding: var(--s4) var(--s5); font-size: 15px; line-height: 1.55; }
.notice--ok { background: var(--ok-tint); border-color: #C5DCCD; }
.notice--err { background: var(--danger-tint); border-color: #E7C4BC; }

/* --- Kaart: laeb klõpsuga, enne seda Google'i küpsiseid ei tule --- */
.map { position: relative; aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* --- Loetelud --- */
.speclist { display: flex; flex-direction: column; margin: 0; }
.speclist__row {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s6); padding: var(--s5) 0; border-bottom: 1px solid var(--line);
}
.speclist__row dt { font-weight: 600; font-size: var(--t-base); }
.speclist__row dd { margin: 0; color: var(--ink-soft); font-size: var(--t-base); max-width: 68ch; }
.speclist__row dd a { color: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.step { border-top: 3px solid var(--line); padding: var(--s5) var(--s7) 0 0; display: flex; flex-direction: column; gap: var(--s2); }
.step:first-child { border-top-color: var(--signal); }
.step + .step { padding-left: var(--s7); }
.step__n { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.step p { max-width: 38ch; }

/* --- Kutse --- */
.cta { background: var(--signal); }
.cta .wrap {
  display: flex; flex-wrap: wrap; gap: var(--s7);
  align-items: center; justify-content: space-between;
  padding-block: clamp(40px, 5vw, 64px);
}
.cta__text { max-width: 620px; display: flex; flex-direction: column; gap: var(--s3); }
.cta__text p { color: #3D3007; font-size: 17px; line-height: 1.55; }
.cta__actions { display: flex; flex-direction: column; gap: var(--s3); min-width: 300px; }
.cta .btn--ghost { border-color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- Jalus --- */
.foot { background: var(--ink); color: #fff; padding-block: clamp(40px, 4vw, 56px); }
.foot a { color: #D6D9DE; text-decoration: none; overflow-wrap: anywhere; }
.foot__col span, .foot p { overflow-wrap: anywhere; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s9); }
.foot__col { display: flex; flex-direction: column; gap: var(--s2); }
.foot__h { font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8A929C; }
.foot__tel { font-variant-numeric: tabular-nums; }
.foot__about { font-size: var(--t-sm); color: #9AA0A9; max-width: 40ch; }
.foot__addr { font-size: var(--t-sm); color: #D6D9DE; }
.foot__bottom {
  border-top: 1px solid var(--ink-line); margin-top: var(--s9); padding-top: var(--s5);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  font-size: 13px; color: #8A929C;
}
.foot__bottom a { color: #8A929C; }

/* --- Küpsiseteade --- */
.cookies {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: var(--ink); color: #fff; padding-block: var(--s5);
  border-top: 3px solid var(--signal);
}
.cookies .wrap { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }
.cookies p { font-size: var(--t-sm); max-width: 70ch; color: #D6D9DE; }
.cookies[hidden] { display: none; }
.cookies { transition: transform 400ms var(--ease), opacity 400ms var(--ease); }
@starting-style { .cookies { transform: translateY(100%); opacity: 0; } }

/* --- Hover ainult päris osutiga: puuteekraanil jääks see kinni --- */
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--signal-deep); }
  .btn--primary:hover { background: #000; color: #fff; }
  .btn--signal:hover { background: #F0B600; color: var(--ink); }
  .btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
  .link-underline:hover { border-bottom-color: var(--ink); }
  .topbar a:hover { color: var(--signal); }
  .chip:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
  .cat:hover { color: var(--ink); box-shadow: 0 10px 28px rgba(14, 17, 22, 0.10), inset 0 -3px 0 var(--signal); }
  .cat:hover img { transform: scale(1.03); }
  .split__half--ink .link-underline:hover { border-bottom-color: #fff; color: #fff; }
  .shot:hover img { transform: scale(1.02); }
  .shot:hover img { outline-color: var(--signal); }
  .lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { border-color: var(--signal); color: var(--signal); }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
  .choice input:hover + span { border-color: var(--ink-soft); background: var(--surface); }
  .upload:hover { background: var(--signal-tint); }
  .cta .btn--ghost:hover { background: rgba(14, 17, 22, 0.08); }
  .foot a:hover { color: var(--signal); }
  .svc:hover { box-shadow: 0 10px 28px rgba(14, 17, 22, 0.08); }
}

/* --- Sisenemine kerimisel ---
   Ainult siis, kui JS on olemas (html.js). Sisu ei jää kunagi peitu.
   Nihe on väike (12 px) ja astmed lühikesed (40 ms): kaskaad, mitte etendus. */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--reveal) var(--ease-out), transform var(--reveal) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
/* Fotod avanevad alt üles, nagu tent tõmmatakse peale */
.js .reveal--clip img { clip-path: inset(0 0 100% 0); }
.js .reveal--clip.is-in img { clip-path: inset(0 0 0 0); transition: clip-path 700ms var(--ease-out) var(--d, 0ms), transform 360ms var(--ease-out), outline-color var(--dur) var(--ease); }

/* --- Murdepunktid --- */
@media (max-width: 1180px) {
  :root { --gut: 32px; }
  .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-bottom: 1px solid var(--ink-line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat:nth-child(2n+1) { padding-left: 0; }
  .stat:nth-child(2n) { padding-right: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { padding-right: 24px; }
  .step + .step { padding-left: 0; }
  .step:nth-child(2n) { padding-left: 24px; }
  .pricelist { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: flex; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: var(--s3) var(--gut) var(--s6);
    z-index: 70; transform-origin: top center;
    /* Suletud: nähtamatu, aga transitionitav. Sulgub kiiremini kui avaneb. */
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms;
  }
  .nav__links.is-open {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity var(--panel) var(--ease-out), transform var(--panel) var(--ease-out), visibility 0s;
  }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav__links .btn { margin-top: var(--s4); border-bottom: 0; }
  .nav__links a[aria-current="page"] { border-bottom: 1px solid var(--line); color: var(--signal-deep); font-weight: 700; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { max-width: none; margin-left: 0; padding-inline: var(--gut); }
  .hero__media { min-height: 320px; order: -1; }
  .hero__title { max-width: none; }
  .split { grid-template-columns: 1fr; }
  .split__half, .split__half:first-child { justify-content: flex-start; }
  .split__inner { max-width: var(--wrap); }
  .split__half + .split__half:not(.split__half--ink) { border-left: 0; border-top: 1px solid var(--line); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-layout { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7); }
  .speclist__row { grid-template-columns: 1fr; gap: 4px; }
  .pricelist__row { grid-template-columns: 1fr; gap: 4px; }
  .cta__actions { min-width: 100%; }
}

@media (max-width: 640px) {
  :root { --gut: 20px; }
  body { font-size: 15.5px; }
  .grid--5, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }

  /* Kategooriad on telefonis menüü, mitte galerii. Reana kerib kõik kümme
     kiiresti läbi; plaatidena oli plokk üle 7000 px pikk. */
  .grid--5 .cat { flex-direction: row; align-items: stretch; border: 1px solid var(--line); min-height: 88px; }
  .grid--5 .cat img { width: 116px; height: 88px; flex: 0 0 auto; aspect-ratio: auto; }
  .grid--5 .cat__body { justify-content: center; }
  .grid { gap: var(--s3); }

  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child, .stat:last-child, .stat:nth-child(2n), .stat:nth-child(2n+1) {
    border-right: 0; padding-left: 0; padding-right: 0;
  }
  .stat { border-bottom: 1px solid var(--ink-line); }
  .stat:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(2n) { padding-left: 0; padding-right: 0; }
  .dims { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .form__send .btn { width: 100%; }
  /* Telefonis ei pea ülariba kolme rida võtma — aadress on jaluses ja kontaktilehel */
  .topbar__addr { display: none; }
  .topbar .wrap { justify-content: space-between; }
  .btn { width: 100%; }
  .nav__links .btn, .cta__actions .btn { width: 100%; }
  .hero__media { min-height: 260px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox__close { top: 8px; right: 8px; }
}

@media print {
  .nav, .topbar, .cta, .cookies, .lightbox, .nav__toggle { display: none; }
  body { color: #000; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Vähem ja pehmemalt, mitte üldse mitte: läbipaistvus jääb, nihe ja skaala kaovad */
  .js .reveal { transform: none; }
  .js .reveal.is-in { transition: opacity 200ms linear; transition-delay: 0ms; }
  .js .reveal--clip img, .js .reveal--clip.is-in img { clip-path: none; transition: none; }
  .hero__text > *, .hero__caption { transform: none; transition: opacity 200ms linear; }
  .hero__media img { transition: none; clip-path: none; }
  .lightbox__fig, .lightbox.is-open .lightbox__fig { transform: none; filter: none; }
  .nav__links, .nav__links.is-open { transform: none; }
  .cookies { transition: opacity 200ms linear; }
  .btn:active, .chip:active, .cat:active, .shot:active, .choice input:active + span { transform: none; }
  .cat:hover img, .shot:hover img { transform: none; }
}
