/* P01 · Rezidencia Pod Hájom · Cinematic dark */

@property --t {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.62;
}

:root {
  --bg: oklch(0.22 0.01 60);
  --bg-2: oklch(0.26 0.012 60);
  --bg-3: oklch(0.18 0.01 60);
  --paper: oklch(0.94 0.015 80);
  --paper-fg: oklch(0.22 0.01 60);
  --paper-muted: oklch(0.46 0.02 70);
  --paper-line: oklch(0.82 0.015 80);
  --fg: oklch(0.92 0.02 80);
  --muted: oklch(0.7 0.02 75);
  --accent: oklch(0.72 0.11 80);
  --accent-fg: oklch(0.2 0.02 60);
  --line: oklch(0.35 0.01 60);
  --win: oklch(0.85 0.1 80);
  --section-y: clamp(6rem, 5rem + 6vw, 11rem);

  --margin: clamp(1.25rem, 8vw, 7rem);
  --gutter: 24px;
  --nav-h: 64px;

  --display-1: clamp(2.75rem, 2rem + 4vw, 6.5rem);
  --display-2: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  --display-3: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
  --step-0: 1.0625rem;
  --lead: 1.25rem;

  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html:not(.motion) { scroll-behavior: smooth; } }
html.motion { scroll-behavior: auto !important; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg) var(--grain);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-fg); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.paper :focus-visible { outline-color: var(--paper-fg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; }
.ic { width: 1.125em; height: 1.125em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 12px 16px; background: var(--fg); color: var(--bg);
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- type ---------- */
.display-1, .display-2, .display-3 {
  font-family: var(--serif);
  font-weight: 400;
  font-feature-settings: "lnum";
  text-wrap: balance;
}
.display-1 { font-size: var(--display-1); line-height: 0.98; letter-spacing: -0.01em; }
.display-2 { font-size: var(--display-2); line-height: 1.04; letter-spacing: -0.01em; }
.display-3 { font-size: var(--display-3); line-height: 1.1; }
.display-1 em, .display-2 em { font-style: italic; }
.lead { font-size: var(--lead); line-height: 1.5; font-weight: 300; max-width: 34ch; }
.lead-xl { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.45; font-weight: 300; max-width: 36ch; text-wrap: pretty; }
.label {
  font: 600 0.75rem/1.2 var(--sans);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--margin), 1440px); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.grid > * { grid-column: 1 / -1; }
.section { padding-block: var(--section-y); position: relative; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 2px;
  background: var(--accent); color: var(--accent-fg);
  font: 600 1rem/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: oklch(0.78 0.11 82); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-color: var(--fg); outline-offset: 3px; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: underline; text-decoration-color: oklch(0.92 0.02 80 / .4);
  transition: text-decoration-color .3s var(--ease);
}
.text-link:hover { text-decoration-color: var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid oklch(0.92 0.02 80 / .28);
  background: oklch(0.18 0.01 60 / .55);
  font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.02em; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: max(var(--margin), calc((100% - 1440px) / 2));
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: oklch(0.22 0.01 60 / 0.85); border-bottom-color: oklch(0.35 0.01 60 / .6); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; justify-self: start; }
.brand-mark { width: 22px; height: 22px; fill: var(--fg); }
.brand-name { font: italic 400 1.25rem/1 var(--serif); letter-spacing: 0.01em; }
.chip-nav { justify-self: center; min-height: 44px; transition: opacity .5s var(--ease), visibility 0s linear .5s; }
.js .nav:not(.past-hero) .chip-nav { opacity: 0; visibility: hidden; }
.js .nav.past-hero .chip-nav { transition-delay: 0s; }
.menu-btn {
  justify-self: end; min-height: 44px; min-width: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 75%;
  transition: background-size .4s var(--ease);
}
.menu-btn:hover { background-size: 100% 1px; }
.no-js .menu-btn { display: none; }

/* ---------- overlay menu ---------- */
.menu {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bg) var(--grain); color: var(--fg);
}
.menu::backdrop { background: oklch(0.12 0.01 60 / .6); }
.menu[open] { animation: menu-in .5s var(--ease-out); }
@keyframes menu-in { from { opacity: 0; } }
.menu-inner {
  min-height: 100%; display: grid; grid-template-columns: 1fr; align-content: center; gap: 48px;
  padding: calc(var(--nav-h) + 24px) var(--margin) 48px;
}
.menu-close {
  position: absolute; top: 10px; right: var(--margin);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  border: 0; background: none; cursor: pointer;
  font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
}
.menu-links { display: grid; gap: 4px; }
.menu-links a {
  font: 400 clamp(2.25rem, 1.5rem + 3vw, 3.5rem)/1.1 var(--serif); text-decoration: none;
  display: inline-block; padding-block: 4px;
  background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 92%;
  transition: background-size .5s var(--ease-out);
}
.menu-links a:hover, .menu-links a:focus-visible { background-size: 100% 2px; }
.menu-contact { display: grid; gap: 8px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.contact-link:hover { text-decoration: underline; }
@media (min-width: 1024px) {
  .menu-inner { grid-template-columns: 7fr 5fr; align-items: end; }
}

/* ---------- media + placeholders ---------- */
.media { position: relative; overflow: hidden; background: var(--bg-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.media.is-missing {
  background: var(--grain), linear-gradient(160deg, oklch(0.3 0.02 60), oklch(0.2 0.01 60));
  box-shadow: inset 0 0 0 1px var(--line);
}
.paper .media { background: oklch(0.88 0.015 80); }
.paper .media.is-missing { background: var(--grain), linear-gradient(160deg, oklch(0.84 0.02 80), oklch(0.76 0.02 70)); box-shadow: inset 0 0 0 1px var(--paper-line); }

/* ---------- hero ---------- */
.hero-scene { position: relative; }
.hero {
  --hero-h: max(100svh, 560px);
  --t: 0.62;
  position: sticky; top: 0; height: var(--hero-h); overflow: clip; isolation: isolate;
  background: var(--bg-3);
}
.hero-stage {
  position: absolute; left: 50%; top: 50%; translate: -50% -47%;
  width: max(100%, calc(var(--hero-h) * 1.8882));
  aspect-ratio: 1920 / 1088; overflow: visible; background: none;
  will-change: transform;
}
.hero-stage img { filter: brightness(calc(1.2 - var(--t) * 0.46)) saturate(calc(1.04 - var(--t) * 0.24)); }
.hero-stage.is-missing { background: var(--grain), radial-gradient(120% 70% at 50% 100%, oklch(0.32 0.03 70), oklch(0.2 0.03 250) 70%); }
.hero-stage.is-missing .wins { display: none; }
.wins { position: absolute; inset: 0; pointer-events: none; }
.win, .win-off { position: absolute; transition: opacity .9s var(--ease) calc(var(--i, 0) * 40ms); }
.win-off {
  background: linear-gradient(170deg, oklch(0.62 0.03 235), oklch(0.4 0.03 250) 60%, oklch(0.34 0.02 250));
  mix-blend-mode: multiply; opacity: 0.94;
}
.win {
  opacity: 0;
  background: linear-gradient(180deg, oklch(0.9 0.12 82), oklch(0.8 0.15 70) 60%, oklch(0.72 0.16 60));
  box-shadow: 0 0 2.4em 0.7em oklch(0.8 0.14 72 / 0.45);
  mix-blend-mode: overlay;
}
.hero.is-lit .win { opacity: var(--o, 0.92); }
.hero.is-lit .win-off { opacity: 0; }
.is-safari .win { box-shadow: none; }

.hero-ov, .hero-ov-day, .hero-ov-night, .hero-scrim { position: absolute; inset: 0; pointer-events: none; }
.hero-ov {
  --day: oklch(0.75 0.04 75 / 0.05);
  --night: oklch(0.2 0.04 260 / 0.72);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--day), var(--night) calc(var(--t) * 100%)) 0%,
    color-mix(in oklab, var(--day), var(--night) calc(var(--t) * 72%)) 55%,
    color-mix(in oklab, var(--day), var(--night) calc(var(--t) * 90%)) 100%);
}
.hero-ov-day, .hero-ov-night { display: none; }
.is-safari .hero-ov { display: none; }
.is-safari .hero-ov-day { display: block; background: oklch(0.75 0.04 75 / 0.05); }
.is-safari .hero-ov-night { display: block; opacity: 0.62; background: linear-gradient(180deg, oklch(0.2 0.04 260 / 0.72), oklch(0.2 0.04 260 / 0.52) 55%, oklch(0.2 0.04 260 / 0.65)); }
.is-safari .hero-stage img { filter: none; }
.hero-scrim {
  background:
    linear-gradient(0deg, oklch(0.14 0.012 60 / 0.86) 0%, oklch(0.14 0.012 60 / 0.5) 30%, transparent 58%),
    linear-gradient(90deg, oklch(0.14 0.012 60 / 0.45), transparent 55%);
}
.hero-scrim::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 160px;
  background: linear-gradient(180deg, oklch(0.14 0.012 60 / 0.55), transparent);
}

