/* LÄIGE · "Valgusvihk". A near-black studio and one warm light that the visitor moves.
   Every photo is dark until the light reaches it; hairlines catch it like a body crease. */

/* ---------- Fonts (self-hosted, latin + latin-ext; weights narrowed in tools/laige-assets.mjs) ---------- */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 300 400;
  src: url(fonts/unbounded-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 300 400;
  src: url(fonts/unbounded-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 600;
  src: url(fonts/schibsted-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 600;
  src: url(fonts/schibsted-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

/* ---------- Tokens ---------- */
:root {
  --studio: #0B0C0D;
  --studio-2: #111315;
  --ink: #E8EAEC;
  --ink-2: #9AA1A8;
  --warm: #F4EBDD;
  --warm-hi: #FFF8EC;
  --hair: rgba(232, 234, 236, 0.13);
  --hair-strong: rgba(232, 234, 236, 0.26);

  --display: "Unbounded", "Arial", sans-serif;
  --text: "Schibsted Grotesk", "Helvetica Neue", "Arial", sans-serif;

  /* Three text sizes; the display sizes are set where they are used (h1, h2, --d-m, --d-s). */
  --t-s: 14px;
  --t: 16px;
  --t-l: 18px;
  --d-m: clamp(1.625rem, 2.5vw, 2.5rem);
  --d-s: clamp(17px, 1.42vw, 21px);

  /* One 12-column grid under the whole page. */
  --gutter: max(clamp(20px, 4.4vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --max: 1680px;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  --gap: 14px;
  --sp: clamp(88px, 13vh, 140px);

  --demo: 44px;          /* the Veebirätsep bar above the page */
  --head: 72px;          /* the header once it is pinned */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: dark;
}
html.vr-closed { --demo: 0px; }

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

html {
  background: var(--studio);
  scrollbar-color: #2A2E32 var(--studio);
  -webkit-text-size-adjust: 100%;
}
/* A section heading never lands under the demo bar plus the pinned header. */
html:not(.vr-closed), html.vr-closed { scroll-padding-top: calc(var(--demo) + var(--head)); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--studio);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--warm);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--warm); color: var(--studio); }

img { display: block; max-width: none; }
a { color: inherit; text-decoration: none; }
a, button, summary, select { touch-action: manipulation; }
button, summary, .tile, .nav a, .wordmark, .pack__go { user-select: none; -webkit-user-select: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }

:focus-visible {
  outline: 1.5px solid var(--warm);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 1100;
  padding: 10px 14px;
  background: var(--warm);
  color: var(--studio);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

.page { position: relative; }

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

/* ---------- Buttons and links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 0;
  font-family: var(--text);
  font-weight: 560;
  letter-spacing: 0.005em;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  user-select: none;
}
.btn:active { transform: scale(0.97); }

.btn--solid {
  height: 54px;
  padding: 0 28px;
  font-size: var(--t);
  background: var(--warm);
  color: var(--studio);
  overflow: hidden;
  isolation: isolate;
}
/* A narrow highlight crosses the button on hover: the same light, at button scale. */
.btn--solid::before {
  content: "";
  position: absolute;
  inset: -2px auto -2px 0;
  width: 46%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  transform: translateX(-120%) skewX(-18deg);
  z-index: -1;
  pointer-events: none;
}
.btn--solid span { position: relative; }

/* Looks 40px tall; the tap area is 48px. */
.btn--line::after { content: ""; position: absolute; inset: -5px 0; }
.btn--line {
  height: 40px;
  padding: 0 18px;
  font-size: var(--t-s);
  color: var(--warm);
  border: 1px solid rgba(244, 235, 221, 0.42);
}

@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: var(--warm-hi); }
  .btn--solid:hover::before {
    transform: translateX(260%) skewX(-18deg);
    transition: transform 700ms var(--ease-out);
  }
  .btn--line:hover { border-color: var(--warm); background: rgba(244, 235, 221, 0.07); }
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: var(--t);
  font-weight: 500;
  color: var(--ink);
}
.link-quiet svg { flex: none; transition: transform 200ms var(--ease-out), color 200ms ease; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .link-quiet:hover svg { transform: translateX(4px); color: var(--ink); }
}

/* ---------- Hairlines that catch the light ----------
   script.js sets --gx (pointer x inside the element) and --ga / --gb (how near the pointer is to the top / bottom line). */
.rule, .rule-end { position: relative; }
.rule::before, .rule-end::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
}
.rule::before {
  top: 0;
  background: radial-gradient(300px 40px at var(--gx, 0px) 50%, rgba(255, 248, 236, var(--ga, 0)), rgba(255, 248, 236, 0)), var(--hair);
}
.rule-end::after {
  bottom: 0;
  background: radial-gradient(300px 40px at var(--gx, 0px) 50%, rgba(255, 248, 236, var(--gb, 0)), rgba(255, 248, 236, 0)), var(--hair);
}

/* ---------- Header ---------- */
.head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 92px;
  padding-inline: var(--edge);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  box-shadow: 0 1px 0 transparent;
  transition: height 240ms var(--ease-out), background-color 240ms ease, box-shadow 240ms ease;
}
/* Once it has scrolled out of view it comes back as a compact bar on the way up, and stays through a menu jump. */
.head.is-pinned {
  position: fixed;
  top: var(--demo);
  height: var(--head);
  background: var(--studio);
  box-shadow: 0 1px 0 var(--hair);
}
.head.is-pinned.is-live { transition: transform 280ms var(--ease-out), height 240ms var(--ease-out), background-color 240ms ease, box-shadow 240ms ease; }
.head.is-pinned.is-away { transform: translateY(calc(-100% - var(--demo) - 2px)); }

