/* Ca' Borgh — palette "smalto": il blu delle pentole smaltate, delle tovaglie a quadretti
   e del mosaico della sedia, su bianco lenzuola; ocra come accento. */
:root {
  --paper: #F7F5EF;
  --paper-2: #E7ECF3;
  --ink: #191C22;
  --ink-soft: #545A64;
  --dark: #17233F;
  --on-dark: #F7F5EF;
  --brand: #1F4C9E;
  --on-brand: #FFFFFF;
  --pop: #E4A12E;

  --display: "Alegreya", Georgia, serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
}
:root { --line: color-mix(in srgb, var(--ink) 18%, transparent); --line-dark: color-mix(in srgb, var(--on-dark) 22%, transparent); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: clamp(17px, 1.05vw + 12px, 19px); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(32px, 3.4vw + 12px, 56px); line-height: 1.05; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--pop); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* il logo vero (scritto a mano) usato come maschera: prende il colore del contesto */
.logo {
  display: block; background: currentColor;
  -webkit-mask: url(../assets/img/logo-caborgh.png) left center / contain no-repeat;
          mask: url(../assets/img/logo-caborgh.png) left center / contain no-repeat;
  aspect-ratio: 2096 / 888;
}
.sagoma {
  display: block; background: currentColor;
  -webkit-mask: url(../assets/img/insegna-sagoma.png) center / contain no-repeat;
          mask: url(../assets/img/insegna-sagoma.png) center / contain no-repeat;
  aspect-ratio: 1000 / 1168;
}

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 18px; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  padding: 14px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s, color .25s, transform .25s, filter .25s;
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { filter: brightness(.9); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 50%, transparent); }
.btn-ghost:hover { border-color: currentColor; }

/* ---------- striscia stagione ---------- */
.season {
  display: flex; justify-content: space-between; gap: 16px;
  background: var(--dark); color: color-mix(in srgb, var(--on-dark) 82%, transparent);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; padding: 9px var(--gutter);
}
.season p { margin: 0; }
.season-score span { color: var(--on-dark); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px; padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.wordmark { color: var(--ink); margin-right: auto; width: 112px; }
.nav nav { display: flex; gap: 24px; }
.nav nav a { font-size: 16px; text-decoration: none; color: var(--ink-soft); }
.nav nav a:hover { color: var(--brand); }
.nav-cta { padding: 10px 16px; }

/* ---------- HERO: la casa dietro le zinnie, il logo si scrive da solo ---------- */
.hero {
  position: relative; padding: 0;
  height: calc(100svh - 92px); min-height: 560px; max-height: 980px;
  overflow: hidden; background: var(--dark); isolation: isolate;
}
.hero-view img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  transform: scale(1.05);
  animation: view-settle 6s cubic-bezier(.22,.7,.2,1) forwards;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(12,14,12,.5) 0%, rgba(12,14,12,0) 60%),
    linear-gradient(to top, rgba(12,14,12,.72) 0%, rgba(12,14,12,.25) 40%, rgba(12,14,12,0) 65%);
}
@keyframes view-settle { to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* il logo è scritto a mano: lo "scriviamo" da sinistra a destra, come una penna */
@keyframes write { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }

.hero-copy {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 7vh, 72px);
  color: #FFFFFF; max-width: 760px;
}
.hero-copy .eyebrow { color: #fff; font-size: 13px; text-shadow: 0 1px 8px rgba(0,0,0,.7); opacity: 0; animation: rise .8s ease-out .2s forwards; }
.hero h1 { width: clamp(250px, 40vw, 520px); margin: 0 0 14px -6px; filter: drop-shadow(0 2px 14px rgba(0,0,0,.4)); }
.logo-write { clip-path: inset(-10% 100% -10% 0); animation: write 2.4s cubic-bezier(.55,.1,.35,1) .5s forwards; }
.hero-line { font-family: var(--display); font-size: clamp(21px, 1.5vw + 12px, 28px); line-height: 1.25; max-width: 30ch; text-shadow: 0 1px 14px rgba(0,0,0,.45); opacity: 0; animation: rise .9s ease-out 2.3s forwards; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; opacity: 0; animation: rise .9s ease-out 2.5s forwards; }
.hero-tel { font-family: var(--mono); font-size: 13px; color: #fff; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 4px; }

/* ---------- sezioni comuni ---------- */
section { padding: clamp(80px, 11vw, 150px) var(--gutter); scroll-margin-top: 64px; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2 { margin-bottom: 22px; }
.section-head > p:last-child { color: var(--ink-soft); max-width: 58ch; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.22,.7,.2,1), transform .9s cubic-bezier(.22,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- benvenuti ---------- */
.welcome {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(40px, 6vw, 110px); align-items: end; max-width: var(--max); margin: 0 auto;
}
.welcome h2 { margin-bottom: 28px; }
.lead { font-size: 1.12em; max-width: 46ch; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 36px 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); padding-top: 4px; }
.facts dd { margin: 0; text-align: right; }
.welcome-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.welcome-photo figcaption, .rooms figcaption, .horses figcaption, .breakfast-side figcaption { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 12px; }

/* ---------- camere ---------- */
.rooms { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-top: 0; }
.rooms-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 2vw, 28px); }
.room { align-self: start; }
.room img { width: 100%; height: auto; object-fit: cover; object-position: 50% 75%; }
.room figcaption span { display: block; font-family: var(--display); font-size: 20px; color: var(--ink); }
.room-a { grid-column: 1 / 8; grid-row: 1; } .room-a img { aspect-ratio: 3/2; }
.room-b { grid-column: 8 / 13; grid-row: 1 / 3; margin-top: 14%; } .room-b img { aspect-ratio: 4/5; }
.room-c { grid-column: 2 / 7; grid-row: 2; } .room-c img { aspect-ratio: 4/3; }
.room-d { grid-column: 8 / 12; grid-row: 3; } .room-d img { aspect-ratio: 1/1; }
.linen { margin-top: clamp(40px, 5vw, 64px); max-width: 760px; font-family: var(--display); font-size: clamp(22px, 1.4vw + 14px, 30px); line-height: 1.3; }
.linen small { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- colazione (sezione scura) ---------- */
.breakfast { background: var(--dark); color: var(--on-dark); }
.breakfast .eyebrow { color: color-mix(in srgb, var(--on-dark) 70%, transparent); }
.breakfast-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: auto auto;
  gap: clamp(28px, 4vw, 56px) clamp(40px, 6vw, 96px);
}
.breakfast-text { grid-row: 1 / 3; align-self: center; }
.breakfast-text h2 { margin-bottom: 26px; }
.breakfast-text > p { color: color-mix(in srgb, var(--on-dark) 84%, transparent); max-width: 44ch; }
.breakfast blockquote { margin: 36px 0 0; padding-left: 22px; border-left: 3px solid var(--pop); }
.breakfast blockquote p { font-family: var(--display); font-style: italic; font-size: clamp(21px, 1.2vw + 14px, 27px); line-height: 1.3; }
cite { font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: .03em; opacity: .75; }
.breakfast-main img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: 50% 60%; }
.breakfast-side { width: 56%; justify-self: end; }
.breakfast-side img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.breakfast-side figcaption { color: color-mix(in srgb, var(--on-dark) 65%, transparent); }

