@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --paper: #f4f5f1;
  --paper-2: #e9ebe4;
  --card: #ffffff;
  --ink: #1b2733;
  --ink-2: #47535e;
  --granite: #6b7680;
  --line: #d8dbd2;
  --teal: #1f5f5b;
  --teal-2: #174a47;
  --marigold: #f0b429;
  --marigold-deep: #c98f0a;
  --taken: #d9dcd4;
  --err: #a33a2c;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-2); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.12; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }
.muted { color: var(--granite); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--card); padding: .5rem 1rem; }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font: 700 1rem/1 var(--sans); background: var(--teal); color: #fff; border: 2px solid var(--teal); border-radius: 10px; padding: .95rem 1.4rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--teal-2); border-color: var(--teal-2); color: #fff; }
.btn-sm { padding: .55rem .95rem; font-size: .92rem; border-radius: 8px; }
.btn-lg { padding: 1.1rem 1.8rem; font-size: 1.08rem; }
.btn-ghost { background: transparent; color: var(--teal); }
.btn-ghost:hover { background: rgba(31,95,91,.08); color: var(--teal-2); }
.btn-light { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.btn-light:hover { background: #f5c552; border-color: #f5c552; color: var(--ink); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(244,245,241,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; justify-content: space-between; align-items: center; height: 4.25rem; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.02rem; }
.logo svg { width: 2rem; height: 2rem; color: var(--ink); flex: none; }
.top-nav { display: flex; align-items: center; gap: 1.6rem; }
.top-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.top-nav a:not(.btn):hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero-copy { padding-top: .75rem; }
.hero h1 { max-width: 13ch; }
.lead { font-size: 1.14rem; color: var(--ink-2); max-width: 46ch; margin: 1.3rem 0 2rem; }

.period { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 30rem; }
.period label { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.period select, .book-form input, .book-form textarea {
  font: 500 1rem/1.3 var(--sans); color: var(--ink); background: var(--card); border: 1.5px solid #c4c8bf; border-radius: 10px; padding: .85rem .9rem; width: 100%; min-width: 0;
}
.period select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b2733' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; cursor: pointer; }
.period select:focus, .book-form input:focus, .book-form textarea:focus { border-color: var(--teal); outline: 3px solid rgba(31,95,91,.18); outline-offset: 0; }
.period .btn { grid-column: 1 / -1; }
.period-note { margin: 1rem 0 0; color: var(--ink-2); font-size: .98rem; }
.period-note strong { font-variant-numeric: tabular-nums; }
.period-note .warn { color: var(--err); font-weight: 600; }

/* ---------- Mappa dei posti ---------- */
.board { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.1rem, 2.5vw, 1.8rem); box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(27,39,51,.35); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.board-head p { margin: 0; }
#board-titolo { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.board-legend { display: flex; gap: 1rem; font-size: .85rem; color: var(--ink-2); }
.board-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.board-legend .bed { width: .9rem; height: 1.25rem; }
.board-sede + .board-sede { margin-top: 1.4rem; padding-top: 1.3rem; border-top: 1px solid var(--paper-2); }
.board-sede-nome { font-weight: 800; margin: 0 0 .6rem; }
.board-app + .board-app { margin-top: .9rem; }
.board-app-nome { font-size: .9rem; color: var(--ink-2); margin: 0 0 .45rem; display: flex; justify-content: space-between; gap: 1rem; }
.board-app-nome span { font-variant-numeric: tabular-nums; color: var(--granite); }
.rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.room { display: flex; gap: 5px; padding: 7px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--paper); text-decoration: none; }
a.room { border-color: var(--marigold-deep); background: #fff8e6; }
a.room:hover { background: #ffefc2; transform: translateY(-1px); }
.room.is-full { opacity: .75; }
.bed { display: block; width: 1.25rem; height: 1.85rem; border-radius: 4px; position: relative; }
.bed::before { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 30%; border-radius: 2px; background: rgba(255,255,255,.75); }
.bed.free { background: var(--marigold); }
.bed.taken { background: var(--taken); }
.bed.taken::before { background: rgba(255,255,255,.55); }
.board-foot { margin: 1.2rem 0 0; font-size: .86rem; color: var(--granite); }
#board-body[aria-busy=true] { opacity: .55; transition: opacity .15s; }
@media (prefers-reduced-motion: no-preference) {
  #board-body.flash .bed.free { animation: pop .45s ease-out; }
  a.room { transition: transform .12s, background .12s; }
}
@keyframes pop { from { transform: scale(.6); opacity: .3; } to { transform: none; opacity: 1; } }

/* ---------- Sezioni ---------- */
.sec { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.sec-alt { background: var(--paper-2); }
.sec h2 { max-width: 22ch; }
.sec-lead { color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; margin: .9rem 0 2.2rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.two-col .sec-lead { margin-bottom: 0; }

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; }
.price .amount { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 600; line-height: 1; margin: 1.1rem 0 .4rem; font-variant-numeric: lining-nums; }
.price .amount span { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--granite); }
.price .split { color: var(--granite); font-size: .95rem; margin-bottom: 1.2rem; }
.price p:not(.amount):not(.split) { color: var(--ink-2); }
.price .btn { margin-top: auto; align-self: flex-start; }

.incl { list-style: none; margin: 0; padding: 0; border-top: 1px solid #cfd3c8; }
.incl li { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid #cfd3c8; color: var(--ink-2); }
.incl strong { color: var(--ink); }

.sedi { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.2rem; }
.sede { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.4rem, 3vw, 2rem); }
.sede img { border-radius: 10px; margin: -.4rem 0 1.2rem; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.sede .addr { color: var(--granite); font-weight: 600; margin: .3rem 0 1rem; }
.sede p { color: var(--ink-2); }

.steps { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: .4rem; padding-top: 1.1rem; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(s); font-family: var(--display); font-size: 1.7rem; font-weight: 600; line-height: 1; color: var(--marigold-deep); }
.steps strong { font-size: 1.08rem; }
.steps span { color: var(--ink-2); font-size: .97rem; }

#domande h2 { margin-bottom: 1.8rem; }
.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 700; font-size: 1.06rem; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: .3rem; top: .95rem; font-size: 1.5rem; font-weight: 400; color: var(--teal); line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--ink-2); padding-bottom: .4rem; max-width: 62ch; }

.cta { background: var(--ink); color: #fff; padding: clamp(2.6rem, 5vw, 3.6rem) 0; }
.cta-in { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta h2 { color: #fff; }

.foot { background: var(--ink); color: #b7c1ca; border-top: 1px solid rgba(255,255,255,.08); padding: 2.6rem 0; font-size: .95rem; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot strong { color: #fff; }
.foot p { margin: .3rem 0; }
.foot a { color: #e4e9ee; }
.foot .muted { color: #8995a0; }

/* ---------- Prenotazione ---------- */
.book { padding: clamp(2rem, 5vw, 3.5rem) 0 5rem; }
.book h1 { margin-bottom: 1.8rem; }
.book-step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.2rem, 3vw, 2rem); margin: 0 0 1.25rem; min-width: 0; }
.book-step legend { padding: 0; float: left; width: 100%; margin-bottom: 1.2rem; }
.book-step legend + * { clear: both; }
.book-step h2 { font-size: 1.45rem; display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.book-step legend h2 { margin: 0; }
.n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: #fff; font: 800 .95rem/1 var(--sans); flex: none; }
fieldset[disabled] { opacity: .5; }
.period-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: .75rem; max-width: 40rem; align-items: end; }
.period-inline select { font: 500 1rem/1.3 var(--sans); color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b2733' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center; appearance: none; border: 1.5px solid #c4c8bf; border-radius: 10px; padding: .85rem 2.4rem .85rem .9rem; width: 100%; cursor: pointer; }
.period-inline .period-note { margin-top: 1rem; }
.period-inline label { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--ink-2); }

.filter-tipo { display: inline-flex; background: var(--paper); border-radius: 10px; padding: 4px; gap: 2px; margin-bottom: 1.4rem; flex-wrap: wrap; }
.filter-tipo a { padding: .45rem .9rem; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .92rem; }
.filter-tipo a.on { background: var(--ink); color: #fff; }

.room-group + .room-group { margin-top: 1.6rem; }
.room-group h3 { font-family: var(--sans); font-size: 1rem; font-weight: 800; letter-spacing: 0; margin-bottom: .7rem; }
.room-group h3 span { font-weight: 500; color: var(--granite); margin-left: .35rem; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.room-opt { position: relative; display: block; cursor: pointer; }
.room-opt input { position: absolute; opacity: 0; inset: 0; }
.room-opt-body { display: grid; gap: .2rem; border: 1.5px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; background: var(--card); height: 100%; }
.room-opt:hover .room-opt-body { border-color: var(--teal); }
.room-opt input:checked + .room-opt-body { border-color: var(--teal); background: #eef5f4; box-shadow: inset 0 0 0 1.5px var(--teal); }
.room-opt input:focus-visible + .room-opt-body { outline: 3px solid var(--marigold); outline-offset: 2px; }
.room-opt-name { font-weight: 800; }
.room-opt-meta { font-size: .9rem; color: var(--granite); }
.room-opt-price { font-family: var(--display); font-size: 1.35rem; font-weight: 600; margin-top: .35rem; }
.room-opt-price small { font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--granite); }
.empty { color: var(--ink-2); background: var(--paper); border-radius: 10px; padding: 1rem 1.2rem; margin: 0; }

.book-form label { display: flex; flex-direction: column; gap: .35rem; font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.book-form label small { font-weight: 500; color: var(--granite); }
.book-form textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; margin-bottom: 1rem; }
.book-form .check { flex-direction: row; align-items: flex-start; gap: .7rem; font-weight: 500; color: var(--ink-2); margin-top: 1.1rem; }
.book-form .check input { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .15rem; accent-color: var(--teal); padding: 0; }
[aria-invalid=true] { border-color: var(--err) !important; }
.field-err { color: var(--err); font-weight: 700; font-size: .86rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.book-summary { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; background: var(--ink); color: #fff; border-radius: 16px; padding: 1.2rem 1.4rem; flex-wrap: wrap; }
.book-summary p { margin: 0; }
.sum-line { font-weight: 800; font-size: 1.1rem; }
.sum-note { color: #c3ccd4; font-size: .92rem; max-width: 52ch; margin-top: .2rem !important; }
.book-summary .btn { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.book-summary .btn:hover { background: #f5c552; border-color: #f5c552; }

.alert { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: #fff4d6; border: 1px solid #ecd391; border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.alert p { margin: 0; }
.alert-err { background: #f9e4e0; border-color: #e6b9b1; color: #7d2a1f; }

.done h1 { margin-bottom: 0; max-width: 18ch; }
.recap { display: grid; grid-template-columns: 9rem 1fr; gap: .7rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; margin: 0 0 1.5rem; }
.recap dt { color: var(--granite); font-weight: 600; }
.recap dd { margin: 0; }

.prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.prose p { color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-in, .two-col { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .top-nav a:not(.btn) { display: none; }
  .prices, .sedi, .grid2 { grid-template-columns: 1fr; }
  .incl li { grid-template-columns: 1fr; gap: .15rem; }
  .foot-in { grid-template-columns: 1fr; gap: 1.2rem; }
  .period-fields { grid-template-columns: 1fr 1fr; }
  .period-inline select, .period select { padding-left: .7rem; padding-right: 2rem; background-position: right .6rem center; font-size: .95rem; }
  .recap { grid-template-columns: 1fr; gap: .1rem; }
  .recap dd { margin-bottom: .6rem; }
  .book-summary { position: static; }
  .book-summary .btn { width: 100%; }
}
@media (max-width: 420px) {
  .steps { grid-template-columns: 1fr; }
  .bed { width: 1.1rem; height: 1.6rem; }
}

.book-form { padding-bottom: .5rem; }