.hero-inner {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-content: end; padding-bottom: clamp(2.5rem, 8vh, 6rem);
}
.hero-copy { grid-column: 1 / -1; display: grid; gap: 20px; justify-items: start; }
.hero-copy h1 { max-width: 15ch; text-shadow: 0 2px 30px oklch(0.14 0.012 60 / .5); }
.hero-copy h1 em { color: oklch(0.88 0.06 82); }
.hero-sub { max-width: 40ch; color: oklch(0.92 0.02 80 / .92); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 8px; }
.chip-hero { margin-top: -4px; }
.hero-clock {
  position: absolute; z-index: 2; right: max(var(--margin), calc((100% - 1440px) / 2)); bottom: clamp(2.5rem, 8vh, 6rem);
  display: none; text-align: right;
}
.hero-clock-time { display: block; font: italic 400 2rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; color: oklch(0.92 0.02 80 / .85); }
.hero-clock-hint { display: block; margin-top: 8px; font: 600 0.6875rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: opacity .6s var(--ease); }
.hero.is-dusk .hero-clock-hint { opacity: 0; }
html:not(.motion) .hero-clock-hint { display: none; }

@media (min-width: 768px) {
  html.motion .hero-scene { height: calc(var(--hero-h-scene, max(100svh, 560px)) + 90vh); }
  .hero-clock { display: block; }
}
@media (min-width: 1024px) {
  /* building sits right of centre so the lit facade is not hidden behind the headline */
  .hero-stage { left: 60%; width: max(120%, calc(var(--hero-h) * 1.8882)); }
  .hero-copy { grid-column: 1 / 8; }
  .hero-copy h1 { max-width: 13ch; }
  .chip-hero { position: absolute; top: calc(var(--nav-h) + 28px); right: var(--margin); margin: 0; }
}
@media (min-width: 600px) and (max-width: 1023px) and (orientation: portrait) {
  /* tablet portrait: show the whole facade under the nav, let it sink into the dark ground */
  .hero-stage { top: calc(var(--nav-h) - 16px); translate: -50% 0; width: 175%; }
  .hero-stage::after { content: ""; position: absolute; inset: auto 0 -2px; height: 34%; background: linear-gradient(transparent, var(--bg-3)); pointer-events: none; }
  .hero-scrim::before { background: linear-gradient(180deg, oklch(0.14 0.012 60 / 0.75), transparent); }
}
@media (max-width: 767px) {
  .hero { --hero-h: max(80svh, 560px); }
  .nav { grid-template-columns: auto 1fr auto; column-gap: 12px; }
  .brand-name { font-size: 1.0625rem; white-space: nowrap; }
  .brand { gap: 8px; }
  .chip-nav { padding: 0 12px; gap: 8px; }
  .hero-copy h1 { font-size: clamp(2.25rem, 1.4rem + 4.4vw, 2.75rem); }
  .hero-sub { font-size: 1.0625rem; }
}

