/* Domixedda: Sardinian coast palette (deep sea, turquoise shallows, myrtle, granite) with a saffron accent for
   San Gavino's saffron and a woven band taken from Sardinian textiles. Single column, sections in reading order. */
:root {
  --bg: #f2f4f1; --surface: #ffffff; --ink: #1b2827; --muted: #5d6a66; --line: #d6dcd6;
  --sea: #0e5a66; --shallows: #3aa6a0; --myrtle: #4c5e3b; --saffron: #d6922a; --todo: #fbe7c4;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0e191a; --surface: #142224; --ink: #e5ece8; --muted: #9aaba6; --line: #263638;
  --sea: #6bc3c8; --shallows: #55bfb8; --myrtle: #9bb07f; --saffron: #e7ab4b; --todo: #4a3816;
  color-scheme: dark; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
a { color: var(--sea); }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--sea); }
h3 { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .4rem; color: var(--myrtle); }
p { margin: 0; }
.prose { max-width: 62ch; }
.muted { color: var(--muted); }
mark.todo { background: var(--todo); color: inherit; border-radius: 3px; padding: 0 .2em; outline: 1px dashed var(--saffron); }

.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  padding: 12px max(16px, calc((100% - 1120px) / 2)); background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.mark { font: 1.5rem/1 var(--display); color: var(--ink); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: 10px; }
.bar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.bar nav a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.bar nav a:hover { color: var(--sea); }
@media (max-width: 760px) { .bar nav { display: none; } }

main, .foot { width: min(1120px, 100% - 32px); margin-inline: auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 64px 48px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--myrtle); }
.hero h1 { font-size: clamp(3.6rem, 10vw, 6.5rem); margin: .1em 0 .15em; letter-spacing: -.01em; }
.lead { font-size: 1.3rem; max-width: 30ch; }
.name-note { color: var(--muted); margin-top: .6rem; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--sea); color: var(--sea);
  text-decoration: none; font-weight: 500; }
.btn.primary { background: var(--sea); color: var(--bg); }
.hero-art { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 999px 999px 10px 10px; overflow: hidden; background: var(--line); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero-art { width: 70%; justify-self: center; } }

.weave { height: 14px; background:
  linear-gradient(135deg, var(--saffron) 25%, transparent 25%) -7px 0 / 14px 14px,
  linear-gradient(225deg, var(--saffron) 25%, transparent 25%) -7px 0 / 14px 14px,
  linear-gradient(315deg, var(--sea) 25%, transparent 25%) 0 0 / 14px 14px,
  linear-gradient(45deg, var(--sea) 25%, transparent 25%) 0 0 / 14px 14px, var(--bg); }

.block { padding-block: 64px; border-bottom: 1px solid var(--line); display: grid; gap: 20px; }
.block:last-child { border-bottom: 0; }
.house { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; }
.house-main { display: grid; gap: 20px; align-content: start; }
.house-side { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; display: grid; gap: 10px; align-content: start; }
.house-side h3 + * { margin-bottom: 10px; }
@media (max-width: 760px) { .house { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 8px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font: 1.7rem/1.1 var(--display); }
@media (max-width: 520px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; background: var(--shallows); transform: rotate(45deg); }
.pairs { margin: 0; display: grid; gap: 6px; }
.pairs div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dotted var(--line); padding-bottom: 6px; }
.pairs dt { color: var(--muted); }
.pairs dd { margin: 0; text-align: right; }
.distances { max-width: 620px; display: grid; gap: 8px; }
.distances dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.small { font-size: .88rem; }
.pairs.big { max-width: 560px; font-size: 1.1rem; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photo { margin: 0; display: grid; gap: 6px; }
.photo a { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo a:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .photo img { transition: none; } }
.photo figcaption { font-size: .88rem; color: var(--muted); }
.sub { margin-top: 20px; }
.gallery.area { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .gallery.area { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 14, 15, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 82vh; border-radius: 6px; object-fit: contain; }
.lb-caption { color: #e5ece8; text-align: center; margin-top: 10px; }
.lightbox button { position: fixed; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px;
  border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 8px; }
.cards article { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.cards p, .travel p { color: var(--muted); }
.travel { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }

.foot-logo { height: 44px; width: auto; }
@media (prefers-color-scheme: dark) { .foot-logo { content: url("logo/logo-dark.svg"); } }
.foot { align-items: center; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 24px 40px; color: var(--muted); font-size: .9rem; }

/* Language switch, guide links and guide pages */
.langs { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; font-size: .82rem; }
.langs a, .langs-current { padding: 2px 9px; border-radius: 999px; text-decoration: none; color: var(--ink); }
.langs a:hover { color: var(--sea); }
.langs-current { background: var(--sea); color: var(--bg); }
.bar nav a[aria-current="page"] { color: var(--sea); text-decoration: underline; text-underline-offset: 6px; }
.guide-links { display: flex; flex-wrap: wrap; gap: 10px; }
.guide-head { padding-top: 48px; }
.guide-h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); color: var(--sea); }
.spots { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; counter-reset: spot; }
.spot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.spot:last-child { border-bottom: 0; padding-bottom: 0; }
.spot:has(.spot-photos) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; }
@media (max-width: 760px) { .spot:has(.spot-photos) { grid-template-columns: minmax(0, 1fr); } }
.spot-photos { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.spot-text { display: grid; gap: 8px; max-width: 62ch; }
.spot-text h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.spot-text h2::before { counter-increment: spot; content: counter(spot) ". "; color: var(--saffron); }
.spot-meta { font-weight: 600; color: var(--myrtle); font-variant-numeric: tabular-nums; }
.cta-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; display: grid; gap: 4px; }
.cta-box p { font-size: 1.15rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--muted); }

/* Click-to-load map in "Getting here" */
.map { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--shallows) 22%, var(--surface)), var(--surface) 70%); }
@media (max-width: 640px) { .map { aspect-ratio: 4 / 5; } }
.map-consent { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 20px; max-width: 46ch; color: var(--sea); }
.map-consent p { color: var(--ink); }
.map-consent .muted { color: var(--muted); }
.map-consent .ctas { margin-top: 8px; justify-content: center; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
button.btn { font: inherit; font-weight: 500; cursor: pointer; }