.wordmark {
  justify-self: start;
  font-family: var(--display);
  font-weight: 380;
  font-size: 15px;
  letter-spacing: 0.52em;
  margin-right: -0.52em;
  line-height: 1;
  padding: 15px 0;
  color: var(--ink);
}

.nav ul { display: flex; gap: clamp(22px, 2.6vw, 40px); }
.nav a {
  position: relative;
  display: inline-block;
  padding: 12px 0;
  font-size: var(--t-s);
  letter-spacing: 0.01em;
  color: var(--ink-2);
  transition: color 200ms ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: scaleX(1); }
}

.head-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 28px;
}
.head-phone {
  padding: 12px 0;
  font-size: var(--t-s);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .head-phone:hover { color: var(--ink); } }

.nav .nav__phone { display: none; }      /* shown only in the phone menu */
html.menu-open { overflow: hidden; }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -13px;      /* the icon, not the tap area, sits on the page edge */
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.menu-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.menu-btn__icon { position: relative; width: 18px; height: 10px; }
.menu-btn__icon i {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 220ms var(--ease-out);
}
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { bottom: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  --vh: 100vh;
  --hh: clamp(560px, calc(var(--vh) - var(--demo)), 1000px);
  /* Used by the children, where cqw is the hero's own width (no scrollbar in it). */
  --e: max(var(--gutter), calc((100cqw - var(--max)) / 2));
  --title: clamp(2.4rem, min(6.6cqw, calc(var(--hh) * 0.1155)), 6rem);
  --copy-b: clamp(48px, calc(var(--hh) * 0.072), 72px);
  /* The wheels stand on a line just above the headline, whatever the screen height. */
  --wheel: calc(var(--hh) - var(--copy-b) - var(--title) * 2.08 - 28px);
  position: relative;
  height: var(--hh);
  overflow: clip;
  background: var(--studio);
  container-type: inline-size;
  view-transition-name: demo-laige;
}
@supports (height: 100svh) { .hero { --vh: 100svh; } }

/* The stage holds two copies of the photo. The dark copy fills the stage. The lit copy lives
   inside .lamp, a feathered ellipse. Moving the light = translating .lamp and counter-translating
   the image inside it, so each frame is two compositor transforms and no repaint. */
.stage {
  /* The car (0.093 to 0.9067 of the photo) runs from the left page edge to the right one. On a low screen it
     shrinks to stay clear of the header, and stays centred. */
  --pw: min(calc((100cqw - 2 * var(--e)) * 1.229), calc((var(--wheel) - 92px) / 0.215));
  --px: calc((100cqw - var(--pw) * 0.8137) / 2 - var(--pw) * 0.093);
  --py: calc(var(--wheel) - var(--pw) * 0.4777);
  /* light: radii and resting centre (front door shoulder) */
  --rx: calc(var(--pw) * 0.3036);
  --ry: calc(var(--pw) * 0.1964);
  --lx: calc(var(--px) + var(--pw) * 0.62);
  --ly: calc(var(--py) + var(--pw) * 0.3125);
  --floor: calc(var(--wheel) - var(--hh) * 0.12);
  position: absolute;
  inset: 0;
  overflow: clip;
  touch-action: pan-y;
  background: var(--studio);
  isolation: isolate;
}
/* Floor fades into the studio so the type has a quiet ground. */
.stage::after {
  content: "";
  position: absolute;
  inset: var(--floor) 0 0 0;
  background: linear-gradient(to bottom, rgba(11, 12, 13, 0) 0%, rgba(11, 12, 13, 0.55) 34%, rgba(11, 12, 13, 0.9) 62%, var(--studio) 86%);
  pointer-events: none;
}

