:root {
  /* Estate mediterranea: calce, blu maiolica, limone, terracotta e camelia */
  --bg: #fffaf0;
  --surface: #ffffff;
  --ink: #15294a;
  --muted: #5b6577;
  --line: #ecdfc6;
  --accent: #1f5fa8;
  --accent-ink: #ffffff;
  --accent-soft: #e3edf9;
  --lemon: #f2c230;
  --lemon-soft: #fdf1c7;
  --terracotta: #c8553d;
  --camelia: #c9345a;
  --leaf: #2f6b4f;
  --sea: #0f3d73;
  --ok: #2f6b4f;
  --blocked: #f1e8d6;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* le camelie decorative possono sporgere dai bordi */
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 72px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--terracotta); font-weight: 600; margin-bottom: .6em; }
.eyebrow.flower { display: flex; align-items: center; gap: 8px; }
.eyebrow.flower::before { content: ""; width: 22px; height: 22px; background: url(/assets/camelia.svg) center / contain no-repeat; }
h1 em, h2 em { font-style: italic; color: var(--camelia); }

/* Decorazioni */
.tiles { height: 40px; background: url(/assets/maiolica.svg) 0 0 / 40px 40px repeat-x; border-block: 3px solid var(--accent); }
.camelia-deco { position: absolute; width: 120px; height: 120px; background: url(/assets/camelia.svg) center / contain no-repeat; pointer-events: none; z-index: 2; filter: drop-shadow(0 8px 12px rgb(80 20 30 / .18)); }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header::before { content: ""; display: block; height: 10px; background: url(/assets/maiolica.svg) 0 0 / 20px 20px repeat-x; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand em, .site-footer strong em { font-style: normal; color: var(--camelia); font-weight: 600; }
.site-footer strong em { color: var(--lemon); }
.brand em.it, .site-footer strong em.it { font-style: italic; font-weight: 500; }
.addresses { display: grid; gap: 10px; margin-top: 18px; }
.address { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .14); border-radius: 12px; padding: 12px 16px; }
.address a { color: var(--lemon); font-weight: 500; white-space: nowrap; }
.brand::before { content: ""; width: 30px; height: 30px; background: url(/assets/camelia.svg) center / contain no-repeat; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: 500 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-lemon { background: var(--lemon); border-color: var(--lemon); color: var(--ink); }
.btn-block { width: 100%; }

/* Photo placeholders */
.photo {
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 20% 10%, hsl(var(--h, 30) 60% 82%), transparent 60%),
    linear-gradient(135deg, hsl(var(--h, 30) 45% 62%), hsl(calc(var(--h, 30) + 30) 40% 42%));
  display: flex; align-items: flex-end; padding: 14px;
  color: #fff; font-size: .8rem; letter-spacing: .04em;
  min-height: 200px; position: relative; overflow: hidden;
}
.photo span { background: rgb(0 0 0 / .28); padding: 3px 9px; border-radius: 999px; }

.pic { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--blocked); }
.card .pic { border-radius: 0; height: 240px; }

