/* =================================================================
   WRS — wrs.si
   HTML + CSS only (no JavaScript). Shared by every page.

   1. Tokens & base          5. Hand of cards (+ four example screens)
   2. Header & buttons       6. Stages: how a website is made
   3. Home: one-screen hero  7. Sub-pages: legal text & messages
   4. Home: background       8. Keyframes, responsive, reduced motion
   ================================================================= */

/* =================================================================
   1. Tokens & base
   ================================================================= */
:root {
  color-scheme: light dark;

  --bg:          light-dark(#F7F4EF, #110F17);
  --panel:       light-dark(#FFFFFF, #1B1922);
  --ink:         light-dark(#1C1A22, #F2F0F6);
  --ink-2:       light-dark(#55515F, #B9B4C4);
  --muted:       light-dark(#7C7785, #8C8798);
  --line:        light-dark(rgb(28 26 34 / .10), rgb(242 240 246 / .10));
  --line-strong: light-dark(rgb(28 26 34 / .18), rgb(242 240 246 / .22));
  --logo-grey:   light-dark(#989898, #B4B2BA);
  --spot:        light-dark(rgb(255 255 255 / .85), rgb(255 255 255 / .05));
  --shadow:      light-dark(rgb(48 28 52 / .30), rgb(0 0 0 / .65));

  /* brand — sampled from the logo */
  --crimson:     #9D1E41;
  --lime:        #A4E017;
  --sky:         #B3DFFE;
  --crimson-ink: light-dark(#9D1E41, #EC6C90);

  --orb-1: light-dark(rgb(157 30 65 / .16), rgb(157 30 65 / .42));
  --orb-2: light-dark(rgb(164 224 23 / .26), rgb(164 224 23 / .16));
  --orb-3: light-dark(rgb(120 190 250 / .50), rgb(100 160 240 / .28));

  --card:      light-dark(#FFFFFF, #F3F0F2);
  --card-edge: light-dark(rgb(28 26 34 / .07), rgb(255 255 255 / .5));

  --sans:  "Barlow", "Bahnschrift", ui-sans-serif, system-ui, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hand:  "Caveat", "Segoe Print", cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%,
                   1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%,
                   .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1);
  --spring-soft: linear(0, .06, .22 8%, .68 22%, .92 34%, 1.03 46%, 1.05 54%, 1.02 68%, 1);
}

/* theme switch without JS: the checkbox inverts the system preference */
@media (prefers-color-scheme: dark)  { :root:has(#theme-toggle:checked) { color-scheme: light; } }
@media (prefers-color-scheme: light) { :root:has(#theme-toggle:checked) { color-scheme: dark; } }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* faint dot grid — a nod to the logo's dots */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 38%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 38%, #000 10%, transparent 75%);
}

h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }

::selection { background: var(--lime); color: #1C1A22; }

:focus-visible { outline: 2px solid var(--crimson-ink); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =================================================================
   2. Header & buttons
   ================================================================= */
.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2.6dvh, 28px) var(--gutter) 0;
}

.logo-link { display: block; border-radius: 8px; }
.logo { display: block; height: clamp(34px, 6dvh, 52px); width: auto; overflow: visible; }
.logo-arc {
  fill: none;
  stroke: var(--logo-grey);
  stroke-width: 8.5;
  stroke-dasharray: 100;
  animation: draw 1.3s var(--ease-out) .15s both;
}
.logo-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .7s var(--spring) both;
  animation-delay: calc(.55s + var(--d, 0) * .14s);
}
.logo-dot:nth-of-type(2) { --d: 1; }
.logo-dot:nth-of-type(3) { --d: 2; }
.logo-word { fill: none; stroke: var(--logo-grey); stroke-width: 7.8; }
.logo-sub  { fill: var(--logo-grey); font: 400 21.5px var(--sans); }

.top-end { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--ink);
  font: 700 .78rem/1 var(--sans);
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; transition: rotate .6s var(--ease-out); }
.theme-input:checked ~ .top .theme-btn svg { rotate: 180deg; }
.theme-input:focus-visible ~ .top .theme-btn { outline: 2px solid var(--crimson-ink); outline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  font: 600 1rem/1 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn-ghost {
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--ink);
  font-size: .92rem;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-primary {
  padding: clamp(13px, 2dvh, 17px) 22px clamp(13px, 2dvh, 17px) 26px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 16px 34px -16px var(--shadow);
}
.btn-primary svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate .3s var(--ease-out);
}
.btn-primary:hover { background: var(--crimson); color: #fff; }
.btn-primary:hover svg { translate: 4px 0; }

/* =================================================================
   3. Home: exactly one screen, no scrolling
   ================================================================= */
html:has(> body.home),
body.home { height: 100%; overflow: hidden; overscroll-behavior: none; }

body.home {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.stage { display: grid; grid-template-rows: auto 1fr; min-height: 0; }

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(10px, 2.1dvh, 22px);
  padding: clamp(10px, 3.4dvh, 40px) var(--gutter) 0;
  text-align: center;
}
.hero > :not(.spark) { animation: rise .9s var(--ease-out) both; }
.kicker  { animation-delay: .15s !important; }
.title   { animation-delay: .25s !important; }
.lede    { animation-delay: .4s !important; }
.actions { animation-delay: .52s !important; }

.kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  font: 600 clamp(.66rem, 1.5dvh, .8rem)/1.2 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.kicker span { display: inline-flex; align-items: center; gap: 8px; }
.d { width: 8px; height: 8px; border-radius: 50%; }
.d1 { background: var(--crimson); }
.d2 { background: var(--lime); }
.d3 { background: var(--sky); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }

.title {
  max-width: 14ch;
  font-family: var(--serif);
  font-size: clamp(2.3rem, min(7.2vw, 8.8dvh), 6.4rem);
  font-weight: 480;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.title em {
  font-style: italic;
  font-weight: 420;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--crimson-ink);
}

/* the logo's three dots, as a dreamy ellipsis */
.dots { display: inline-flex; gap: .085em; margin-left: .07em; }
.dots i {
  width: .13em; height: .13em;
  border-radius: 50%;
  background: var(--crimson);
  animation: dream 2.6s ease-in-out infinite;
}
.dots i:nth-child(2) { background: var(--lime); animation-delay: .18s; }
.dots i:nth-child(3) { background: var(--sky);  animation-delay: .36s; box-shadow: inset 0 0 0 .01em rgb(0 0 0 / .1); }

.lede {
  max-width: 44ch;
  font-size: clamp(.98rem, 2.2dvh, 1.22rem);
  color: var(--ink-2);
  text-wrap: balance;
}

.actions { padding-top: clamp(0px, .6dvh, 6px); }

/* twinkling sparks */
.spark {
  position: absolute;
  width: var(--s, 16px);
  aspect-ratio: 1;
  background: var(--c);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 3.6s ease-in-out infinite;
}
.s1 { --c: var(--crimson); --s: 18px; left: 14%; top: 36%; }
.s2 { --c: var(--lime);    --s: 22px; right: 13%; top: 16%; animation-delay: -1.2s; }
.s3 { --c: var(--sky);     --s: 15px; right: 21%; bottom: 8%; animation-delay: -2.4s; }

/* small legal line in the corner */
.home-foot {
  position: fixed;
  left: var(--gutter);
  bottom: 12px;
  z-index: 20;
  display: flex;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-size: .78rem;
  color: var(--muted);
}
.home-foot a { color: inherit; text-decoration: none; }
.home-foot a:hover { color: var(--ink); text-decoration: underline; }

/* =================================================================
   4. Background (all pages)
   ================================================================= */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  width: 62vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  animation: float 24s ease-in-out infinite alternate;
}
.orb-1 { --c: var(--orb-1); left: -20vmax; top: -26vmax; }
.orb-2 { --c: var(--orb-2); right: -24vmax; top: -6vmax; animation-delay: -8s; }
.orb-3 { --c: var(--orb-3); left: 50%; bottom: -34vmax; margin-left: -31vmax; animation-delay: -14s; }

/* =================================================================
   5. The table & the hand of cards
   ================================================================= */
.table {
  position: relative;
  container-type: size;
  min-height: 0;
  /* card height: fills what's left of the screen, but never too big or too wide */
  --h: min(86cqb, 27rem, 76cqi);
}

/* soft spotlight under the hand */
.table::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: min(1200px, 150vw);
  aspect-ratio: 2.4;
  translate: -50% 0;
  background: radial-gradient(closest-side, var(--spot), transparent);
  pointer-events: none;
}

/* halo arcs — the logo's arc, concentric with the fan's pivot */
.halo {
  position: absolute;
  left: 50%;
  /* pivot sits 2.08h below the table; arc radius ≈ 3.1h, just above the card tops */
  bottom: calc(var(--h) * -5.24);
  width: calc(var(--h) * 6.33);
  aspect-ratio: 1;
  translate: -50% 0;
  overflow: visible;
  pointer-events: none;
}
.halo path {
  fill: none;
  stroke: var(--logo-grey);
  stroke-dasharray: 100;
  stroke-linecap: round;
}
/* user units: the SVG is scaled ~10×, so these land at roughly 1.5px / 1px */
.halo-a { stroke-width: .16; opacity: .55; animation: draw 2s var(--ease-out) .5s both; }
.halo-b { stroke-width: .1;  opacity: .3;  animation: draw 2.4s var(--ease-out) .7s both; }

.hint {
  position: absolute;
  right: calc(50% + var(--h) * 1.12);
  bottom: calc(var(--h) * .6);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  font: 600 clamp(1.3rem, 3dvh, 1.75rem)/1 var(--hand);
  color: var(--ink-2);
  rotate: -7deg;
  white-space: nowrap;
  transition: opacity .35s;
  animation: rise .8s var(--ease-out) 1.6s both;
}
.hint svg {
  width: 52px;
  margin-bottom: -26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* the hint has done its job once a card is picked */
.table:has(.card:is(:hover, :focus-visible)) .hint { opacity: 0; }

.hand { position: absolute; inset: 0; --fan: 9.5deg; }

.card {
  --w: calc(var(--h) / 1.4);
  container: card / inline-size;
  position: absolute;
  left: 50%;
  bottom: calc(var(--h) * -.08);
  width: var(--w);
  height: var(--h);
  margin: 0 0 0 calc(var(--w) / -2);
  display: flex;
  flex-direction: column;
  gap: 3cqi;
  padding: calc(var(--w) * .045);
  border: 1px solid var(--card-edge);
  border-radius: calc(var(--w) * .075);
  background: var(--card);
  box-shadow:
    0 1px 1px rgb(0 0 0 / .04),
    0 22px 44px -22px var(--shadow);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;

  /* fan: every card rotates around the same far-below pivot */
  transform-origin: 50% 300%;
  rotate: calc(var(--k) * var(--fan) + var(--push, 0deg));
  transform: translateY(var(--lift, 0%)) scale(var(--zoom, 1));
  transition:
    rotate .7s var(--spring-soft),
    transform .7s var(--spring-soft),
    opacity .45s ease,
    visibility .45s,
    box-shadow .4s ease,
    z-index 0s .3s;

  /* dealt into the hand on load */
  animation: deal 1.1s var(--spring) backwards;
  animation-delay: calc(.7s + var(--i) * .13s);
}
.card:nth-child(1) { --i: 0; --k: -1.5; --suit: var(--crimson); }
.card:nth-child(2) { --i: 1; --k: -.5;  --suit: var(--lime); }
.card:nth-child(3) { --i: 2; --k: .5;   --suit: var(--sky); }
.card:nth-child(4) { --i: 3; --k: 1.5;  --suit: var(--crimson); }

/* glossy sweep on hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / .55) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  pointer-events: none;
  transition: background-position .9s var(--ease-out);
}

.card:is(:hover, :focus-visible) {
  --lift: -12%;
  --zoom: 1.02;          /* small: scaling happens around the far pivot, so it also lifts */
  z-index: 10;
  rotate: calc(var(--k) * var(--fan) * .35);
  box-shadow:
    0 1px 1px rgb(0 0 0 / .04),
    0 50px 80px -34px var(--shadow);
  transition:
    rotate .7s var(--spring-soft),
    transform .7s var(--spring-soft),
    opacity .45s ease,
    visibility .45s,
    box-shadow .4s ease,
    z-index 0s 0s;
}
.card:is(:hover, :focus-visible)::after { background-position: -30% 0; }
.card:focus-visible { outline: 2px solid var(--crimson-ink); outline-offset: 4px; }

/* neighbours make room */
.card:is(:hover, :focus-visible) ~ .card { --push: 5deg; }
.card:has(~ .card:is(:hover, :focus-visible)) { --push: -5deg; }

/* card chrome */
.card-top {
  display: flex;
  align-items: center;
  gap: 2.4cqi;
  color: #2A2730;
  font: 600 4.8cqi/1 var(--sans);
}
.card-idx  { font-weight: 700; font-size: 4.6cqi; letter-spacing: .04em; color: #8A8592; }
.card-suit { width: 3.4cqi; aspect-ratio: 1; border-radius: 50%; background: var(--suit); box-shadow: inset 0 0 0 .3cqi rgb(0 0 0 / .06); }
.card-name { font-size: 5.4cqi; font-weight: 700; letter-spacing: -.01em; }
.card-type {
  margin-left: auto;
  font-size: 3.4cqi;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9A95A2;
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 4.4cqi;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}

/* ---------- 01 · bakery ---------- */
.c-bakery .screen {
  display: flex;
  flex-direction: column;
  gap: 3cqi;
  padding: 4.5cqi;
  background: #F6ECDF;
  color: #4A2C1D;
}
.bk-nav { display: flex; align-items: center; gap: 2.4cqi; }
.bk-logo { font: italic 600 5.6cqi/1 var(--serif); }
.bk-links { display: flex; gap: 2.4cqi; margin-left: auto; }
.bk-links i { width: 8cqi; height: 1.3cqi; border-radius: 9px; background: rgb(74 44 29 / .25); }
.bk-bag { width: 5.4cqi; height: 5.4cqi; border-radius: 1.4cqi; background: #4A2C1D; }
.bk-hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.6cqi;
  padding-top: 3cqi;
}
.bk-tag { font: 700 3.1cqi/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #B4692A; }
.bk-title { font: 560 11.5cqi/.95 var(--serif); letter-spacing: -.03em; }
.bk-btn { padding: 2.4cqi 5cqi; border-radius: 99px; background: #4A2C1D; color: #F6ECDF; font: 600 3.8cqi/1 var(--sans); }
.bk-loaf { position: absolute; right: -5cqi; bottom: -1cqi; width: 60cqi; }
.bk-items { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqi; }
.bk-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 2.2cqi;
  padding: 2.4cqi;
  border-radius: 3cqi;
  background: #FFF8EF;
  box-shadow: 0 .8cqi 2.4cqi -1.2cqi rgb(74 44 29 / .35);
}
.bk-item i { grid-row: span 2; width: 9cqi; aspect-ratio: 1; border-radius: 50%; }
.bk-p1 { background: radial-gradient(circle at 35% 30%, #EDB874, #A45E28 72%); }
.bk-p2 { background: radial-gradient(circle at 35% 30%, #F4CB86, #C47A2C 72%); }
.bk-item b { font: 700 3.8cqi/1.15 var(--sans); }
.bk-item s { font: 600 3.3cqi/1.15 var(--sans); text-decoration: none; color: #B4692A; }

/* ---------- 02 · shop ---------- */
.c-shop .screen {
  display: flex;
  flex-direction: column;
  gap: 3cqi;
  padding: 4.5cqi;
  background: #FFFFFF;
  color: #1F2A24;
}
.sh-nav { display: flex; align-items: center; gap: 3cqi; }
.sh-logo { font: 700 5.2cqi/1 var(--sans); letter-spacing: -.02em; }
.sh-logo i { font-style: normal; color: #C7623F; }
.sh-search {
  position: relative;
  margin-left: auto;
  width: 4.6cqi; height: 4.6cqi;
  border: .7cqi solid #1F2A24;
  border-radius: 50%;
}
.sh-search::after {
  content: "";
  position: absolute;
  right: -1.8cqi; bottom: -1.6cqi;
  width: 2.2cqi; height: .7cqi;
  border-radius: 9px;
  background: #1F2A24;
  rotate: 45deg;
}
.sh-cart {
  position: relative;
  width: 5.4cqi; height: 4.8cqi;
  border: .7cqi solid #1F2A24;
  border-radius: .6cqi .6cqi 1.6cqi 1.6cqi;
}
.sh-cart b {
  position: absolute;
  right: -2.6cqi; top: -2.6cqi;
  width: 4.2cqi; height: 4.2cqi;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #C7623F;
  color: #fff;
  font: 700 2.6cqi/1 var(--sans);
}
.sh-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4cqi;
  background: radial-gradient(circle at 50% 72%, #F4F7F0, #DCE5D4 72%);
}
.sh-vase { height: 88%; }
.sh-badge {
  position: absolute;
  left: 3cqi; top: 3cqi;
  padding: 1.5cqi 2.8cqi;
  border-radius: 99px;
  background: #fff;
  font: 700 2.8cqi/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sh-dots { position: absolute; bottom: 3cqi; left: 50%; translate: -50% 0; display: flex; gap: 1.4cqi; }
.sh-dots i { width: 1.6cqi; height: 1.6cqi; border-radius: 9px; background: rgb(31 42 36 / .25); }
.sh-dots .on { width: 5cqi; background: #1F2A24; }
.sh-info { display: flex; align-items: baseline; justify-content: space-between; gap: 2cqi; }
.sh-name  { font: 700 5cqi/1.1 var(--sans); }
.sh-price { font: 700 4.6cqi/1 var(--sans); color: #C7623F; }
.sh-row { display: flex; align-items: center; justify-content: space-between; }
.sh-swatches { display: flex; gap: 1.8cqi; }
.sh-swatches i { width: 5cqi; height: 5cqi; border-radius: 50%; background: #C7623F; }
.sh-swatches i:nth-child(2) { background: #E8D9C4; }
.sh-swatches i:nth-child(3) { background: #2F3B33; }
.sh-swatches .on { box-shadow: 0 0 0 .7cqi #fff, 0 0 0 1.2cqi #1F2A24; }
.sh-stars { font-size: 3.4cqi; letter-spacing: .1em; color: #E2A33B; }
.sh-btn {
  display: grid;
  place-items: center;
  height: 10cqi;
  border-radius: 3cqi;
  background: #1F2A24;
  color: #fff;
  font: 600 4cqi/1 var(--sans);
}

/* ---------- 03 · holiday apartments ---------- */
.c-stay .screen { display: flex; flex-direction: column; background: #F2F6F8; color: #1F3B4A; }
.ap-hero {
  position: relative;
  flex: 1.3;
  overflow: hidden;
  padding: 4.5cqi;
  background: linear-gradient(#8FC7EC, #CFE8F6 50%, #F7E3CC 70%);
  color: #fff;
}
.ap-hero > i { position: absolute; display: block; }
.ap-sun {
  right: 15cqi; top: 26%;
  width: 14cqi; aspect-ratio: 1;
  border-radius: 50%;
  background: #FFF2CC;
  box-shadow: 0 0 9cqi 2cqi rgb(255 242 204 / .8);
}
.ap-m { left: 0; right: 0; }
.ap-m1 {
  bottom: 30%; height: 46%;
  background: linear-gradient(#7E9CB2, #5F7F96);
  clip-path: polygon(0 72%, 16% 34%, 28% 52%, 47% 6%, 64% 44%, 79% 22%, 100% 58%, 100% 100%, 0 100%);
}
.ap-m2 {
  bottom: 30%; height: 28%;
  background: linear-gradient(#557D6C, #3F6455);
  clip-path: polygon(0 52%, 20% 22%, 38% 58%, 60% 18%, 82% 54%, 100% 34%, 100% 100%, 0 100%);
}
.ap-lake {
  left: 0; right: 0; bottom: 0; height: 30%;
  background:
    repeating-linear-gradient(transparent 0 2.4cqi, rgb(255 255 255 / .16) 2.4cqi 2.8cqi),
    linear-gradient(#6AA6C4, #2F6F8E);
}
.ap-island {
  left: 22%; bottom: 25%;
  width: 18cqi; height: 6cqi;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: #2E4F45;
}
.ap-island::before {
  content: "";
  position: absolute;
  left: 52%; bottom: 80%;
  width: 4cqi; height: 7cqi;
  background: #23403A;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.ap-nav { position: relative; display: flex; align-items: center; justify-content: space-between; }
.ap-logo { font: 700 4.2cqi/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.ap-menu { display: grid; gap: .9cqi; }
.ap-menu i { width: 5cqi; height: .7cqi; border-radius: 9px; background: #fff; }
.ap-title {
  position: relative;
  display: block;
  margin-top: 6cqi;
  font: 560 9.6cqi/.95 var(--serif);
  letter-spacing: -.02em;
  text-shadow: 0 .5cqi 3cqi rgb(31 59 74 / .35);
}
.ap-rate {
  position: relative;
  display: inline-block;
  margin-top: 2.6cqi;
  padding: 1.4cqi 2.6cqi;
  border-radius: 99px;
  background: rgb(255 255 255 / .28);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  font: 700 3.2cqi/1 var(--sans);
}
.ap-book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4cqi;
  margin: -9cqi 4cqi 4cqi;
  padding: 3.4cqi;
  border-radius: 4cqi;
  background: #fff;
  box-shadow: 0 2cqi 6cqi -2cqi rgb(31 59 74 / .35);
}
.ap-field { display: grid; gap: .9cqi; padding: 2cqi 2.6cqi; border-radius: 2.4cqi; background: #EEF3F6; }
.ap-field em { font: 600 2.6cqi/1 var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: #6B8796; }
.ap-field b  { font: 700 4cqi/1 var(--sans); }
.ap-wide { grid-column: span 2; }
.ap-btn {
  grid-column: span 2;
  display: grid;
  place-items: center;
  height: 9.4cqi;
  border-radius: 2.4cqi;
  background: #1F6F78;
  color: #fff;
  font: 600 3.9cqi/1 var(--sans);
}

/* ---------- 04 · salon app ---------- */
.c-app .screen {
  display: flex;
  flex-direction: column;
  gap: 3.2cqi;
  padding: 4cqi 5cqi 3cqi;
  background: #16141C;
  color: #F3F1F7;
}
.app-status { display: flex; align-items: center; justify-content: space-between; font: 700 3.2cqi/1 var(--sans); }
.app-status span { display: flex; align-items: flex-end; gap: .7cqi; }
.app-status i { width: 1cqi; border-radius: 2px; background: #F3F1F7; }
.app-status i:nth-child(1) { height: 1.4cqi; }
.app-status i:nth-child(2) { height: 2.2cqi; }
.app-status i:nth-child(3) { height: 3cqi; }
.app-hello { margin-top: 1.6cqi; font: 500 3.8cqi/1 var(--sans); color: #9B97A6; }
.app-title { margin-top: -1cqi; font: 700 8.2cqi/1 var(--sans); letter-spacing: -.02em; }
.app-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqi; }
.app-days span {
  display: grid;
  justify-items: center;
  gap: 1.2cqi;
  padding: 2.6cqi 0;
  border-radius: 3cqi;
  background: #221F2B;
}
.app-days em { font: 600 2.7cqi/1 var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .08em; color: #8F8A9C; }
.app-days b  { font: 700 5cqi/1 var(--sans); }
.app-days .on { background: #A4E017; color: #16141C; }
.app-days .on em { color: rgb(22 20 28 / .65); }
.app-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqi; }
.app-slots span {
  padding: 2.5cqi 0;
  border: .4cqi solid #302C3B;
  border-radius: 2.4cqi;
  text-align: center;
  font: 600 3.8cqi/1 var(--sans);
}
.app-slots .on  { border-color: #A4E017; background: rgb(164 224 23 / .12); color: #A4E017; }
.app-slots .off { opacity: .35; text-decoration: line-through; }
.app-service { display: flex; align-items: center; gap: 2.8cqi; padding: 2.6cqi; border-radius: 3cqi; background: #221F2B; }
.app-service i {
  display: grid;
  place-items: center;
  width: 9cqi; height: 9cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #D2486E, #9D1E41 70%);
}
.app-service svg { width: 55%; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.app-service span { display: grid; gap: 1cqi; }
.app-service b  { font: 700 4cqi/1 var(--sans); }
.app-service em { font: 500 3.2cqi/1 var(--sans); font-style: normal; color: #9B97A6; }
.app-btn {
  margin-top: auto;
  display: grid;
  place-items: center;
  height: 10cqi;
  border-radius: 99px;
  background: #A4E017;
  color: #16141C;
  font: 700 4cqi/1 var(--sans);
}
.app-home { align-self: center; width: 28cqi; height: 1cqi; border-radius: 99px; background: rgb(243 241 247 / .5); }

/* =================================================================
   7. Sub-pages: privacy text, thank-you, errors, 404
   ================================================================= */
body.page { display: grid; grid-template-rows: auto 1fr auto; }

.doc { padding: clamp(32px, 7dvh, 80px) var(--gutter) 64px; }

.prose { max-width: 68ch; margin-inline: auto; font-size: 1.05rem; color: var(--ink-2); }
.prose h1 {
  margin-bottom: .45em;
  font: 480 clamp(2.3rem, 6vw, 3.6rem)/1 var(--serif);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -.03em;
  color: var(--ink);
}
.prose h2 { margin: 2.2em 0 .5em; font: 700 1.15rem/1.3 var(--sans); color: var(--ink); }
.prose p, .prose ul { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--crimson-ink); }
.prose a { color: var(--crimson-ink); text-underline-offset: 2px; }
.prose .meta { font-size: .92rem; color: var(--muted); }
.prose .fill {
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--lime) 30%, transparent);
  color: var(--ink);
}

.msg { display: grid; place-items: center; padding: 6dvh var(--gutter) 10dvh; text-align: center; }
.msg-card { display: grid; justify-items: center; gap: 18px; max-width: 34rem; }
.msg-card h1 {
  font: 480 clamp(2.5rem, 8vw, 4.6rem)/1 var(--serif);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.msg-card h1 em { font-style: italic; color: var(--crimson-ink); }
.msg-card p { font-size: 1.1rem; color: var(--ink-2); text-wrap: balance; }
.msg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.msg-mark { display: flex; gap: 10px; }
.msg-mark i { width: 16px; height: 16px; border-radius: 50%; background: var(--crimson); animation: dream 2.6s ease-in-out infinite; }
.msg-mark i:nth-child(2) { background: var(--lime); animation-delay: .18s; }
.msg-mark i:nth-child(3) { background: var(--sky);  animation-delay: .36s; }

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
}
.site-foot a { color: inherit; }
.site-foot a:hover { color: var(--ink); }

/* =================================================================
   6. Stages — "Kako nastane spletna stran?" / "How is a website made?"
   The hero button is a <label for="steps">. Checking it puts the example
   hand away and deals six stage cards; a highlight then walks through
   them in a loop. No JavaScript.
   ================================================================= */
.steps-hide { display: none; }
:root:has(#steps:checked) .steps-show { display: none; }
:root:has(#steps:checked) .steps-hide { display: inline; }
.steps-btn svg { transition: rotate .4s var(--ease-out), translate .3s var(--ease-out); }
.btn-primary.steps-btn:hover svg { translate: 0 2px; }
:root:has(#steps:checked) .steps-btn svg { rotate: 180deg; }
.steps-input:focus-visible ~ .stage .steps-btn { outline: 2px solid var(--crimson-ink); outline-offset: 3px; }

/* put the example hand away: the cards slide back down into the hand */
:root:has(#steps:checked) .card { --lift: 75%; --push: 0deg; opacity: 0; visibility: hidden; }
.halo { transition: opacity .4s; }
:root:has(#steps:checked) .hint,
:root:has(#steps:checked) .halo { opacity: 0; }

.steps {
  position: absolute;
  left: 50%;
  top: calc(50% - 22px);          /* centred in the space between the button and the footer */
  translate: -50% -50%;
  width: min(100cqi - 2 * var(--gutter), 78rem);
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  visibility: hidden;
  transition: visibility .6s;
}
:root:has(#steps:checked) .steps { visibility: visible; }

/* the thread that connects the stages (visible in the gaps) */
.steps::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 3%;
  right: 3%;
  top: 31px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--lime), var(--sky));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
:root:has(#steps:checked) .steps::before { transform: scaleX(1); transition: transform 1.4s var(--ease-out) .5s; }

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--card-edge);
  border-radius: 18px;
  background: var(--card);
  color: #55515F;
  box-shadow: 0 1px 1px rgb(0 0 0 / .04), 0 22px 44px -22px var(--shadow);

  /* hidden: below, slightly scattered */
  opacity: 0;
  translate: 0 60px;
  rotate: calc((var(--i) - 2.5) * 2deg);
  transition: opacity .35s ease, translate .7s var(--spring-soft), rotate .7s var(--spring-soft);
  transition-delay: calc((5 - var(--i)) * 40ms);
}
:root:has(#steps:checked) .step {
  opacity: 1;
  translate: 0 0;
  rotate: 0deg;
  transition-delay: calc(.25s + var(--i) * 90ms);
  /* one stage at a time is highlighted: 6 stages × 2 s */
  animation: step-focus 12s ease-in-out infinite;
  animation-delay: calc(2.2s + var(--i) * 2s);
}
.step:nth-child(1) { --i: 0; --c: var(--crimson); }
.step:nth-child(2) { --i: 1; --c: var(--lime); }
.step:nth-child(3) { --i: 2; --c: var(--sky); }
.step:nth-child(4) { --i: 3; --c: var(--crimson); }
.step:nth-child(5) { --i: 4; --c: var(--lime); }
.step:nth-child(6) { --i: 5; --c: var(--sky); }

.step-head { display: flex; align-items: center; gap: 8px; }
.step-n { font: 700 .78rem/1 var(--sans); letter-spacing: .06em; color: #8A8592; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.step-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-left: auto;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 22%, #fff);
  color: #2A2730;
}
.step-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step-title { font: 700 clamp(1rem, 1.35vw, 1.15rem)/1.15 var(--sans); letter-spacing: -.01em; color: #1C1A22; }
.step p { margin: 0; font-size: clamp(.8rem, .95vw, .9rem); line-height: 1.42; }
.step-out {
  align-self: flex-start;
  margin-top: auto;
  padding: 5px 10px;
  border-radius: 99px;
  background: #F3F0EC;
  color: #55515F;
  font: 600 .72rem/1 var(--sans);
  font-style: normal;
  letter-spacing: .03em;
}
.step-out::before { content: "→ "; color: #8A8592; }

@keyframes step-focus {
  0%, 14%   { transform: translateY(-8px); box-shadow: 0 0 0 2px var(--c), 0 34px 54px -26px var(--shadow); }
  20%, 100% { transform: none; box-shadow: 0 1px 1px rgb(0 0 0 / .04), 0 22px 44px -22px var(--shadow); }
}

/* tablets: 3 × 2 */
@container (max-width: 980px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .steps::before { display: none; }
}

/* medium width but not tall enough for two rows: one row you can swipe through */
@container (max-width: 980px) and (max-height: 519px) {
  .steps {
    display: flex;
    width: 100cqi;
    padding: 10px var(--gutter) 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .step { flex: 0 0 min(15rem, 62cqi); scroll-snap-align: start; }
}

/* phones: a compact vertical list (scrolls inside the table only if the screen is very short) */
@container (max-width: 560px) {
  .steps {
    display: grid;
    width: min(100cqi - 2 * var(--gutter), 78rem);
    grid-template-columns: 1fr;
    gap: 4px;
    max-height: calc(100cqb - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 2px;
  }
  .step {
    display: grid;
    grid-template-columns: 14px 1fr;
    column-gap: 10px;
    row-gap: 1px;
    padding: 8px 12px;
    border-radius: 14px;
    translate: 40px 0;
    rotate: 0deg;
  }
  .step-head { grid-row: 1 / span 2; padding-top: 4px; }
  .step-n, .step-icon, .step-out { display: none; }
  .step-title { font-size: .95rem; }
  .step p { font-size: .8rem; line-height: 1.35; }
  :root:has(#steps:checked) .step { animation-name: step-focus-flat; }   /* no lift inside a scroll box */
}
@keyframes step-focus-flat {
  0%, 14%   { box-shadow: 0 0 0 2px var(--c), 0 14px 30px -18px var(--shadow); }
  20%, 100% { box-shadow: 0 1px 1px rgb(0 0 0 / .04), 0 14px 30px -18px var(--shadow); }
}

/* =================================================================
   8. Keyframes, responsive, reduced motion
   ================================================================= */
@keyframes draw    { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes pop     { from { transform: scale(0); } }
@keyframes rise    { from { opacity: 0; translate: 0 18px; } }
@keyframes deal    { from { opacity: 0; rotate: 0deg; transform: translateY(80%) scale(.9); } }
@keyframes float   { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
@keyframes dream   { 0%, 55%, 100% { translate: 0 0; } 25% { translate: 0 -.14em; } }
@keyframes twinkle {
  0%, 100% { scale: .55; rotate: 0deg; opacity: .45; }
  50%      { scale: 1;   rotate: 45deg; opacity: 1; }
}

@container (max-width: 760px) {
  .hint { display: none; }
}
@container (max-width: 860px) {
  .hand { --fan: 7.5deg; }
}
@container (max-width: 560px) {
  .hand { --fan: 6deg; }
}

@media (max-width: 600px) {
  .kicker { gap: 4px 14px; letter-spacing: .12em; }
  .spark { display: none; }
  /* while the stages are open, the subtitle makes room for all six of them */
  :root:has(#steps:checked) .lede { display: none; }
}

/* very short landscape screens (phones on their side): allow scrolling rather than crush the cards */
@media (max-height: 520px) and (orientation: landscape) {
  html:has(> body.home), body.home { overflow: auto; height: auto; }
  body.home { min-height: 100dvh; }
  .table { height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
