/* ==========================================================================
   A.T. Epopõrandad — disainisüsteem 2026 „Valatud valgus"
   Buildless, ilma raamistiketa. Kaskaadikihid hoiavad spetsiifilisuse korras.
   Logo (img/logo.png) kuvatakse alati muutmata kujul heledal alusel.
   ========================================================================== */

@layer reset, tokens, base, layout, components, pages, utilities, themes;

/* ---------- Fondid (self-hosted, SIL OFL 1.1) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metriliselt lähedane varufont vähendab fondivahetusel tekkivat nihet (CLS). */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@property --mx { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --my { syntax: "<length>"; inherits: true; initial-value: 0px; }

/* ==========================================================================
   RESET
   ========================================================================== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  img, picture, svg, iframe { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  address { font-style: normal; }
  fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
  legend { padding: 0; }
  [hidden] { display: none !important; }
  dialog { padding: 0; border: 0; color: inherit; background: none; max-width: none; max-height: none; }
}

/* ==========================================================================
   TOKENS — oklch + light-dark(). Teema: süsteemi järgi, käsitsi hele/tume,
   lisaks ligipääsetav kõrge kontrastsusega teema (themes-kiht).
   ========================================================================== */
@layer tokens {
  :root {
    color-scheme: light dark;

    /* Põhipalett: betoon, grafiit, epo-sinine (logo), vaigusära, märgistuskollane */
    --c-bg: light-dark(oklch(0.955 0.004 240), oklch(0.17 0.02 256));
    --c-bg-2: light-dark(oklch(0.925 0.007 240), oklch(0.205 0.024 256));
    --c-bg-3: light-dark(oklch(0.895 0.009 240), oklch(0.24 0.026 256));
    --c-ink: light-dark(oklch(0.23 0.025 256), oklch(0.965 0.005 240));
    --c-ink-2: light-dark(oklch(0.45 0.022 252), oklch(0.79 0.018 245));
    --c-line: light-dark(oklch(0.25 0.03 256 / 0.12), oklch(1 0 0 / 0.08));
    --c-line-strong: light-dark(oklch(0.25 0.03 256 / 0.3), oklch(1 0 0 / 0.24));
    --c-glass: light-dark(oklch(1 0 0 / 0.56), oklch(0.27 0.03 256 / 0.46));
    --c-glass-strong: light-dark(oklch(0.99 0.002 240 / 0.84), oklch(0.22 0.026 256 / 0.84));
    --c-glass-hi: light-dark(oklch(1 0 0 / 0.95), oklch(1 0 0 / 0.13));
    --c-accent: light-dark(oklch(0.47 0.15 260), oklch(0.77 0.11 245));
    --c-brand: oklch(0.47 0.15 260);
    --c-brand-2: oklch(0.41 0.15 263);
    --c-on-brand: oklch(0.99 0 0);
    --c-glow: light-dark(oklch(0.8 0.09 228), oklch(0.6 0.13 242));
    --c-glow-2: light-dark(oklch(0.86 0.06 280), oklch(0.42 0.12 275));
    --c-marking: oklch(0.85 0.16 88);
    --c-on-marking: oklch(0.22 0.04 80);
    --c-shadow: light-dark(oklch(0.38 0.09 260 / 0.16), oklch(0.06 0.02 260 / 0.6));
    --c-focus: light-dark(oklch(0.47 0.15 260), oklch(0.85 0.16 88));
    --c-concrete: light-dark(oklch(0.78 0.006 240), oklch(0.38 0.012 250));
    --c-concrete-2: light-dark(oklch(0.7 0.008 240), oklch(0.31 0.012 250));
    --c-danger: light-dark(oklch(0.52 0.19 27), oklch(0.76 0.14 25));
    --c-success: light-dark(oklch(0.5 0.13 155), oklch(0.8 0.14 155));
    --c-logo-chip: oklch(1 0 0);
    --c-spot: light-dark(oklch(1 0 0 / 0.75), oklch(0.8 0.1 235 / 0.2));

    /* Mesh-gradiendi värvid (vedel vaik) */
    --mesh-a: light-dark(oklch(0.84 0.07 235 / 0.9), oklch(0.42 0.14 258 / 0.9));
    --mesh-b: light-dark(oklch(0.9 0.05 270 / 0.85), oklch(0.36 0.12 285 / 0.75));
    --mesh-c: light-dark(oklch(0.93 0.04 200 / 0.9), oklch(0.45 0.1 225 / 0.7));

    /* Klaas */
    --glass-blur: 18px;
    --glass-sat: 1.5;

    /* Tüpograafia: Archivo (laius-telg) + JetBrains Mono ainult mõõtudele */
    --font-sans: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --wide: 122%;
    --semi-wide: 112%;
    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem);
    --step-3: clamp(1.85rem, 1.3rem + 2.2vw, 3.1rem);
    --step-4: clamp(2.3rem, 1.2rem + 5.2vw, 6.2rem);

    /* Ruum ja vorm */
    --gutter: clamp(1rem, 4vw, 3rem);
    --content: 80rem;
    --section: clamp(4.5rem, 9vw, 8.5rem);
    --r-xl: 28px;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 10px;
    --r-pill: 999px;
    --header-h: 4.25rem;

    /* Liikumine: kiire väljumine + füüsikaline vedru */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --spring: linear(0, 0.056, 0.183, 0.339, 0.495, 0.635, 0.752, 0.844, 0.912, 0.96, 0.991, 1.01, 1.02, 1.023, 1.02, 1.013, 1.007, 1.003, 1, 0.999, 1);
    --spring-snappy: linear(0, 0.053, 0.178, 0.336, 0.498, 0.648, 0.774, 0.875, 0.949, 1, 1.031, 1.048, 1.053, 1.045, 1.028, 1.013, 1.003, 0.998, 0.998, 1);
    --dur-1: 160ms;
    --dur-2: 320ms;
    --dur-3: 640ms;

    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='turbulence' baseFrequency='1.6' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .12 0 0 0 0 .15 0 0 0 -2.2 1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  }

  :root[data-scheme="light"] { color-scheme: light; }
  :root[data-scheme="dark"] { color-scheme: dark; }
  :root[data-text-size="125"] { font-size: 125%; }
  :root[data-text-size="150"] { font-size: 150%; }
  :root[data-text-size="200"] { font-size: 200%; }

  /* Brauserid ilma light-dark() toeta saavad heleda teema. */
  @supports not (color: light-dark(#000, #fff)) {
    :root {
      --c-bg: oklch(0.955 0.004 240); --c-bg-2: oklch(0.925 0.007 240); --c-bg-3: oklch(0.895 0.009 240);
      --c-ink: oklch(0.23 0.025 256); --c-ink-2: oklch(0.45 0.022 252);
      --c-line: oklch(0.25 0.03 256 / 0.12); --c-line-strong: oklch(0.25 0.03 256 / 0.3);
      --c-glass: oklch(1 0 0 / 0.56); --c-glass-strong: oklch(0.99 0.002 240 / 0.84); --c-glass-hi: oklch(1 0 0 / 0.95);
      --c-accent: oklch(0.47 0.15 260); --c-glow: oklch(0.8 0.09 228); --c-glow-2: oklch(0.86 0.06 280);
      --c-shadow: oklch(0.38 0.09 260 / 0.16); --c-focus: oklch(0.47 0.15 260);
      --c-concrete: oklch(0.78 0.006 240); --c-concrete-2: oklch(0.7 0.008 240);
      --c-danger: oklch(0.52 0.19 27); --c-success: oklch(0.5 0.13 155); --c-spot: oklch(1 0 0 / 0.75);
      --mesh-a: oklch(0.84 0.07 235 / 0.9); --mesh-b: oklch(0.9 0.05 270 / 0.85); --mesh-c: oklch(0.93 0.04 200 / 0.9);
    }
  }
}

/* ==========================================================================
   BASE
   ========================================================================== */
@layer base {
  html {
    font-family: var(--font-sans);
    scroll-padding-top: calc(var(--header-h) + 2rem);
    hanging-punctuation: first last;
  }
  @media (prefers-reduced-motion: no-preference) {
    html:not([data-motion="reduce"]) { scroll-behavior: smooth; }
  }
  body {
    min-height: 100dvh;
    background: var(--c-bg);
    color: var(--c-ink);
    font-size: var(--step-0);
    line-height: 1.6;
    font-weight: 400;
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
    overflow-x: clip;
  }
  /* Peen filmiteralisus annab pinnale taktiilsuse. */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    background-image: var(--noise);
    opacity: 0.05;
  }
  body.modal-open { overflow: hidden; }

  h1, h2, h3, h4 {
    font-weight: 640;
    line-height: 1.04;
    letter-spacing: -0.022em;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: manual;
  }
  h1 { font-size: var(--step-4); font-stretch: var(--wide); line-height: 0.96; letter-spacing: -0.035em; }
  h2 { font-size: var(--step-3); font-stretch: var(--wide); }
  h3 { font-size: var(--step-2); font-stretch: var(--semi-wide); line-height: 1.15; letter-spacing: -0.012em; }
  h4 { font-size: var(--step-1); font-stretch: var(--semi-wide); }
  p, li, dd, figcaption, blockquote { text-wrap: pretty; }
  p + p { margin-top: 1em; }
  strong { font-weight: 640; }
  small { font-size: var(--step--1); }

  a { color: inherit; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
  a:hover { text-decoration-thickness: 0.12em; }
  :focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: 4px; }
  main:focus { outline: none; }
  ::selection { background: var(--c-marking); color: var(--c-on-marking); }

  svg.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
@layer layout {
  .container { width: min(100% - var(--gutter) * 2, var(--content)); margin-inline: auto; }
  .section { padding-block: var(--section); position: relative; }
  .section-tint { background: var(--c-bg-2); }
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.5rem 4rem;
    align-items: end;
    margin-bottom: clamp(2.25rem, 4.5vw, 4rem);
  }
  .section-head > p { color: var(--c-ink-2); max-width: 46ch; justify-self: end; }
  .section-head .link { justify-self: end; }
  .kicker { display: block; color: var(--c-accent); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.01em; margin-bottom: 1rem; font-stretch: 100%; }
  @media (max-width: 760px) {
    .section-head { grid-template-columns: 1fr; align-items: start; }
    .section-head > p, .section-head .link { justify-self: start; }
  }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
@layer components {

  /* ---------- Klaaspind ---------- */
  .glass {
    background: var(--c-glass);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    border: 1px solid var(--c-line);
    box-shadow:
      inset 0 1px 0 0 var(--c-glass-hi),
      inset 0 0 0 1px oklch(1 0 0 / 0.02),
      0 1px 1px oklch(0 0 0 / 0.03),
      0 24px 48px -28px var(--c-shadow);
  }

  /* ---------- Skip-link ---------- */
  .skip-link {
    position: fixed; left: 1rem; top: 1rem; z-index: 1000;
    padding: 0.75rem 1.1rem; border-radius: var(--r-md);
    background: var(--c-brand); color: var(--c-on-brand); font-weight: 600; text-decoration: none;
    transform: translateY(-200%); transition: transform var(--dur-2) var(--ease-out);
  }
  .skip-link:focus-visible { transform: none; }

  /* ---------- Nupud ---------- */
  .btn {
    --btn-bg: var(--c-brand);
    --btn-fg: var(--c-on-brand);
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    min-height: 3.25rem; padding: 0.8rem 1.4rem;
    border-radius: var(--r-pill);
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-stretch: 108%; letter-spacing: -0.005em; line-height: 1.1;
    text-decoration: none; white-space: nowrap;
    border: 1px solid oklch(1 0 0 / 0.14);
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.28), 0 10px 26px -12px oklch(0.47 0.15 260 / 0.65);
    translate: var(--tx, 0px) var(--ty, 0px);
    transition: translate var(--dur-3) var(--spring), background-color var(--dur-1) ease, box-shadow var(--dur-2) ease;
    isolation: isolate;
    overflow: hidden;
  }
  .btn::before { /* sisemine läige */
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: radial-gradient(120% 140% at 50% -20%, oklch(1 0 0 / 0.35), transparent 55%);
    opacity: 0.8;
  }
  .btn:hover { --btn-bg: var(--c-brand-2); text-decoration: none; }
  .btn:active { scale: 0.98; }
  .btn .i { transition: transform var(--dur-2) var(--ease-out); }
  .btn:hover .i { transform: translate(2px, -2px); }
  .btn-ghost {
    --btn-bg: var(--c-glass); --btn-fg: var(--c-ink);
    border-color: var(--c-line-strong);
    box-shadow: inset 0 1px 0 var(--c-glass-hi);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .btn-ghost::before { display: none; }
  .btn-ghost:hover { --btn-bg: var(--c-glass-strong); }
  .btn-small { min-height: 2.6rem; padding: 0.5rem 1.05rem; font-size: 0.95rem; }
  .btn[aria-busy="true"] { pointer-events: none; }
  .btn[aria-busy="true"] .btn-label { opacity: 0.0; }
  .btn[aria-busy="true"]::after {
    content: ""; position: absolute; width: 1.25rem; height: 1.25rem; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin 0.7s linear infinite;
  }

  .icon-btn {
    display: inline-grid; place-items: center;
    width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill);
    color: var(--c-ink);
    border: 1px solid var(--c-line);
    background: var(--c-glass);
    transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease;
  }
  .icon-btn:hover { background: var(--c-glass-strong); border-color: var(--c-line-strong); }
  .icon-btn .i { width: 1.2rem; height: 1.2rem; }

  /* Tekstilink: allkriips joonistub transformiga */
  .link {
    position: relative; display: inline-flex; align-items: center; gap: 0.45rem;
    color: var(--c-accent); font-weight: 600; text-decoration: none; font-stretch: 106%;
    padding-block: 0.2rem;
  }
  .link::before, .link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
    background: currentColor; opacity: 0.3;
  }
  .link::after { opacity: 1; transform-origin: right; transform: scaleX(0); transition: transform var(--dur-3) var(--ease-out); }
  .link:hover::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

  /* ---------- Päis ---------- */
  .site-header {
    position: sticky; top: 0.75rem; z-index: 50;
    margin-top: 0.75rem;
    view-transition-name: site-header;
  }
  .header-bar {
    position: relative;
    display: flex; align-items: center; gap: 1rem;
    min-height: var(--header-h);
    padding: 0.55rem 0.6rem 0.55rem 0.7rem;
    border-radius: var(--r-lg);
  }
  .header-bar::before { /* kerimisel tihenev klaaskiht */
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: var(--c-glass-strong);
    opacity: 0;
  }
  .brand { display: inline-flex; flex-shrink: 0; border-radius: var(--r-md); text-decoration: none; }
  .logo-chip {
    display: inline-flex; align-items: center;
    padding: 0.45rem 0.7rem; border-radius: var(--r-md);
    background: var(--c-logo-chip);
    box-shadow: inset 0 0 0 1px oklch(0.25 0.03 256 / 0.08);
  }
  .site-header .logo-chip { view-transition-name: brand-logo; }
  .logo-chip img { width: auto; height: 2.35rem; }
  .main-nav { margin-inline: auto; }
  .main-nav ul { display: flex; gap: 0.25rem; }
  .main-nav a {
    position: relative; display: block;
    padding: 0.55rem 0.85rem; border-radius: var(--r-pill);
    color: var(--c-ink-2); font-weight: 520; text-decoration: none; font-stretch: 104%;
    transition: color var(--dur-1) ease, background-color var(--dur-1) ease;
  }
  .main-nav a:hover { color: var(--c-ink); background: var(--c-line); }
  .main-nav a[aria-current="page"] { color: var(--c-ink); }
  .main-nav a[aria-current="page"]::after { /* põranda märgistusjoon */
    content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.25rem; height: 2px;
    border-radius: 2px; background: var(--c-marking);
  }
  .header-actions { display: flex; align-items: center; gap: 0.5rem; }
  .header-phone {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.5rem 0.75rem; border-radius: var(--r-pill);
    font-family: var(--font-mono); font-size: 0.86rem; font-weight: 500; letter-spacing: -0.01em;
    color: var(--c-ink); text-decoration: none; white-space: nowrap;
  }
  .header-phone:hover { background: var(--c-line); }
  .menu-toggle { display: none; }
  .theme-toggle .i-moon { display: none; }
  :root[data-effective-scheme="dark"] .theme-toggle .i-sun { display: none; }
  :root[data-effective-scheme="dark"] .theme-toggle .i-moon { display: block; }

  @media (max-width: 1100px) { .header-phone { display: none; } }
  @media (max-width: 860px) {
    .main-nav a { padding-inline: 0.6rem; }
  }
  @media (max-width: 760px) {
    .site-header { top: 0.5rem; margin-top: 0.5rem; }
    .header-bar { flex-wrap: wrap; gap: 0.5rem; }
    .logo-chip img { height: 1.9rem; }
    .menu-toggle { display: inline-grid; }
    .header-actions { margin-left: auto; }
    .header-cta { display: none; }
    .main-nav { order: 3; flex-basis: 100%; margin: 0; }
    .main-nav ul { flex-direction: column; gap: 0.15rem; padding: 0.5rem 0 0.35rem; }
    .main-nav a { padding: 0.85rem 0.9rem; font-size: 1.15rem; font-stretch: 112%; color: var(--c-ink); border-radius: var(--r-md); }
    .main-nav a[aria-current="page"] { background: var(--c-line); }
    .main-nav a[aria-current="page"]::after { left: 0.9rem; right: auto; width: 1.75rem; bottom: 0.45rem; }
    .main-nav .nav-cta { display: block; margin-top: 0.5rem; }
    .main-nav .nav-cta .btn { width: 100%; }
  }
  @media (min-width: 761px) { .main-nav .nav-cta { display: none; } }

  /* ---------- Hero (avaleht) ---------- */
  .hero {
    position: relative;
    margin-top: calc(-1 * (var(--header-h) + 0.75rem));
    padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 6.5rem));
    padding-bottom: clamp(3rem, 6vw, 5.5rem);
    isolation: isolate;
    overflow: clip;
  }
  .mesh {
    position: absolute; inset: -20% -10% auto -10%; height: 140%; z-index: -2;
    pointer-events: none;
  }
  .mesh::before, .mesh::after {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(38% 42% at 18% 28%, var(--mesh-a), transparent 70%),
      radial-gradient(34% 40% at 78% 22%, var(--mesh-b), transparent 72%),
      radial-gradient(40% 36% at 62% 72%, var(--mesh-c), transparent 70%);
    filter: blur(28px);
  }
  .mesh::after {
    background:
      radial-gradient(26% 30% at 40% 60%, var(--c-glow), transparent 70%),
      radial-gradient(22% 26% at 88% 64%, var(--mesh-a), transparent 70%);
    opacity: 0.55;
  }
  .hero::after { /* kursor kui valguslaik läikival pinnal */
    content: ""; position: absolute; left: 0; top: 0; z-index: -1;
    width: 48rem; aspect-ratio: 1; border-radius: 50%;
    translate: calc(var(--mx) - 50%) calc(var(--my) - 50%);
    background: radial-gradient(closest-side, var(--c-spot), transparent);
    opacity: 0; pointer-events: none;
    transition: opacity 0.9s var(--ease-out);
  }
  .hero.is-lit::after { opacity: 0.85; }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
  }
  .hero-copy { position: relative; }
  .hero-place {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin-bottom: 1.75rem; padding: 0.4rem 0.85rem 0.4rem 0.6rem;
    border-radius: var(--r-pill); font-size: var(--step--1); font-weight: 560; color: var(--c-ink);
  }
  .pulse-dot { position: relative; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--c-marking); box-shadow: 0 0 0 3px oklch(0.85 0.16 88 / 0.28); }
  .hero-title { position: relative; font-weight: 680; }
  .hero-title .line { display: block; overflow: clip; padding-bottom: 0.06em; margin-bottom: -0.06em; }
  .hero-title .line > span { display: inline-block; }

  /* Põrandajoon + peegeldus: pealkiri seisab läikival põrandal */
  .floor {
    position: relative; height: 1px; margin-top: 0.12em; font-size: var(--step-4);
    background: linear-gradient(90deg, var(--c-line-strong), var(--c-line-strong) 55%, transparent);
    transform-origin: left;
  }
  .floor::after { /* spekulaarne läige joonel */
    content: ""; position: absolute; left: 8%; top: -1px; width: 28%; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--c-glass-hi), transparent);
    filter: blur(1px);
  }
  .reflection {
    font-size: var(--step-4); font-stretch: var(--wide); font-weight: 680; line-height: 0.96; letter-spacing: -0.035em;
    height: 0.98em; overflow: hidden; pointer-events: none; user-select: none;
    -webkit-mask-image: linear-gradient(to bottom, oklch(0 0 0 / 0.5), transparent 78%);
    mask-image: linear-gradient(to bottom, oklch(0 0 0 / 0.5), transparent 78%);
    filter: blur(1.2px);
    opacity: 0.55;
  }
  .reflection-inner { display: block; transform: scaleY(-1); }

  .hero-lead { max-width: 40ch; margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.5; color: var(--c-ink-2); }
  .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 2rem; }

  .hero-card {
    position: relative; border-radius: var(--r-xl); padding: 0.6rem;
    transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform var(--dur-3) var(--spring);
    transform-style: preserve-3d;
  }
  .hero-card .media { border-radius: calc(var(--r-xl) - 0.6rem); aspect-ratio: 5 / 3.4; }
  .hero-card figcaption {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.95rem 0.6rem 0.4rem;
  }
  .hero-card figcaption strong { display: block; font-stretch: 108%; }
  .hero-card figcaption span { color: var(--c-ink-2); font-size: var(--step--1); }
  .hero-stat {
    position: absolute; left: -1.75rem; bottom: 5.25rem;
    padding: 0.85rem 1.1rem; border-radius: var(--r-lg);
    transform: translateZ(40px);
  }
  .hero-stat b { display: block; font-size: 2rem; font-stretch: var(--wide); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
  .hero-stat span { display: block; margin-top: 0.3rem; font-size: 0.82rem; color: var(--c-ink-2); max-width: 13ch; line-height: 1.3; }

  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 34rem; }
    .hero-stat { left: auto; right: 1rem; bottom: 5.5rem; }
  }
  @media (max-width: 520px) {
    :root { --wide: 108%; }
    .hero-title { letter-spacing: -0.04em; }
  }

  /* ---------- Meedia + skeleton ---------- */
  .media { position: relative; display: block; overflow: hidden; background: var(--c-bg-3); }
  .media img { width: 100%; height: 100%; object-fit: cover; }
  .js .media:not(.is-loaded)::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 20%, var(--c-glass-hi) 50%, transparent 80%);
    opacity: 0.5;
    transform: translateX(-100%);
    animation: shimmer 1.3s var(--ease-in-out) infinite;
  }
  .js .media:not(.is-loaded) img { opacity: 0; }
  .media img { transition: opacity var(--dur-3) var(--ease-out); }

  /* ---------- Kliendiriba (sotsiaalne tõestus) ---------- */
  .clients { padding-block: 1.75rem; border-block: 1px solid var(--c-line); }
  .clients-inner { display: flex; align-items: baseline; gap: 1rem 2rem; }
  .clients-label { flex-shrink: 0; color: var(--c-ink-2); font-size: var(--step--1); max-width: 16ch; line-height: 1.35; }
  .client-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
  .client-list li { font-stretch: var(--semi-wide); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--c-ink); opacity: 0.82; white-space: nowrap; }
  @media (max-width: 760px) {
    .clients-inner { flex-direction: column; gap: 0.75rem; }
    .clients-label { max-width: none; }
    .client-list { gap: 0.4rem 1.1rem; }
    .client-list li { font-size: 0.95rem; }
  }

  /* ---------- Bento ---------- */
  .bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(12rem, auto);
    gap: 0.9rem;
  }
  .tile {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column;
    padding: clamp(1.35rem, 2.2vw, 2rem);
    border-radius: var(--r-xl);
    container-type: inline-size;
    color: var(--c-ink); text-decoration: none;
  }
  a.tile { transition: border-color var(--dur-2) ease; }
  a.tile:hover { border-color: var(--c-line-strong); }
  .tile h3 { margin-bottom: 0.6rem; }
  .tile p { color: var(--c-ink-2); max-width: 42ch; margin-bottom: 1.25rem; }
  .tile .link { margin-top: auto; align-self: flex-start; }
  .tile .link-wrap { margin-top: auto; padding-top: 1.25rem; }
  .tile-install { grid-column: span 3; grid-row: span 2; padding: 0; }
  .tile-install .media { flex: 1; min-height: 15rem; }
  .tile-install .tile-body { padding: clamp(1.35rem, 2.2vw, 2rem); }
  .tile-materials { grid-column: span 2; flex-direction: row; gap: 1.25rem; }
  .tile-materials .tile-body { display: flex; flex-direction: column; flex: 1; }
  .tile-materials .swatch { width: 34%; flex-shrink: 0; border-radius: var(--r-md); align-self: stretch; min-height: 9rem; }
  .tile-stat { grid-column: span 1; justify-content: space-between; background: var(--c-brand); color: var(--c-on-brand); border-color: transparent; }
  .tile-stat { text-decoration: none; }
  .tile-stat b { font-size: clamp(2.6rem, 4.5vw, 3.6rem); font-stretch: var(--wide); font-weight: 720; line-height: 0.9; letter-spacing: -0.04em; }
  .tile-stat span { font-size: 0.92rem; line-height: 1.35; opacity: 0.88; }
  .tile-renov { grid-column: span 2; }
  .tile-partners { grid-column: span 1; justify-content: space-between; }
  .tile-partners h3 { font-size: 1.1rem; }
  .tile-partners ul { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.88rem; color: var(--c-ink-2); }
  @media (max-width: 1100px) {
    .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tile-install { grid-column: span 4; grid-row: span 1; flex-direction: row; }
    .tile-install .media { flex: 1.1; }
    .tile-install .tile-body { flex: 1; display: flex; flex-direction: column; }
    .tile-materials { grid-column: span 3; }
    .tile-stat { grid-column: span 1; }
    .tile-renov { grid-column: span 2; }
    .tile-partners { grid-column: span 2; }
    .tile-partners ul { flex-flow: row wrap; gap: 0.25rem 0.9rem; }
  }
  @media (max-width: 700px) {
    .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
    .tile-install, .tile-materials, .tile-stat, .tile-renov, .tile-partners { grid-column: auto; }
    .tile-install { flex-direction: column; }
    .tile-install .media { min-height: 13rem; }
    .tile-stat { flex-direction: row; align-items: center; gap: 1.25rem; justify-content: flex-start; }
    .tile-stat span { max-width: 22ch; }
    .tile-partners ul { flex-direction: row; flex-wrap: wrap; gap: 0.25rem 1rem; }
  }
  @container (max-width: 22rem) {
    .tile-materials .swatch { display: none; }
  }

  /* ---------- Valguslaik (spotlight) ---------- */
  [data-spotlight] { position: relative; overflow: hidden; }
  [data-spotlight]::before {
    content: ""; position: absolute; left: 0; top: 0; z-index: 0;
    width: 32rem; aspect-ratio: 1; border-radius: 50%;
    translate: calc(var(--mx) - 50%) calc(var(--my) - 50%);
    background: radial-gradient(closest-side, var(--c-spot), transparent);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-3) var(--ease-out);
  }
  [data-spotlight].is-lit::before { opacity: 1; }
  [data-spotlight] > :not(.mesh) { position: relative; z-index: 1; }
  .tile-stat[data-spotlight]::before { background: radial-gradient(closest-side, oklch(1 0 0 / 0.22), transparent); }

  /* ---------- Kihipaksuse uurija (allkiri-element) ---------- */
  .explorer {
    --min: 3; --max: 6; --scale-h: 20rem;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
  }
  .explorer:has(#sys-epomassid:checked) { --min: 1; --max: 3; }
  .explorer:has(#sys-poluuretaan:checked) { --min: 1; --max: 3; }
  .explorer:has(#sys-epovarvid:checked) { --min: 0.3; --max: 0.5; }
  .explorer:has(#sys-dekoratiiv:checked) { --min: 5; --max: 12; }
  .explorer:has(#sys-antistaatiline:checked) { --min: 2; --max: 3; }
  .explorer:has(#sys-keemiakindel:checked) { --min: 6; --max: 12; }

  .systems legend { font-weight: 600; margin-bottom: 1rem; color: var(--c-ink-2); font-size: var(--step--1); }
  .system-list { display: grid; gap: 0.4rem; }
  .system {
    position: relative; display: flex; align-items: center; gap: 1rem;
    padding: 0.95rem 1.1rem; border-radius: var(--r-md);
    border: 1px solid var(--c-line);
    cursor: pointer;
    transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease;
  }
  .system:hover { background: var(--c-glass); border-color: var(--c-line-strong); }
  .system input { position: absolute; opacity: 0; pointer-events: none; }
  .system .name { font-weight: 560; font-stretch: 104%; flex: 1; }
  .system .mm { font-family: var(--font-mono); font-size: 0.84rem; color: var(--c-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .system::before {
    content: ""; flex-shrink: 0; width: 0.95rem; height: 0.95rem; border-radius: 50%;
    border: 1.5px solid var(--c-line-strong);
    transition: border-width var(--dur-2) var(--spring-snappy), border-color var(--dur-1) ease;
  }
  .system:has(input:checked) { background: var(--c-glass-strong); border-color: var(--c-brand); box-shadow: inset 0 1px 0 var(--c-glass-hi), 0 12px 28px -20px var(--c-shadow); }
  .system:has(input:checked)::before { border: 5px solid var(--c-brand); }
  :root[data-effective-scheme="dark"] .system:has(input:checked) { border-color: var(--c-accent); }
  :root[data-effective-scheme="dark"] .system:has(input:checked)::before { border-color: var(--c-accent); }
  .system:has(input:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: 2px; }

  .slab-panel { position: sticky; top: calc(var(--header-h) + 2rem); padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--r-xl); }
  .slab-figure { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: end; }
  .ruler {
    position: relative; height: var(--scale-h); width: 3.2rem; margin-bottom: 4.5rem;
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-ink-2);
    border-right: 1px solid var(--c-line-strong);
  }
  .ruler span { position: absolute; right: 0.55rem; translate: 0 50%; line-height: 1; }
  .ruler span:nth-child(1) { bottom: 0%; }
  .ruler span:nth-child(2) { bottom: 16.6667%; }
  .ruler span:nth-child(3) { bottom: 33.3333%; }
  .ruler span:nth-child(4) { bottom: 50%; }
  .ruler span:nth-child(5) { bottom: 66.6667%; }
  .ruler span:nth-child(6) { bottom: 83.3333%; }
  .ruler span:nth-child(7) { bottom: 100%; }
  .ruler span::after { content: ""; position: absolute; right: -0.55rem; top: 50%; width: 0.4rem; height: 1px; background: var(--c-line-strong); }
  .slab {
    position: relative; height: calc(var(--scale-h) + 4.5rem);
    border-radius: var(--r-md); overflow: hidden;
    background: linear-gradient(to bottom, transparent 0, transparent calc(100% - 4.5rem), var(--c-concrete) calc(100% - 4.5rem));
    border-bottom: 1px solid var(--c-line);
  }
  .slab::after { /* betoon: täpiline tekstuur */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4.5rem;
    background-image: var(--speckle), linear-gradient(to bottom, var(--c-concrete), var(--c-concrete-2));
    background-size: 160px 160px, 100% 100%;
    opacity: 0.95;
  }
  .slab-grid { /* mm abijooned */
    position: absolute; inset: 0 0 4.5rem 0;
    background-image: linear-gradient(to top, var(--c-line) 1px, transparent 1px);
    background-size: 100% calc(var(--scale-h) / 6);
    background-position: bottom;
  }
  .resin-wrap { position: absolute; left: 0; right: 0; bottom: 4.5rem; height: var(--scale-h); transform-origin: bottom; }
  .resin {
    position: absolute; inset: 0; transform-origin: bottom;
    transition: transform 0.9s var(--spring);
  }
  .resin-max {
    transform: scaleY(calc(var(--max) / 12));
    background: linear-gradient(to bottom, oklch(0.8 0.09 230 / 0.45), oklch(0.6 0.13 250 / 0.35));
    border-top: 1px dashed oklch(0.47 0.15 260 / 0.6);
  }
  .resin-min {
    transform: scaleY(calc(var(--min) / 12));
    background: linear-gradient(to bottom, oklch(0.62 0.14 248), oklch(0.47 0.15 260));
    box-shadow: inset 0 2px 0 oklch(1 0 0 / 0.55);
  }
  .resin-sheen { /* läikiv pealispind */
    position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
    transform-origin: bottom; transform: scaleY(calc(var(--max) / 12));
    background: linear-gradient(100deg, transparent 30%, oklch(1 0 0 / 0.35) 45%, transparent 60%);
    transition: transform 0.9s var(--spring);
    mix-blend-mode: soft-light;
  }
  .dim {
    position: absolute; right: 1rem; bottom: 4.5rem;
    translate: 0 calc(var(--max) / 12 * var(--scale-h) * -1 - 0.6rem);
    transition: translate 0.9s var(--spring);
    padding: 0.35rem 0.6rem; border-radius: var(--r-sm);
    background: var(--c-marking); color: var(--c-on-marking);
    font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; white-space: nowrap;
    box-shadow: 0 6px 16px -8px oklch(0.3 0.08 80 / 0.6);
  }
  .dim-values { display: none; }
  .explorer:has(#sys-hoordemassid:checked) .dim [data-for="hoordemassid"],
  .explorer:has(#sys-epomassid:checked) .dim [data-for="epomassid"],
  .explorer:has(#sys-poluuretaan:checked) .dim [data-for="poluuretaan"],
  .explorer:has(#sys-epovarvid:checked) .dim [data-for="epovarvid"],
  .explorer:has(#sys-dekoratiiv:checked) .dim [data-for="dekoratiiv"],
  .explorer:has(#sys-antistaatiline:checked) .dim [data-for="antistaatiline"],
  .explorer:has(#sys-keemiakindel:checked) .dim [data-for="keemiakindel"] { display: inline; }
  .slab-caption { margin-top: 0.6rem; font-size: 0.8rem; color: var(--c-ink-2); display: flex; justify-content: space-between; gap: 1rem; }
  .slab-caption .mono { white-space: nowrap; }
  .system-info { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
  .system-info > div { display: none; }
  .explorer:has(#sys-hoordemassid:checked) [data-info="hoordemassid"],
  .explorer:has(#sys-epomassid:checked) [data-info="epomassid"],
  .explorer:has(#sys-poluuretaan:checked) [data-info="poluuretaan"],
  .explorer:has(#sys-epovarvid:checked) [data-info="epovarvid"],
  .explorer:has(#sys-dekoratiiv:checked) [data-info="dekoratiiv"],
  .explorer:has(#sys-antistaatiline:checked) [data-info="antistaatiline"],
  .explorer:has(#sys-keemiakindel:checked) [data-info="keemiakindel"] { display: block; animation: rise var(--dur-3) var(--ease-out) both; }
  .system-info h3 { font-size: var(--step-1); margin-bottom: 0.45rem; }
  .system-info p { color: var(--c-ink-2); }
  .system-info .link { margin-top: 0.9rem; }
  @media (max-width: 860px) {
    .explorer { grid-template-columns: 1fr; --scale-h: 13rem; gap: 1rem; }
    .slab-panel { position: relative; top: 0; }
    .systems legend { margin-bottom: 0.6rem; }
    .system-list {
      display: flex; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
      padding: 0.2rem 2.5rem 0.6rem 0.2rem; margin-inline: -0.2rem; scrollbar-width: none;
      -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent);
    }
    .system-list::-webkit-scrollbar { display: none; }
    .system { flex: 0 0 auto; scroll-snap-align: start; padding: 0.7rem 0.95rem; gap: 0.65rem; border-radius: var(--r-pill); }
    .system .name { white-space: nowrap; }
  }

  /* ---------- Tööde galerii (bento) ---------- */
  .work-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(14rem, 22vw, 19rem);
    gap: 0.9rem;
  }
  .work-card {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform var(--dur-3) var(--spring);
  }
  .work-card figure { height: 100%; }
  .work-card a { display: block; height: 100%; color: inherit; text-decoration: none; border-radius: inherit; }
  .work-card .media { height: 100%; border-radius: inherit; }
  .work-card .media img { transition: opacity var(--dur-3) var(--ease-out), transform 1.2s var(--ease-out); }
  .work-card:hover .media img { transform: scale(1.035); }
  .work-card figcaption {
    position: absolute; left: 0.75rem; bottom: 0.75rem; right: 0.75rem; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.6rem 0.65rem 0.6rem 0.95rem; border-radius: var(--r-md);
  }
  .work-card figcaption h3 { font-size: 0.98rem; font-stretch: 106%; letter-spacing: -0.005em; line-height: 1.25; }
  .work-card figcaption .zoom { display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); }
  .work-card figcaption .zoom .i { width: 1rem; height: 1rem; }
  .w-a { grid-column: span 5; }
  .w-b { grid-column: span 4; }
  .w-c, .w-d, .w-e { grid-column: span 4; }
  .w-more {
    grid-column: span 3; border-radius: var(--r-lg);
    display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
    padding: 1.5rem; text-decoration: none; color: var(--c-ink);
  }
  .w-more b { font-size: var(--step-2); font-stretch: var(--wide); line-height: 1.1; }
  .w-more span { color: var(--c-ink-2); }
  .w-more .link { align-self: flex-start; }
  @media (max-width: 900px) {
    .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(11rem, 34vw, 16rem); }
    .w-a { grid-column: span 2; }
    .w-b, .w-c, .w-d, .w-e { grid-column: span 1; }
    .w-more { grid-column: span 2; grid-row: auto; }
  }
  @media (max-width: 520px) {
    .work-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .w-a, .w-b, .w-c, .w-d, .w-e, .w-more { grid-column: auto; }
    .work-card .media { aspect-ratio: 5 / 3; height: auto; }
  }

  /* ---------- Protsess (tõeline järjestus → numbrid on õigustatud) ---------- */
  .steps {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem;
    counter-reset: step; position: relative; isolation: isolate;
  }
  .step {
    position: relative; display: grid; grid-template-rows: subgrid; grid-row: span 3;
    gap: 0.75rem; padding: 1.5rem; border-radius: var(--r-lg);
    counter-increment: step;
  }
  .step::before {
    content: counter(step); display: inline-grid; place-items: center;
    width: 2.4rem; height: 2.4rem; border-radius: 50%;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem;
    background: var(--c-marking); color: var(--c-on-marking);
  }
  .step h3 { font-size: var(--step-1); align-self: end; }
  .step p { color: var(--c-ink-2); font-size: 0.98rem; }
  .steps-track { /* märgistusjoon sammude vahel */
    position: absolute; left: 3rem; right: 3rem; top: 2.7rem; height: 2px; z-index: -1;
    background: repeating-linear-gradient(90deg, var(--c-marking) 0 18px, transparent 18px 30px);
    opacity: 0.85;
  }
  @media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps-track { display: none; } }
  @media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step { grid-template-rows: auto; grid-row: auto; } }

  /* ---------- Tsitaat ---------- */
  .quote-section { position: relative; isolation: isolate; overflow: clip; }
  .quote-bg { position: absolute; inset: -12% 0; z-index: -1; }
  .quote-bg img { width: 100%; height: 100%; object-fit: cover; }
  .quote-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--c-bg) 0%, var(--c-bg) 11%, oklch(from var(--c-bg) l c h / 0.4) 32%, oklch(from var(--c-bg) l c h / 0.4) 68%, var(--c-bg) 89%, var(--c-bg) 100%); }
  .quote-card { max-width: 60rem; padding: clamp(1.75rem, 5vw, 4rem); border-radius: var(--r-xl); }
  .quote-card blockquote p {
    font-size: clamp(1.5rem, 1rem + 2.1vw, 2.6rem); font-stretch: 108%; font-weight: 520; line-height: 1.2; letter-spacing: -0.02em;
  }
  .quote-card blockquote p::before { content: "„"; }
  .quote-card blockquote p::after { content: "“"; }
  .quote-card figcaption { display: flex; align-items: center; gap: 0.9rem; margin-top: 2rem; }
  .quote-card figcaption .bar { width: 2.5rem; height: 2px; background: var(--c-marking); }
  .quote-card figcaption b { font-stretch: 108%; }
  .quote-card figcaption span { color: var(--c-ink-2); }

  /* ---------- KKK (details) ---------- */
  .faq-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .faq-layout > div:first-child p { color: var(--c-ink-2); margin-top: 1.25rem; max-width: 34ch; }
  .texture-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 11rem)); gap: 0.75rem; margin-top: 2rem; }
  .texture-pair .media { aspect-ratio: 263 / 324; border-radius: var(--r-lg); }
  .texture-pair figcaption { margin-top: 0.5rem; font-size: 0.84rem; color: var(--c-ink-2); }
  @media (max-width: 860px) { .texture-pair { display: none; } }
  .faq { display: grid; gap: 0.6rem; }
  .faq details { border-radius: var(--r-lg); border: 1px solid var(--c-line); background: var(--c-glass); transition: background-color var(--dur-2) ease, border-color var(--dur-2) ease; }
  .faq details[open] { background: var(--c-glass-strong); border-color: var(--c-line-strong); }
  .faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.2rem 1.35rem; cursor: pointer; list-style: none;
    font-weight: 600; font-stretch: 108%; font-size: 1.1rem; border-radius: inherit;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary .pm { position: relative; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--c-line-strong); }
  .faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0.7rem; height: 1.5px; background: currentColor; translate: -50% -50%; transition: transform var(--dur-2) var(--spring-snappy); }
  .faq summary .pm::after { transform: rotate(90deg); }
  .faq details[open] summary .pm::after { transform: rotate(0deg); }
  .faq .details-body { padding: 0 1.35rem 1.35rem; color: var(--c-ink-2); max-width: 65ch; }
  .faq details[open] .details-body { animation: rise var(--dur-3) var(--ease-out) both; }
  @media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; } }

  /* ---------- CTA-riba ---------- */
  .cta-band { position: relative; padding-block: var(--section); isolation: isolate; overflow: clip; }
  .cta-card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem; align-items: end;
    padding: clamp(2rem, 5vw, 4.5rem); border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
    background: oklch(0.25 0.06 258); color: oklch(0.98 0.004 240);
    border: 1px solid oklch(1 0 0 / 0.1);
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.14), 0 40px 80px -48px oklch(0.3 0.12 260 / 0.8);
  }
  .cta-card .mesh { inset: -40% -20%; height: auto; --mesh-a: oklch(0.47 0.15 260 / 0.95); --mesh-b: oklch(0.4 0.14 285 / 0.8); --mesh-c: oklch(0.55 0.12 230 / 0.7); --c-glow: oklch(0.6 0.13 242); }
  .cta-card h2 { max-width: 18ch; }
  .cta-card p { margin-top: 1rem; color: oklch(0.88 0.02 245); max-width: 46ch; }
  .cta-card .cta-contacts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.75rem; }
  .cta-card .cta-contacts a { color: oklch(0.98 0.004 240); font-family: var(--font-mono); font-size: 0.95rem; text-decoration-color: oklch(1 0 0 / 0.35); }
  .cta-card .btn { --btn-bg: oklch(0.99 0 0); --btn-fg: oklch(0.25 0.06 258); box-shadow: inset 0 -1px 0 oklch(0 0 0 / 0.08), 0 14px 30px -14px oklch(0 0 0 / 0.6); }
  .cta-card .btn:hover { --btn-bg: oklch(0.94 0.02 245); }
  .cta-card .btn::before { display: none; }
  @media (max-width: 760px) { .cta-card { grid-template-columns: 1fr; } .cta-card .btn { justify-self: start; } }

  /* ---------- Jalus ---------- */
  .site-footer { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: 2rem; background: var(--c-bg-2); border-top: 1px solid var(--c-line); }
  .footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
  .footer-brand p { margin-top: 1.25rem; color: var(--c-ink-2); max-width: 30ch; }
  .footer-col h2 { font-size: 0.95rem; font-stretch: 108%; letter-spacing: 0; margin-bottom: 1rem; color: var(--c-ink); }
  .footer-col ul { display: grid; gap: 0.5rem; }
  .footer-col a { color: var(--c-ink-2); text-decoration: none; }
  .footer-col a:hover { color: var(--c-ink); text-decoration: underline; }
  .footer-col address, .footer-col p { color: var(--c-ink-2); }
  .footer-col .mono { color: var(--c-ink-2); }
  .footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--c-line);
    color: var(--c-ink-2); font-size: var(--step--1);
  }
  .footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; }
  .text-btn { color: var(--c-ink-2); text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
  .text-btn:hover, .footer-actions a:hover { color: var(--c-ink); }
  .footer-actions a { color: var(--c-ink-2); }
  @media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
  @media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

  /* ---------- Alamlehtede intro ---------- */
  .page-hero {
    position: relative; isolation: isolate; overflow: clip;
    margin-top: calc(-1 * (var(--header-h) + 0.75rem));
    padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem));
    padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  }
  .page-hero .mesh { opacity: 0.75; }
  .page-hero + .section, .page-hero + .container { padding-top: clamp(0.5rem, 2.5vw, 2rem); }
  .page-hero h1 { font-size: clamp(2.2rem, 1.2rem + 4.4vw, 5.2rem); max-width: 16ch; }
  .page-hero .lead { margin-top: 1.4rem; max-width: 52ch; font-size: var(--step-1); line-height: 1.5; color: var(--c-ink-2); }
  .breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; font-size: var(--step--1); color: var(--c-ink-2); }
  .breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
  .breadcrumbs a { color: var(--c-ink-2); }
  .breadcrumbs [aria-current] { color: var(--c-ink); font-weight: 560; }

  /* ---------- Dialoogid ---------- */
  .sheet {
    width: min(100% - 2rem, 34rem); margin: auto;
    border-radius: var(--r-xl); padding: clamp(1.25rem, 4vw, 2rem);
    background: var(--c-glass-strong);
    -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid var(--c-line-strong);
    box-shadow: inset 0 1px 0 var(--c-glass-hi), 0 40px 90px -40px var(--c-shadow);
    color: var(--c-ink);
    opacity: 1; scale: 1;
    transition: opacity var(--dur-2) var(--ease-out), scale var(--dur-3) var(--spring), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
  }
  .sheet:not([open]) { opacity: 0; scale: 0.96; }
  @starting-style { .sheet[open] { opacity: 0; scale: 0.96; } }
  dialog::backdrop { background: oklch(0.15 0.03 256 / 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity var(--dur-2) ease, overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete; opacity: 1; }
  dialog:not([open])::backdrop { opacity: 0; }
  @starting-style { dialog[open]::backdrop { opacity: 0; } }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
  .sheet-head h2 { font-size: var(--step-2); }
  .sheet > p { color: var(--c-ink-2); }
  .sheet fieldset { margin-top: 1.5rem; }
  .sheet legend { font-weight: 600; margin-bottom: 0.65rem; }
  .segmented { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .segmented label { position: relative; }
  .segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
  .segmented span { display: inline-flex; min-height: 2.75rem; align-items: center; padding: 0.5rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--c-line-strong); font-weight: 520; }
  .segmented input:checked + span { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
  .segmented input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
  .check-option { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; }
  .check-option input { width: 1.25rem; height: 1.25rem; accent-color: var(--c-brand); }
  .settings-hint { margin-top: 1rem; font-size: var(--step--1); color: var(--c-ink-2); }
  .status-message:not(:empty) { margin-top: 0.75rem; padding: 0.7rem 0.9rem; border-radius: var(--r-md); background: var(--c-line); font-size: var(--step--1); }
  .dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; margin-top: 1.5rem; }

  /* Fotovaatur */
  .lightbox {
    width: min(100% - 1.5rem, 64rem); margin: auto; padding: 0.75rem;
    border-radius: var(--r-xl);
    background: oklch(0.16 0.02 256 / 0.92); color: oklch(0.97 0.004 240);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid oklch(1 0 0 / 0.1);
    opacity: 1; scale: 1;
    transition: opacity var(--dur-2) var(--ease-out), scale var(--dur-3) var(--spring), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
  }
  .lightbox:not([open]) { opacity: 0; scale: 0.94; }
  @starting-style { .lightbox[open] { opacity: 0; scale: 0.94; } }
  .lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.15rem 0.25rem 0.65rem 0.5rem; }
  .lightbox-bar p { font-family: var(--font-mono); font-size: 0.82rem; opacity: 0.8; }
  .lightbox .icon-btn { color: inherit; border-color: oklch(1 0 0 / 0.16); background: oklch(1 0 0 / 0.06); }
  .lightbox figure { position: relative; }
  .lightbox img { width: 100%; max-height: 72dvh; object-fit: contain; border-radius: var(--r-lg); background: oklch(0 0 0 / 0.3); aspect-ratio: 5 / 3; touch-action: pan-y; }
  .lightbox figcaption { padding: 0.85rem 0.5rem 0.25rem; font-weight: 600; font-stretch: 108%; }
  .lightbox-nav { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.25rem 0.25rem; }
  .lightbox-nav .btn-ghost { --btn-fg: oklch(0.97 0.004 240); --btn-bg: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.16); }

  /* ---------- Teavitused (toast) ---------- */
  .toast-region {
    position: fixed; z-index: 120; right: 1rem; bottom: 1rem; left: auto;
    display: grid; gap: 0.6rem; width: min(100% - 2rem, 25rem); pointer-events: none;
  }
  .toast {
    pointer-events: auto;
    display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: start;
    padding: 0.95rem 0.9rem 0.95rem 1rem; border-radius: var(--r-lg);
    background: var(--c-glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--c-line-strong);
    box-shadow: inset 0 1px 0 var(--c-glass-hi), 0 24px 50px -24px var(--c-shadow);
    animation: toast-in var(--dur-3) var(--spring) both;
  }
  .toast.is-leaving { animation: toast-out var(--dur-2) var(--ease-out) both; }
  .toast .toast-icon { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; color: var(--c-on-brand); background: var(--c-success); }
  .toast[data-type="error"] .toast-icon { background: var(--c-danger); }
  .toast .toast-icon .i { width: 1rem; height: 1rem; stroke-width: 2.2; }
  .toast b { display: block; font-stretch: 106%; }
  .toast p { font-size: 0.92rem; color: var(--c-ink-2); margin-top: 0.15rem; }
  .toast p a { color: var(--c-accent); }
  .toast .icon-btn { width: 2rem; height: 2rem; border: 0; background: transparent; }

  /* ---------- Mobiili kinnitatud tegevusriba ---------- */
  .mobile-cta { display: none; }
  @media (max-width: 760px) {
    .mobile-cta {
      position: fixed; z-index: 40; left: 0.6rem; right: 0.6rem; bottom: max(0.6rem, env(safe-area-inset-bottom));
      display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; padding: 0.45rem; border-radius: var(--r-lg);
      transition: transform var(--dur-3) var(--spring), opacity var(--dur-2) ease;
    }
    .mobile-cta .btn { min-height: 3rem; }
    .mobile-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
    body { padding-bottom: 5rem; }
    .toast-region { bottom: 5.25rem; right: 0.6rem; width: calc(100% - 1.2rem); }
  }

  .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
}