.stage__img {
  position: absolute;
  width: var(--pw);
  height: auto;
  left: var(--px);
  top: var(--py);
  user-select: none;
  pointer-events: none;
}
/* Both copies are blended with "lighten" against the studio colour: the photo's pure black
   becomes exactly #0B0C0D, so the photo has no visible box and the light never darkens the room. */
.stage__img--dark {
  filter: brightness(0.21) contrast(1.1);
  mix-blend-mode: lighten;
}
.stage__img--lit {
  filter: brightness(1.6) contrast(1.24) sepia(0.12);
  transform: translate3d(calc(var(--rx) - var(--lx)), calc(var(--ry) - var(--ly)), 0);
  will-change: transform;
}

.lamp {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--rx) * 2);
  height: calc(var(--ry) * 2);
  transform: translate3d(calc(var(--lx) - var(--rx)), calc(var(--ly) - var(--ry)), 0);
  pointer-events: none;
}
.stage .lamp {
  will-change: transform, opacity;
  mix-blend-mode: lighten;
  /* a tight core inside a wide, feathered falloff */
  -webkit-mask-image:
    radial-gradient(17% 17% at 50% 50%, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%),
    radial-gradient(50% 50% at 50% 50%, #000 0%, rgba(0,0,0,.9) 12%, rgba(0,0,0,.7) 28%, rgba(0,0,0,.45) 46%, rgba(0,0,0,.22) 64%, rgba(0,0,0,.07) 82%, transparent 100%);
  mask-image:
    radial-gradient(17% 17% at 50% 50%, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%),
    radial-gradient(50% 50% at 50% 50%, #000 0%, rgba(0,0,0,.9) 12%, rgba(0,0,0,.7) 28%, rgba(0,0,0,.45) 46%, rgba(0,0,0,.22) 64%, rgba(0,0,0,.07) 82%, transparent 100%);
}

/* Touch screens only: says the light can be dragged. */
.stage__hint {
  position: absolute;
  right: var(--e);
  top: 104px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-s);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
  opacity: 0;
  z-index: 2;
  transition: opacity 600ms ease;
  pointer-events: none;
}
.stage__hint.is-on { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .stage__hint { display: none; } }

.hero__copy {
  position: absolute;
  z-index: 5;
  left: var(--e);
  right: var(--e);
  bottom: var(--copy-b);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap);
  pointer-events: none;
}
.hero__copy a { pointer-events: auto; }

.hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: var(--title);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero__title .line {
  display: block;
  overflow: clip;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.hero__title .line > span { display: block; }

/* The aside starts on the grid's ninth column, like every note below it. */
.hero__aside {
  flex: none;
  width: calc((100cqw - 2 * var(--e) - 11 * var(--gap)) / 3 + 3 * var(--gap));
  padding-bottom: 4px;
}
.hero__lede {
  font-size: var(--t-l);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
  text-wrap: pretty;
}
.hero__actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.hero .link-quiet { min-height: 54px; }

/* Unbounded's capitals carry up to 0.085em of space on their left. --lsb (set per heading, for its first
   letter) pulls the heading back so its ink, not its box, stands on the page edge. */
.hero__title .line > span, h2, .pack__name { margin-left: calc(var(--lsb, 0em) * -1); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: var(--sp) var(--edge) 0;
}

h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
  /* The box ends at the capitals, so a heading's top meets the top of the column beside it. */
  text-box: trim-both cap alphabetic;
}

.sec-head { align-items: end; align-items: last baseline; row-gap: 20px; }
.sec-head h2 { grid-column: 1 / span 8; }
.note {
  grid-column: 9 / -1;
  max-width: 44ch;
  color: var(--ink-2);
  text-wrap: pretty;
}
.for-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .for-fine { display: none; }
  .for-touch { display: inline; }
}

