:root {
  --ink: #23140f;
  --muted: #6f5548;
  --paper: #fff8ef;
  --cream: #f5e6d1;
  --red: #9d261c;
  --red-dark: #641811;
  --gold: #c88b24;
  --sage: #49694b;
  --sea: #0b5364;
  --white: #fffdf8;
  --line: rgba(88, 48, 30, .18);
  --shadow: 0 24px 70px rgba(43, 23, 14, .18);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Karla", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
}

body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--gold);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 8px;
  background: rgba(255, 248, 239, .86);
  box-shadow: 0 14px 48px rgba(35, 20, 15, .16);
  backdrop-filter: blur(18px);
  transition: background .25s ease, box-shadow .25s ease;
}

.site-header.scrolled {
  background: rgba(255, 248, 239, .97);
  box-shadow: 0 12px 42px rgba(35, 20, 15, .22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 205px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper);
  font-family: "Playfair Display SC", serif;
  font-weight: 900;
  letter-spacing: 0;
}
.brand strong {
  display: block;
  font-weight: 900;
  line-height: 1;
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: .78rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.desktop-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: rgba(35, 20, 15, .82);
  font-weight: 800;
  transition: background .2s ease, color .2s ease;
}
.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  background: rgba(157, 38, 28, .1);
  color: var(--red);
}

.nav-cta, .menu-toggle, .button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}
.nav-cta {
  padding: 0 16px;
  background: var(--red);
  color: var(--white);
}
.menu-toggle {
  display: none;
  width: 48px;
  background: var(--ink);
  color: var(--paper);
}
.nav-cta svg, .menu-toggle svg, .button svg, .quick-links svg, .contact-card svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.mobile-nav {
  position: fixed;
  inset: 96px 16px auto;
  z-index: 90;
  display: none;
  padding: 14px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.mobile-nav.open { display: grid; }
.mobile-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}
.mobile-nav a:last-child { border-bottom: 0; }

.hero {
  position: relative;
  min-height: 96dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 132px max(24px, calc((100vw - 1180px) / 2)) 36px;
  color: var(--white);
}
.hero-bg, .hero-scrim {
  position: absolute;
  inset: 0;
}
.hero-bg {
  background-image: url("assets/castelnuovo-hero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.hero-scrim {
  background:
    linear-gradient(90deg, rgba(24, 12, 8, .86), rgba(24, 12, 8, .45) 48%, rgba(24, 12, 8, .18)),
    linear-gradient(0deg, rgba(24, 12, 8, .72), transparent 46%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding-bottom: 116px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 900;
}
.eyebrow.dark { color: var(--red); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  font-family: "Playfair Display SC", serif;
  font-size: clamp(4rem, 12vw, 11.5rem);
  line-height: .82;
  letter-spacing: 0;
  text-shadow: 0 14px 38px rgba(0,0,0,.32);
}
h2 {
  margin-bottom: 18px;
  font-family: "Playfair Display SC", serif;
  font-size: clamp(2.15rem, 5vw, 5rem);
  line-height: .96;
  letter-spacing: 0;
}
h3 {
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.08;
}
.hero-copy {
  max-width: 680px;
  margin-bottom: 28px;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  color: rgba(255,255,255,.92);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  padding: 0 18px;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  background: var(--gold);
  color: #23140f;
  box-shadow: 0 18px 34px rgba(200,139,36,.34);
}
.button.ghost {
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(255,255,255,.13);
  color: var(--white);
  backdrop-filter: blur(12px);
}
.button.light {
  width: fit-content;
  background: var(--paper);
  color: var(--red-dark);
}
.button.submit {
  width: 100%;
  background: var(--red);
  color: var(--white);
}
.hero-panel {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  left: max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(18px);
}
.hero-panel div {
  padding: 18px 22px;
  border-right: 1px solid rgba(255,255,255,.22);
}
.hero-panel div:last-child { border-right: 0; }
.hero-panel span, .hero-panel small {
  display: block;
  color: rgba(255,255,255,.72);
  font-weight: 800;
}
.hero-panel strong {
  display: block;
  color: var(--white);
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--red-dark);
}
.quick-links a {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: var(--red);
  color: var(--paper);
  font-weight: 900;
  transition: background .2s ease;
}
.quick-links a:hover { background: var(--sea); }

.section {
  padding: 104px max(20px, calc((100vw - 1180px) / 2));
}
.section-heading {
  margin-bottom: 42px;
}
.section-heading.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 38px;
  align-items: end;
}
.section-heading p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}

.about {
  background:
    radial-gradient(circle at 15% 18%, rgba(200,139,36,.13), transparent 28%),
    linear-gradient(180deg, var(--paper), var(--cream));
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .7fr);
  gap: 26px;
  align-items: stretch;
}
.story-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 4vw, 52px);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(35,20,15,.86), rgba(35,20,15,.22)),
    url("assets/piatto-mare.jpg") center / cover;
  color: var(--white);
  box-shadow: var(--shadow);
}
.story-card p { max-width: 620px; color: rgba(255,255,255,.86); }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.facts span {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.1);
}
.facts strong { display: block; color: var(--gold); }
.about-photo {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-photo figcaption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,248,239,.92);
  color: var(--ink);
  font-weight: 900;
}

