/* Bernardin auction — Broadsheet design system (base + the components this page uses),
   retuned to the page's clean blue-and-white palette. */

/* Playfair Display Regular (SIL Open Font License, see assets/fonts/OFL.txt) covers Latin, č š ž, € and Cyrillic,
   so every language uses it. Only the regular weight is installed. */
@font-face { font-family: "Playfair Display"; src: url("assets/fonts/PlayfairDisplay-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }

:root {
  --color-bg: #ffffff;
  --color-surface: oklch(0.97 0.012 250);
  --color-text: oklch(0.24 0.05 258);
  --color-divider: oklch(0.24 0.05 258 / 0.14);
  --color-muted: color-mix(in srgb, var(--color-text) 70%, transparent);
  --color-band: oklch(0.955 0.006 250);

  --color-accent: oklch(0.42 0.12 258);
  --color-accent-100: oklch(0.95 0.02 250);
  --color-accent-400: oklch(0.52 0.12 255);
  --color-accent-600: oklch(0.36 0.11 259);
  --color-accent-700: oklch(0.32 0.1 260);
  --color-accent-800: oklch(0.27 0.085 260);

  --font-heading: "Playfair Display", Georgia, serif;
  --font-heading-weight: 600;
  --font-body: "Playfair Display", Georgia, serif;

  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;

  --radius-md: 2px;
  --color-button: #0c7286; /* filled buttons */
  --color-button-hover: color-mix(in srgb, #0c7286 82%, #fff);
  --text-size: 17px; /* one size for all running text: paragraphs, lists, tables, notes, form text */
  --text-line: 28px;
  --gutter: clamp(20px, 5vw, 72px);
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: var(--text-size); line-height: var(--text-line); font-weight: 400;
  background: var(--color-bg); color: var(--color-text); text-wrap: pretty;
  font-variant-numeric: lining-nums; /* Playfair defaults to old-style figures; prices, dates and the countdown read better level */
}
h1, h2, h3 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.tnum { font-feature-settings: 'tnum' 1; }
.serif-num { font-family: var(--font-heading); font-feature-settings: 'tnum' 1; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary, .btn-primary:hover { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-size); }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td { padding: var(--space-2); border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — photo slots: an <img> that falls back to a labelled placeholder until a photo is supplied — */
.photo { position: absolute; inset: 0; overflow: hidden; background: var(--color-surface); }
.photo img, .photo video { width: 100%; height: 100%; object-fit: cover; }
.photo video { object-fit: contain; background: #000; }
.photo::before {
  content: attr(data-placeholder); position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; text-align: center; padding: 16px;
  font-size: 14px; letter-spacing: 0.06em; color: var(--color-muted);
}
.photo.is-empty img { display: none; }
.photo.is-empty::before { display: flex; }

/* — PIN screen (a privacy screen only: the page content is still in the files) — */
.gate { display: none; }
.locked body { overflow: hidden; }
.locked .hero, .locked main { display: none; }
.locked .gate {
  display: flex; position: fixed; inset: 0; z-index: 10; align-items: center; justify-content: center; padding: 24px;
  background: var(--color-accent-800); color: #fff;
}
.gate-box { display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(100%, 320px); text-align: center; }
.gate-box img { height: 110px; width: auto; margin-bottom: 12px; filter: invert(1); mix-blend-mode: screen; }
.gate-title { margin: 0; font-size: 22px; }
.gate-box label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.gate-box input {
  width: 100%; padding: 12px 14px; text-align: center; font: inherit; font-size: 24px; letter-spacing: 0.5em;
  color: #fff; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.5); border-radius: var(--radius-md); outline: none;
}
.gate-box input:focus { border-color: #fff; }
.gate-btn {
  width: 100%; padding: 12px 22px; border: 1px solid var(--color-button); border-radius: var(--radius-md); background: var(--color-button);
  font: inherit; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; cursor: pointer; transition: background 0.2s ease;
}
.gate-btn:hover { background: var(--color-button-hover); border-color: var(--color-button-hover); }
.gate-error { margin: 0; font-size: 14px; color: #ffd2d2; }
.gate-call { margin: 12px 0 0; font-size: 15px; line-height: 1.6; opacity: 0.85; }
.gate-call a { color: #fff; font-size: 19px; letter-spacing: 0.04em; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 0.5); }
.gate-call a:hover { color: #fff; border-bottom-color: #fff; }
.gate-langs { position: absolute; top: 24px; right: 24px; }

/* — running text is justified, so full lines meet both edges; centred blocks keep their last line centred — */
.intro p, .viewing > p, .footer span, .terms p, .terms li, .terms .lines span, .dep-text, .calc-note {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
.intro p, .viewing > p, .footer span { text-align-last: center; }

/* photos can't be long-press saved on phones or selected/dragged */
img, video { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }

/* — hero — */
.hero { position: relative; height: 100vh; min-height: 640px; background: var(--color-accent-800); overflow: hidden; color: #fff; }
.hero .photo { background: var(--color-accent-800); }
.hero .photo video { object-fit: cover; background: none; }
.hero .photo::before { color: rgb(255 255 255 / 0.5); align-items: flex-end; padding-bottom: 120px; }
.hero-shade { position: absolute; inset: 0; background: rgba(10, 20, 40, 0.32); pointer-events: none; }
/* Scroll fade: app.js sets --p from 0 (top) to 1 (scrolled 60% of the hero). The bottom of the photo dissolves into the
   page below the button; the headline and button sit above it and stay fully visible. */
.hero-title, .hero-scroll { z-index: 2; }
.hero-scroll { opacity: calc(1 - var(--p, 0) * 1.6); translate: 0 calc(var(--p, 0) * -24px); } /* only the scroll hint fades away */
@media (prefers-reduced-motion: reduce) { .hero-scroll { translate: none; } }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--color-bg)); opacity: var(--p, 0);
}
.hero-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: 20px var(--gutter) 90px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  /* blue tint behind the logo, menu and languages, deep blue at the top easing through lighter blues to clear ~90px below the menu */
  background: linear-gradient(to bottom,
    color-mix(in srgb, oklch(0.36 0.17 257.99) 50%, transparent) 0%,
    color-mix(in srgb, oklch(0.46 0.22 259.87) 47%, transparent) 30%,
    color-mix(in srgb, oklch(0.47 0.16 259.81) 38%, transparent) 50%,
    color-mix(in srgb, oklch(0.67 0.1 261.78) 25%, transparent) 65%,
    color-mix(in srgb, oklch(0.69 0.08 262.21) 13%, transparent) 78%,
    color-mix(in srgb, oklch(1 0 0) 5%, transparent) 90%,
    color-mix(in srgb, oklch(0.37 0.19 259.8) 0%, transparent) 100%);
}
.langs { position: absolute; top: 28px; right: var(--gutter); display: flex; gap: 2px; }
.langs button {
  background: none; border: 0; cursor: pointer; min-width: 34px; padding: 6px;
  font: inherit; font-size: 13px; letter-spacing: 0.08em; color: #fff; opacity: 0.7; font-weight: 400;
}
.langs button:hover, .langs button[aria-pressed="true"] { opacity: 1; }
.langs button[aria-pressed="true"] { font-weight: 600; }
.hero-logo { display: flex; }
.hero-logo img { height: 64px; width: auto; filter: invert(1); mix-blend-mode: screen; }
.hero-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; font-size: 16px; }
.hero-nav a { color: #fff; text-decoration: none; white-space: nowrap; }
.hero-nav a:hover { color: #fff; text-decoration: underline; }
.hero-title {
  /* starts 45% down, so the headline block is centred at about 72% of the hero height; on short screens it starts
     higher (100% - 440px) so the button never reaches the scroll hint */
  position: absolute; inset: min(45%, calc(100% - 440px)) 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px; pointer-events: none;
}
.hero-title h1 { margin: 0; font-family: var(--font-heading); font-size: min(50px, max(3.6vw, min(24px, 5.4vw))); line-height: 1.15; letter-spacing: -0.01em; font-weight: 400; color: #fff; }
/* h1a over h1b, each kept whole; on narrow phones the size follows the screen width so the longer line still fits */
.hero-title h1 span { display: block; white-space: nowrap; }
.hero-cta {
  margin-top: 48px; padding: 12px 22px; border: 1px solid rgb(255 255 255 / 0.85); border-radius: var(--radius-md);
  font-family: var(--font-heading); font-size: clamp(14.4px, 1.44vw, 19.2px); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; text-decoration: none; pointer-events: auto; transition: background 0.2s ease;
}
.hero-cta:hover { color: #fff; background: rgb(255 255 255 / 0.14); }
.hero-cta span { white-space: nowrap; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-scroll:hover { color: #fff; }
.hero-scroll span:first-child { font-family: Georgia, serif; font-size: 20px; line-height: 1; animation: scroll-nudge 2s ease-in-out infinite; }
.hero-scroll span:last-child { animation: scroll-glow 2s ease-in-out infinite; }
@keyframes scroll-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes scroll-glow { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero-scroll span { animation: none; }
}

/* — intro + facts — */
.intro { max-width: 1080px; margin: 0 auto; padding: 104px 24px 56px; text-align: center; }
.intro p { margin: 0 auto; max-width: 80ch; }
.intro .actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; margin-top: 32px; }

/* "Book a viewing" and the form's submit button: the hero button's bordered style in navy; a soft tint follows the cursor and the button leans towards it */
.btn-view {
  position: relative; isolation: isolate; overflow: hidden; display: inline-block;
  padding: 12px 22px; border: 1px solid var(--color-button); border-radius: var(--radius-md);
  font-family: var(--font-heading); font-size: clamp(14.4px, 1.44vw, 19.2px); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--color-button); text-decoration: none; cursor: pointer;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  transition: transform 0.25s ease, background 0.2s ease;
}
.btn-view::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.25s ease;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.22), transparent 70%);
}
.btn-view:hover, .btn-view:focus-visible { color: #fff; background: var(--color-button-hover); border-color: var(--color-button-hover); }
.btn-view:hover::before { opacity: 1; }
.btn-view:active { transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.98); }
@media (prefers-reduced-motion: reduce) { .btn-view { transition: none; } }

/* property: key facts on top, cadastral aerial photo under them, book-a-viewing button under everything; all centred */
.property {
  max-width: 1000px; margin: 0 auto; padding: 0 24px 96px;
  display: flex; flex-direction: column; align-items: center; gap: 48px;
}
.property-info, .property-map { width: min(100%, 560px); } /* photo matches the facts list width */
.property-map { margin: 0; }
.property-map img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }

/* click-to-enlarge (cadastral photo and gallery photos) */
.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; }
.zoomable img { transition: transform 0.3s ease; }
.property-map .zoomable { overflow: hidden; border-radius: var(--radius-md); }
.property-map .zoomable:hover img { transform: scale(1.02); }
#gallery-stage .photo img { cursor: zoom-in; }
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(8 14 30 / 0.94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lightbox-in 0.25s ease; }
@keyframes lightbox-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px clamp(12px, 6vw, 96px); }
.lightbox-media > img:first-child, .lightbox-media > video { max-width: calc(100vw - 2 * clamp(12px, 6vw, 96px)); max-height: calc(100vh - 112px); object-fit: contain; display: block; }
.lightbox-btn {
  position: absolute; width: 52px; height: 52px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0.85; transition: opacity 0.2s ease;
}
.lightbox-btn:hover { opacity: 1; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 8px; right: 8px; font: inherit; font-size: 40px; line-height: 1; }
.lightbox-prev { left: clamp(4px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: clamp(4px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; font-size: 14px; letter-spacing: 0.1em; opacity: 0.75; }
.facts { display: flex; flex-direction: column; gap: 12px; }
.fact { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.fact-dots { flex: 1; min-width: 28px; align-self: flex-end; margin-bottom: 0.34em; border-bottom: 1px dotted var(--color-divider); }
.fact-value { font-family: var(--font-heading); font-weight: 400; white-space: nowrap; color: var(--color-accent); }

/* — countdown + calculator band: on wide screens each column is as wide as its figure (countdown, bid stepper) and the
   pair is centred, so the visible margins match; the text below each figure wraps to that width instead of widening it — */
.band { background: var(--color-band); padding: 80px var(--gutter); }
.band-grid {
  --cd-size: clamp(44px, 5vw, 64px);
  margin: 0 auto; display: grid; gap: 28px clamp(48px, 7vw, 112px); align-items: start; justify-content: center;
  grid-template-columns: minmax(0, 460px);
  grid-template-areas: "cdk" "cd" "dep" "calk" "step" "calc";
}
.cd-title { grid-area: cdk; }
.countdown { grid-area: cd; }
.dep-text { grid-area: dep; }
@media (min-width: 820px) { .dep-text, .calc { width: 0; min-width: 100%; } }
/* wide screens: the deposit deadline stays on one line and its column widens to fit it, but only when app.js
   (fitDeposit) finds the whole band still fits the page; long translations wrap instead of running into the calculator */
@media (min-width: 1200px) { .band-grid .dep-text.one-line { width: auto; min-width: 0; max-width: none; white-space: nowrap; } }
.calc-title { grid-area: calk; margin-top: 32px; }
.stepper { grid-area: step; }
.calc { grid-area: calc; }
@media (min-width: 820px) {
  .band-grid { grid-template-columns: max-content max-content; grid-template-areas: "cdk calk" "cd step" "dep calc"; }
  .calc-title { margin-top: 0; }
}
.kicker { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent); }
.countdown { display: flex; gap: clamp(12px, 3.5vw, 48px); flex-wrap: wrap; }
.countdown div { display: flex; flex-direction: column; gap: 12px; min-width: 56px; }
.countdown .n { font-family: var(--font-heading); font-size: var(--cd-size); font-weight: 400; line-height: 1; font-feature-settings: 'tnum' 1; color: var(--color-accent); }
.countdown .l { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); }
.dep-text { margin: 4px 0 0; max-width: 46ch; }

/* the stepper sits level with the countdown digits */
.stepper { display: flex; align-items: center; gap: clamp(8px, 1vw, 12px); height: var(--cd-size); }
.stepper .bid { font-family: var(--font-heading); font-size: min(calc(var(--cd-size) * 1.25), 10vw); font-weight: 400; line-height: 1; font-feature-settings: 'tnum' 1; color: var(--color-accent-800); white-space: nowrap; }
.stepper .btn, .stepper .btn:disabled { color: #000; border-color: #000; opacity: 1; font-size: 18px; } /* −/+ stay solid black everywhere, even at the starting price */
.stepper .cur { font-size: 12.5px; letter-spacing: 0.1em; color: var(--color-muted); }
.calc { margin-top: 4px; }
.calc-steps { margin: 0; }
.calc-open { margin-top: 20px; }

/* calculator popup */
.calc-dialog {
  --cd-size: clamp(34px, 4vw, 48px);
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: var(--radius-md);
  background: #fff; color: var(--color-text); box-shadow: 0 30px 80px -20px rgb(10 20 40 / 0.45);
}
.calc-dialog[open] { animation: dialog-in 0.25s ease; }
.calc-dialog::backdrop { background: rgb(10 20 40 / 0.55); backdrop-filter: blur(3px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .calc-dialog[open] { animation: none; } }
html:has(.calc-dialog[open]) { overflow: hidden; }
.calc-dialog-body { position: relative; padding: 40px clamp(20px, 5vw, 40px) 32px; }
.calc-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 30px; line-height: 1; color: #000;
}
.calc-close:hover { color: var(--color-accent); }
.calc-dialog .stepper { margin: 22px 0 10px; }
.calc-dialog .calc-steps { margin-bottom: 20px; color: var(--color-muted); }
.calc-dialog .table { text-align: left; }
.calc-dialog .table td + td { text-align: right; white-space: nowrap; font-feature-settings: 'tnum' 1; }
.calc-dialog .table tr.is-strong td { font-weight: 400; color: var(--color-accent-800); }
.calc-note { margin: 12px 0 0; color: var(--color-muted); }

/* — gallery: the photo spans the page, arrows sit outside it (below it on phones), logo watermark bottom right — */
.gallery { padding: 96px max(clamp(16px, 2vw, 32px), calc((100% - 1496px) / 2)); } /* content capped at 1496px */
.gallery h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; margin: 0 0 36px; text-align: center; font-weight: 400; }
.gallery-stage { position: relative; aspect-ratio: 16 / 9; background: var(--color-surface); margin-inline: 76px; }
.gallery-stage .photo[hidden] { display: none; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; padding: 0;
  border: 0; background: none; color: #000; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: color 0.2s ease;
}
.gallery-arrow svg { transition: transform 0.2s ease; }
.gallery-arrow.prev:hover svg { transform: translateX(-4px); }
.gallery-arrow.next:hover svg { transform: translateX(4px); }
.gallery-arrow[hidden], .gallery[hidden], .hero-nav a[hidden] { display: none; }
.gallery-arrow:hover { color: var(--color-accent-800); }
.gallery-arrow.prev { left: -76px; }
.gallery-arrow.next { right: -76px; }
.gallery-mark {
  position: absolute; right: clamp(12px, 2vw, 28px); bottom: clamp(10px, 1.6vw, 22px); z-index: 1;
  height: clamp(36px, 5.5vw, 84px); width: auto; opacity: 0.85; pointer-events: none;
  filter: invert(1); mix-blend-mode: screen;
}
.gallery-stage.is-video .gallery-mark { bottom: clamp(52px, 5vw, 64px); } /* clear the video controls */
/* the same logo watermark on the cadastral photo and in the full-screen viewer */
.zoomable .gallery-mark { width: auto; height: clamp(30px, 4vw, 56px); right: 12px; bottom: 10px; border-radius: 0; }
.zoomable:hover .gallery-mark { transform: none; }
.lightbox-media { position: relative; display: inline-flex; max-width: 100%; max-height: 100%; }
.lightbox-media .gallery-mark { height: clamp(40px, 6vw, 96px); }
.lightbox-media.is-video .gallery-mark { bottom: clamp(56px, 6vw, 72px); }
.gallery-meta {
  display: flex; justify-content: flex-end; gap: 16px; margin: 16px 76px 0;
  font-size: 14px; letter-spacing: 0.06em; color: var(--color-muted);
}
@media (max-width: 760px) {
  .gallery-stage { margin-inline: 0; }
  .gallery-arrow { top: calc(100% + 16px); transform: none; width: 44px; height: 44px; }
  .gallery-arrow.prev { left: 0; }
  .gallery-arrow.next { right: 0; }
  .gallery-meta { justify-content: center; margin: 0; height: 76px; align-items: center; }
}

/* — terms article — */
.terms { max-width: 760px; margin: 0 auto; padding: 40px 24px 96px; display: flex; flex-direction: column; gap: 72px; }
.terms .num { color: var(--color-accent); margin-right: 0.15em; }
.terms h2 { font-size: 32px; line-height: 40px; letter-spacing: -0.015em; margin: 0 0 20px; font-weight: 400; }
.terms p { margin: 20px 0 0; }
.terms h2 + p { margin-top: 0; }
.terms .stack { display: flex; flex-direction: column; gap: 20px; }
.terms .stack p { margin: 0; }
.terms ol { margin: 12px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 3px; }
.terms .lines { margin: 24px 0 0; display: flex; flex-direction: column; }
.parcels { margin-top: 20px; max-width: 420px; }
.parcels th + th, .parcels td + td { text-align: right; }
.parcels td + td { font-feature-settings: 'tnum' 1; }
.parcels tr.is-total td { font-weight: 600; }
.iban { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 16px 0 0; }
.iban span { font-family: var(--font-heading); font-size: 24px; line-height: 32px; letter-spacing: 0.02em; font-feature-settings: 'tnum' 1; }
.terms .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* — viewing form — */
.viewing { background: var(--color-band); padding: 96px var(--gutter); }
.viewing > * { max-width: 680px; margin-inline: auto; }
.viewing h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 auto; text-align: center; font-weight: 400; }
.viewing > p { margin: 16px auto 40px; max-width: 52ch; }
@media (min-width: 760px) { .viewing > p { max-width: none; width: max-content; white-space: nowrap; } } /* form intro on one line */
.viewing form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px 24px; }
.viewing label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted);
}
.viewing label.wide, .viewing .submit { grid-column: 1 / -1; }
.viewing input, .viewing textarea {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 1px solid var(--color-divider); background: #fff; color: var(--color-text);
  border-radius: 0; outline: none; text-transform: none; letter-spacing: 0;
}
.viewing textarea { resize: vertical; }
.viewing input:focus, .viewing textarea:focus { border-color: var(--color-accent); }
.viewing .submit { display: flex; justify-content: center; margin-top: 8px; }
.viewing .thanks { margin: 0 auto; padding: 28px; background: #fff; text-align: center; }
.viewing [hidden] { display: none; }
.viewing .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* spam trap, hidden from people */
.form-error { grid-column: 1 / -1; margin: 0; text-align: center; color: #b3261e; }
.form-error-detail { display: block; margin-top: 6px; font-size: 13px; color: var(--color-muted); }
.btn-view:disabled { opacity: 0.6; cursor: wait; }

/* — footer — */
.footer {
  margin: 0 auto; padding: 56px 24px 64px;
  text-align: center; color: var(--color-muted); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.footer img { height: 150px; width: auto; margin-bottom: 20px; mix-blend-mode: multiply; }
.footer [hidden] { display: none; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; margin-bottom: 24px; font-size: 15px; }
.footer-nav a { color: var(--color-accent-700); text-decoration: none; white-space: nowrap; }
.footer-nav a:hover { color: var(--color-accent-800); text-decoration: underline; }
.footer #footer-line { white-space: nowrap; } /* one line; app.js eases the size down if it would not fit, or lets it wrap on phones */
.footer #footer-line.wraps { white-space: normal; max-width: 760px; }
