/* archora.pl - one deep ink-blue surface in every colour scheme: the site is the studio sign grown into a set of
   drawings, so it does not flip. Pencil-blue lines draw; chalk carries the words. */

@property --r1 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r2 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r3 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r4 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r5 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r6 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --r7 { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  color-scheme: dark;
  --ink: oklch(0.27 0.06 262);
  --ink-deep: oklch(0.22 0.055 262);
  --chalk: oklch(0.96 0.008 262);
  --chalk-soft: oklch(0.84 0.03 262);
  --line: oklch(0.72 0.09 262);
  --line-strong: oklch(0.8 0.08 262);
  --rule: oklch(0.72 0.09 262 / 0.28);
  --rule-faint: oklch(0.72 0.09 262 / 0.14);
  --halo: oklch(0.72 0.09 262 / 0.2);
  --halo-faint: oklch(0.72 0.09 262 / 0.06);
  --warn: oklch(0.82 0.11 60);
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar-h: 4.25rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] { display: none !important; }

html {
  background: var(--ink-deep);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 1.5rem);
  scrollbar-color: var(--line) var(--ink-deep);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: radial-gradient(120% 70% at 85% 0%, var(--ink), var(--ink-deep) 70%) var(--ink-deep);
  background-attachment: fixed;
  color: var(--chalk-soft);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--chalk);
}

::selection { background: var(--line); color: var(--ink-deep); }

img, svg { display: block; max-width: 100%; }

/* The drawing behind the hero bleeds past the right edge on phones; clip (not hidden) keeps the sticky plan sticky. */
main { overflow-x: clip; }

a {
  color: var(--chalk);
  text-decoration-line: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s var(--ease);
}
a:hover { text-decoration-color: var(--chalk); }

:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  margin: 0;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); line-height: 1.05; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.625rem, 1.25rem + 1.3vw, 2.25rem); line-height: 1.1; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100%, 82rem); margin-inline: auto; padding-inline: var(--gutter); }

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

/* ---- Bar ---------------------------------------------------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--bar-h);
  background: var(--ink-deep);
  border-bottom: 1px solid var(--rule-faint);
}

.bar .wrap { height: 100%; display: flex; align-items: center; gap: 2rem; }

.wordmark {
  color: var(--chalk);
  font-family: var(--display);
  font-size: 1.625rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.bar nav { margin-left: auto; }
.bar nav ul { display: flex; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.bar nav a { color: var(--chalk-soft); font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.bar nav a:hover { color: var(--chalk); }

@media (max-width: 47.99rem) {
  .bar nav { display: none; }
  .bar .btn { margin-left: auto; }
}

/* ---- Buttons ------------------------------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--chalk); color: var(--ink-deep); }
.btn-primary:hover { background: oklch(1 0 0); }

.btn-ghost { border-color: oklch(0.84 0.03 262 / 0.45); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--chalk); }

.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- The spine: words left, the plan drawing right ---------------------------------------------------------- */

.spine { display: grid; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 62rem) {
  .spine {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
  }
}

.spine-plan { display: none; }

