/* L'Altro Casello — Domine + Hind Madurai. Crema, carbone delle pareti, tuorlo della pasta, rosa antico della sala. */
:root {
  --cream: #f4eee2;
  --cream-2: #ebe3d3;
  --card: #fffaf1;
  --ink: #2a2522;
  --wall: #2f2a27;
  --yolk: #e3b23c;
  --yolk-d: #b9871c;
  --rosa: #c98f84;
  --rosa-l: #ecdcd3;
  --noce: #6e4a2f;
  --muted: #625a53;
  --line: rgba(42, 37, 34, .15);
  --disp: 'Domine', Georgia, serif;
  --body: 'Hind Madurai', 'Segoe UI', sans-serif;
  --wrap: 1160px;
  --hh: 74px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 10px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.08rem/1.7 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--disp); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--cream); padding: 10px 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--yolk-d); outline-offset: 3px; }

.preview-strip { background: var(--wall); color: #e6dccb; font-size: .76rem; letter-spacing: .03em; text-align: center; padding: 6px 12px; line-height: 1.4; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.is-compact { border-color: var(--line); box-shadow: 0 8px 22px -18px rgba(0, 0, 0, .5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--hh); transition: height .3s; }
.site-header.is-compact .header-inner { height: 60px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 400 1.42rem/1 var(--disp); letter-spacing: -.02em; }
.brand-name b { font-weight: 700; }
.brand-sub { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.menu-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--cream); border: 0; border-radius: 4px; padding: 9px 12px 9px 14px; font: 600 .9rem var(--body); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--yolk); stroke-width: 2.4; stroke-linecap: round; transition: transform .3s; }
.menu-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav { position: fixed; left: 0; right: 0; top: calc(var(--hh) + 26px); background: var(--cream); border-bottom: 3px solid var(--yolk); padding: 6px 20px 22px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s; }
.nav.is-open { opacity: 1; visibility: visible; transform: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 700 1.2rem var(--disp); }
.nav .nav-cta a { margin-top: 14px; border: 0; background: var(--yolk); text-align: center; border-radius: 4px; font: 600 1rem var(--body); }

/* bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 4px; font: 600 1rem/1.2 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s, background .2s, color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-yolk { background: var(--yolk); color: var(--ink); box-shadow: 0 3px 0 var(--yolk-d); }
.btn-yolk:hover { box-shadow: 0 5px 0 var(--yolk-d); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #000; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.btn-block { width: 100%; }

.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* nastro di pasta (firma) */
.ribbon { position: absolute; left: 0; width: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.ribbon path { fill: none; stroke: var(--yolk); stroke-width: 18px; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 5px 4px rgba(110, 74, 47, .25)); }
.ribbon .rb-d { display: none; }

