/* Ristorante Carpe Diem — travertino, rosso pompeiano, notte */
:root {
  --stone: #efe7d8;
  --stone-2: #e4d9c4;
  --white: #faf6ee;
  --red: #8f2d1f;
  --red-dark: #6f2116;
  --night: #1d2030;
  --night-2: #2a2e44;
  --gold: #c99a3c;
  --gold-light: #e2c07a;
  --ink: #262220;
  --muted: #6a5f55;
  --line: rgba(38, 34, 32, .16);
  --disp: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Rosario', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--body); font-size: 1.08rem; line-height: 1.62; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--disp); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--night); color: var(--white); padding: 8px 14px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.preview-strip { height: 28px; line-height: 28px; font-size: .76rem; letter-spacing: .05em; text-align: center; background: var(--night); color: var(--gold-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--stone); border-bottom: 1px solid var(--line); transition: box-shadow .3s var(--ease); }
.site-header.is-compact { box-shadow: 0 8px 20px -16px rgba(0,0,0,.45); }
.header-in { display: flex; align-items: center; gap: 24px; height: 78px; transition: height .3s var(--ease); }
.site-header.is-compact .header-in { height: 60px; }
.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; line-height: 1; }
.brand-name { font-family: var(--disp); font-weight: 700; font-size: 1.55rem; letter-spacing: .08em; color: var(--red); }
.brand-name .dot { color: var(--gold); margin: 0 .08em; }
.brand-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .26em; color: var(--muted); margin-top: 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px; background: var(--red); transition: left .25s var(--ease), right .25s var(--ease); }
.nav a:hover::after, .nav a:focus-visible::after { left: 0; right: 0; }
.nav-cta a { font-family: var(--disp); font-weight: 700; letter-spacing: .1em; background: var(--red); color: var(--white); padding: 10px 18px; }
.nav-cta a::after { display: none; }
.nav-cta a:hover { background: var(--red-dark); }
.menu-btn { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; font: 600 1rem/1.2 var(--body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--white); }
.arrow-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.arrow-link::after { content: " →"; }

/* hero */
.hero { position: relative; padding: clamp(50px, 7vw, 96px) 0 clamp(40px, 5vw, 70px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-weight: 600; margin-bottom: 22px; max-width: 30em; }
.hero h1 { font-weight: 700; font-size: clamp(3.4rem, 9.5vw, 8.4rem); line-height: .9; letter-spacing: .04em; color: var(--red); margin-bottom: 30px; }
.hero h1 span { display: block; }
.hero h1 .h1-b { padding-left: .9em; color: var(--ink); }
.lead { font-size: 1.2rem; max-width: 30em; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.now { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .98rem; margin: 0; }
.now .dot { width: 10px; height: 10px; border-radius: 50%; background: #a69a8c; flex: none; }
.now.is-open .dot { background: #4c7d39; box-shadow: 0 0 0 4px rgba(76,125,57,.18); }
.now.is-closed .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(143,45,31,.15); }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; outline: 1px solid rgba(143,45,31,.35); outline-offset: 12px; }
.hero-photo figcaption { margin-top: 24px; font-size: .9rem; color: var(--muted); display: flex; gap: 12px; align-items: baseline; }
.cap-n { font-family: var(--disp); color: var(--red); font-weight: 700; }
.cap-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.motto { font-family: var(--disp); text-transform: uppercase; letter-spacing: .5em; font-size: clamp(.7rem, 1.2vw, .9rem); color: rgba(143,45,31,.55); text-align: center; margin: clamp(40px, 6vw, 70px) 0 0; padding: 0 20px; }

/* locale */
.locale { padding: clamp(70px, 9vw, 120px) 0; background: var(--white); border-top: 1px solid var(--line); }
.locale h2 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); color: var(--red); margin-bottom: 36px; }
.locale-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 90px); }
.locale-intro { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.4; margin: 0; }
.rooms { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.room { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.room-n { grid-row: span 2; font-family: var(--disp); font-weight: 700; font-size: 2.4rem; color: var(--gold); line-height: 1; }
.room h3 { font-size: 1.3rem; margin-bottom: 6px; }
.room p { margin: 0; color: var(--muted); }
.park { grid-column: 1 / -1; display: flex; gap: 22px; align-items: center; background: var(--stone); padding: 24px 28px; border-left: 4px solid var(--red); }
.park svg { width: 46px; height: 46px; flex: none; color: var(--red); }
.park p { margin: 0; font-size: 1.12rem; }

/* la giornata — meridiana */
.day { --night-mix: 0; position: relative; padding: clamp(70px, 9vw, 120px) 0; color: var(--ink); background: var(--stone-2); transition: background-color .8s var(--ease), color .8s var(--ease); }
.day.is-night { background: var(--night); color: #ece4d4; }
.day-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); }
.dial-sticky { position: sticky; top: 120px; }
.dial { width: 100%; overflow: visible; }
.dial-face { fill: var(--white); stroke: var(--red); stroke-width: 2; transition: fill .8s, stroke .8s; }
.dial-lines line { stroke: rgba(38,34,32,.35); stroke-width: 1; transition: stroke .8s; }
.dial-nums text { font-family: var(--disp); font-weight: 600; font-size: 13px; fill: var(--ink); transition: fill .8s; }
.shadow { transform-origin: 200px 230px; transform: rotate(var(--ang, 0deg)); transition: transform 1s var(--ease), opacity .8s; }
.shadow path { fill: rgba(38,34,32,.55); }
.gnomon { fill: var(--red); transition: fill .8s; }
.sun { fill: var(--gold); }
.moon { opacity: 0; transition: opacity 1s var(--ease); }
.moon circle { fill: var(--gold-light); }
.moon .moon-cut { fill: var(--night); }
.dial-motto { font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: 4px; fill: var(--red); transition: fill .8s; }
.day.is-night .dial-face { fill: var(--night-2); stroke: var(--gold); }
.day.is-night .dial-lines line { stroke: rgba(236,228,212,.25); }
.day.is-night .dial-nums text { fill: rgba(236,228,212,.6); }
.day.is-night .shadow { opacity: 0; }
.day.is-night .gnomon { fill: var(--gold); }
.day.is-night .moon { opacity: 1; }
.day.is-night .dial-motto { fill: var(--gold-light); }
.day-head { margin-bottom: 20px; }
.day h2 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); color: var(--red); margin-bottom: 18px; transition: color .8s; }
.day.is-night h2 { color: var(--gold-light); }
.day-head p { max-width: 28em; }
.moment { padding: clamp(40px, 9vh, 90px) 0; border-top: 1px solid var(--line); opacity: .45; transition: opacity .6s var(--ease); }
.day.is-night .moment { border-color: rgba(236,228,212,.15); }
.moment.active { opacity: 1; }
.m-time { font-family: var(--disp); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; color: var(--red); margin-bottom: 8px; transition: color .8s; }
.day.is-night .m-time { color: var(--gold); }
.moment h3 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 12px; }
.moment p:last-child { font-size: 1.15rem; max-width: 26em; margin: 0; }