.lede {
  font-size: var(--t-l);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Photos under the light ----------
   Same build as the hero: a dim copy, and a bright copy inside a lamp that moves on transforms. */
.lit {
  /* read by the children, where cqw / cqh are this frame's size */
  --rx: 80cqw;
  --ry: 55cqh;
  --lx: 50cqw;
  --ly: 42cqh;
  position: relative;
  display: block;
  overflow: clip;
  border-radius: 3px;
  background: var(--studio);
  container-type: size;
  isolation: isolate;
}
.lit__dark, .lit__lit {
  position: absolute;
  left: 0;
  top: 0;
  width: 100cqw;
  height: 100cqh;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}
/* "lighten" against the studio colour, as in the hero: a photo's black is the room's black, so no box shows. */
.lit__dark { filter: brightness(0.27) contrast(1.08) saturate(0.3); mix-blend-mode: lighten; }
.lit__lit {
  filter: brightness(1.2) contrast(1.16) saturate(0.55) sepia(0.08);
  transform: translate3d(calc(var(--rx) - var(--lx)), calc(var(--ry) - var(--ly)), 0);
}
.lit .lamp {
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, rgba(0,0,0,.8) 22%, rgba(0,0,0,.45) 48%, rgba(0,0,0,.15) 72%, transparent 100%);
  mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, rgba(0,0,0,.8) 22%, rgba(0,0,0,.45) 48%, rgba(0,0,0,.15) 72%, transparent 100%);
}
/* With script.js the light is off until the visitor brings it; without it every photo stays lit at rest. */
html.js .lit .lamp { opacity: 0; transition: opacity 520ms ease; }
/* Photos without a label keep a low light on their best part; it swings to the pointer and back. */
html.js .lit--rest .lamp { opacity: 0.45; }
html.js .lit.is-lit .lamp { opacity: 1; transition: opacity 240ms var(--ease-out); }
.lit.is-lit .lamp, .lit.is-lit .lit__lit { will-change: transform; }

/* ---------- Teenused ---------- */
.tiles { margin-top: 52px; row-gap: var(--gap); }
.tiles > li { grid-column: span 3; }

.tile {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--hair);
  transition: border-color 300ms ease;
}
/* Scrim keeps the label legible wherever the light is. */
.tile::after {
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to bottom, transparent, rgba(11, 12, 13, 0.82));
  pointer-events: none;
}
.tile.is-lit { border-color: var(--hair-strong); }

