/* Alcarotti 6 website: a simple, personal "diary" layout (white, minimal, serif titles).
   Light by default. If the owner picks "Follow the visitor's device" on the admin page, app.js sets
   <html data-theme="auto"> and the dark colours below apply to visitors whose device is in dark mode. */
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #666666;
  --line: #e6e6e6;
  --soft: #f6f6f4;
  --accent: #9a8a6a;        /* warm grey-gold for small details */
  --sel: #222222;           /* selected dates, main button */
  --range: #f0efeb;
  --busy-text: #bdbdbd;
  --error: #c13515;
  --field: #cfcfcf;         /* borders of inputs and the dates box */
  --on-sel: #ffffff;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #18191b;
    --text: #ececec;
    --muted: #a3a3a3;
    --line: #313337;
    --soft: #222427;
    --accent: #c2b08a;
    --sel: #ececec;
    --range: #2c2e32;
    --busy-text: #5f6166;
    --error: #ff8a75;
    --field: #4a4d52;
    --on-sel: #18191b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 743px) { .wrap { padding: 0 20px; } }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.bar-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { font-family: var(--serif); font-size: 1.6rem; text-decoration: none; margin-right: auto; }
.links { display: flex; gap: 26px; }
.links a { text-decoration: none; font-size: .9rem; color: var(--muted); }
.links a:hover { color: var(--text); }
@media (max-width: 743px) { .links { display: none; } .bar-in { height: 60px; } }
.lang { display: flex; gap: 2px; font-size: .85rem; }
.lang button { border: 0; background: none; color: var(--muted); padding: 4px 6px; font: inherit; cursor: pointer; }
.lang button + button::before { content: "/"; margin-right: 8px; color: var(--line); }
.lang button.on { color: var(--text); font-weight: 600; }