/* ---------- animali ---------- */
.horses {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 90px); align-items: start;
}
.horses-photo { grid-row: 1 / 3; }
.horses-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: 50% 90%; }
.horses-text .sagoma { width: 96px; color: var(--brand); margin-bottom: 26px; }
.horses-text h2 { margin-bottom: 26px; }
.horses-text > p { max-width: 46ch; }
.mono-note { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.mono-note span { color: var(--brand); margin-right: 10px; }
.horses-minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.horses-minis img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.horses-minis figcaption { margin-top: 8px; }

/* ---------- stagioni ---------- */
.seasons { background: var(--paper-2); }
.seasons .section-head, .seasons-grid { max-width: var(--max); margin-left: auto; margin-right: auto; }
.seasons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 26px); }
.season-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.season-card figcaption { margin-top: 14px; color: var(--ink-soft); font-size: 16px; line-height: 1.45; }
.season-card b { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; font-size: 24px; color: var(--ink); margin-bottom: 4px; }
.season-card.is-now b::after { content: "adesso"; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .04em; color: var(--on-brand); background: var(--brand); padding: 3px 9px; border-radius: 999px; }
.season-card.is-now img { outline: 3px solid var(--brand); outline-offset: 4px; }

/* ---------- recensioni ---------- */
.voices { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.voices-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: 48px; }
.voices-head .eyebrow { flex-basis: 100%; margin-bottom: 0; }
.scores { display: flex; gap: 28px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 0; }
.scores b { font-family: var(--display); font-weight: 500; font-size: 30px; color: var(--brand); margin-right: 6px; }
.voices-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.voices-list blockquote { margin: 0; padding-top: 22px; border-top: 2px solid var(--pop); }
.voices-list p { font-family: var(--display); font-size: 21px; line-height: 1.38; }

