/* =========================================================
   FoxSocial — disainisüsteem v3 "Stuudio, mitte mall"
   ---------------------------------------------------------
   Põhimõtted
   - Kiri kannab isikupära: Cormorant Garamond (logo sugulane)
     pealkirjades, DM Sans tekstis ja liideses.
   - Paber on neutraalne. Lilla ja roosa on aktsendid, mitte taust.
   - 12-veeruline võrgustik; vasak "rööbas" (veerud 1–3) siltidele,
     sisu veergudes 4–12. Asümmeetria tuleb võrgustikust, mitte kaunistustest.
   - Liikumine on lühike ja vaikne. prefers-reduced-motion lülitab selle välja.
   - Mustandisisu: [data-draft] on avalikult peidus, nähtav ?mustand abil.
   Mobiil enne, laiemad ekraanid min-width päringutega.
   ========================================================= */

:root {
  /* Brändivärvid logolt */
  --brand-purple: #4a2788;
  --brand-magenta: #b42484;
  --brand-blue: #243c90;
  /* Varasem Figma palett (Fox_vol1), alles hoitud */
  --lavender: #e3d5f6;
  --sky: #87bfe5;

  /* Pinnad */
  --paper: #f6f3ef;          /* neutraalne soe paber */
  --paper-tint: #ece5f3;     /* lavendli jälg, kasutusel säästlikult */
  --ink: #1d1a26;            /* lillaka alatooniga must */
  --ink-soft: #5b5665;
  --ink-faint: #716c79;
  --line: rgba(29, 26, 38, 0.14);
  --line-strong: rgba(29, 26, 38, 0.32);

  /* Tume pind */
  --deep: #1d1a26;
  --deep-2: #2a2536;
  --on-deep: #f4f0f6;
  --on-deep-soft: rgba(244, 240, 246, 0.68);
  --line-deep: rgba(244, 240, 246, 0.16);

  /* Aktsendid */
  --accent: var(--brand-purple);         /* lingid, fookus, numbrid (AA heledal) */
  --accent-hot: var(--brand-magenta);    /* üksikud rõhud */
  --accent-on-deep: #cbb8f0;
  --accent-hot-on-deep: #ec8fc7;

  --error: #b3261e;
  --error-on-deep: #ffb4ab;

  /* Kiri */
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, "Times New Roman", serif;

  /* Tüübiskaala (≈1.25 sammuga, sujuv) */
  --fs-display: clamp(3.25rem, 1.5rem + 7.2vw, 9rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 4.6vw, 6.25rem);
  --fs-h2: clamp(2.375rem, 1.6rem + 3.2vw, 4.75rem);
  --fs-h3: clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem);
  --fs-h4: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.03rem + 0.4vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;

  /* Ruum */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --gutter-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  --col-gap: clamp(16px, 2vw, 28px);
  --section: clamp(5rem, 3rem + 7vw, 10rem);
  --header-h: 68px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .5s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open body { overflow: hidden; }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
