/* Base reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Layout: photo-led listing; a split hero (text + loggia photo), a facts strip, a portrait photo grid with a lightbox, then details and contact in two columns that stack on phones */
:root {
  /* Single light look by choice: beige ground, off-white panels, warm grey text */
  --bg: #e9dcc6;
  --surface: #faf6ef;
  --ink: #4a4540;
  --muted: #7a7066;
  --line: #d3c3a8;
  --accent: #d6c2a1;
  --accent-ink: #3f3a35;
  --focus: #8a7a66;
  color-scheme: light;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
}
.wrap {
  max-width: 72rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; text-wrap: balance; margin: 0; line-height: 1.08; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.1rem; font-weight: 500; }
p { margin: 0; }
.label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wrap { padding-block: .55rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.langs a { display: inline-block; text-decoration: none;  font: inherit; font-size: .85rem; font-weight: 500; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: .3rem .9rem; cursor: pointer; }
.langs a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }

/* Hero */
.hero .wrap { padding-block: 3rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero-text { display: grid; gap: 1.25rem; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.12; }
.answer { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3; max-width: 34ch; padding-left: 1rem; border-left: 3px solid var(--accent); }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 56ch; }
.lead strong { color: var(--ink); font-weight: 600; }
.prices { display: flex; gap: .5rem 2.25rem; flex-wrap: wrap; }
.price { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.buy { margin-top: .5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); display: grid; gap: .4rem; }
.buy strong { font-family: var(--font-display); font-weight: 650; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.price strong { font-family: var(--font-display); font-weight: 650; font-size: 2.4rem; font-variant-numeric: tabular-nums; }
.price > span { color: var(--muted); }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 999px; padding: .65rem 1.3rem;
}
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn:hover { filter: brightness(1.04); }
.hero-text h1 { max-width: 24ch; }
.hero-media { margin: 0; position: relative; }
.hero-arch { position: relative; border-radius: 12rem 12rem 8px 8px; overflow: hidden; }
.hero-bg { width: 100%; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 58% center; display: block; }
.place-tag {
  position: absolute; top: 2rem; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: .3rem .85rem;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
}
.bubbles {
  position: absolute; left: 0; right: 0; bottom: 1.1rem;
  list-style: none; margin: 0; padding: 0 .75rem; display: flex; justify-content: center; gap: .9rem;
}
.bubbles button { all: unset; cursor: zoom-in; display: grid; justify-items: center; gap: .4rem; }
.bubbles button:focus-visible img { outline: 2px solid var(--focus); outline-offset: 2px; }
.bubbles img {
  width: clamp(70px, 7.5vw, 104px); max-width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block;
  border: 4px solid var(--surface); box-shadow: 0 8px 22px rgba(74, 69, 64, .22);
  transition: transform .25s ease;
}
.bubbles button:hover img { transform: translateY(-3px); }
.bubbles .cap { font-size: .8rem; font-weight: 500; background: var(--surface); border-radius: 999px; padding: .1rem .65rem; }
.hero-media figcaption { margin-top: .6rem; font-size: .8rem; color: var(--muted); }
.hero-media figcaption a { color: var(--muted); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; padding-block: 2rem 2.5rem; }
  .hero-bg { aspect-ratio: 4 / 4.6; }
  .bubbles { gap: .6rem; }
}
@media (prefers-reduced-motion: reduce) { .bubbles img { transition: none; } }

/* Facts */
.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.facts li { padding: 1rem 1rem 1rem 0; display: grid; gap: .15rem; align-content: start; }
.facts li + li { border-left: 1px solid var(--line); padding-left: 1rem; }
.facts strong { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; line-height: 1.2; }
@media (max-width: 760px) {
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li, .facts li + li { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); }
  .facts li:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
  .facts li:last-child { grid-column: 1 / -1; border-bottom: 0; padding-left: 0; border-left: 0; }
}

section .wrap { padding-block: 4rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head > div { display: grid; gap: .5rem; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery li { min-width: 0; }
.gallery button { all: unset; cursor: zoom-in; display: grid; gap: .45rem; width: 100%; }
.gallery button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.gallery img { width: 100%; max-width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; display: block; background: var(--surface); transition: transform .3s ease; }
.gallery button:hover img { transform: scale(1.015); }
.gallery span { font-size: .88rem; }
@media (max-width: 560px) { .gallery { gap: 8px; } .gallery span { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

/* Lightbox */
dialog#lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0;
}
dialog#lightbox::backdrop { background: rgba(233, 220, 198, .97); }
.lb {
  height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: .75rem;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  color: var(--ink);
}
.lb-top, .lb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lb-stage { min-height: 0; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb button { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; }
.lb button:hover { background: var(--accent); }
.lb .count { font-family: var(--font-mono); font-size: .8rem; opacity: .8; }

/* Details */
.alt { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }
.stack { display: grid; gap: 1rem; }
.stack p { max-width: 62ch; }
.rooms { list-style: none; margin: 0; padding: 0; }
.rooms li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 480px) { .rooms li { grid-template-columns: 1fr; gap: .1rem; } }
.costs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.costs th, .costs td { text-align: left; padding: .7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 400; }
.costs th { font-weight: 500; }
.costs td { text-align: right; font-family: var(--font-mono); white-space: nowrap; padding-left: 1rem; }
.costs small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }

/* Contact */
form { display: grid; gap: 1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .3rem; min-width: 0; }
.field label { font-size: .88rem; font-weight: 500; }
input, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 4px; padding: .6rem .7rem; width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
textarea { min-height: 7rem; resize: vertical; }
form .btn { width: fit-content; border-radius: 4px; }
.small-btn { font: inherit; font-size: .85rem; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: .3rem .7rem; }
.contact-line { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.contact-line span { font-family: var(--font-mono); user-select: all; }
.walk { list-style: none; margin: 0; padding: 0; }
.walk li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.walk .min { font-family: var(--font-mono); font-size: .88rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.rare { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.channels { display: grid; gap: .75rem; align-content: start; }
.alt .channel, .alt .small-btn { background: var(--bg); }
.channel {
  display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem;
  transition: background .2s ease, border-color .2s ease;
}
.channel:hover { background: var(--accent); border-color: var(--accent); }
.channel svg { width: 2rem; height: 2rem; flex: none; fill: var(--ink); }
.channel > span { display: grid; min-width: 0; }
.channel strong { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.channel small { color: var(--muted); font-family: var(--font-mono); font-size: .8rem; overflow-wrap: anywhere; }
.channels .contact-line { margin-top: .25rem; font-size: .9rem; }

footer .wrap { padding-block: 2rem; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