/* hero */
.hero { position: relative; padding: 34px 0 150px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; }
.eyebrow { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--noce); font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.9rem, 12.5vw, 6.2rem); line-height: .98; letter-spacing: -.035em; margin-bottom: 22px; }
.lead { font-size: 1.14rem; max-width: 31em; color: #3d3632; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.live { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: .95rem; }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: #aaa092; }
.live.is-open .dot { background: #4f8a2b; box-shadow: 0 0 0 4px rgba(79, 138, 43, .2); }
.live.is-closed .dot { background: #b9482f; box-shadow: 0 0 0 4px rgba(185, 72, 47, .16); }
.hero-photo { margin: 0; justify-self: center; max-width: 440px; width: 100%; }
.frame { background: var(--card); padding: 12px 12px 14px; box-shadow: 0 30px 50px -30px rgba(60, 40, 20, .45), 0 2px 0 var(--line); transform: rotate(1.6deg); }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.hero-photo figcaption { font-size: .9rem; color: var(--muted); margin: 16px auto 0; text-align: center; width: fit-content; max-width: 100%; background: var(--cream); padding: 2px 10px; position: relative; z-index: 3; }
.ribbon-hero { bottom: 0; height: 200px; }

/* fascia */
.band { background: var(--wall); color: #efe6d6; padding: 56px 0; position: relative; }
.band-grid { display: grid; gap: 26px; }
.band-big { font: 700 clamp(1.45rem, 5.6vw, 2.35rem)/1.25 var(--disp); letter-spacing: -.015em; margin: 0; max-width: 24em; }
.band-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 1rem; }
.band-list li { display: flex; align-items: center; gap: 12px; }
.band-list li::before { content: ''; flex: none; width: 26px; height: 10px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'%3E%3Cpath d='M2 7c3-5 6-5 9 0s7 5 10 0 3-3 3-3' fill='none' stroke='%23e3b23c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* sezioni */
.sec { padding: 76px 0; position: relative; }
.kicker { display: flex; align-items: center; gap: 12px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--noce); margin-bottom: 14px; }
.kicker span { font: 700 .82rem var(--disp); letter-spacing: 0; color: var(--ink); background: var(--yolk); padding: 3px 7px 2px; border-radius: 2px; }
.sec h2 { font-size: clamp(2rem, 7.4vw, 3.5rem); margin-bottom: 20px; }
.small { font-size: .88rem; color: var(--muted); }
.note { font-size: .98rem; color: var(--muted); }

/* cucina */
.cucina { padding-bottom: 130px; }
.cucina-grid { display: grid; gap: 40px; }
.piatti { list-style: none; margin: 8px 0 22px; padding: 0; border-top: 2px solid var(--ink); }
.piatti li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.piatti b { font: 700 1.28rem var(--disp); letter-spacing: -.01em; }
.piatti span { color: var(--muted); font-size: 1rem; }
.cucina-photo { margin: 0; }
.cucina-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.cucina-photo figcaption, .fam-photo figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.ribbon-div { bottom: 30px; height: 70px; }

/* famiglia */
.famiglia { background: var(--rosa-l); }
.fam-grid { display: grid; gap: 34px; }
.fam-photo { margin: 0; }
.fam-photo img { width: 100%; border-radius: 3px; box-shadow: 0 30px 50px -36px rgba(60, 30, 20, .6); }
.fam-text p { max-width: 30em; }

/* sala */
.sala-head { max-width: 640px; margin-bottom: 34px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-item { padding: 0; border: 0; background: var(--cream-2); cursor: zoom-in; overflow: hidden; border-radius: 3px; position: relative; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.g-item:hover img { transform: scale(1.04); }
.g-a { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.g-b, .g-c, .g-d { aspect-ratio: 1; }
.g-d { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.g-d img { object-position: 50% 30%; }
.sala .small { margin-top: 12px; }

/* prenota + orari */
.pren { background: var(--cream-2); }
.pren-grid { display: grid; gap: 64px; }
.form { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--yolk); padding: 24px 20px; margin-top: 10px; }
.f-row { margin-bottom: 16px; }
.f-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.f-row > label, .f-turno legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
.form input[type=text], .form input[type=number], .form input[type=date], .form select, .form textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c9bfae; border-radius: 3px; background: #fff; font: 400 1.02rem var(--body); color: var(--ink); }
.form textarea { min-height: 80px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: 2px solid rgba(227, 178, 60, .55); outline-offset: 0; }
.form [aria-invalid="true"] { border-color: #b33b22; }
.f-err { color: #a3321b; font-size: .88rem; margin: 6px 0 0; }
.f-turno { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.f-turno legend { width: 100%; }
.f-turno label { position: relative; padding: 9px 20px; border: 1.5px solid var(--ink); border-radius: 999px; cursor: pointer; font-weight: 600; transition: background .2s, color .2s; }
.f-turno input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.f-turno label:has(input:checked) { background: var(--ink); color: var(--cream); }
.f-turno label:has(input:focus-visible) { outline: 3px solid var(--yolk-d); outline-offset: 2px; }
.badge-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 12px 3px; border-radius: 2px; font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; background: #ddd3c1; }
.badge.is-open { background: #d9e6c3; color: #2d4a12; }
.badge.is-closed { background: #f1d2c6; color: #7d2714; }
.hours { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.hours th, .hours td { text-align: left; padding: 11px 12px; border-bottom: 1px dashed rgba(42, 37, 34, .25); }
.hours th { font-weight: 400; }
.hours td { font-variant-numeric: tabular-nums; text-align: right; }
.hours .slot { display: block; }
@media (min-width: 370px) { .hours .slot { display: inline; } .hours .slot + .slot::before { content: ' · '; white-space: pre; opacity: .55; } }
.hours tr.is-today { background: var(--yolk); }
.hours tr.is-today th { font-weight: 600; }
.hours tr.is-closed-day td { color: #9a3a22; }

/* dove */
.dove-grid { display: grid; gap: 34px; }
address { font-style: normal; margin-bottom: 20px; line-height: 1.8; }
.dove-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map { aspect-ratio: 4 / 3; border: 1px solid var(--line); background: var(--cream-2); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* footer */
.footer { background: var(--wall); color: #d9cfbf; padding: 56px 0 110px; font-size: .98rem; }
.footer-grid { display: grid; gap: 24px; }
.f-name { font: 400 1.6rem var(--disp); color: #fff; margin-bottom: 4px; }
.f-name b { color: var(--yolk); }
.footer a { color: #fff; }
.f-legal { margin-top: 28px; padding-top: 18px; background: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12)) center top / calc(100% - 40px) 1px no-repeat; font-size: .82rem; color: #a59a8a; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(28, 24, 22, .92); display: flex; align-items: center; justify-content: center; padding: 60px 16px 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-close { position: absolute; top: 14px; right: 14px; background: var(--yolk); color: var(--ink); border: 0; border-radius: 3px; padding: 10px 16px; font: 600 .95rem var(--body); cursor: pointer; }

/* barra azioni */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--wall); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(0, 0, 0, .15); }
.action-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 11px; color: #f4eee2; text-decoration: none; font-size: .8rem; font-weight: 600; }
.action-bar a:nth-child(2) { background: var(--yolk); color: var(--ink); }
.action-bar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .band-grid { grid-template-columns: 1.6fr 1fr; align-items: center; gap: 50px; }
  .gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: 12px; }
  .g-a { grid-column: 1; grid-row: 1 / 3; aspect-ratio: auto; }
  .g-b { grid-column: 2 / 4; aspect-ratio: 16 / 10; }
  .g-c, .g-d { grid-column: auto; aspect-ratio: 3 / 4; }
  .form { padding: 30px 28px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr; }
}
@media (min-width: 960px) {
  :root { --hh: 84px; }
  .menu-toggle { display: none; }
  .nav { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; padding: 0; }
  .nav ul { display: flex; align-items: center; gap: 28px; }
  .nav li a { border: 0; padding: 4px 0; font: 600 1rem var(--body); position: relative; }
  .nav li:not(.nav-cta) a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 2px; background: var(--yolk); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
  .nav li:not(.nav-cta) a:hover::after { transform: scaleX(1); }
  .nav .nav-cta a { margin: 0; padding: 10px 20px; }
  .hero { padding: 64px 0 190px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .hero-photo { justify-self: end; }
  .ribbon .rb-d { display: inline; }
  .ribbon .rb-m { display: none; }
  .ribbon path { stroke-width: 24px; }
  .ribbon-hero { height: 330px; }
  .sec { padding: 110px 0; }
  .cucina { padding-bottom: 170px; }
  .cucina-grid { grid-template-columns: 1fr 1.1fr; gap: 70px; align-items: center; }
  .cucina-photo { transform: translateY(30px); }
  .fam-grid { grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: center; }
  .fam-photo { margin-left: -40px; }
  .pren-grid { grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: start; }
  .orari { position: sticky; top: 110px; }
  .dove-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
  .action-bar { display: none; }
  .footer { padding-bottom: 50px; }
}
@media (min-width: 1200px) {
  .hero h1 { font-size: 6.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .ribbon path { stroke-dashoffset: 0 !important; }
}