p { text-wrap: pretty; }
::selection { background: var(--brand-purple); color: #fff; }

/* Pealkirjad: seriif, püstine. Kursiiv on erand, mitte reegel. */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h4 { font-size: var(--fs-small); font-weight: 600; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.on-deep :focus-visible { outline-color: var(--accent-on-deep); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Pinnad ---------- */
.bg-paper { background: var(--paper); }
.bg-tint { background: var(--paper-tint); }
.bg-deep { background: var(--deep); color: var(--on-deep); }

/* ---------- Sildid ---------- */
/* Sektsiooni silt: väike, vaikne, rööpa veerus. Ei ole "pill" ega badge. */
.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.label__num { color: var(--accent); margin-right: 0.6em; font-variant-numeric: tabular-nums; }
.bg-deep .label { color: var(--on-deep-soft); }
.bg-deep .label__num { color: var(--accent-on-deep); }

.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); max-width: 38ch; }
.bg-deep .lead { color: var(--on-deep-soft); }

/* ---------- Nupud ja lingid ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 52px;
  padding: 0.75em 1.4em;
  font: 600 1rem/1.2 var(--sans);
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s;
}
.btn__arrow { display: inline-block; width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease-out); }
.btn__arrow svg { width: 100%; height: 100%; display: block; }
.btn:hover, .btn:focus-visible { background: var(--accent); border-color: var(--accent); }
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn--small { min-height: 44px; padding: 0.5em 1.1em; font-size: 0.9375rem; }

.bg-deep .btn { background: var(--on-deep); color: var(--ink); border-color: var(--on-deep); }
.bg-deep .btn:hover, .bg-deep .btn:focus-visible { background: var(--accent-on-deep); border-color: var(--accent-on-deep); }
.bg-deep .btn--ghost { background: transparent; color: var(--on-deep); border-color: var(--line-deep); }

.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }

/* Tekstilink: joon kaob paremale, ilmub vasakult */
.text-link {
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease-out), color .25s;
}
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--accent); }
.bg-deep .text-link:hover { color: var(--accent-on-deep); }

/* ---------- Päis ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper);
}

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--paper);  /* tahke: backdrop-filter lõhuks mobiilimenüü fixed-paigutuse */
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo img { width: auto; height: 52px; }
.logo__text { display: none; font: 500 1.5rem var(--serif); color: var(--brand-purple); }
.logo.is-empty .logo__text { display: inline; }

.header-actions { display: flex; align-items: center; gap: 4px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 4px 0 12px;
  font: 600 0.9375rem var(--sans); color: var(--ink);
  background: none; border: 0; cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 20px; height: 9px; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease-out), top .35s var(--ease-out), bottom .35s var(--ease-out);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 3.75px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { bottom: 3.75px; transform: rotate(-45deg); }