@media (min-width: 62rem) {
  .spine-plan { display: block; }
  .spine-plan figure {
    position: sticky;
    top: calc(var(--bar-h) + 2.5rem);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .spine-plan .plan { width: 100%; max-height: calc(100svh - var(--bar-h) - 7rem); }
}

/* Below the wide layout the drawing still has to exist for the small copies to point at, so it is hidden from
   sight, not from rendering (a display:none source drops its hatch pattern in some engines). */
@media (max-width: 61.99rem) {
  .spine-plan {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.plan {
  color: var(--line);
  font-family: var(--body);
  overflow: visible;
  transition: --r1 0.6s var(--ease), --r2 0.6s var(--ease), --r3 0.6s var(--ease), --r4 0.6s var(--ease),
    --r5 0.6s var(--ease), --r6 0.6s var(--ease), --r7 0.6s var(--ease);
}

.plan path, .plan line, .plan rect, .plan circle { vector-effect: non-scaling-stroke; }

/* Each room is a link to its own section: the plan is the page's map. */
.room-link { cursor: pointer; text-decoration: none; }
.room-link rect { transition: fill 0.2s var(--ease); }
.room-link:hover rect { fill: oklch(0.72 0.09 262 / 0.1); }
.room-link:focus { outline: none; }
.room-link:focus-visible rect { fill: oklch(0.72 0.09 262 / 0.14); stroke: var(--chalk); stroke-width: 2; }

.plan-caption {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--chalk-soft);
}
.plan-caption svg { flex: none; color: var(--line); }

/* ---- Hero --------------------------------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--bar-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(3rem, 8vh, 6rem) clamp(3rem, 10vh, 6.5rem);
}

.hero h1 { display: flex; flex-direction: column; gap: clamp(1rem, 2.5vw, 1.5rem); }

.hero .name {
  font-size: clamp(4rem, 2.4rem + 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero .tagline {
  max-width: 18ch;
  font-size: clamp(1.625rem, 1.1rem + 1.8vw, 2.375rem);
  line-height: 1.12;
  color: var(--chalk);
}

.hero .lead { max-width: 40ch; margin-top: clamp(1.25rem, 3vw, 1.75rem); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); }
@media (max-width: 29.99rem) { .actions .btn { flex: 1 1 100%; } }

.pin {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--chalk);
}

/* The drawing pin on the plan: the one thing that keeps moving, and only where motion is welcome. */
.pin::before {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 0.3rem var(--halo);
}

/* The sign's drawing behind the words, on narrow screens only - the wide layout has the real one alongside. */
.plan-ghost {
  position: absolute;
  top: 1rem;
  right: calc(var(--gutter) * -1 - 18vw);
  width: min(96vw, 30rem);
  height: auto;
  color: var(--line);
  opacity: 0.26;
  pointer-events: none;
  --tags: 0;
}
@media (min-width: 62rem) { .plan-ghost { display: none; } }

/* ---- Sections ----------------------------------------------------------------------------------------------- */

.intro { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule-faint); }
.intro p { max-width: 60ch; margin-top: 1.25rem; }
.intro .map-note { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9375rem; }
.intro .map-note svg { flex: none; margin-top: 0.25rem; color: var(--line); }

.room { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--rule-faint); }

.room-head { display: flex; align-items: center; gap: 1rem; }

.room-no {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font: 600 0.9375rem/1 var(--body);
  color: var(--chalk);
}

.plan-mini { display: none; width: 4.5rem; height: auto; flex: none; color: var(--line); --tags: 0; --room-fill: currentColor; --fill: 0.45; }
@media (max-width: 61.99rem) {
  .plan-mini { display: block; }
  .room-head .room-no { display: none; }
}

.room > p { max-width: 60ch; margin-top: 1.25rem; }

/* The plan stays whole while the last room is read: its column must outlast the drawing. */
@media (min-width: 62rem) {
  .spine-text .room:last-child { min-height: calc(100svh - var(--bar-h)); }
}

/* A drawing legend: short facts, each on a pencil tick. */
.legend { max-width: 60ch; margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.625rem; }
.legend li { position: relative; padding-left: 1.75rem; }
.legend li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 1rem;
  height: 1px;
  background: var(--line);
}

.sheet { margin: clamp(2rem, 4vw, 2.75rem) 0 0; }
.sheet .plate { display: block; border-radius: 0.5rem; text-decoration: none; cursor: zoom-in; }
.sheet img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  box-shadow: 0 1.75rem 3.5rem -1.75rem oklch(0.12 0.05 262 / 0.75);
  background: var(--ink-deep);
}
.sheet figcaption {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--chalk-soft);
}
.sheet figcaption::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: var(--line);
  transform: translateY(-0.3em);
}

.room-split > div > p { max-width: 60ch; margin-top: 1.25rem; }
.room-split .sheet { max-width: 30rem; }


/* ---- How we start: a chain of dimensions -------------------------------------------------------------------- */

.start { padding-block: clamp(4.5rem, 10vw, 8rem); border-top: 1px solid var(--rule-faint); }

.steps {
  counter-reset: step;
  display: grid;
  gap: 2.5rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .steps li { padding-right: clamp(1.5rem, 3vw, 3rem); }
}

.steps li { position: relative; padding-top: 2.5rem; }

/* The dimension line: a hairline with a tick at each step, the way a drawing measures a run of rooms. */
.steps li::before {
  content: "";
  position: absolute;
  top: 0.625rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.steps li::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0;
  width: 1px;
  height: 1.125rem;
  background: var(--line);
  transform: skewX(-35deg);
}
.steps li:last-child { padding-right: 0; }

.steps h3 { display: flex; align-items: baseline; gap: 0.75rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }
.steps h3::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--line-strong);
}
.steps p { margin-top: 0.875rem; max-width: 34ch; }

/* ---- Plans -------------------------------------------------------------------------------------------------- */

.plans { padding-block: clamp(4.5rem, 10vw, 8rem); border-top: 1px solid var(--rule-faint); }
.plans > .wrap > p { max-width: 60ch; margin-top: 1.25rem; }