/* ==========================================================================
   PAGES
   ========================================================================== */
@layer pages {

  /* ---------- Ettevõttest ---------- */
  .about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .about-photo { position: sticky; top: calc(var(--header-h) + 2rem); border-radius: var(--r-xl); padding: 0.6rem; }
  .about-photo .media { border-radius: calc(var(--r-xl) - 0.6rem); aspect-ratio: 555 / 333; }
  .about-photo figcaption { padding: 0.9rem 0.5rem 0.35rem; color: var(--c-ink-2); font-size: var(--step--1); }
  .prose { max-width: 62ch; }
  .prose h2 { margin-bottom: 1.5rem; }
  .prose p { color: var(--c-ink-2); }
  .prose p.prose-lead { color: var(--c-ink); font-size: var(--step-1); line-height: 1.5; }
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 2.25rem; }
  .fact { padding: 1.1rem 1.15rem; border-radius: var(--r-lg); }
  .fact b { display: block; font-size: 1.6rem; font-stretch: var(--wide); line-height: 1; letter-spacing: -0.03em; }
  .fact span { display: block; margin-top: 0.45rem; font-size: 0.86rem; color: var(--c-ink-2); line-height: 1.35; }
  @media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-photo { position: relative; top: 0; } }
  @media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }

  .service-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
  .service-card { display: flex; flex-direction: column; padding: 0; border-radius: var(--r-xl); overflow: hidden; }
  .service-card .media { aspect-ratio: 5 / 3; }
  .service-card .body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
  .service-card h3 { margin-bottom: 0.55rem; }
  .service-card p { color: var(--c-ink-2); }
  .service-card .link { margin-top: auto; align-self: flex-start; }
  .service-card .body p { margin-bottom: 1.25rem; }
  @media (max-width: 900px) { .service-cards { grid-template-columns: 1fr; } .service-card { flex-direction: row; } .service-card .media { width: 40%; aspect-ratio: auto; } }
  @media (max-width: 560px) { .service-card { flex-direction: column; } .service-card .media { width: 100%; aspect-ratio: 5 / 3; } }

  .partners-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .partners-grid > div:first-child p { margin-top: 1.25rem; color: var(--c-ink-2); max-width: 38ch; }
  .partner-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .partner-chips li { padding: 0.65rem 1rem; border-radius: var(--r-pill); font-weight: 560; font-stretch: 104%; }
  .partner-logos { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
  .partner-logos a { display: grid; place-items: center; width: 11rem; height: 5.5rem; padding: 0.9rem 1.2rem; border-radius: var(--r-lg); background: oklch(1 0 0); border: 1px solid var(--c-line); transition: transform var(--dur-3) var(--spring); }
  .partner-logos a:hover { transform: translateY(-3px); }
  .partner-logos img { max-height: 100%; width: auto; object-fit: contain; }
  @media (max-width: 860px) { .partners-grid { grid-template-columns: 1fr; } }

  /* ---------- Tooted ---------- */
  .scroll-progress {
    position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 60;
    background: var(--c-marking); transform-origin: left; transform: scaleX(0);
  }
  .products-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
  .product-index { position: sticky; top: calc(var(--header-h) + 2rem); padding: 0.6rem; border-radius: var(--r-lg); }
  .product-index h2 { font-size: 0.9rem; font-stretch: 104%; letter-spacing: 0; color: var(--c-ink-2); padding: 0.5rem 0.75rem 0.6rem; }
  .product-index a {
    display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline;
    padding: 0.6rem 0.75rem; border-radius: var(--r-sm);
    color: var(--c-ink-2); text-decoration: none; font-size: 0.95rem; line-height: 1.3;
    transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
  }
  .product-index a:hover { background: var(--c-line); color: var(--c-ink); }
  .product-index a[aria-current="true"] { background: var(--c-glass-strong); color: var(--c-ink); box-shadow: inset 2px 0 0 var(--c-marking); }
  .product-index .mm { font-family: var(--font-mono); font-size: 0.76rem; white-space: nowrap; }
  .product-list { display: grid; gap: 1rem; }
  .product {
    display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem);
    padding: clamp(0.75rem, 1.5vw, 1rem); border-radius: var(--r-xl);
    container-type: inline-size;
  }
  .product-visual { display: flex; flex-direction: column; gap: 0.9rem; }
  .product-visual .media { border-radius: calc(var(--r-xl) - 0.75rem); aspect-ratio: 5 / 3; }
  .thickness { padding: 0.9rem 1rem 1rem; border-radius: var(--r-md); background: var(--c-line); }
  .thickness-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.86rem; color: var(--c-ink-2); }
  .thickness-head strong { font-family: var(--font-mono); color: var(--c-ink); font-weight: 600; font-size: 0.92rem; }
  .thickness-bar { position: relative; height: 0.6rem; margin-top: 0.7rem; border-radius: var(--r-pill); background: var(--c-bg); overflow: hidden; }
  .thickness-bar span {
    position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--c-brand), var(--c-glow));
    transform-origin: left;
    clip-path: inset(0 calc(100% - var(--b) / 12 * 100%) 0 calc(var(--a) / 12 * 100%) round 999px);
  }
  #hoordemassid .thickness { --a: 3; --b: 6; }
  #epomassid .thickness, #poluuretaanmassid .thickness { --a: 1; --b: 3; }
  #epovarvid .thickness { --a: 0.3; --b: 0.5; }
  #dekoratiivporandad .thickness { --a: 5; --b: 12; }
  #antistaatilised .thickness { --a: 2; --b: 3; }
  #keemiakindlad .thickness { --a: 6; --b: 12; }
  .thickness-scale { display: flex; justify-content: space-between; margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.68rem; color: var(--c-ink-2); }
  .product-body { padding: clamp(0.25rem, 1.5vw, 1rem) clamp(0.25rem, 1.5vw, 1rem) clamp(0.75rem, 1.5vw, 1rem) 0; display: flex; flex-direction: column; }
  .product-body h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); margin-bottom: 1rem; }
  .product-body > p { color: var(--c-ink-2); }
  .product-body h3 { font-size: 1rem; font-stretch: 104%; margin-top: 1.5rem; margin-bottom: 0.75rem; letter-spacing: 0; }
  .check-list { display: grid; gap: 0.5rem; }
  .check-list li { position: relative; padding-left: 1.85rem; }
  .check-list li::before {
    content: ""; position: absolute; left: 0; top: 0.28em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
    background: var(--c-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
  }
  .product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: auto; padding-top: 1.75rem; }
  .datasheets { margin-top: 1.5rem; display: grid; gap: 0.4rem; }
  .datasheets a {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border-radius: var(--r-md);
    border: 1px solid var(--c-line); text-decoration: none; font-size: 0.92rem; color: var(--c-ink);
    transition: border-color var(--dur-1) ease, background-color var(--dur-1) ease;
  }
  .datasheets a:hover { border-color: var(--c-line-strong); background: var(--c-glass); }
  .datasheets a small { margin-left: auto; color: var(--c-ink-2); font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
  @container (max-width: 40rem) {
    .product { grid-template-columns: 1fr; }
    .product-body { padding: 0.25rem 0.5rem 0.75rem; }
  }
  @media (max-width: 960px) {
    .products-layout { grid-template-columns: 1fr; }
    .product-index { position: relative; top: 0; }
    .product-index ul { display: flex; gap: 0.35rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.25rem; }
    .product-index li { scroll-snap-align: start; flex-shrink: 0; }
    .product-index a { border: 1px solid var(--c-line); border-radius: var(--r-pill); }
    .product-index .mm { display: none; }
  }
  .datasheet-section .ds-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
  .ds-group { padding: 1.5rem; border-radius: var(--r-xl); }
  .ds-group h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }
  .ds-group > p { color: var(--c-ink-2); font-size: 0.95rem; }
  @media (max-width: 900px) { .datasheet-section .ds-groups { grid-template-columns: 1fr; } }

  /* ---------- Tehtud tööd ---------- */
  .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.75rem; }
  .filters [role="group"] { display: contents; }
  .chip {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem;
    padding: 0.5rem 1rem; border-radius: var(--r-pill);
    border: 1px solid var(--c-line-strong); background: var(--c-glass); color: var(--c-ink);
    font-weight: 540; font-stretch: 104%;
    transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease, color var(--dur-1) ease;
  }
  .chip:hover { background: var(--c-glass-strong); }
  .chip[aria-pressed="true"] { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
  .chip .count { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.75; }
  .filter-status { margin-left: auto; color: var(--c-ink-2); font-size: var(--step--1); }
  .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.9rem; }
  .gallery .work-card { view-transition-class: work; }
  .gallery .work-card .media { aspect-ratio: 5 / 3; height: auto; }
  @media (max-width: 760px) { .filter-status { margin-left: 0; flex-basis: 100%; } }

  /* ---------- Kontakt ---------- */
  .contact-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
  .form-card { padding: clamp(1.4rem, 3.5vw, 2.75rem); border-radius: var(--r-xl); }
  .form-card > h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); }
  .form-card > p { margin-top: 0.75rem; color: var(--c-ink-2); max-width: 52ch; }
  .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1rem; margin-top: 2rem; }
  .field { display: grid; gap: 0.45rem; align-content: start; }
  .field-full { grid-column: 1 / -1; }
  .field label, .field legend { font-weight: 580; font-size: 0.95rem; }
  .field .opt { font-weight: 400; color: var(--c-ink-2); }
  .field .hint { font-size: 0.84rem; color: var(--c-ink-2); }
  .input {
    width: 100%; min-height: 3.15rem; padding: 0.75rem 0.95rem;
    border-radius: var(--r-md); border: 1px solid var(--c-line-strong);
    background: var(--c-glass-strong); color: var(--c-ink);
    box-shadow: inset 0 1px 2px oklch(0 0 0 / 0.04);
    transition: border-color var(--dur-1) ease, box-shadow var(--dur-2) ease;
  }
  .input::placeholder { color: var(--c-ink-2); opacity: 0.75; }
  .input:hover { border-color: var(--c-ink-2); }
  .input:focus-visible { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 4px oklch(0.47 0.15 260 / 0.22); }
  :root[data-effective-scheme="dark"] .input:focus-visible { border-color: var(--c-accent); box-shadow: 0 0 0 4px oklch(0.77 0.11 245 / 0.25); }
  textarea.input { min-height: 9rem; resize: vertical; field-sizing: content; max-height: 24rem; }
  select.input { appearance: none; padding-right: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8794' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 1.1rem; }
  .input-unit { position: relative; }
  .input-unit .input { padding-right: 3rem; font-family: var(--font-mono); }
  .input-unit span { position: absolute; right: 0.95rem; top: 50%; translate: 0 -50%; color: var(--c-ink-2); font-family: var(--font-mono); font-size: 0.9rem; pointer-events: none; }
  .field-error { display: none; align-items: center; gap: 0.4rem; color: var(--c-danger); font-size: 0.88rem; font-weight: 560; }
  .field:has([aria-invalid="true"]) .field-error { display: flex; }
  .field:has([aria-invalid="true"]) .input { border-color: var(--c-danger); }
  .input:user-invalid { border-color: var(--c-danger); }
  .chips-field { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .chip-check { position: relative; }
  .chip-check input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .chip-check span { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.5rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--c-line-strong); background: var(--c-glass-strong); font-weight: 540; transition: background-color var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease; }
  .chip-check span::before { content: ""; width: 0.9rem; height: 0.9rem; border-radius: 4px; border: 1.5px solid currentColor; opacity: 0.6; }
  .chip-check input:checked + span { background: var(--c-brand); color: var(--c-on-brand); border-color: var(--c-brand); }
  .chip-check input:checked + span::before { opacity: 1; background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b52a5' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 0.7rem no-repeat; }
  .chip-check input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
  .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
  .form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-top: 0.5rem; }
  .form-foot p { font-size: 0.86rem; color: var(--c-ink-2); max-width: 40ch; }
  .form-success { display: grid; gap: 0.75rem; justify-items: start; padding: 1.5rem; margin-top: 2rem; border-radius: var(--r-lg); border: 1px solid var(--c-success); background: oklch(from var(--c-success) l c h / 0.08); }
  .form-success h3 { font-size: var(--step-1); }
  .form-success p { color: var(--c-ink-2); }
  @media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

  .contact-side { display: grid; gap: 0.9rem; position: sticky; top: calc(var(--header-h) + 2rem); }
  .contact-card { padding: 1.5rem; border-radius: var(--r-xl); }
  .contact-card h2 { font-size: var(--step-1); font-stretch: 108%; margin-bottom: 1rem; letter-spacing: -0.01em; }
  .contact-lines { display: grid; gap: 0.25rem; }
  .contact-lines a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.75rem; margin-inline: -0.75rem; border-radius: var(--r-md); text-decoration: none; color: var(--c-ink); transition: background-color var(--dur-1) ease; }
  .contact-lines a:hover { background: var(--c-line); }
  .contact-lines .i { color: var(--c-accent); }
  .contact-lines .mono { font-size: 1rem; }
  .contact-card address { color: var(--c-ink-2); }
  .contact-card address strong { color: var(--c-ink); }
  .company-data { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; margin-top: 0.25rem; font-size: 0.92rem; }
  .company-data dt { color: var(--c-ink-2); }
  .company-data dd { font-family: var(--font-mono); font-size: 0.86rem; overflow-wrap: anywhere; }
  .guide-list { display: grid; gap: 0.5rem; color: var(--c-ink-2); font-size: 0.95rem; }
  .guide-list li { position: relative; padding-left: 1.2rem; }
  .guide-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.45rem; height: 2px; background: var(--c-marking); }
  @media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } .contact-side { position: relative; top: 0; } }

  .map-shell { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 26rem; display: grid; }
  .map-placeholder {
    position: relative; display: grid; place-content: center; justify-items: center; gap: 0.9rem; text-align: center; padding: 2rem;
    background:
      radial-gradient(circle at 50% 46%, oklch(0.47 0.15 260 / 0.18), transparent 32%),
      repeating-linear-gradient(0deg, var(--c-line) 0 1px, transparent 1px 44px),
      repeating-linear-gradient(90deg, var(--c-line) 0 1px, transparent 1px 44px),
      var(--c-bg-2);
  }
  .map-pin { position: relative; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); box-shadow: 0 0 0 10px oklch(0.47 0.15 260 / 0.14), 0 0 0 22px oklch(0.47 0.15 260 / 0.07); }
  .map-placeholder h3 { font-size: var(--step-2); }
  .map-placeholder p { color: var(--c-ink-2); max-width: 44ch; }
  .map-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.5rem; }
  .map-frame { width: 100%; height: 100%; min-height: 26rem; border: 0; filter: saturate(0.85); }
  :root[data-effective-scheme="dark"] .map-frame { filter: invert(0.9) hue-rotate(180deg) saturate(0.7) brightness(0.95); }
  .map-status:not(:empty) { position: absolute; left: 1rem; bottom: 1rem; padding: 0.5rem 0.8rem; border-radius: var(--r-md); font-size: 0.86rem; background: var(--c-glass-strong); }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .mt-0 { margin-top: 0 !important; }
}