/* Mobiilimenüü: täisekraanipaneel, suured seriifsed lingid */
.nav {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 16px var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--paper);
  overflow-y: auto;
}
.js .nav:not(.is-open) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .nav.is-open { animation: navIn .35s var(--ease-out) both; }
}
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.nav__list { display: flex; flex-direction: column; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.nav__link {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 0;
  font: 500 clamp(2.25rem, 1.6rem + 3vw, 3rem)/1 var(--serif);
  letter-spacing: -0.015em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav__link::after { content: "→"; font: 400 1.125rem var(--sans); color: var(--ink-faint); }
.nav__link[aria-current="page"], .nav__link.is-active { color: var(--accent); }

.nav__social { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__social .btn { flex: 1; }
.icon-link {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  color: var(--ink);
  transition: color .25s;
}
.icon-link:hover { color: var(--accent); }
.icon-link svg { width: 20px; height: 20px; }

.header-cta { display: none; }

@media (min-width: 960px) {
  .site-header { background: rgba(246, 243, 239, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .nav-toggle { display: none; }
  .nav, .js .nav:not(.is-open) {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 4px;
    margin-left: auto; padding: 0; background: none; overflow: visible; animation: none;
  }
  .nav__list { flex-direction: row; gap: 4px; border: 0; }
  .nav__link {
    position: relative; display: block; padding: 10px 12px;
    font: 500 0.9375rem var(--sans); letter-spacing: 0; border: 0;
  }
  .nav__link::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform .45s var(--ease-out);
  }
  .nav__link:hover::after, .nav__link[aria-current="page"]::after, .nav__link.is-active::after {
    transform: scaleX(1); transform-origin: left;
  }
  .nav__link[aria-current="page"], .nav__link.is-active { color: var(--ink); }
  .nav__social { gap: 0; }
  .nav__social .btn { display: none; }
  .header-actions { order: 3; }
  .header-cta { display: inline-flex; margin-left: 12px; }
}

/* ---------- Sektsioon ja rööbas ---------- */
.section { padding-block: var(--section); position: relative; }
.section + .section.bg-paper, .bg-paper + .section.bg-paper { border-top: 1px solid var(--line); }

.grid { display: grid; gap: var(--col-gap); }

.section-head { display: grid; gap: 20px; margin-bottom: clamp(3rem, 2rem + 3vw, 5.5rem); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head .lead { max-width: 34ch; }

@media (min-width: 900px) {
  .grid, .section-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .section-head { align-items: start; }
  .section-head > .label { grid-column: 1 / span 3; padding-top: 0.9em; }
  .section-head > h2 { grid-column: 4 / span 6; }
  .section-head > .lead,
  .section-head > .section-head__aside { grid-column: 4 / span 6; }
  .section-head--wide > h2 { grid-column: 4 / -1; }
  .section-head--aside > h2 { grid-column: 4 / span 5; }
  .section-head--aside > .lead { grid-column: 10 / -1; grid-row: 1; align-self: end; font-size: var(--fs-body); }
}

.count {
  font: 500 0.32em var(--sans);
  vertical-align: top;
  margin-left: 0.35em;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.bg-deep .count { color: var(--on-deep-soft); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 1.5rem + 6vw, 8rem) clamp(3.5rem, 2rem + 5vw, 7rem); }
.hero__title {
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.hero__line { display: block; }
@media (min-width: 900px) { .hero__line { white-space: nowrap; } }
.hero__line--em { font-style: italic; color: var(--accent); }
.hero__line--em .dot { color: var(--accent-hot); font-style: normal; }

.hero__foot {
  display: grid; gap: 40px;
  margin-top: clamp(2.5rem, 1.5rem + 4vw, 5.5rem);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__lead { font-size: var(--fs-lead); line-height: 1.5; max-width: 36ch; }
.hero__lead strong { font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }

.toc { list-style: none; padding: 0; display: grid; gap: 2px; font-size: var(--fs-small); }
.toc a {
  display: grid; grid-template-columns: 2.5em 1fr; align-items: baseline;
  padding: 6px 0; text-decoration: none; font-weight: 500;
  transition: color .25s;
}
.toc a:hover { color: var(--accent); }
.toc span { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: var(--fs-label); }

@media (min-width: 900px) {
  .hero__foot { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .toc { grid-column: 1 / span 3; align-self: start; }
  .hero__text { grid-column: 7 / -1; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__line { animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .hero__foot { animation: fade .9s var(--ease-out) .35s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.18em); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Kerimisel ilmumine (ainult suured plokid) ---------- */
.motion [data-reveal] { transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.motion [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(14px); }

/* ---------- Pildikohad ---------- */
.media { position: relative; overflow: hidden; background: var(--paper-tint); }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.media.is-empty { display: grid; place-items: center; min-height: 160px; }
.media.is-empty::after {
  content: attr(data-label);
  padding: 4px 10px; font-size: var(--fs-label); font-weight: 600; color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
}
.bg-deep .media { background: var(--deep-2); }
.bg-tint .media { background: rgba(29, 26, 38, 0.07); }
.bg-deep .media.is-empty::after { color: var(--on-deep-soft); border-color: var(--line-deep); }

/* ---------- Tööd ---------- */
.work-list { display: grid; gap: clamp(3.5rem, 2rem + 5vw, 7rem); }
.work { display: block; text-decoration: none; color: inherit; }
.work__media { aspect-ratio: 2.6 / 1; }
.work__media img { transition: transform 1.1s var(--ease-out), filter .6s; }
.work__meta {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 18px;
  padding-top: 20px;
}
.work__index { font-size: var(--fs-label); font-weight: 600; color: var(--on-deep-soft); font-variant-numeric: tabular-nums; }
.work__name { font-size: var(--fs-h2); transition: color .3s; }
.work__tags { grid-column: 2; font-size: var(--fs-small); color: var(--on-deep-soft); }
.work__go {
  grid-column: 2;
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  font-size: var(--fs-small); font-weight: 600;
}
.work__go svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.work:hover .work__media img { transform: scale(1.03); }
.work:hover .work__name, .work:focus-visible .work__name { color: var(--accent-on-deep); }
.work:hover .work__go svg { transform: translateX(5px); }
.work:focus-visible { outline-offset: 10px; }

@media (min-width: 640px) { .work__media { aspect-ratio: 3 / 1; } }
@media (min-width: 900px) {
  .work-list { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .work { grid-column: 1 / -1; }
  .work:nth-child(even) { grid-column: 4 / -1; }
  .work__media { aspect-ratio: 1231 / 307; }
  .work__meta { grid-template-columns: 3rem minmax(0, 1fr) auto; column-gap: 0; }
  .work__go { grid-column: 3; grid-row: 1; align-self: center; margin: 0; }
}

/* Showreel (mustand, kuni video olemas) */
.showreel { margin-top: clamp(4rem, 3rem + 4vw, 7rem); }
.showreel__frame {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden; padding: 0; border: 0; cursor: pointer;
  background: var(--deep-2); color: var(--on-deep);
}
.showreel__frame[aria-disabled="true"] { cursor: default; }
.showreel__poster { position: absolute; inset: 0; display: grid; grid-template-columns: 1.2fr 1fr 1fr; }
.showreel__poster img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5); opacity: .5; }
.showreel__ui {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: flex-end; gap: 20px;
  padding: clamp(18px, 1rem + 2vw, 40px); text-align: left;
}
.showreel__play {
  display: grid; place-items: center; flex-shrink: 0;
  width: clamp(56px, 3rem + 3vw, 88px); aspect-ratio: 1; border-radius: 50%;
  background: var(--on-deep); color: var(--ink);
  transition: transform .6s var(--ease-out);
}
.showreel__play svg { width: 32%; height: 32%; margin-left: 6%; }
.showreel__frame:not([aria-disabled="true"]):hover .showreel__play { transform: scale(1.06); }
.showreel__title { font: 500 var(--fs-h3)/1.05 var(--serif); }
.showreel__sub { display: block; margin-top: 6px; font: 500 var(--fs-small) var(--sans); color: var(--on-deep-soft); }

.video-dialog { width: min(1200px, 100vw - 32px); max-width: none; padding: 0; border: 0; background: #000; color: #fff; }
.video-dialog::backdrop { background: rgba(14, 12, 20, 0.9); }
.video-dialog video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.video-dialog__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 1.125rem;
}

/* ---------- Teenused: toimetuslikud read ---------- */
.services { display: grid; }
.service {
  display: grid; gap: 22px;
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service__head { display: flex; align-items: baseline; gap: 18px; }
.service__num { font-size: var(--fs-label); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2em; }
.service__name { font-size: clamp(2.75rem, 1.6rem + 5vw, 6rem); line-height: .95; letter-spacing: -0.025em; }
.service__media { aspect-ratio: 16 / 10; }
.service__text { display: grid; gap: 14px; }
.service__lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 34ch; }
.service__fit { color: var(--ink-soft); max-width: 40ch; }
.service__fit strong { color: var(--ink); font-weight: 600; }
.service__lists { display: grid; gap: 28px; }
.service__lists h4 { margin-bottom: 10px; color: var(--ink-soft); font-weight: 500; font-size: var(--fs-label); letter-spacing: 0.02em; }
.service__lists ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.service__lists li { padding-left: 1.1em; position: relative; }
.service__lists li::before { content: "–"; position: absolute; left: 0; color: var(--ink-faint); }
.service__gets li { font-weight: 500; }
.service__includes ul { font-size: var(--fs-small); color: var(--ink-soft); gap: 4px; }
.service__cta { margin-top: 4px; }

@media (min-width: 640px) {
  .service__lists { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .service { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 36px; align-items: start; }
  /* nimi algab sisuveeru joonest (subgrid) */
  .service__head { display: grid; grid-template-columns: subgrid; grid-column: 1 / span 9; align-items: baseline; }
  .service__num { grid-column: 1 / span 3; }
  .service__name { grid-column: 4 / span 6; }
  .service__media { grid-column: 10 / -1; grid-row: 1 / span 3; aspect-ratio: 4 / 5; }
  .service__text { grid-column: 4 / span 6; display: grid; gap: 20px; }
  .service__lists { grid-column: 4 / span 6; }
  .service__cta { grid-column: 4 / span 6; }
  .service__media img { transition: transform 1.1s var(--ease-out); }
  .service:hover .service__media img { transform: scale(1.03); }
}

/* ---------- Meist / meeskond ---------- */
.about__intro { display: grid; gap: 24px; }
.about__intro p { max-width: 42ch; }
.team { display: grid; gap: clamp(48px, 2rem + 4vw, 72px); margin-top: clamp(3rem, 2rem + 4vw, 6rem); }
.member { display: grid; gap: 18px; align-content: start; }
.member__photo { aspect-ratio: 4 / 5; width: 100%; }
.member__photo.media.is-empty { background: var(--deep); }
.member__photo.media.is-empty::after {
  content: attr(data-initials);
  padding: 0; border: 0;
  font: 500 clamp(4rem, 2rem + 6vw, 7rem)/1 var(--serif);
  color: var(--on-deep);
  letter-spacing: -0.02em;
}
.member__body { display: grid; gap: 6px; }
.member__name { font-size: var(--fs-h3); }
.member__role { font-size: var(--fs-small); color: var(--ink-soft); }
.member__bio { color: var(--ink-soft); max-width: 40ch; margin-top: 6px; }
.about__more { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.about__more p { color: var(--ink-soft); font-size: var(--fs-small); }

.team--compact { grid-template-columns: 1fr 1fr; column-gap: var(--col-gap); }
.team--compact .member__name { font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2.25rem); }
.team--compact .member__photo.media.is-empty::after { font-size: clamp(2.5rem, 1.5rem + 5vw, 6rem); }
@media (min-width: 760px) {
  .team { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .member:nth-child(1) { grid-column: 1 / span 5; }
  .member:nth-child(2) { grid-column: 7 / span 5; margin-top: clamp(4rem, 2rem + 8vw, 9rem); }
}
@media (min-width: 900px) {
  .team--compact .member:nth-child(1) { grid-column: 4 / span 4; }
  .team--compact .member:nth-child(2) { grid-column: 9 / span 4; }
  .about__more { padding-left: calc((100% - 11 * var(--col-gap)) / 12 * 3 + 3 * var(--col-gap)); }
}

/* Tööprotsess (staatiline nummerdatud loend) */
.steps { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--line); }
.step { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.step__num { font-size: var(--fs-label); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.step__title { font-size: var(--fs-h3); }
.step__text { color: var(--ink-soft); max-width: 44ch; }
@media (min-width: 900px) {
  .steps { grid-column: 4 / -1; }
  .step { grid-template-columns: 4rem minmax(0, 4fr) minmax(0, 5fr); column-gap: var(--col-gap); align-items: baseline; }
}

/* ---------- Tõendus (mustand) ---------- */
.proof { display: grid; gap: clamp(3rem, 2rem + 4vw, 5rem); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fact { padding: 22px 12px 0 0; display: grid; gap: 6px; align-content: start; }
.fact + .fact { padding-left: 16px; border-left: 1px solid var(--line); }
.fact__value { order: -1; font: 500 clamp(3rem, 1.5rem + 5vw, 6rem)/0.9 var(--serif); font-variant-numeric: tabular-nums; }
.fact__label { font-size: var(--fs-small); color: var(--ink-soft); max-width: 18ch; }

.quote { display: grid; gap: 24px; }
.quote blockquote p { font: 500 clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem)/1.15 var(--serif); letter-spacing: -0.01em; }
.quote blockquote p::before { content: "„"; }
.quote blockquote p::after { content: "“"; }
.quote figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-small); color: var(--ink-soft); }
.quote figcaption strong { color: var(--ink); font-weight: 600; }
.bg-deep .quote figcaption { color: var(--on-deep-soft); }
.bg-deep .quote figcaption strong { color: var(--on-deep); }

@media (min-width: 900px) {
  .proof { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .proof__quote { grid-column: 4 / span 8; }
  .proof__facts { grid-column: 4 / -1; }
}

/* ---------- Mustandid ----------
   [data-draft]  avalikult peidus; nähtav, kui URL-is on ?mustand
   .todo         täitmist vajav koht (joon ja silt ainult mustandivaates)
   [data-public-note] avalik selgitus, mis kustutatakse, kui sisu valmib */
html:not(.show-drafts) [data-draft] { display: none !important; }
.show-drafts .todo { position: relative; outline: 1px dashed var(--accent-hot); outline-offset: 6px; }
.show-drafts .todo::before {
  content: "Täitmiseks"; position: absolute; top: -22px; right: -6px; z-index: 2;
  padding: 2px 8px; font: 600 0.6875rem/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--accent-hot);
}
.show-drafts .bg-deep .todo { outline-color: var(--accent-hot-on-deep); }
.todo-text { color: var(--ink-soft); font-style: italic; }
.bg-deep .todo-text { color: var(--on-deep-soft); }
.show-drafts body::after {
  content: "Mustandivaade: peidetud sisu on nähtav";
  position: fixed; left: 12px; bottom: 12px; z-index: 90;
  padding: 8px 12px; font: 600 0.8125rem var(--sans); color: #fff; background: var(--accent-hot);
}

/* ---------- KKK ---------- */
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 44px; padding: 22px 0;
  font: 500 clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem)/1.2 var(--serif);
  cursor: pointer; list-style: none;
  transition: color .25s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px;
  background: currentColor; transition: transform .45s var(--ease-out);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0); }
.faq__item summary:hover { color: var(--accent); }
.faq__answer { padding: 0 48px 26px 0; color: var(--ink-soft); max-width: 60ch; }
@supports (interpolate-size: allow-keywords) {
  .faq__item { interpolate-size: allow-keywords; }
  .faq__item::details-content { height: 0; overflow: hidden; transition: height .45s var(--ease-out), content-visibility .45s allow-discrete; }
  .faq__item[open]::details-content { height: auto; }
}
@media (min-width: 900px) {
  .faq__list { grid-column: 4 / -1; }
}

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: clamp(3rem, 2rem + 4vw, 5rem); }
.contact__title { font-size: var(--fs-h1); line-height: .95; letter-spacing: -0.025em; }
.contact__title em { color: var(--accent-on-deep); }
.contact__intro { display: grid; gap: 24px; align-content: start; }
.contact__steps { display: grid; gap: 10px; list-style: none; padding: 0; counter-reset: c; margin-top: 8px; }
.contact__steps li { display: grid; grid-template-columns: 2.25em 1fr; counter-increment: c; color: var(--on-deep-soft); }
.contact__steps li::before { content: counter(c, decimal-leading-zero); font-size: var(--fs-label); font-weight: 600; color: var(--accent-on-deep); padding-top: 0.3em; }
.contact__details { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 8px; }

/* Vorm tumedal pinnal: jooned, mitte kaardid */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.form[hidden] { display: none; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: var(--fs-small); font-weight: 600; padding: 0; }
.field .hint { font-weight: 400; color: var(--on-deep-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 0;
  font: 400 1.125rem/1.4 var(--sans); color: var(--on-deep);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(244, 240, 246, 0.35);
  border-radius: 0;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:hover, .field textarea:hover { border-bottom-color: rgba(244, 240, 246, 0.6); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent-on-deep); box-shadow: 0 1px 0 var(--accent-on-deep); }
.field [aria-invalid="true"] { border-bottom-color: var(--error-on-deep); }
.field__error { font-size: 0.875rem; color: var(--error-on-deep); font-weight: 600; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 16px 8px 14px;
  font-size: 0.9375rem; font-weight: 500;
  border: 1px solid var(--line-deep);
  transition: background-color .25s, border-color .25s, color .25s;
}
.chip span::before { content: ""; width: 10px; height: 10px; border: 1px solid currentColor; transition: background-color .2s; }
.chip:hover span { border-color: var(--on-deep-soft); }
.chip input:checked + span { background: var(--on-deep); color: var(--ink); border-color: var(--on-deep); }
.chip input:checked + span::before { background: var(--brand-magenta); border-color: var(--brand-magenta); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-on-deep); outline-offset: 2px; }

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

.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 4px; }
.form__privacy { font-size: 0.875rem; color: var(--on-deep-soft); flex-basis: 100%; }
.form__status { font-size: var(--fs-small); font-weight: 600; flex-basis: 100%; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--error-on-deep); }
.form__status.is-pending { color: var(--on-deep-soft); }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__arrow { animation: spin 0.9s linear infinite; }
.btn.is-loading .btn__arrow svg { display: none; }
.btn.is-loading .btn__arrow::before {
  content: ""; display: block; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { display: grid; gap: 16px; align-content: start; padding-top: 8px; border-top: 1px solid var(--line-deep); }
.form-success[hidden] { display: none; }
.form-success h3 { font-size: var(--fs-h3); padding-top: 16px; }
.form-success p { color: var(--on-deep-soft); }
.form-success .btn { justify-self: start; }

@media (min-width: 640px) {
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .field--full, .form__footer { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .contact__intro { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
  .contact__form-wrap { grid-column: 7 / -1; padding-top: 0.75rem; }
}

/* ---------- Juhtumi leht (korduvkasutatav mall) ---------- */
.case-hero { padding-block: clamp(2rem, 1rem + 3vw, 4rem) clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: var(--fs-small); font-weight: 500; text-decoration: none; color: var(--ink-soft);
  margin-bottom: clamp(1.5rem, 1rem + 3vw, 4rem);
}
.back-link:hover { color: var(--ink); }
.case-hero__grid { display: grid; gap: 20px; }
.case-hero__title { font-size: var(--fs-display); line-height: .92; letter-spacing: -0.025em; }
.case-hero__summary { font-size: var(--fs-lead); line-height: 1.45; max-width: 36ch; }
.case-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin-top: clamp(1.5rem, 1rem + 2vw, 3rem); padding-top: 20px; border-top: 1px solid var(--line); }
.case-meta dt { font-size: var(--fs-label); font-weight: 600; color: var(--ink-soft); }
.case-meta dd { margin-top: 4px; font-weight: 500; }
@media (min-width: 900px) {
  .case-hero__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .case-hero__grid > .label { grid-column: 1 / span 3; padding-top: 1.2em; }
  .case-hero__title { grid-column: 4 / -1; }
  .case-hero__summary { grid-column: 4 / span 6; }
  .case-meta { grid-column: 4 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.case-cover { aspect-ratio: 2.6 / 1; }
@media (min-width: 640px) { .case-cover { aspect-ratio: 3 / 1; } }
@media (min-width: 900px) { .case-cover { aspect-ratio: 1231 / 307; } }

.case-pending { display: grid; gap: 16px; }
.case-pending p { font-size: var(--fs-lead); line-height: 1.45; max-width: 40ch; color: var(--ink-soft); }
.case-pending__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
@media (min-width: 900px) { .case-pending { grid-column: 4 / -1; } }

.case-section { display: grid; gap: 18px; }
.case-section + .case-section { margin-top: clamp(3rem, 2rem + 4vw, 6rem); }
.case-section h2 { font-size: var(--fs-h3); }
.case-section p { color: var(--ink-soft); max-width: 62ch; }
.case-section__body { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .case-section { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .case-section > .label { grid-column: 1 / span 3; padding-top: 0.7em; }
  .case-section__body { grid-column: 4 / span 7; }
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; font-weight: 500; }

/* Galerii: .case-gallery__item--wide võtab terve rea */
.case-gallery { display: grid; gap: var(--col-gap); }
.case-gallery__item { display: grid; gap: 10px; }
.case-gallery__item .media { aspect-ratio: 4 / 3; }
.case-gallery__item--wide .media { aspect-ratio: 16 / 9; }
.case-gallery figcaption { font-size: var(--fs-small); color: var(--ink-soft); }
@media (min-width: 760px) {
  .case-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-gallery__item--wide { grid-column: 1 / -1; }
}

.case-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line-deep); }
.case-result { padding: 22px 16px 0 0; display: grid; gap: 6px; }
.case-result + .case-result { padding-left: 16px; border-left: 1px solid var(--line-deep); }
.case-result__value { font: 500 clamp(2.75rem, 1.5rem + 3vw, 4.75rem)/1 var(--serif); }
.case-result__label { font-size: var(--fs-small); color: var(--on-deep-soft); }
@media (min-width: 900px) { .case-results { grid-column: 4 / -1; } }

.next-case { display: grid; gap: 10px; text-decoration: none; padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-top: 1px solid var(--line); }
.next-case__name { font: 500 var(--fs-h1)/1 var(--serif); letter-spacing: -0.02em; transition: color .3s; }
.next-case__name span { display: inline-block; transition: transform var(--dur) var(--ease-out); }
.next-case:hover .next-case__name { color: var(--accent); }
.next-case:hover .next-case__name span { transform: translateX(10px); }
@media (min-width: 900px) {
  .next-case { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: baseline; }
  .next-case > .label { grid-column: 1 / span 3; }
  .next-case__name { grid-column: 4 / -1; }
}

/* ---------- Meist leht ---------- */
.page-hero { padding-block: clamp(3rem, 1.5rem + 6vw, 8rem) clamp(3rem, 2rem + 4vw, 6rem); }
.page-hero__title { font-size: var(--fs-h1); line-height: .96; letter-spacing: -0.02em; max-width: 14ch; }
.page-hero__text { display: grid; gap: 20px; margin-top: clamp(2rem, 1rem + 3vw, 4rem); }
.page-hero__text p { max-width: 44ch; }
@media (min-width: 900px) {
  .page-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .page-hero__grid > .label { grid-column: 1 / span 3; padding-top: 1em; }
  .page-hero__title { grid-column: 4 / -1; }
  .page-hero__text { grid-column: 7 / -1; }
}

/* ---------- Jalus ---------- */
.site-footer { padding-block: clamp(4rem, 3rem + 4vw, 7rem) 28px; border-top: 1px solid var(--line); background: var(--paper); }
.footer__cta { display: grid; gap: 24px; padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); margin-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); border-bottom: 1px solid var(--line); }
.footer__cta-title { font: 500 var(--fs-h2)/1 var(--serif); letter-spacing: -0.02em; max-width: 14ch; }
@media (min-width: 900px) { .footer__cta { grid-template-columns: 1fr auto; align-items: end; } }

.footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.footer__brand { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; }
.footer__brand .logo img { height: 80px; }
.footer__tagline { font-size: var(--fs-small); color: var(--ink-soft); max-width: 28ch; }
.footer__col h3 { margin-bottom: 14px; font: 600 var(--fs-label) var(--sans); letter-spacing: 0.02em; color: var(--ink); }
.footer__col ul { display: grid; gap: 2px; list-style: none; padding: 0; }
.footer__col a { display: inline-block; padding: 5px 0; text-decoration: none; font-size: var(--fs-small); color: var(--ink-soft); transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); }
  .footer__brand { grid-column: auto; }
}
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--ink-soft);
}
.footer__bottom a { font-weight: 500; color: var(--ink); text-underline-offset: 4px; }

/* ---------- Vähendatud liikumine ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.show-drafts [data-public-note] { display: none; }