/* serate */
.nights { background: var(--night); color: #ece4d4; padding: clamp(40px, 6vw, 80px) 0 clamp(70px, 9vw, 120px); }
.nights-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 60px; align-items: end; margin-bottom: 40px; }
.nights h2 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); color: var(--gold-light); }
.nights-head p { margin: 0; color: #c9c0b0; max-width: 30em; }
.nights-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(236,228,212,.2); }
.nights-list li { display: flex; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid rgba(236,228,212,.12); }
.nights-list li:nth-child(even) { padding-left: clamp(0px, 12vw, 180px); }
.n-num { font-family: var(--disp); font-size: 1rem; color: var(--gold); width: 40px; flex: none; }
.n-word { font-family: var(--disp); font-weight: 700; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1; letter-spacing: .03em; color: #f3ecdf; transition: color .3s, letter-spacing .4s var(--ease); }
.nights-list li:hover .n-word { color: var(--gold-light); letter-spacing: .06em; }
.nights-note { font-size: 1.2rem; margin: 32px 0 20px; color: #ece4d4; font-style: italic; }
.nights-links { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; }
.nights-links a { color: var(--gold-light); }

/* galleria */
.gallery { padding: clamp(70px, 9vw, 120px) 0; }
.gallery h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); color: var(--red); margin-bottom: 30px; }
.g-grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.g-item { padding: 0; border: 0; background: var(--stone-2); cursor: zoom-in; overflow: hidden; position: relative; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g1 { grid-row: span 2; aspect-ratio: 4 / 5; }
.g2, .g3 { aspect-ratio: 3 / 2; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20,18,24,.92); display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close { position: absolute; top: 16px; right: 16px; background: var(--white); border: 0; padding: 10px 16px; font: 600 .95rem var(--body); cursor: pointer; }

/* prenota */
.book { padding: clamp(70px, 9vw, 120px) 0; background: var(--white); border-top: 1px solid var(--line); }
.book-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.book h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); color: var(--red); margin-bottom: 20px; }
.book-head p { max-width: 28em; }
.book-facts { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.book-facts li { padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative; }
.book-facts li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 14px; }
.form label, .form legend { font-weight: 600; font-size: .92rem; }
.opt { font-weight: 400; color: var(--muted); }
.form input[type=text], .form input[type=date], .form input[type=time], .form input[type=number], .form textarea {
  width: 100%; font: 400 1.02rem/1.4 var(--body); color: var(--ink); background: var(--stone); border: 1px solid #cfc2ad; border-radius: 0; padding: 12px 12px; min-height: 48px;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(143,45,31,.14); }
.form [aria-invalid=true] { border-color: var(--red) !important; background: #fbeee9; }
.err { color: var(--red); font-size: .88rem; font-weight: 600; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 8px; padding: 0; }
.chips label { cursor: pointer; font-weight: 400; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: 9px 16px; border: 1px solid #cfc2ad; background: var(--stone); transition: background .2s, color .2s, border-color .2s; }
.chips input:checked + span { background: var(--night); border-color: var(--night); color: var(--gold-light); font-weight: 600; }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form-note { font-size: .9rem; color: var(--muted); margin: 0; }

/* orari */
.where { padding: clamp(70px, 9vw, 120px) 0; }
.where-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.where h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); color: var(--red); margin-bottom: 18px; }
.badge-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.badge { font-weight: 600; font-size: .88rem; padding: 6px 12px; background: var(--stone-2); }
.badge.open { background: #dfe9d6; color: #2f5a1f; }
.badge.closed { background: #f1dcd5; color: var(--red-dark); }
.badge-sub { color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 400; width: 34%; }
.hours td span { white-space: nowrap; }
.hours td span + span::before { content: "·"; margin: 0 .7em; color: var(--muted); }
.hours tr.today { background: var(--white); }
.hours tr.today th { font-weight: 700; color: var(--red); }
.hours tr.today th::after { content: " · oggi"; font-weight: 400; font-size: .85rem; color: var(--muted); }
.hours-note { font-size: .92rem; color: var(--muted); margin-top: 14px; }
.addr { font-style: normal; margin-bottom: 18px; line-height: 1.6; }
.addr strong { font-family: var(--disp); font-size: 1.3rem; color: var(--red); }
.map { aspect-ratio: 4 / 3; border: 1px solid var(--ink); outline: 1px solid rgba(143,45,31,.3); outline-offset: 8px; background: var(--stone-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 22px; }
.map-links a { color: var(--red); }

/* footer */
.site-footer { background: var(--night); color: #c9c0b0; padding: 50px 0 36px; font-size: .96rem; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; }
.foot-brand { font-family: var(--disp); font-weight: 700; font-size: 2rem; letter-spacing: .08em; color: var(--gold-light); margin-bottom: 10px; line-height: 1; }
.site-footer a { color: #f3ecdf; }
.foot-small { grid-column: 1 / -1; font-size: .8rem; color: #8f8879; border-top: 1px solid rgba(236,228,212,.14); padding-top: 18px; margin: 6px 0 0; }

.action-bar { display: none; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .nav ul { gap: 16px; }
  .nav a { font-size: .88rem; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 1.5px solid var(--ink); padding: 9px 14px; font: 600 .9rem var(--body); color: var(--ink); cursor: pointer; }
  .menu-ic { width: 18px; height: 10px; position: relative; }
  .menu-ic i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .25s var(--ease), top .25s var(--ease); }
  .menu-ic i:first-child { top: 1px; } .menu-ic i:last-child { top: 8px; }
  .menu-btn[aria-expanded=true] .menu-ic i:first-child { top: 4.5px; transform: rotate(45deg); }
  .menu-btn[aria-expanded=true] .menu-ic i:last-child { top: 4.5px; transform: rotate(-45deg); }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--stone); border-bottom: 2px solid var(--red); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 20px; }
  .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .nav-cta a { text-align: center; margin-top: 14px; border: 0; }
  .hero-grid, .locale-grid, .day-grid, .book-grid, .where-grid, .nights-head { grid-template-columns: 1fr; }
  .hero-photo { max-width: 560px; }
  .day-grid { display: block; }
  .dial-col { position: sticky; top: 60px; z-index: 3; background: var(--stone-2); margin: 0 -20px; padding: 8px 20px 12px; transition: background-color .8s var(--ease); box-shadow: 0 10px 14px -12px rgba(0,0,0,.25); }
  .day.is-night .dial-col { background: var(--night); }
  .dial-sticky { position: static; max-width: 340px; margin: 0 auto; }
  .day-head { margin-top: 28px; }
  .moment { padding: 46px 0; }
}
@media (max-width: 640px) {
  body { font-size: 1.03rem; padding-bottom: 68px; }
  .wrap { width: calc(100% - 32px); }
  .header-in { height: 64px; }
  .brand-name { font-size: 1.35rem; }
  .brand-sub { font-size: .6rem; letter-spacing: .2em; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(3.1rem, 17vw, 4.4rem); }
  .lead { font-size: 1.08rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-photo img { outline-offset: 7px; aspect-ratio: 4 / 3; }
  .motto { letter-spacing: .3em; }
  .room { grid-template-columns: 48px 1fr; }
  .room-n { font-size: 1.9rem; }
  .park { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .dial-sticky { max-width: 230px; }
  .dial-col { margin: 0 -16px; padding: 6px 16px 8px; }
  .nights-list li:nth-child(even) { padding-left: 0; }
  .n-word { font-size: clamp(2.2rem, 11vw, 3rem); }
  .n-num { width: 30px; }
  .g-grid { grid-template-columns: 1fr 1fr; }
  .g1 { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:first-child { grid-column: 1 / -1; }
  .form .btn { justify-self: stretch; }
  .hours th { width: 32%; }
  .hours td span { display: inline-block; margin-right: .6em; }
  .hours td span + span::before { content: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .action-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--night); color: #f3ecdf; border-top: 2px solid var(--gold); padding-bottom: env(safe-area-inset-bottom); }
  .action-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 10px; text-decoration: none; font-size: .76rem; font-weight: 600; }
  .action-bar a + a { border-left: 1px solid rgba(236,228,212,.15); }
  .action-bar a:nth-child(2) { color: var(--gold-light); }
  .action-bar svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .moment { opacity: 1; }
}