/* Opening: big title on the left, a few words on the right */
.lead { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: end; margin: 48px 0 40px; }
.lead h1 { font-size: clamp(2.9rem, 5.6vw, 4.8rem); line-height: 1; margin: 0; }
.lead h1 em { color: var(--accent); }
.lead p { font-size: 1.12rem; color: var(--muted); margin: 0; }
.more { display: inline-block; margin-top: 20px; text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
@media (max-width: 743px) { .lead { grid-template-columns: 1fr; gap: 18px; margin: 20px 0 28px; } .lead p { font-size: 1.02rem; } }

/* Photos: one big, four small */
.photos { position: relative; margin-bottom: 88px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: min(48vw, 540px); }
.gallery a { display: block; overflow: hidden; background: var(--soft); border-radius: 2px; }
.gallery a:first-child { grid-row: span 2; }
.gallery a:nth-child(n+6) { display: none; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.gallery a:hover img { opacity: .88; }
.show-all { position: absolute; right: 16px; bottom: 16px; background: var(--bg); color: var(--text); border: 0; border-radius: 2px;
  padding: 7px 14px; font: inherit; font-size: .85rem; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.photo-count { display: none; }
@media (max-width: 743px) {
  /* Phones: all photos side by side, swipe through them */
  .photos { margin: 0 -20px 48px; }
  .gallery { display: flex; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery a, .gallery a:nth-child(n+6) { display: block; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; border-radius: 0; }
  .show-all { display: none; }
  .photo-count { display: block; position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.55); color: #fff;
    font-size: .8rem; padding: 2px 10px; border-radius: 2px; }
}

/* Sections: title on the left, content on the right */
.cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 52px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.cols > h2 { font-size: 2rem; line-height: 1.1; margin: 0; }
.cols > div > p { color: var(--muted); max-width: 660px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; gap: 14px; padding: 40px 0; } .cols > h2 { font-size: 1.8rem; } }
.list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; font-size: .95rem; }
.list li { padding: 10px 0; border-bottom: 1px dotted var(--field); }
.walk li { display: flex; justify-content: space-between; gap: 12px; }
.walk b { font-weight: 400; color: var(--accent); }
@media (max-width: 600px) { .list { grid-template-columns: 1fr; } }
.street { margin: 28px 0 10px; font-weight: 500; }
/* Map (MapLibre + OpenFreeMap, softened in app.js) with an Airbnb-like round pin */
.map { width: 100%; height: 380px; border-radius: 12px; overflow: hidden; background: #f4f2ee; }
.map .pin { width: 46px; height: 46px; border-radius: 50%; background: #222; border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.map .pin svg { width: 21px; height: 21px; fill: #fff; }
.map .pin .halo { position: absolute; inset: -18px; border-radius: 50%; background: rgba(34,34,34,.12); z-index: -1; }
.map .maplibregl-ctrl-attrib { font-size: .7rem; }
.map-link { display: inline-block; margin-top: 8px; font-size: .85rem; color: var(--muted); }
@media (max-width: 743px) { .map { height: 260px; } }
.sign { font-family: var(--serif); font-style: italic; font-size: 1.7rem; color: var(--text); margin-top: 4px; }

/* Booking: calendar on the left, request on the right */
.book-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; margin-top: 24px; align-items: start; }
@media (max-width: 1000px) { .book-grid { grid-template-columns: 1fr; gap: 32px; } }
.times { color: var(--text); font-weight: 500; margin: 0 0 4px; }
.stay { margin-top: 28px; }
.stay-sum { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 0; font-size: .9rem; color: var(--muted); }
.stay-sum:has(.price:not([hidden])) .nights { display: none; }
.price { font-weight: 600; color: var(--text); margin: 0; }
.request { margin-top: 8px; }

/* Calendar */
.cal { margin-top: 8px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hint { flex: 1; margin: 0; text-align: center; color: var(--muted); font-size: .9rem; }
.nav { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  font-size: 1.4rem; line-height: 1; cursor: pointer; }
.nav:hover:not(:disabled) { background: var(--soft); }
.nav:disabled { opacity: .25; cursor: default; }
.months { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 620px) { .months { grid-template-columns: 1fr; } .months .month:nth-child(2) { display: none; } }
.month h3 { margin: 4px 0 12px; text-align: center; font-size: 1rem; font-weight: 600; text-transform: capitalize; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dow { text-align: center; font-size: .72rem; color: var(--muted); padding: 4px 0 8px; font-weight: 600; }
.day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; color: var(--text);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; padding: 0; }
.day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--text); }
.day:disabled { cursor: default; }
.day.past { color: var(--busy-text); font-weight: 400; }
.day.busy { color: var(--busy-text); text-decoration: line-through; font-weight: 400; }
.day.checkout-ok { text-decoration: none; color: var(--text); font-weight: 600; }
.day.range { background: var(--range); border-radius: 0; }
.day.edge { background: var(--sel); color: var(--on-sel); }
.day.empty { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.sw.busy { background: var(--bg); border: 1px solid var(--line); background-image: linear-gradient(135deg, transparent 45%, var(--busy-text) 45% 55%, transparent 55%); }
.sw.sel { background: var(--sel); }

.card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; background: var(--soft); }
.dates-box { border: 1px solid var(--field); border-radius: 10px; overflow: hidden; }
.dates-box { display: grid; grid-template-columns: 2fr 1fr; }
.dates { display: grid; grid-template-columns: 1fr 1fr; }
.dates a { display: block; padding: 10px 12px; text-decoration: none; }
.dates a + a { border-left: 1px solid var(--field); }
.label { display: block; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dates strong { font-weight: 400; font-size: .92rem; }
form label.guests-row { margin: 0; padding: 10px 12px; border-left: 1px solid var(--field); }
form label.guests-row > span { color: var(--text); margin: 0; }
.guests-row select { border: 0; padding: 0; font-size: .92rem; background: transparent; }
.guests-row select:focus { outline: none; }

form label { display: block; margin-bottom: 12px; font-size: .88rem; }
form label > span { display: block; margin-bottom: 4px; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--field); border-radius: 8px; padding: 10px 12px; }
input:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; border-color: transparent; }
.pay { border: 0; padding: 0; margin: 24px 0 0; }
.pay legend { padding: 0; margin-bottom: 6px; font-size: .88rem; color: var(--muted); }
form label.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
form label.choice:has(input:checked) { border-color: var(--text); background: var(--soft); }
label.choice input { width: auto; margin: 3px 0 0; accent-color: var(--text); }
label.choice > span { display: block; margin: 0; color: var(--text); }
label.choice small { display: none; color: var(--muted); font-size: .8rem; margin-top: 2px; }
label.choice:has(input:checked) small { display: block; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#captcha { margin: 8px 0 12px; min-height: 65px; }
.primary { display: block; width: 100%; border: 0; border-radius: 4px; padding: 14px; font: inherit; font-weight: 600;
  text-align: center; text-decoration: none; background: var(--sel); color: var(--on-sel); cursor: pointer; }
.primary:hover { opacity: .88; }
.primary:disabled { opacity: .5; cursor: default; }
.error { color: var(--error); margin: 8px 0; font-size: .9rem; }
.small { font-size: .8rem; color: var(--muted); text-align: center; margin: 10px 0 0; }
.ref { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; letter-spacing: .08em; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: .9rem; }

/* Photo viewer */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox button { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; }
.lb-next { right: 12px; top: 50%; }
.lb-count { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; }


.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 28px 0 36px; margin-top: 24px; }
.foot-in { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
