:root {
  --bg: #f6f3ee; --ink: #1d2320; --muted: #66706a; --line: #ddd6cb; --card: #fffdf9;
  --accent: #2f5d50; --accent-ink: #fff;
  --available: #2e9e6b; --reserved: #e0a021; --sold: #b9483f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
a { color: inherit; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px); background: rgba(246, 243, 238, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; text-decoration: none; letter-spacing: .02em; }
/* demo pages: the round back button left of the brand leads to all demos and stays in the sticky header */
.top-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); transition: border-color .15s, color .15s; }
.home svg { width: 16px; height: 16px; }
.home:hover { border-color: var(--accent); color: var(--accent); }
/* when the header runs out of room the brand ends in an ellipsis instead of sliding under the flag */
.top-start .brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: .95rem; }
.top nav a { text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--accent); }
/* language switch: the flag of the language it opens, kept in the header on phones; aria-label names it */
.top nav a.lang { display: inline-block; flex: none; width: 27px; height: 18px; border-radius: 3px; overflow: hidden; text-indent: 100%; white-space: nowrap;
  background: center / cover no-repeat; box-shadow: 0 0 0 1px rgba(29, 35, 32, .2); transition: box-shadow .15s; }
.top nav a.lang[hreflang="ro"] { background-image: url("img/flag-ro.svg"); }
.top nav a.lang[hreflang="en"] { background-image: url("img/flag-en.svg"); }
.top nav a.lang:hover { box-shadow: 0 0 0 2px var(--accent); }

/* thin strip above the demo pages: says they are demos and links the prices (the way back is the button in the header) */
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 32px; padding: 0 clamp(16px, 4vw, 48px);
  background: var(--ink); color: #c9d0cb; font-size: .82rem; white-space: nowrap; }
.demo-bar span { overflow: hidden; text-overflow: ellipsis; }
.demo-bar nav { display: flex; flex: none; gap: 18px; }
.demo-bar a { color: #fff; font-weight: 600; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }
@media (max-width: 350px) { .demo-bar span { display: none; } }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 13px 26px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: #244a40; }
.btn.small { padding: 8px 16px; font-size: .9rem; }

.hero { position: relative; }
.hero img { width: 100%; height: min(78vh, 760px); object-fit: cover; object-position: 35% 60%; }
.hero-text { position: absolute; left: clamp(16px, 4vw, 48px); bottom: clamp(20px, 6vh, 64px); max-width: 560px;
  background: rgba(255, 253, 249, .93); padding: clamp(18px, 3vw, 34px); border-radius: 14px; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 3.1rem); }
.eyebrow { margin: 0 0 10px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.lead { color: var(--muted); margin: 14px 0 20px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: var(--card); }
.facts div { padding: 22px clamp(12px, 3vw, 40px); border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font: 600 1.6rem var(--serif); font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .9rem; }

section.selector, section.gallery, section.film { padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) 0; max-width: 1500px; margin: 0 auto; }
.sec-head { margin-bottom: 22px; }
.sec-head p { color: var(--muted); margin: 8px 0 0; }

.controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-bottom: 16px; }
.controls label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.controls label.check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); padding-bottom: 9px; }
select { font: inherit; font-size: .95rem; color: var(--ink); padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-transform: none; letter-spacing: 0;
  /* own chevron instead of the browser's arrow, which differs on every system */
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%235d6862' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 11px 7px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 3px; }
.seg button { border: 0; background: none; font: 600 .92rem var(--sans); color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }

.stage-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stage { position: relative; border-radius: 14px; overflow: hidden; background: #cfd8dc; aspect-ratio: 16 / 9; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#overlay polygon { fill-opacity: .30; stroke: #fff; stroke-opacity: .85; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity .12s; }
#overlay polygon.available { fill: var(--available); }
#overlay polygon.reserved { fill: var(--reserved); }
#overlay polygon.sold { fill: var(--sold); }
#overlay polygon:hover, #overlay polygon:focus { fill-opacity: .62; outline: none; }
#overlay polygon.sel { fill-opacity: .72; stroke-width: 3; stroke-opacity: 1; }
#overlay polygon.dim { fill-opacity: .04; stroke-opacity: .25; }
.tip { position: absolute; pointer-events: none; transform: translate(-50%, -115%); background: var(--ink); color: #fff; font-size: .82rem;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; z-index: 5; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-height: 100%; }
.panel-empty { color: var(--muted); margin: 0; }
.panel h3 { font-size: 1.5rem; }
.panel .sub { color: var(--muted); margin: 2px 0 12px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: #fff; }
.badge.available { background: var(--available); } .badge.reserved { background: var(--reserved); color: #2b1f00; } .badge.sold { background: var(--sold); }
.price { font: 600 1.7rem var(--serif); margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.price small { font: 400 .85rem var(--sans); color: var(--muted); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 14px 0; padding: 0; }
.specs div { border-top: 1px solid var(--line); padding-top: 6px; }
.specs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.plan text { font: 9px var(--sans); fill: #4b544f; text-anchor: middle; }
.plan .cap { font-size: 7.5px; fill: #8a928c; }
.panel .btn { width: 100%; text-align: center; }
.panel .btn[aria-disabled="true"] { background: #b9b3a8; pointer-events: none; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 20px; font-size: .9rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
.dot.available { background: var(--available); } .dot.reserved { background: var(--reserved); } .dot.sold { background: var(--sold); }
#match-count { margin-left: auto; color: var(--ink); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-height: 460px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; min-width: 640px; }
th { position: sticky; top: 0; background: var(--card); text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f1ece3; }
tbody tr.sel { background: #e6efe9; }
tbody tr.sold td { color: #9a9a94; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--card); }
figure.wide { grid-column: 1 / -1; }
figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figure.wide img { aspect-ratio: 21 / 9; }
figcaption { padding: 10px 14px; font-size: .9rem; color: var(--muted); }
.film video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16 / 9; }

.contact { margin: clamp(40px, 7vw, 88px) auto 0; max-width: 1500px; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; background: var(--ink); color: #fff; }
.contact p { color: #c9d0cb; max-width: 44ch; }
.contact form { display: grid; gap: 10px; }
.contact input { font: inherit; padding: 13px 14px; border-radius: 10px; border: 1px solid #47504b; background: #262d29; color: #fff; }
.contact input::placeholder { color: #98a19b; }
.contact .btn { background: #e9e2d4; color: var(--ink); }
.form-note { margin: 0; color: #c9d0cb; font-size: .9rem; }
footer { padding: 26px clamp(16px, 4vw, 48px) 40px; color: var(--muted); font-size: .85rem; max-width: 1500px; margin: 0 auto; }
footer p { margin: 0 0 4px; }
footer a, .form-note a { color: inherit; }
.contact .form-note a { color: #fff; }
/* privacy and 404: one column of plain text */
.legal { max-width: 68ch; margin: 0 auto; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px) 24px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal p { line-height: 1.6; margin: .7em 0 0; }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal mark { background: #f7e3b5; padding: 0 4px; border-radius: 3px; }
.legal.missing { min-height: 50vh; }

@media (max-width: 980px) {
  .hero img { height: 56vh; }
  .hero-text { position: static; max-width: none; border-radius: 0; background: var(--card); }
  .stage-wrap { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top nav a:not(.btn):not(.lang) { display: none; }
  .grid { grid-template-columns: 1fr; }
  figure.wide img { aspect-ratio: 16 / 9; }
  #match-count { margin-left: 0; width: 100%; }
}
/* small phones: brand and button stay on one line each, so the sticky header keeps its height */
@media (max-width: 400px) {
  .top { gap: 10px; }
  .brand { font-size: 1.1rem; white-space: nowrap; }
  .top .btn.small { padding: 7px 12px; font-size: .84rem; white-space: nowrap; }
  .top nav { gap: 10px; }
  .top-start { gap: 8px; }
  .home { width: 28px; height: 28px; }
  .top-start .brand { font-size: 1.02rem; }
}
/* brand, language switch and button on one line at 320px */
@media (max-width: 350px) {
  .top nav { gap: 8px; }
  .brand { font-size: 1rem; }
  .top .btn.small { padding: 7px 9px; font-size: .8rem; }
  .top { padding-left: 12px; padding-right: 12px; }
  .top { gap: 8px; }
  .top-start .brand { font-size: .9rem; letter-spacing: 0; }
}
/* data only the operator can give; every mark must be filled before the site goes public */
mark.todo { background: #f7e3b5; color: #1d2320; padding: 0 4px; border-radius: 3px; }