.menu-section {
  background:
    linear-gradient(90deg, rgba(157,38,28,.08) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper), #fffdf8);
  background-size: 74px 74px, auto;
}
.menu-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tab {
  min-height: 46px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.menu-tab:hover,
.menu-tab:focus-visible,
.menu-tab.active {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}
.menu-layout { margin-top: 10px; }
.menu-category {
  display: none;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(43, 23, 14, .1);
}
.menu-category.active {
  display: block;
  animation: menuIn .22s ease;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-category.featured {
  background:
    linear-gradient(135deg, rgba(11,83,100,.95), rgba(100,24,17,.96)),
    var(--sea);
  color: var(--white);
}
.menu-category h3 {
  font-family: "Playfair Display SC", serif;
  font-size: clamp(2rem, 4vw, 4rem);
}
.menu-category.featured h3 { color: var(--gold); }
.menu-category ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 42px;
}
.menu-category li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.menu-category.featured li { border-color: rgba(255,255,255,.2); }
.menu-category li span { max-width: 72ch; color: rgba(35,20,15,.82); }
.menu-category.featured li span { color: rgba(255,255,255,.88); }
.menu-category li strong {
  white-space: nowrap;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.menu-category li strong::before { content: "€ "; }
.menu-category.featured li strong { color: var(--gold); }

.gallery {
  background: var(--cream);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 12px;
}
.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
}
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(35,20,15,.82);
  color: var(--paper);
  font-weight: 900;
}

.reservation {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1fr);
  gap: 34px;
  padding: 104px max(20px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(35,20,15,.92), rgba(35,20,15,.66)),
    url("assets/gallery-7.jpg") center / cover;
  color: var(--white);
}
.reservation-copy {
  align-self: center;
}
.reservation-copy p {
  max-width: 520px;
  color: rgba(255,255,255,.82);
  font-size: 1.08rem;
}
.booking-form {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255, 248, 239, .96);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-weight: 900;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(35,20,15,.22);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
}
.field textarea { resize: vertical; }
.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--sage);
  font-weight: 900;
}

.contacts {
  background:
    radial-gradient(circle at 85% 8%, rgba(11,83,100,.12), transparent 28%),
    var(--paper);
}
.contact-grid {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 22px;
}
.contact-list {
  display: grid;
  gap: 12px;
}
.contact-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.contact-card svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(157,38,28,.1);
  color: var(--red);
}
.contact-card h3 {
  margin-bottom: 4px;
  font-family: "Karla", system-ui, sans-serif;
  font-size: 1.04rem;
}
.contact-card p { margin-bottom: 0; color: var(--muted); }
.contact-card a { color: var(--red); font-weight: 900; }
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.social-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(157,38,28,.18);
  border-radius: 8px;
  background: rgba(157,38,28,.08);
  color: var(--red-dark);
  transition: background .2s ease, transform .2s ease;
}
.social-links a:hover {
  background: rgba(157,38,28,.14);
  transform: translateY(-1px);
}
.social-links svg {
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.social-links a[href*="facebook"] svg {
  fill: currentColor;
  stroke: none;
}
.map-shell {
  min-height: 480px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.map-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  filter: saturate(.92) contrast(1.04);
}
.map-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: var(--sea);
  color: var(--white);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(20px, calc((100vw - 1180px) / 2));
  background: var(--ink);
  color: var(--paper);
}
.site-footer div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0 14px;
  max-width: 680px;
}
.footer-mark { grid-row: span 2; }
.site-footer p {
  margin: 4px 0 0;
  color: rgba(255,248,239,.72);
}
.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  color: var(--gold);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 980px) {
  .desktop-nav, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .site-header { top: 10px; width: min(100% - 20px, 760px); }
  .brand { min-width: 0; }
  .hero {
    min-height: 92dvh;
    display: block;
    padding: 112px 18px 26px;
  }
  .hero-content { padding-bottom: 0; }
  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 18px;
    grid-template-columns: 1fr;
  }
  .hero-panel div {
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.22);
  }
  .hero-panel div:last-child { border-bottom: 0; }
  .quick-links, .section-heading.split, .about-grid, .reservation, .contact-grid {
    grid-template-columns: 1fr;
  }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .menu-category ul { columns: 1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 560px) {
  .site-header { min-height: 62px; padding: 8px; }
  .brand small { display: none; }
  .brand-mark { width: 44px; height: 44px; }
  h1 { font-size: clamp(3.45rem, 20vw, 5.7rem); }
  .hero-actions .button { width: 100%; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-links a { min-height: 72px; justify-content: flex-start; }
  .section, .reservation { padding: 72px 16px; }
  .story-card, .about-photo { min-height: 430px; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
  .gallery .wide, .gallery .tall {
    grid-column: auto;
    grid-row: auto;
  }
  .menu-tab { padding: 0 14px; }
  .menu-category { padding: 18px; }
  .menu-category li { gap: 10px; }
  .site-footer {
    display: grid;
  }
  .site-footer div { grid-template-columns: 1fr; }
  .footer-mark { margin-bottom: 12px; }
}