.tile__text {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tile__name {
  font-family: var(--display);
  font-weight: 380;
  font-size: var(--d-s);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tile__price {
  font-size: var(--t-s);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.tile__arrow {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  color: var(--ink-2);
  transition: transform 260ms var(--ease-out), color 260ms ease;
}
.tile.is-lit .tile__arrow { color: var(--warm); transform: translate(2px, -2px); }
.tile:focus-visible { outline-offset: 3px; }

/* ---------- Paketid ---------- */
.packs { margin-top: 52px; }
.pack {
  position: relative;
  padding-block: 40px;
  align-items: start;
  row-gap: 20px;
}
.pack__name, .pack__price {
  font-family: var(--display);
  font-weight: 300;
  font-size: var(--d-m);
  line-height: 1;
  letter-spacing: -0.02em;
  text-box: trim-both cap alphabetic;
}
.pack__name { grid-column: 1 / span 4; grid-row: 1; overflow-wrap: anywhere; hyphens: auto; transition: color 240ms ease; }
.pack__list {
  grid-column: 5 / span 4;
  grid-row: 1 / span 2;
  color: var(--ink-2);
  text-box: trim-start cap alphabetic;
}
.pack__list li + li { margin-top: 4px; }
.pack__price {
  grid-column: 9 / -1;
  grid-row: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pack__price span {
  font-family: var(--text);
  font-weight: 400;
  font-size: var(--t-s);
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-right: 0.35em;
}
.pack__go {
  grid-column: 9 / -1;
  grid-row: 2;
  justify-self: start;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-block: -11px -10px;      /* the label, not the 44px tap area, sits on the last list line */
  font-weight: 500;
}
.pack__go svg { flex: none; color: var(--ink-2); transition: transform 200ms var(--ease-out), color 200ms ease; }
/* The whole row books the package. */
.pack__go::after { content: ""; position: absolute; inset: 0; }
.pack__go:focus-visible { outline: none; }
.pack:has(.pack__go:focus-visible) { outline: 1.5px solid var(--warm); outline-offset: 8px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
  .pack:hover .pack__name { color: var(--warm-hi); }
  .pack:hover .pack__go svg { transform: translateX(4px); color: var(--ink); }
}

/* ---------- Tööd ---------- */
.works { margin-top: 52px; row-gap: var(--gap); }
.work { grid-column: span 4; }
.work--wide { grid-column: span 8; }
.work .lit {
  --rx: clamp(220px, 27vw, 440px);
  --ry: calc(var(--rx) * 0.72);
  height: 100%;
}
.work--wide .lit { height: auto; aspect-ratio: 16 / 9; }
/* the gallery is monochrome; its light is stronger so there is more to find */
.work .lit__lit { filter: brightness(1.5) contrast(1.14) sepia(0.1); }

/* ---------- Two-part sections: heading on the left third, content on the rest ---------- */
.split { align-items: start; }
.split__head { grid-column: 1 / span 4; }
.split__body { grid-column: 5 / -1; }
.split__head .lede { margin-top: 32px; max-width: 30ch; }
.split__head .lede + p { margin-top: 16px; max-width: 38ch; color: var(--ink-2); }

.about-photo {
  --rx: clamp(220px, 27vw, 440px);
  --ry: calc(var(--rx) * 0.72);
  --lx: 58cqw;
  --ly: 46cqh;
  aspect-ratio: 3 / 2;
}

/* ---------- KKK ---------- */
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: var(--t-l);
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  transition: color 200ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline-offset: 6px; }
.faq__mark { position: relative; flex: none; width: 14px; height: 14px; color: var(--ink-2); }
.faq__mark::before, .faq__mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6.5px;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: transform 240ms var(--ease-out);
}
.faq__mark::after { transform: rotate(90deg); }
details[open] .faq__mark::after { transform: rotate(0deg); }
.faq__a { padding: 0 38px 28px 0; max-width: 64ch; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .faq summary:hover { color: var(--warm-hi); }
  .faq summary:hover .faq__mark { color: var(--warm-hi); }
}
/* Opens and closes smoothly where the browser can animate to the content's own height. */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq details { interpolate-size: allow-keywords; }
    .faq details::details-content {
      block-size: 0;
      overflow-y: clip;
      transition: block-size 240ms var(--ease-out), content-visibility 240ms allow-discrete;
    }
    .faq details[open]::details-content { block-size: auto; }
  }
}

/* ---------- Broneeri aeg ---------- */
.contact-list { margin-top: 28px; }
.contact-list li { color: var(--ink-2); }
.contact-list a {
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--t-l);
  color: var(--ink);
}
.contact-list li:last-child { display: flex; align-items: center; min-height: 44px; font-size: var(--t-l); }
@media (hover: hover) and (pointer: fine) {
  .contact-list a:hover, .foot a:hover { color: var(--warm-hi); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
}

.form {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 30px;
}
.field {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field > span {
  font-size: var(--t-s);
  line-height: 1;
  color: var(--ink-2);
  text-box: trim-start cap alphabetic;
  transition: color 200ms ease;
}
.field em { font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%;
  height: 46px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--t);          /* 16px keeps phones from zooming the page on focus */
  outline: none;
  transition: border-color 200ms ease;
}
/* One line that grows with the message. */
.field textarea { display: block; height: auto; min-height: 46px; padding-bottom: 11px; max-height: 12em; resize: none; line-height: 1.5; field-sizing: content; }
@supports not (field-sizing: content) { .field textarea { resize: vertical; } }
.field select {
  appearance: none;
  padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239AA1A8' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 2px center;
  cursor: pointer;
}
.field select:invalid, .field input[type="date"]:invalid:not(:focus) { color: var(--ink-2); }
.field option, .field optgroup { background: var(--studio-2); color: var(--ink); }
.field input[type="date"] { min-width: 0; }
/* The line under a field lights up when the field is in use. */
.field:focus-within > span { color: var(--warm); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.field [aria-invalid="true"] {
  border-bottom: 2px solid var(--warm);
  padding-bottom: 11px;
}
.field textarea:focus-visible { padding-bottom: 10px; }
/* the date picker's own highlight, in the page's colours */
.field input::-webkit-datetime-edit-day-field:focus,
.field input::-webkit-datetime-edit-month-field:focus,
.field input::-webkit-datetime-edit-year-field:focus { background: var(--warm); color: var(--studio); outline: none; }
/* What is missing is said right under the field it belongs to. */
.field__err { margin-top: 6px; font-size: var(--t-s); line-height: 1.4; color: var(--warm-hi); }
@media (hover: hover) and (pointer: fine) {
  .field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: rgba(244, 235, 221, 0.6); }
}

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 6px;
}
.msg { flex: 1 1 240px; min-height: 1.55em; color: var(--ink); }