/* ---------- prenota ---------- */
.book {
  background: var(--brand); color: var(--on-brand);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 110px); align-items: start;
  --soft: color-mix(in srgb, var(--on-brand) 72%, transparent);
  --hair: color-mix(in srgb, var(--on-brand) 30%, transparent);
}
.book > * { max-width: 640px; }
.book .eyebrow { color: var(--soft); }
.book-text h2 { margin-bottom: 22px; }
.book-contacts { list-style: none; padding: 0; margin: 34px 0 0; }
.book-contacts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.book-contacts span { font-family: var(--mono); font-size: 12px; color: var(--soft); padding-top: 4px; }
.book-contacts a { text-decoration: none; font-size: 19px; }
.book-contacts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.book-form { background: color-mix(in srgb, var(--on-brand) 8%, transparent); padding: clamp(22px, 3vw, 40px); border: 1px solid var(--hair); border-radius: 6px; }
.book-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.book-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--soft); margin-bottom: 16px; }
.book-form input, .book-form select, .book-form textarea {
  font: inherit; font-family: var(--body); font-size: 17px; color: var(--on-brand);
  background: transparent; border: 0; border-bottom: 1px solid var(--hair);
  padding: 8px 0; border-radius: 0; width: 100%; min-width: 0;
}
.book-form select option { color: #222; }
.book-form textarea { resize: vertical; }
.book-form input::placeholder, .book-form textarea::placeholder { color: color-mix(in srgb, var(--on-brand) 45%, transparent); }
.book-form input:focus, .book-form select:focus, .book-form textarea:focus { outline: none; border-bottom-color: var(--on-brand); }
.nights { font-family: var(--display); font-style: italic; font-size: 22px; margin: -2px 0 18px; min-height: 1.4em; }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.form-error { font-family: var(--mono); font-size: 12px; margin: 14px 0 0; min-height: 1em; }

/* ---------- come arrivare ---------- */
.route {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: stretch;
}
.route-text h2 { margin-bottom: 30px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 32px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 64px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); font-family: var(--mono); font-size: 12px; color: var(--ink-soft); padding-top: 4px; }
.steps li span { font-family: var(--mono); font-size: 13px; color: var(--brand); padding-top: 3px; }
address { font-style: normal; color: var(--ink-soft); margin-bottom: 28px; line-height: 1.55; }
.route-map { min-height: 420px; background: var(--paper-2); }
.route-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: saturate(.7); }

/* ---------- footer ---------- */
.foot { background: var(--dark); color: color-mix(in srgb, var(--on-dark) 75%, transparent); padding: 64px var(--gutter) 48px; font-size: 15px; }
.foot p { margin: 0 0 6px; }
.foot a { color: inherit; }
.foot .logo { width: 170px; color: var(--on-dark); margin-bottom: 22px; }
.cin { font-family: var(--mono); font-size: 11px; opacity: .6; margin-top: 18px !important; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav nav { display: none; }
  .welcome, .horses, .book, .route { grid-template-columns: 1fr; }
  .breakfast-inner { grid-template-columns: 1fr; }
  .breakfast-text, .horses-photo { grid-row: auto; }
  .voices-list { grid-template-columns: 1fr; }
  .welcome-photo img { aspect-ratio: 4/3; }
  .seasons-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .season-score { display: none; }
  .nav { gap: 12px; padding-top: 8px; padding-bottom: 8px; }
  .wordmark { width: 92px; }
  .nav-cta { padding: 9px 12px; font-size: 12px; }
  .hero h1 { width: 260px; }
  .horses-minis { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: 1fr 1fr; }
  .room { grid-row: auto !important; }
  .room-a { grid-column: 1 / 3; }
  .room-b { grid-column: 1 / 2; margin-top: 0; }
  .room-c { grid-column: 2 / 3; } .room-c img { aspect-ratio: 4/5; }
  .room-d { grid-column: 1 / 3; margin-top: 0; } .room-d img { aspect-ratio: 3/2; }
  .room figcaption span { font-size: 18px; }
  .breakfast-side { width: 100%; }
  .book-form .row { grid-template-columns: 1fr; gap: 0; }
  .book-actions .btn { flex: 1 1 100%; }
  .steps li { grid-template-columns: 26px 52px 1fr; }
  .seasons-grid { grid-template-columns: 1fr 1fr; }
  .route-map, .route-map iframe { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-view img { animation: none; transform: none; }
  .hero-copy *, .logo-write { animation: none !important; opacity: 1 !important; clip-path: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