/* ==========================================================================
   LIIKUMINE — ainult transform ja opacity. Austab prefers-reduced-motion
   ja kasutaja enda „Vähenda liikumist" valikut.
   ========================================================================== */
@keyframes spin { to { rotate: 360deg; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes line-up { from { transform: translateY(105%); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes card-in { from { opacity: 0; transform: perspective(1100px) translateY(24px) rotateX(6deg) scale(0.97); } }
@keyframes drift-a { 50% { transform: translate3d(4%, 3%, 0) rotate(6deg) scale(1.06); } }
@keyframes drift-b { 50% { transform: translate3d(-5%, 2%, 0) rotate(-8deg) scale(0.96); } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
@keyframes header-solid { to { opacity: 1; } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes pour { from { transform: scaleY(0); } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes bg-parallax { from { transform: translateY(-6%); } to { transform: translateY(6%); } }

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduce"]) {
    /* Avalehe üks orkestreeritud hetk */
    .hero-title .line > span { animation: line-up 1s var(--ease-out) both; }
    .hero-title .line:nth-child(2) > span { animation-delay: 90ms; }
    .hero-title .line:nth-child(3) > span { animation-delay: 180ms; }
    .hero .floor { animation: draw-x 1.1s 420ms var(--ease-out) both; }
    .hero .reflection { animation: fade-in 1.2s 700ms var(--ease-out) both; }
    .hero-lead, .hero-actions, .hero-place { animation: rise 0.9s 380ms var(--ease-out) both; }
    .hero-visual { animation: card-in 1.2s 260ms var(--ease-out) both; }
    .mesh::before { animation: drift-a 26s var(--ease-in-out) infinite; }
    .mesh::after { animation: drift-b 32s var(--ease-in-out) infinite; }
    .pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c-marking); animation: ping 2.4s var(--ease-out) infinite; }
  }

  @supports (animation-timeline: scroll()) {
    :root:not([data-motion="reduce"]) {
      .header-bar::before { animation: header-solid linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
      .scroll-progress { animation: progress linear both; animation-timeline: scroll(root); }
    }
  }
  @supports (animation-timeline: view()) {
    :root:not([data-motion="reduce"]) {
      .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
      .resin-wrap { animation: pour linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
      .quote-bg img { animation: bg-parallax linear both; animation-timeline: view(); animation-range: cover; }
    }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 220ms var(--ease-out) both fade-out-vt; }
  ::view-transition-new(root) { animation: 420ms var(--ease-out) both fade-in-vt; }
  ::view-transition-group(work) { animation-duration: 480ms; animation-timing-function: var(--ease-out); }
}
@keyframes fade-out-vt { to { opacity: 0; } }
@keyframes fade-in-vt { from { opacity: 0; transform: translateY(8px); } }

/* Kui kerimispõhist ajajoont pole, on päis kohe tihe klaas. */
@supports not (animation-timeline: scroll()) {
  .header-bar::before { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .header-bar::before { opacity: 1; }
}
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation: none !important; transition-duration: 0.01ms !important; }
:root[data-motion="reduce"] .header-bar::before { opacity: 1; }

/* ==========================================================================
   THEMES — kõrge kontrastsus ja vähendatud läbipaistvus
   ========================================================================== */
@layer themes {
  :root[data-theme="contrast"] {
    color-scheme: dark;
    --c-bg: #0c1118; --c-bg-2: #121a24; --c-bg-3: #1a2430;
    --c-ink: #ffffff; --c-ink-2: #e3e9f0;
    --c-line: #8796a6; --c-line-strong: #c9d3dd;
    --c-glass: #151d28; --c-glass-strong: #151d28; --c-glass-hi: transparent;
    --c-accent: #ffe477; --c-brand: #ffe477; --c-brand-2: #fff0a8; --c-on-brand: #0c1118;
    --c-focus: #ffe477; --c-marking: #ffe477; --c-on-marking: #0c1118;
    --c-shadow: transparent; --c-spot: transparent;
    --c-danger: #ffb4a8; --c-success: #a8f0c0;
    --mesh-a: transparent; --mesh-b: transparent; --mesh-c: transparent; --c-glow: transparent;
  }
  :root[data-theme="contrast"] body::after { display: none; }
  :root[data-theme="contrast"] .glass,
  :root[data-theme="contrast"] .sheet,
  :root[data-theme="contrast"] .toast { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border: 1px solid var(--c-line-strong); }
  :root[data-theme="contrast"] .btn { box-shadow: none; border-color: var(--c-brand); }
  :root[data-theme="contrast"] .btn::before,
  :root[data-theme="contrast"] .reflection,
  :root[data-theme="contrast"] .mesh { display: none; }
  :root[data-theme="contrast"] .cta-card { background: var(--c-bg-2); border: 2px solid var(--c-line-strong); }
  :root[data-theme="contrast"] .cta-card .btn { --btn-bg: var(--c-brand); --btn-fg: var(--c-on-brand); }
  :root[data-theme="contrast"] .tile-stat { background: var(--c-bg-2); color: var(--c-ink); border: 1px solid var(--c-line-strong); }
  :root[data-theme="contrast"] .quote-bg { display: none; }
  :root[data-theme="contrast"] a:not(.btn):not(.brand) { text-decoration-line: underline; }
  :root[data-theme="contrast"] .main-nav a, :root[data-theme="contrast"] .contact-lines a, :root[data-theme="contrast"] .work-card a { text-decoration: none; }
  :root[data-theme="contrast"] .resin-min { background: var(--c-accent); }
  :root[data-theme="contrast"] .resin-max { background: oklch(0.9 0.12 95 / 0.35); }

  @media (prefers-reduced-transparency: reduce) {
    :root { --c-glass: var(--c-bg-2); --c-glass-strong: var(--c-bg-2); }
    .glass, .sheet, .toast { -webkit-backdrop-filter: none; backdrop-filter: none; }
    body::after { display: none; }
  }
  @media (prefers-contrast: more) {
    :root { --c-line: var(--c-line-strong); --c-ink-2: var(--c-ink); }
    .reflection { display: none; }
  }
  @media (forced-colors: active) {
    .btn, .chip, .system, .input, .glass { border: 1px solid CanvasText; }
    .reflection, .mesh, body::after { display: none; }
  }

  @media print {
    body::after, .site-header, .mobile-cta, .cta-band, .mesh, .reflection, .toast-region, .site-footer .footer-actions { display: none !important; }
    body { background: #fff; color: #000; }
    .glass { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid #ccc; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  }
}