/* ---------- reveal (only under html.motion) ---------- */
html.motion .reveal { opacity: 0; transform: translateY(32px); }
html.motion .media-photo img { opacity: 0; transform: scale(1.06); }
html.motion .reveal.is-in { opacity: 1 !important; transform: none !important; }
html.motion .media-photo.is-in img { opacity: 1 !important; transform: none !important; }

/* ---------- byty / floor picker ---------- */
.byty-intro { display: grid; gap: 20px; margin-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.picker { display: grid; gap: 32px; grid-column: 1 / -1; }
.picker-build { min-width: 0; }
.build-frame { position: relative; padding: 0 0 0 0; }
.roof { position: relative; height: 22px; margin-left: 3rem; }
.roof span { position: absolute; left: 8%; right: 18%; bottom: 0; height: 14px; border: 1px solid var(--line); border-bottom: 0; }
.roof::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 2px; background: var(--line); }
.building { --row-h: clamp(64px, 11vh, 112px); position: relative; display: grid; }
.floor {
  appearance: none; display: grid; grid-template-columns: 3rem 1fr; align-items: stretch;
  height: var(--row-h); padding: 0; margin: 0; border: 0; background: none; cursor: pointer; text-align: left;
  opacity: 0.35; transition: opacity .4s var(--ease);
}
.floor + .floor .units { border-top: 0; }
.floor.is-active, .floor.is-lit { opacity: 1; }
.floor:focus-visible { outline: none; }
.floor:focus-visible .units { outline: 2px solid var(--accent); outline-offset: 3px; }
.floor-no { align-self: center; font: 400 1.5rem/1 var(--serif); font-feature-settings: "lnum"; color: var(--muted); }
.floor.is-active .floor-no { color: var(--fg); }
.units {
  display: flex; gap: 3px; padding: 5px 0 3px; border-bottom: 2px solid var(--line); min-width: 0;
  background: linear-gradient(var(--line), var(--line)) 0 100% / 100% 0 no-repeat;
}
.u {
  position: relative; flex: var(--a) 1 0; min-width: 0;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .4s var(--ease), box-shadow .25s var(--ease);
}
.u::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 6px; height: 1px; background: currentColor; opacity: .25; }
.u[data-s="volny"] { background-color: oklch(0.72 0.11 80 / 0.9); color: var(--accent-fg); box-shadow: none; }
.u[data-s="rezervovany"] {
  background-color: oklch(0.72 0.11 80 / 0.16);
  background-image: repeating-linear-gradient(135deg, oklch(0.72 0.11 80 / 0.4) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 1px oklch(0.72 0.11 80 / 0.4); color: var(--fg);
}
.u[data-s="predany"] { background-color: var(--line); box-shadow: none; color: oklch(0.92 0.02 80 / .8); }
.building.is-dark .floor:not(.is-lit) .u { background-color: var(--bg-2); background-image: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.u-id { position: absolute; left: 6px; top: 5px; font: 600 0.6875rem/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.floor:not(.is-active):not(.is-lit) .u-id { visibility: hidden; }
.u.is-cursor { box-shadow: inset 0 0 0 2px var(--fg); }
.u.is-cursor::before { content: ""; position: absolute; inset: 4px; border: 1px dashed currentColor; opacity: .7; }
.u.is-picked { box-shadow: inset 0 0 0 2px var(--fg), 0 0 0 2px var(--fg); z-index: 1; }
.parter {
  height: calc(var(--row-h, 60px) * 1.15); margin-left: 3rem;
  display: flex; align-items: center; padding: 0 16px;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 0.75rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  position: relative;
}
.picker-build .parter { --row-h: clamp(64px, 11vh, 112px); }
.parter::after { content: ""; position: absolute; right: 22%; bottom: 0; width: 9%; height: 62%; border: 1px solid var(--line); border-bottom: 0; background: oklch(0.85 0.1 80 / .1); }
.ground { height: 1px; margin-left: 0; background: var(--muted); opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 0 3rem; font-size: 0.875rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 12px; display: inline-block; }
.sw-volny { background: oklch(0.72 0.11 80 / .9); }
.sw-rezervovany { background: repeating-linear-gradient(135deg, oklch(0.72 0.11 80 / .55) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 1px oklch(0.72 0.11 80 / .5); }
.sw-predany { background: var(--line); }
.kbd-hint { margin: 8px 0 0 3rem; font-size: 0.8125rem; color: var(--muted); display: none; }
.has-kbd .kbd-hint { display: block; }

.picker-panel { min-width: 0; }
.floor-chips { display: flex; gap: 8px; margin-bottom: 20px; }
.floor-chips button {
  min-width: 44px; min-height: 44px; flex: 1; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: none;
  font: 400 1.25rem/1 var(--serif); font-feature-settings: "lnum";
}
.floor-chips button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.panel { min-height: 34rem; outline: none; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.panel-meta { color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-body { transition: opacity .25s var(--ease); }
.panel-body.is-swap { opacity: 0; }
.unit-list li { border-bottom: 1px solid var(--line); }
.unit-row {
  width: 100%; display: grid; grid-template-columns: 3.75rem 1fr auto; align-items: center; gap: 4px 16px;
  min-height: 60px; padding: 8px 4px; border: 0; background: none; text-align: left; cursor: pointer;
  transition: background-color .25s var(--ease);
}
.unit-row:hover { background: var(--bg-2); }
.unit-row[aria-expanded="true"] { background: var(--bg-2); }
.ur-id { font: 400 1.25rem/1 var(--serif); font-feature-settings: "lnum"; }
.ur-type { display: grid; gap: 2px; font-size: 0.9375rem; }
.ur-state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.ur-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.unit-row[data-s="volny"] .ur-state { color: var(--fg); }
.unit-row[data-s="volny"] .ur-state::before { background: var(--accent); }
.unit-row[data-s="rezervovany"] .ur-state::before { background: repeating-linear-gradient(135deg, var(--accent) 0 1.5px, transparent 1.5px 3px); box-shadow: inset 0 0 0 1px var(--accent); }
.ur-price { font: 400 1.75rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "lnum", "tnum"; white-space: nowrap; text-align: right; }
.unit-row[data-s="predany"] .ur-price, .unit-row[data-s="predany"] .ur-id { color: var(--muted); }
.unit-row[data-s="predany"] .ur-price { text-decoration: line-through; text-decoration-thickness: 1px; }
.card { padding: 4px 4px 24px 4px; background: var(--bg-2); display: grid; gap: 16px; padding-inline: calc(3.75rem + 20px) 4px; }
.card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.card dt { font: 600 0.6875rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card dd { margin: 4px 0 0; }
.card .btn { justify-self: start; }
.card-note { font-size: 0.9375rem; color: var(--muted); max-width: 44ch; }
.byty-note { margin-top: 32px; font-size: 0.875rem; color: var(--muted); }
.ns-table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: .9375rem; }
.ns-table caption { text-align: left; padding-bottom: 8px; color: var(--muted); }
.ns-table th, .ns-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

@media (min-width: 1024px) {
  .byty-intro { grid-column: 1 / 8; }
  .picker { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
  .picker-build { grid-column: 1 / 8; position: sticky; top: calc(var(--nav-h) + 32px); }
  .picker-panel { grid-column: 8 / 13; padding-left: clamp(0px, 2.5vw, 48px); }
  .floor-chips { display: none; }
  .byty-note { grid-column: 8 / 13; }
}
@media (max-width: 1023px) {
  .building { --row-h: calc((44vh - 22px) / 4.15); }
  .picker-build .parter { --row-h: calc((44vh - 22px) / 4.15); }
  .floor { grid-template-columns: 2rem 1fr; }
  .roof, .parter { margin-left: 2rem; }
  .legend, .kbd-hint { margin-left: 2rem; }
  .floor-no { font-size: 1.125rem; }
  .panel { min-height: 0; }
}
@media (max-width: 767px) {
  .u-id { display: none; }
  .unit-row { grid-template-columns: 3rem 1fr auto; gap: 4px 12px; }
  .ur-price { font-size: 1.375rem; }
  .card { padding-inline: 16px; }
  .card dl { grid-template-columns: 1fr 1fr; }
  .legend { font-size: 0.8125rem; gap: 8px 16px; }
  .parter { font-size: 0.6875rem; letter-spacing: 0.08em; padding-right: 30%; }
}

/* ---------- lokalita ---------- */
.lokalita .grid { row-gap: 48px; align-items: start; }
.lok-text { display: grid; gap: 24px; }
.times { width: 100%; border-collapse: collapse; margin-top: 16px; }
.times caption { text-align: left; padding-bottom: 12px; }
.times th, .times td { padding: 12px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.times tr:last-child th, .times tr:last-child td { border-bottom: 1px solid var(--line); }
.times th { font-weight: 400; padding-right: 16px; }
.times td { color: var(--muted); font-size: 0.9375rem; }

.times .t-min { white-space: nowrap; padding-right: 16px; width: 1%; color: var(--muted); }
.t-min span { font: 400 2rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; color: var(--fg); display: inline-block; min-width: 1.4em; text-align: right; }
@media (min-width: 1024px) {
  .lok-photo { grid-column: 1 / 7; margin-top: clamp(4rem, 8vw, 9rem); }
  .lok-text { grid-column: 8 / 13; }
}

/* ---------- standard (paper) ---------- */
.paper { background: var(--paper); color: var(--paper-fg); color-scheme: light; }
.paper .label, .paper .lead { color: var(--paper-fg); }
.paper ::selection { background: var(--paper-fg); color: var(--paper); }
.standard .grid { row-gap: 48px; }
.std-head { display: grid; gap: 20px; }
.std-fig .veil { position: absolute; inset: 0; background: oklch(0.22 0.01 60 / .22); transition: opacity .6s var(--ease); }
.standard:has(.std-item[data-ph="1"]:hover) .std-fig-1 .veil,
.standard:has(.std-item[data-ph="2"]:hover) .std-fig-2 .veil { opacity: 0; }
.std-list { display: grid; grid-template-columns: 1fr; gap: 0 32px; align-content: start; }
.std-item { display: grid; grid-template-columns: 2.5rem 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--paper-line); transition: color .3s var(--ease); }
.std-item:hover .std-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.num { font: 600 0.8125rem/1.6 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .06em; color: var(--paper-muted); }
.std-name { font-size: 1.0625rem; line-height: 1.45; }
@media (min-width: 560px) { .std-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .std-head { grid-column: 1 / 7; }
  .std-fig-1 { grid-column: 1 / 6; grid-row: 2; }
  .std-list { grid-column: 7 / 13; grid-row: 2; align-self: end; }
  .std-fig-2 { grid-column: 6 / 11; grid-row: 3; }
}

/* ---------- harmonogram ---------- */
.harmonogram h2 { max-width: 14ch; }
.tl-note { margin-top: 16px; color: var(--muted); }
.tl { position: relative; margin-top: clamp(3rem, 2rem + 3vw, 5rem); display: grid; gap: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; padding-bottom: 36px; }
.tl-dot { grid-row: 1 / 4; width: 13px; height: 13px; border-radius: 50%; margin: 14px 0 0 9px; border: 1px solid var(--muted); background: var(--bg); position: relative; z-index: 1; }
.tl-item.is-done .tl-dot { background: var(--fg); border-color: var(--fg); }
.tl-item.is-now .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px oklch(0.72 0.11 80 / .18); }
.tl-seg { position: absolute; left: 15px; top: 27px; bottom: -14px; width: 1px; background: var(--line); transform-origin: 50% 0; }
.tl-item.is-done .tl-seg { background: var(--fg); }
.tl-date { font: 400 2.5rem/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.tl-label { color: var(--fg); }
.tl-state { font: 600 0.6875rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.tl-item.is-now .tl-state { color: var(--accent); }
@media (min-width: 768px) {
  .tl { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gutter); }
  .tl-item { grid-template-columns: 1fr; padding: 0 0 0 0; }
  .tl-item::before { content: ""; position: absolute; left: 6px; top: 13px; height: 56px; width: 1px; background: var(--line); }
  .tl-dot { grid-row: auto; margin: 7px 0 0 0; }
  .tl-seg { left: 13px; right: calc(-1 * var(--gutter)); top: 13px; bottom: auto; width: auto; height: 1px; transform-origin: 0 50%; }
  .tl-date { margin-top: 48px; font-size: clamp(1.75rem, 0.8rem + 1.6vw, 2.5rem); }
  .tl-label { margin-top: 8px; padding-right: 8px; }
}

/* ---------- developer ---------- */
.developer .grid { row-gap: 48px; align-items: center; }
.dev-text { display: grid; gap: 20px; max-width: 46ch; }
.dev-text p { color: oklch(0.92 0.02 80 / .88); }
.dev-text h2 { margin-bottom: 8px; }
@media (min-width: 1024px) {
  .dev-text { grid-column: 1 / 6; }
  .dev-photo { grid-column: 7 / 13; }
}

/* ---------- faq ---------- */
.faq .grid { row-gap: 40px; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font: 400 clamp(1.125rem, 1rem + .4vw, 1.375rem)/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 20px; height: 20px; transition: transform .4s var(--ease); color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(45deg); color: var(--accent); }
.faq summary:hover { color: oklch(0.97 0.02 80); }
.faq-a { padding: 0 48px 24px 0; color: oklch(0.92 0.02 80 / .86); max-width: 62ch; }
@media (min-width: 1024px) {
  .faq-title { grid-column: 1 / 5; align-self: start; position: sticky; top: calc(var(--nav-h) + 32px); }
  .faq-list { grid-column: 6 / 13; }
}

/* ---------- booking form ---------- */
.booking { background: var(--bg-3) var(--grain); border-top: 1px solid var(--line); }
.booking .grid { row-gap: 56px; }
.book-text { display: grid; gap: 24px; align-content: start; justify-items: start; }
.book-contact { display: grid; gap: 4px; margin-top: 8px; }
.contact-addr { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); }
.form { display: grid; gap: 24px; }
.field-row { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font: 600 0.8125rem/1.3 var(--sans); letter-spacing: .04em; }
.field input:not([type="checkbox"]), .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 2px;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--fg); font: 400 1rem/1.3 var(--sans);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.field input::placeholder { color: oklch(0.7 0.02 75 / .85); }
.field input:hover, .field select:hover { border-color: oklch(0.5 0.01 60); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-size: 6px 6px; background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-repeat: no-repeat; }
.field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(.3); cursor: pointer; }
.field [aria-invalid="true"] { border-color: oklch(0.7 0.16 30) !important; }
.err { display: flex; gap: 8px; align-items: flex-start; font-size: 0.875rem; color: oklch(0.8 0.12 35); }
.err .ic { margin-top: 2px; }
.err[hidden] { display: none; }
.hint { font-size: 0.8125rem; color: var(--muted); }
.field-check { grid-template-columns: 24px 1fr; column-gap: 14px; align-items: start; }
.field-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.field-check label { font: 400 0.9375rem/1.5 var(--sans); letter-spacing: 0; color: oklch(0.92 0.02 80 / .88); cursor: pointer; }
.field-check .err { grid-column: 2; }
.btn-submit { justify-self: start; min-width: 240px; }
.form-status:empty { display: none; }
.form-status { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid oklch(0.72 0.11 80 / .5); background: oklch(0.72 0.11 80 / .08); }
.form-status .ic { color: var(--accent); margin-top: 3px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .book-text { grid-column: 1 / 6; position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
  .form { grid-column: 7 / 13; }
}

/* ---------- footer ---------- */
.footer { padding-block: 64px 40px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }
.footer .grid { row-gap: 32px; }
.foot-name { color: var(--fg); font-size: 1.75rem; margin-bottom: 12px; }
.foot-links { display: grid; gap: 0; align-content: start; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.foot-links a:hover { color: var(--fg); text-decoration: underline; }
.demo-label { padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.875rem; }
.demo-label strong { color: var(--fg); font-weight: 600; }
@media (min-width: 768px) {
  .foot-brand { grid-column: 1 / 7; }
  .foot-links { grid-column: 8 / 13; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; transition-delay: 0ms !important; }
  .hero-stage { will-change: auto; }
}
