/* NO SURRENDER: baas, tüpograafiarollid ja sektsiooniraam. Ainult tokenid (tokens.css); toorväärtusi siin ei ole.
   Sektsioon valib rolli klassi (.t-*) ja raami klassi, mitte ei sea ise font-size / padding / margin väärtusi. */

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

html {
  scrollbar-gutter: stable;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: var(--w-regular);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  cursor: default;
}

:where(h1, h2, h3, p, figure, dl, dd, ul, ol) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
:where(h1, h2, h3) { font-weight: var(--w-medium); }
:where(img) { display: block; max-width: 100%; }
:where(button) { font: inherit; color: inherit; cursor: pointer; }

/* AI_KULDREEGLID §13: nupul, lingil ja [role=button]-il pole brauseri fookusvisuaali */
button:focus, a:focus, [role="button"]:focus { outline: none; box-shadow: none; }

/* Brand-aware valik */
::selection { background: var(--ink); color: var(--ground); text-shadow: none; }
::-moz-selection { background: var(--ink); color: var(--ground); text-shadow: none; }

/* Üks kerimisriba kõigile kerivatele kihtidele */
* { scrollbar-width: thin; scrollbar-color: var(--soft) var(--surface); }
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: auto; }
  ::-webkit-scrollbar { width: var(--scrollbar-w); height: var(--scrollbar-w); }
  ::-webkit-scrollbar-track { background: var(--surface); }
  ::-webkit-scrollbar-thumb { min-height: var(--hit); min-width: var(--hit); border: var(--s-0) solid var(--surface); border-radius: 999px; background: var(--soft); background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: var(--ink); }
}

/* ---------- Rollid: font, kaal, suurus, reavahe, tähevahe koos ---------- */
.t-name   { font-family: var(--f-name); font-weight: var(--w-bold);    font-size: var(--t-name);   line-height: var(--lh-name);   letter-spacing: var(--ls-0); }
.t-name-fit { font-family: var(--f-hero); font-weight: var(--w-bold); font-size: var(--t-name-fit); line-height: var(--lh-name); letter-spacing: var(--ls-0); }
.fit-box  { container-type: inline-size; }
.nowrap   { white-space: nowrap; }
.t-sub    { font-family: var(--f-head); font-weight: var(--w-medium);  font-size: var(--t-sub);    line-height: var(--lh-sub);    letter-spacing: var(--ls-0); }
.t-h2     { font-family: var(--f-head); font-weight: var(--w-medium);  font-size: var(--t-h2);     line-height: var(--lh-tight);  letter-spacing: var(--ls-0); }
.t-h3     { font-family: var(--f-head); font-weight: var(--w-medium);  font-size: var(--t-h3);     line-height: var(--lh-h3);     letter-spacing: var(--ls-0); }
.t-lead   { font-family: var(--f-body); font-weight: var(--w-light);   font-size: var(--t-lead);   line-height: var(--lh-lead);   letter-spacing: var(--ls-0); }
.t-body   { font-family: var(--f-body); font-weight: var(--w-regular); font-size: var(--t-body);   line-height: var(--lh-body);   letter-spacing: var(--ls-0); }
.t-note   { font-family: var(--f-body); font-weight: var(--w-regular); font-size: var(--t-note);   line-height: var(--lh-note);   letter-spacing: var(--ls-0); }
.t-fine   { font-family: var(--f-body); font-weight: var(--w-regular); font-size: var(--t-fine);   line-height: var(--lh-note);   letter-spacing: var(--ls-0); }
.t-label  { font-family: var(--f-mono); font-weight: var(--w-medium);  font-size: var(--t-label);  line-height: var(--lh-label);  letter-spacing: var(--ls-label); text-transform: uppercase; }
.t-figure { font-family: var(--f-name); font-weight: var(--w-medium);  font-size: var(--t-figure); line-height: var(--lh-figure); letter-spacing: var(--ls-0); }
.t-price  { font-family: var(--f-name); font-weight: var(--w-medium);  font-size: var(--t-price);  line-height: var(--lh-figure); letter-spacing: var(--ls-0); }
.t-button { font-family: var(--f-mono); font-weight: var(--w-medium);  font-size: var(--t-button); line-height: var(--lh-figure); letter-spacing: var(--ls-label); text-transform: uppercase; }
.t-menu   { font-family: var(--f-head); font-weight: var(--w-medium);  font-size: var(--t-menu);   line-height: var(--lh-sub);    letter-spacing: var(--ls-0); }

.is-soft { color: var(--soft); }
.measure { max-width: var(--measure); }
.measure-lead { max-width: var(--measure-lead); }

/* ---------- Sektsiooniraam ---------- */
.sec { padding-block: var(--sec); padding-inline: var(--pad-x); }
.sec--flush-top { padding-top: 0; }          /* sama tooniga järgmine sektsioon: ainult üks --sec */
.sec--flush-bottom { padding-bottom: 0; }
.sec--surface { background: var(--surface); }
.sec--bleed { padding-inline: 0; }        /* rõhtne rada ulatub ekraani servani; sisemised osad saavad oma --pad-x */

.cols { display: grid; grid-template-columns: var(--col-title) var(--col-main); column-gap: var(--gutter); row-gap: var(--gap); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.head-gap { margin-bottom: var(--head-gap); }      /* pealkiri → plokk (pealkirja all) */
.head-gap-top { margin-top: var(--head-gap); }     /* sama vahe, kui plokk tuleb teksti alla */
.title-lead { margin-top: var(--title-lead); }     /* pealkiri → oma lõik */
.rule-top { border-top: var(--hair) solid var(--rule); }

/* ---------- Fotoraam ---------- */
.photo { overflow: clip; background: var(--surface); }
.photo > img { width: 100%; height: 100%; object-fit: cover; }
.r-landscape { aspect-ratio: var(--r-landscape); }
.r-wide { aspect-ratio: var(--r-wide); }
.r-cinema { aspect-ratio: var(--r-cinema); }
.r-portrait { aspect-ratio: var(--r-portrait); }
.r-square { aspect-ratio: var(--r-square); }

/* ---------- Nupp: ainult geomeetria. Pind, hover ja stiil otsustatakse CTA demos (Faas 2). ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--btn-h); padding-inline: var(--btn-px);
  border: var(--hair) solid currentColor; background: transparent; color: inherit;
  transition: color var(--dur-ui) var(--ease-ui), background-color var(--dur-ui) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--ink); color: var(--ground); } }   /* üks hover kõigile .btn nuppudele (hero, closing, menüü, FAQ, spec, päring) */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