/* Tutte le foto */
.all-photos-btn {
  position: absolute; right: 14px; bottom: 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--ink);
  border-radius: 10px; padding: 8px 14px; font: 500 .9rem var(--sans); cursor: pointer;
}
.gallery-wrap { position: relative; }
.gallery .pic { cursor: zoom-in; min-height: 0; }
dialog.photos {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; padding: 0;
  background: var(--bg); color: var(--ink);
}
dialog.photos::backdrop { background: rgb(0 0 0 / .5); }
.photos-head { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 1; }
.photos-head .wrap { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.photos-head button { border: 0; background: none; font: 500 1rem var(--sans); cursor: pointer; color: var(--ink); padding: 8px; }
.photos-grid { width: min(900px, 100% - 32px); margin: 24px auto 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photos-grid .pic { height: auto; aspect-ratio: 3 / 2; cursor: default; }
.photos-grid .pic:nth-child(3n + 1) { grid-column: span 2; }

/* Hero */
.hero {
  padding: 56px 0 72px; position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 100% 0%, var(--lemon-soft), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, var(--accent-soft), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-visual { position: relative; }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.places span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: var(--ink); }
.places span:nth-child(3n + 1) { border-color: rgb(31 95 168 / .35); }
.places span:nth-child(3n + 2) { border-color: rgb(242 194 48 / .6); }
.places span:nth-child(3n) { border-color: rgb(201 52 90 / .35); }
/* Foto ad arco, come le finestre e i portici della costiera */
.hero-visual .pic { height: 500px; border-radius: 260px 260px 20px 20px; border: 8px solid var(--surface); box-shadow: 0 30px 60px -30px rgb(15 61 115 / .45); }
.hero-visual .camelia-deco.c1 { width: 150px; height: 150px; left: -54px; bottom: 28px; transform: rotate(-18deg); }
.hero-visual .camelia-deco.c2 { width: 92px; height: 92px; right: -26px; top: 70px; transform: rotate(32deg); }
.hero-badge {
  position: absolute; right: 18px; bottom: 20px; z-index: 2;
  background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: .9rem;
  box-shadow: 0 10px 24px -12px rgb(15 61 115 / .5);
}
.hero-badge strong { color: var(--camelia); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgb(60 40 20 / .35); }
.card .photo { border-radius: 0; min-height: 220px; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { color: var(--muted); font-size: .92rem; }
.card-price { margin-top: auto; padding-top: 10px; font-size: .95rem; }
.card-price strong { font-size: 1.25rem; color: var(--camelia); font-family: var(--serif); }
.card { position: relative; }
.card:hover { border-color: var(--lemon); }
.card-tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 500;
}
.card-tag::before { content: "★ "; color: var(--lemon); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; position: relative; overflow: hidden; }
.feature::before { content: ""; display: block; width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px; background: url(/assets/maiolica.svg) center / 44px 44px; box-shadow: inset 0 0 0 2px rgb(31 95 168 / .15); }
.feature:nth-child(2)::before { background-position: 22px 22px; }
.feature:nth-child(4)::before { background-position: 22px 22px; }
.feature h3 { font-size: 1.1rem; margin-bottom: .3em; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.map-box { min-height: 320px; --h: 160; }

/* Sezione "blu mare" */
.section.sea { background: var(--sea); color: #f3f6fb; position: relative; }
.section.sea .muted, .section.sea p { color: #c9d6ea; }
.section.sea strong { color: #fff; }
.section.sea .eyebrow { color: var(--lemon); }
.section.sea .pic { height: 360px; border-radius: 20px 200px 20px 20px; border: 6px solid rgb(255 255 255 / .12); }
.sea-visual { position: relative; }
.sea-visual .camelia-deco { left: -36px; top: -40px; transform: rotate(-30deg); }

.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.contact-box p { margin: .3em 0; }
.contact-box .camelia-deco { width: 84px; height: 84px; right: -24px; top: -30px; transform: rotate(20deg); }

/* Esperienze */
.exp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.exp-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.exp-card:hover { transform: translateY(-3px); border-color: var(--lemon); box-shadow: 0 14px 30px -18px rgb(15 61 115 / .4); }
.exp-card h3 { font-size: 1.2rem; margin: 10px 0 2px; }
.exp-card p { font-size: .93rem; margin: 0; }
.exp-more { margin-top: auto; padding-top: 12px; color: var(--accent); font-weight: 500; font-size: .92rem; }
/* Icona dentro un arco colorato con un angolo di maiolica */
.exp-icon {
  width: 78px; height: 92px; border-radius: 40px 40px 12px 12px; background: var(--c);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.exp-icon::after { content: ""; position: absolute; right: -10px; bottom: -10px; width: 28px; height: 28px; background: url(/assets/maiolica.svg) center / 28px; border-radius: 6px; transform: rotate(45deg); opacity: .9; }
.exp-icon svg { width: 46px; height: 46px; position: relative; z-index: 1; }

.exp-list { display: grid; gap: 22px; margin: 32px 0 56px; }
.exp-row {
  display: grid; grid-template-columns: 120px 1fr 260px; gap: 28px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; scroll-margin-top: 100px;
}
.exp-row .exp-icon { width: 110px; height: 130px; border-radius: 56px 56px 14px 14px; }
.exp-row .exp-icon svg { width: 62px; height: 62px; }
.exp-row h2 { font-size: 1.7rem; margin-bottom: .2em; }
.exp-row .tagline { color: var(--terracotta); font-weight: 500; margin-bottom: .8em; }
.exp-row ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .93rem; }
.exp-row li::before { content: "✓"; color: var(--leaf); margin-right: 8px; }
.exp-side { display: grid; gap: 12px; align-content: start; }
.exp-price { font-size: .95rem; color: var(--muted); }
.exp-price strong { color: var(--camelia); font-family: var(--serif); font-size: 1.3rem; }
.exp-row:target, .exp-row.highlight { border-color: var(--lemon); box-shadow: 0 0 0 3px var(--lemon-soft); }

.request-box { max-width: 760px; margin: 0 auto 80px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 28px 28px; overflow: hidden; position: relative; scroll-margin-top: 90px; }
.request-box::before { content: ""; display: block; height: 14px; margin: 0 -28px 24px; background: url(/assets/maiolica.svg) 0 0 / 28px 28px repeat-x; }
.request-box form.guest { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.request-box form.guest .full { grid-column: 1 / -1; }
.success { background: #e8f3ec; border: 1px solid #b9dcc6; color: var(--leaf); border-radius: 12px; padding: 14px 16px; }

/* Footer */
.site-footer { background: var(--sea); color: #c9d6ea; padding: 0 0 48px; font-size: .9rem; }
.site-footer::before { content: ""; display: block; height: 40px; margin-bottom: 36px; background: url(/assets/maiolica.svg) 0 0 / 40px 40px repeat-x; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.site-footer a { color: #fff; }

/* Apartment page */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 10px; margin: 24px 0 8px; }
.gallery .photo, .gallery .pic { min-height: 0; }
.gallery > :first-child { grid-row: span 2; }
.apt-layout { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: start; padding-bottom: 72px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); margin: 4px 0 22px; }
.amenities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; padding: 0; list-style: none; margin: 0 0 28px; }
.amenities li::before { content: "✓"; color: var(--ok); margin-right: 8px; }
.info-list { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }
.info-list dt { font-weight: 600; }
.info-list dd { margin: 0 0 12px; color: var(--muted); }

.booking {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  padding: 0 22px 22px; box-shadow: 0 24px 48px -28px rgb(15 61 115 / .45); overflow: hidden;
}
.booking::before { content: ""; display: block; height: 14px; margin: 0 -22px 18px; background: url(/assets/maiolica.svg) 0 0 / 28px 28px repeat-x; }
.apt-title { display: flex; align-items: center; gap: 12px; }
.apt-title::after { content: ""; width: 46px; height: 46px; background: url(/assets/camelia.svg) center / contain no-repeat; transform: rotate(15deg); }
.booking h3 { margin-bottom: 4px; }
.demo-note { background: #fff6dd; border: 1px solid #f0dc9c; color: #6b5512; border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin: 10px 0; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.cal-head button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; color: var(--ink); }
.cal-head button:disabled { opacity: .35; cursor: default; }
.cal-title { font-weight: 600; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: .72rem; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; border: 0; background: transparent; border-radius: 8px;
  font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); position: relative;
}
.cal-day:hover:not(:disabled) { background: var(--accent-soft); }
.cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cal-day small { font-size: .62rem; color: var(--muted); margin-top: 2px; }
.cal-day.start small, .cal-day.end small { color: rgb(255 255 255 / .85); }
.cal-day:disabled small { display: none; }
.cal-day:disabled { cursor: default; color: #b9b1a6; }
.cal-day.booked { background: var(--blocked); text-decoration: line-through; }
.cal-day.in-range { background: var(--accent-soft); border-radius: 0; }
.cal-day.start, .cal-day.end { background: var(--accent); color: var(--accent-ink); }
.cal-day.start { border-radius: 8px 0 0 8px; }
.cal-day.end { border-radius: 0 8px 8px 0; }
.cal-day.start.end { border-radius: 8px; }
.cal-legend { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

.summary { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-size: .95rem; }
.summary .row { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .discount { color: var(--leaf); font-weight: 500; }
.summary .total { font-weight: 600; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.error { color: #a3261b; font-size: .9rem; margin: 8px 0 0; }

form.guest { display: grid; gap: 10px; margin-top: 14px; }
form.guest label { font-size: .85rem; color: var(--muted); display: grid; gap: 4px; }
form.guest input, form.guest select, form.guest textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%;
}
form.guest textarea { min-height: 70px; resize: vertical; }
form.guest .check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
form.guest .check input { width: auto; margin-top: 4px; }
.secure { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 8px; }

.page { max-width: 760px; padding: 48px 0 80px; }
.page h2 { font-size: 1.5rem; margin-top: 1.6em; }

@media (max-width: 960px) {
  .hero-grid, .split, .apt-layout { grid-template-columns: 1fr; }
  .hero-visual .pic { height: 380px; }
  .hero-visual .camelia-deco.c1 { width: 110px; height: 110px; left: -18px; bottom: -20px; }
  .hero-visual .camelia-deco.c2 { right: 0; }
  .section.sea .pic { height: 260px; }
  .sea-visual .camelia-deco { left: auto; right: 0; width: 90px; height: 90px; }
  .contact-box .camelia-deco { right: 0; }
  .cards { grid-template-columns: 1fr; }
  .exp-cards { grid-template-columns: 1fr 1fr; }
  .exp-row { grid-template-columns: 1fr; gap: 16px; }
  .exp-row .exp-icon { width: 78px; height: 92px; }
  .exp-row .exp-icon svg { width: 46px; height: 46px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .booking { position: static; }
}
@media (max-width: 600px) {
  .nav { gap: 14px; }
  .nav a { font-size: .9rem; }
  .nav a.hide-sm { display: none; }
  .brand { font-size: 1.15rem; gap: 6px; }
  .brand::before { width: 24px; height: 24px; }
  .section { padding: 52px 0; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 120px; }
  .gallery > :first-child { grid-column: span 2; grid-row: auto; }
  .gallery > :nth-child(n+4) { display: none; }
  .photos-grid { grid-template-columns: 1fr; }
  .photos-grid .pic:nth-child(3n + 1) { grid-column: auto; }
  .amenities { grid-template-columns: 1fr; }
  .exp-cards { grid-template-columns: 1fr; }
  .request-box { padding: 0 18px 22px; }
  .request-box::before { margin: 0 -18px 20px; }
  .request-box form.guest { grid-template-columns: 1fr; }
}