/* ---------- Footer ---------- */
.foot { margin-top: var(--sp); padding-inline: var(--edge); }
.foot__in {
  padding-block: 44px 56px;
  align-items: start;
  row-gap: 28px;
  font-size: var(--t-s);
  color: var(--ink-2);
}
.foot__brand { grid-column: 1 / span 4; }
.foot__brand .wordmark { display: inline-block; margin-top: -14px; }
.foot__contact { grid-column: 5 / span 4; }
.foot__contact a { color: var(--ink); }
.foot__demo { grid-column: 9 / -1; font-size: var(--t-s); text-wrap: pretty; }
@media (pointer: coarse) {
  /* 44px rows for fingers; the first line still starts level with the wordmark */
  .foot__contact { margin-top: -11px; }
  .foot__contact li { display: flex; align-items: center; min-height: 44px; }
}
.foot__demo a { display: inline-block; padding-block: 13px; margin-block: -13px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Demo notice ---------- */
.toast {
  overflow-wrap: anywhere;
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  padding: 14px 18px;
  background: var(--warm);
  color: var(--studio);
  font-weight: 560;
  border-radius: 2px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s;
}

/* ---------- Load sequence (only when JS runs; content is visible without it) ---------- */
html.js:not(.ready) .head,
html.js:not(.ready) .hero__title .line > span,
html.js:not(.ready) .hero__aside > *,
html.js:not(.ready) .stage__img--dark,
html.js:not(.ready) .stage .lamp { opacity: 0; }

html.js.ready .stage__img--dark { animation: fade 1100ms ease-out both; }
/* backwards only: a filled-forwards transform would stop the pinned header from sliding away later */
html.js.ready .head { animation: fade-down 800ms var(--ease-out) 200ms backwards; }
html.js.ready .hero__title .line > span { animation: rise 1000ms var(--ease-out) both; }
html.js.ready .hero__title .line:nth-child(1) > span { animation-delay: 380ms; }
html.js.ready .hero__title .line:nth-child(2) > span { animation-delay: 460ms; }
html.js.ready .hero__aside > * { animation: fade-up 800ms var(--ease-out) both; }
html.js.ready .hero__aside > :nth-child(1) { animation-delay: 620ms; }
html.js.ready .hero__aside > :nth-child(2) { animation-delay: 700ms; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
/* starts wholly below its mask, padding included, so no part of a letter shows before it rises */
@keyframes rise {
  from { transform: translateY(calc(100% + 0.2em)); }
  to   { transform: none; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.js.ready .stage__img--dark,
  html.js.ready .head,
  html.js.ready .hero__title .line > span,
  html.js.ready .hero__aside > * { animation: none; }
  .btn--solid::before { display: none; }
  .head, .head.is-pinned.is-live { transition: none; }
  html.js .lit .lamp { transition: none; }
}

/* ---------- Narrower desktop: tiles go two by two ---------- */
@media (max-width: 1100px) {
  .hero .btn--solid { padding: 0 24px; }
  .tiles > li { grid-column: span 6; }
  .tile { aspect-ratio: 5 / 4; }
  .head-phone { display: none; }
  .nav ul { gap: 22px; }
}

/* ---------- Tablet: the two-part sections stack ---------- */
@media (max-width: 1023px) {
  /* five columns for the hero aside, so both actions stay on one line */
  .hero__aside { width: calc((100cqw - 2 * var(--e) - 11 * var(--gap)) / 12 * 5 + 4 * var(--gap)); }
  .sec-head h2, .note { grid-column: 1 / -1; }
  .note { max-width: 52ch; }
  .split__head, .split__body { grid-column: 1 / -1; }
  .split__body { margin-top: 44px; }
  .split__head .lede { max-width: 44ch; }
  .split__head .lede + p { max-width: 52ch; }
  .field { grid-column: span 6; }
  .foot__brand, .foot__contact { grid-column: span 6; }
  .foot__demo { grid-column: 1 / -1; }
}

/* ---------- Stacked hero: phones, small windows, and tablets held upright ---------- */
@media (max-width: 899px), (max-width: 1023px) and (orientation: portrait) {
  .hero {
    --sh: max(44svh, 280px);
    --title: clamp(2.1rem, 12.8cqw, 3.4rem);
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .stage {
    /* the car runs gutter to gutter, its tail on the headline's left edge */
    --pw: 113cqw;
    --px: calc(var(--gutter) - 10.96cqw);
    --py: calc(var(--sh) * 0.6 - 42cqw);
    --rx: 48cqw;
    --ry: 34cqw;
    --floor: 62%;
    position: relative;
    inset: auto;
    height: var(--sh);
  }
  .stage__hint { left: 50%; right: auto; top: auto; bottom: 18px; transform: translateX(-50%); }

  .hero__copy {
    position: relative;
    left: auto; right: auto; bottom: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 4px var(--gutter) 8px;
  }
  .hero__title { line-height: 1.06; }
  .hero__aside { width: auto; }
  .hero__actions { margin-top: 24px; gap: 12px 18px; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
  :root { --gap: 12px; --head: 60px; --sp: 88px; }

  .head {
    height: 68px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .head.is-pinned { height: var(--head); }
  .wordmark { font-size: 14px; letter-spacing: 0.46em; margin-right: -0.46em; }
  .head-end { gap: 6px; }
  .btn--line { height: 38px; padding: 0 14px; }
  .menu-btn { display: inline-flex; }

  /* The menu drops from the header and fills the rest of the screen. */
  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    height: calc(100vh - var(--demo) - 100%);
    height: calc(100dvh - var(--demo) - 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--studio);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 200ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms;
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; font-family: var(--display); font-weight: 300; font-size: 26px; color: var(--ink); padding: 10px 0; }
  .nav a::after { display: none; }
  .nav .nav__phone { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; padding: 0; font-family: var(--text); font-weight: 400; font-size: var(--t-l); color: var(--ink-2); font-variant-numeric: tabular-nums; }

  /* No script, no menu button: the links sit in a plain row under the wordmark. */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .head { height: auto; padding-block: 12px 6px; }
  html:not(.js) .head-end { grid-row: 1; grid-column: 2; }
  html:not(.js) .nav { position: static; grid-row: 2; grid-column: 1 / -1; display: block; height: auto; padding: 0; background: none; overflow: visible; opacity: 1; visibility: visible; transform: none; }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
  html:not(.js) .nav a { padding: 12px 0; font-family: var(--text); font-weight: 400; font-size: var(--t-s); color: var(--ink-2); }
  html:not(.js) .nav .nav__phone { display: none; }
  .head.is-open { position: fixed; top: var(--demo); background: var(--studio); }
  .head.is-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms ease, transform 220ms var(--ease-out), visibility 0s; }

  .btn--solid { height: 52px; }
  .hero .btn--solid { flex: 1 1 auto; max-width: 220px; }

  .tiles, .packs, .works { margin-top: 36px; }
  .tiles > li { grid-column: 1 / -1; }
  .tile { aspect-ratio: 4 / 3; }
  .tile__name { font-size: 19px; }

  /* Name and price share a line while they fit; a longer pair wraps instead of running off the screen. */
  .pack {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px 16px;
    padding-block: 32px;
  }
  .pack__name { order: 1; min-width: 0; }
  .pack__price { order: 2; }
  .pack__list { order: 3; flex: 0 0 100%; margin-top: 8px; }
  .pack__go { order: 4; flex: 0 0 100%; margin-block: -2px -10px; }

  .work, .work--wide { grid-column: 1 / -1; }
  .work .lit { height: auto; aspect-ratio: 1; }
  .work--wide .lit { aspect-ratio: 3 / 2; }

  .split__body { margin-top: 36px; }
  .faq summary { padding: 20px 0; }
  .field { grid-column: 1 / -1; }
  .form__foot .btn { flex: 1 1 100%; }
  .foot__brand, .foot__contact, .foot__demo { grid-column: 1 / -1; }
}

/* 320px phones: the wordmark, the booking button and the menu button still share one row. */
@media (max-width: 359px) {
  .wordmark { letter-spacing: 0.3em; margin-right: -0.3em; }
  .btn--line { padding: 0 11px; }
  .pack__name { flex: 0 0 100%; }
}