.period {
  display: inline-flex;
  margin: 2rem 0 0;
  padding: 0.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
}
.period legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.period input { position: absolute; opacity: 0; pointer-events: none; }
.period label {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--chalk-soft);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.period label small { font-weight: 400; color: inherit; opacity: 0.85; }
.period input:checked + label { background: var(--chalk); color: var(--ink-deep); }
.period input:focus-visible + label { outline: 2px solid var(--chalk); outline-offset: 2px; }

.plan-set {
  display: grid;
  gap: 1.5rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

@media (min-width: 56rem) {
  .plan-set { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(9, auto); column-gap: 0; row-gap: 0; }
  .plan-col { display: grid; grid-row: span 9; grid-template-rows: subgrid; }
  .plan-col + .plan-col { border-left: 1px solid var(--rule); }
}

.plan-col {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
}

@media (min-width: 56rem) {
  .plan-col { border: 0; border-radius: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .plan-col:first-child { border-left: 1px solid var(--rule); border-radius: 0.5rem 0 0 0.5rem; }
  .plan-col:last-child { border-right: 1px solid var(--rule); border-radius: 0 0.5rem 0.5rem 0; }
}

.plan-col h3 { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); }
.plan-col .for { margin-top: 0.25rem; font-size: 0.9375rem; }

.price { margin-top: 1.5rem; color: var(--chalk); }
.price strong { font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; }
.price span { margin-left: 0.375rem; font-size: 0.9375rem; color: var(--chalk-soft); }
.price-r { display: none; }
.plans:has(#okres-r:checked) .price-m { display: none; }
.plans:has(#okres-r:checked) .price-r { display: block; }

.plan-col dl { display: contents; margin: 0; }
.plan-col .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--rule-faint);
}
.plan-col .row:first-of-type { margin-top: 1.5rem; }
.plan-col dt { font-size: 0.9375rem; }
.plan-col dd { margin: 0; color: var(--chalk); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.plan-col dd.no { color: var(--chalk-soft); font-weight: 400; opacity: 0.75; }
.plan-col .btn { margin-top: 1.75rem; align-self: end; }

.plans .note { margin-top: 1.75rem; font-size: 0.9375rem; max-width: 70ch; }

/* ---- The request form: a drawing's title block ------------------------------------------------------------- */

.request { padding-block: clamp(4.5rem, 10vw, 8rem) clamp(5rem, 10vw, 8rem); border-top: 1px solid var(--rule-faint); }
.request > .wrap > p { max-width: 62ch; margin-top: 1.25rem; }

.block {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  overflow: hidden;
}

.cell {
  position: relative;
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  padding: 0.875rem 1.125rem 1rem;
  background: var(--ink-deep);
  transition: background-color 0.2s var(--ease);
}
.cell:focus-within { background: var(--ink); }

@media (min-width: 48rem) {
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
}

.cell > label:not(.check), .cell > .label, .cell legend {
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-strong);
}
.cell .optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--chalk-soft); }

fieldset.cell { margin: 0; border: 0; min-inline-size: 0; }
fieldset.cell legend { float: left; width: 100%; margin-bottom: 0.375rem; }

.cell input[type="text"], .cell input[type="email"], .cell input[type="tel"], .cell textarea {
  width: 100%;
  padding: 0.25rem 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--chalk);
  font: 400 1.0625rem/1.5 var(--body);
}
.cell input::placeholder, .cell textarea::placeholder { color: oklch(0.84 0.03 262 / 0.72); }
.cell input:focus-visible, .cell textarea:focus-visible { outline: none; border-bottom-color: var(--line); }
.cell textarea { min-height: 6rem; resize: vertical; }

.address { display: flex; align-items: baseline; min-width: 0; }
.address input { flex: 1 1 auto; min-width: 4ch; text-align: right; }
.address span { flex: none; color: var(--chalk-soft); font-size: 1.0625rem; }

.hint, .error { font-size: 0.8125rem; }
.error { color: var(--warn); font-weight: 600; }
.error:empty { display: none; }
.cell.invalid { box-shadow: inset 0 0 0 1px var(--warn); }

.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; clear: both; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--chalk-soft);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.choices span:hover { border-color: var(--line); color: var(--chalk); }
.choices input:checked + span { background: var(--chalk); border-color: var(--chalk); color: var(--ink-deep); }
.choices input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }

.check { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--chalk-soft); cursor: pointer; clear: both; }
.check input {
  flex: none;
  appearance: none;
  display: grid;
  place-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  border: 1px solid var(--line);
  border-radius: 0.1875rem;
  background: var(--ink-deep);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.check input::before {
  content: "";
  width: 0.625rem;
  height: 0.375rem;
  margin-top: -0.125rem;
  border: solid var(--ink-deep);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s var(--ease);
}
.check input:checked { background: var(--chalk); border-color: var(--chalk); }
.check input:checked::before { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cell.invalid .check input { border-color: var(--warn); }
.check span { font-size: 0.9375rem; line-height: 1.5; }

.cell-submit { justify-content: center; background: var(--ink); }
.cell-submit .btn { width: 100%; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 1.25rem; font-weight: 600; color: var(--chalk); }
.form-status.is-error { color: var(--warn); }
.form-status:empty { display: none; }

.sent {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--ink-deep);
}
.sent p { max-width: 60ch; margin-top: 0.875rem; }

/* ---- Screenshot preview: a native dialog over the page, closed by its button, Esc or a click outside the shot. -- */

.lightbox {
  width: min(96vw, 100rem);
  max-height: 96svh;
  margin: auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--ink-deep);
  color: var(--chalk-soft);
  box-shadow: 0 2rem 4rem -1rem oklch(0.08 0.04 262 / 0.8);
}
.lightbox::backdrop { background: oklch(0.12 0.045 262 / 0.88); }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 0.75rem; }
.lightbox-close {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid oklch(0.84 0.03 262 / 0.45);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--chalk);
  font: 600 0.9375rem/1 var(--body);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.lightbox-close:hover { border-color: var(--chalk); background: oklch(0.96 0.008 262 / 0.06); }
.lightbox img {
  width: 100%;
  max-height: calc(96svh - 9rem);
  object-fit: contain;
  border-radius: 0.375rem;
}
.lightbox-caption { margin-top: 0.75rem; font-size: 0.875rem; }
.lightbox-caption:empty { display: none; }
html:has(.lightbox[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in 0.22s var(--ease); }
  .lightbox[open]::backdrop { animation: fade 0.22s var(--ease); }
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }

/* ---- Footer ------------------------------------------------------------------------------------------------- */

.foot { padding-block: 2.5rem 3rem; border-top: 1px solid var(--rule-faint); font-size: 0.875rem; }
.foot .wrap { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .foot .wrap { grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 2.5rem; } }
.foot .wordmark { font-size: 1.375rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }

/* ---- Cookie consent: a quiet strip on the sheet's bottom edge, both choices equally easy. ------------------------ */

.cookie-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom));
  background: var(--ink-deep);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -1.5rem 3rem -1.5rem oklch(0.08 0.04 262 / 0.7);
}
.cookie-bar-inner { width: min(100%, 82rem); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.cookie-bar p { flex: 1 1 32rem; margin: 0; font-size: 0.9375rem; }
.cookie-bar strong { margin-right: 0.5rem; color: var(--chalk); }
.cookie-bar-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 29.99rem) { .cookie-bar-actions .btn { flex: 1 1 0; } }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--chalk);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.link-button:hover { text-decoration-color: var(--chalk); }

/* ---- Document pages (terms, privacy, 404) ------------------------------------------------------------------- */

.doc { position: relative; min-height: calc(100svh - var(--bar-h) - 7rem); display: flex; align-items: center; padding-block: clamp(3rem, 10vw, 7rem); overflow: hidden; }
.doc .wrap { position: relative; z-index: 1; }
.doc h1 { font-size: clamp(2.75rem, 1.8rem + 4vw, 4.5rem); line-height: 1; letter-spacing: -0.02em; }
.doc p { max-width: 52ch; margin-top: 1.5rem; }
.doc .pin { margin-top: 2rem; }
.doc .sheet-drawing { position: absolute; right: -6rem; top: 50%; translate: 0 -50%; width: min(70vmin, 34rem); color: var(--line); opacity: 0.3; pointer-events: none; }

/* ---- Motion ------------------------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .plan .walls {
    stroke-dasharray: 1;
    animation: draw 2.4s var(--ease) 0.15s both;
  }
  .plan .detail, .plan .tags {
    animation: fade 1.2s var(--ease) 1.4s both;
  }
  .pin::before { animation: pin 2.8s var(--ease) infinite; }
  .sheet-drawing .walls { stroke-dasharray: 1; animation: draw 2.4s var(--ease) 0.15s both; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plan { transition: none; }
}

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pin {
  0%, 100% { box-shadow: 0 0 0 0.3rem var(--halo); }
  50% { box-shadow: 0 0 0 0.55rem var(--halo-faint); }
}
