/* ============================================================
   RESTAURANT-V1 — STYLES.CSS — Osteria del Porto
   Dark warm · Amber/Gold · Cormorant Garamond + Outfit
   ============================================================ */

:root {
  --gold: #d4a853;
  --gold-dark: #b8922f;
  --gold-light: #fef3c7;
  --gold-rgb: 212, 168, 83;
  --warm: #c2956a;
  --warm-rgb: 194, 149, 106;

  --dark-950: #0e0b08;
  --dark-900: #1a1310;
  --dark-800: #241c16;
  --dark-700: #2e2418;
  --dark-600: #3d3020;
  --dark-500: #5a4a35;
  --dark-400: #7a6850;
  --dark-300: #a09080;
  --dark-200: #c4b8a8;
  --dark-100: #e8e0d6;

  --white: #ffffff;
  --canvas: var(--dark-950);
  --canvas-alt: var(--dark-900);
  --ink: var(--dark-100);
  --ink-soft: var(--dark-200);
  --muted: var(--dark-300);
  --border: var(--dark-600);

  --font-main: 'Outfit', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 5vw, 4.8rem);

  --section-py: clamp(60px, 8vw, 120px);
  --container-max: 1140px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 20px rgba(var(--gold-rgb), 0.2);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.35s;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-preloader: 500;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 13px 16px; background: var(--dark-800); width: 100%; transition: border-color var(--duration), box-shadow var(--duration); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.15); }
input::placeholder, textarea::placeholder { color: var(--dark-500); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a6850' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
::selection { background: rgba(var(--gold-rgb), 0.2); }

/* UTILITIES */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.section-title { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 600; line-height: 1.12; color: var(--white); margin-bottom: 14px; }
.section-title em { font-style: italic; color: var(--gold); }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-lead { margin: 0 auto; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark-950); box-shadow: var(--shadow-gold); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(var(--gold-rgb), 0.35); }
.btn--outline-light { border-color: rgba(255,255,255,0.25); color: var(--white); }
.btn--outline-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--dark-950); display: flex; align-items: center; justify-content: center; transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__icon { font-size: 32px; color: var(--gold); margin-bottom: 12px; animation: iconPulse 1.5s ease-in-out infinite; }
@keyframes iconPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.1); } }
.preloader__text { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--gold); letter-spacing: 0.1em; }

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: linear-gradient(90deg, var(--gold), var(--warm)); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(14, 11, 8, 0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.navbar__brand { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--white); font-weight: 500; }
.navbar__brand em { font-style: italic; color: var(--gold); font-weight: 400; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--gold); background: rgba(var(--gold-rgb), 0.08); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.navbar__burger { display: none; width: 28px; height: 20px; position: relative; }
.navbar__burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; position: absolute; left: 0; right: 0; transition: all var(--duration); }
.navbar__burger span:nth-child(1) { top: 0; }
.navbar__burger span:nth-child(2) { bottom: 0; }
.navbar__burger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* HERO */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.3) saturate(0.8); }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14,11,8,0.2), rgba(14,11,8,0.7) 70%, var(--dark-950)); }
.hero__content { position: relative; z-index: 1; max-width: 750px; padding: 80px 0; }
.hero__badge { display: inline-block; font-family: var(--font-display); font-size: var(--fs-sm); color: var(--gold); letter-spacing: 0.08em; margin-bottom: 24px; }
.hero__title { font-family: var(--font-display); font-size: var(--fs-4xl); font-weight: 600; line-height: 1.05; color: var(--white); margin-bottom: 20px; }
.hero__title em { font-style: italic; color: var(--gold); }
.hero__lead { font-size: var(--fs-md); color: rgba(255,255,255,0.65); max-width: 560px; margin: 0 auto 32px; line-height: 1.8; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.3); animation: scrollBounce 2s ease-in-out infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* INTRO */
.intro { padding: 48px 0; background: var(--dark-900); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.intro__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.intro__card { text-align: center; padding: 24px 16px; }
.intro__card .material-icons { font-size: 28px; color: var(--gold); margin-bottom: 12px; }
.intro__card h3 { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 600; color: var(--white); margin-bottom: 6px; }
.intro__card p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

/* MENU / CARTA */
.menu { padding: var(--section-py) 0; }
.menu__tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.menu__tab { padding: 10px 24px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-full); transition: all var(--duration); cursor: pointer; background: none; }
.menu__tab:hover { color: var(--gold); border-color: rgba(var(--gold-rgb), 0.3); }
.menu__tab.active { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark-950); border-color: transparent; }
.menu__panel { display: none; max-width: 700px; margin: 0 auto; }
.menu__panel.active { display: block; }
.menu__item { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.menu__item:last-child { border-bottom: none; }
.menu__item-info h4 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--white); margin-bottom: 4px; }
.menu__item-info p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.menu__price { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; color: var(--gold); white-space: nowrap; }

/* HISTORY */
.history { padding: var(--section-py) 0; }
.history__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.history__img img { width: 100%; height: 500px; object-fit: cover; border-radius: var(--radius-2xl); }
.history__content p { font-size: var(--fs-md); color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.history__signature { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.history__signature img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.history__signature strong { display: block; font-size: var(--fs-sm); font-weight: 800; color: var(--white); }
.history__signature span { font-size: var(--fs-xs); color: var(--muted); }

/* SPECIALS */
.specials { position: relative; padding: var(--section-py) 0; overflow: hidden; }
.specials__bg { position: absolute; inset: 0; z-index: 0; }
.specials__bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.2); }
.specials__overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(14,11,8,0.9), rgba(14,11,8,0.6)); }
.specials__content { position: relative; z-index: 1; }
.specials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.special-card { padding: 32px; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-xl); background: rgba(255,255,255,0.03); backdrop-filter: blur(10px); text-align: center; transition: all var(--duration); }
.special-card:hover { border-color: rgba(var(--gold-rgb), 0.2); transform: translateY(-4px); }
.special-card__icon { font-size: 36px; margin-bottom: 14px; display: block; }
.special-card h3 { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--white); margin-bottom: 8px; }
.special-card p { font-size: var(--fs-sm); color: rgba(255,255,255,0.6); line-height: 1.6; margin-bottom: 14px; }
.special-card__price { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--gold); }

/* GALLERY */
.gallery { padding: var(--section-py) 0; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 12px; }
.gallery__item { border-radius: var(--radius-lg); overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; background: var(--dark-900); }
.testi-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); text-align: center; }
.testi-card__stars { color: var(--gold); font-size: var(--fs-sm); letter-spacing: 2px; margin-bottom: 16px; }
.testi-card blockquote { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink-soft); line-height: 1.6; font-style: italic; margin-bottom: 20px; }
.testi-card__author strong { display: block; font-family: var(--font-main); font-size: var(--fs-sm); font-weight: 800; color: var(--white); }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* RESERVATIONS */
.reservations { padding: var(--section-py) 0; }
.reservations__grid { display: grid; grid-template-columns: 0.45fr 0.55fr; gap: 48px; align-items: start; }
.reservations__details { display: grid; gap: 18px; margin-top: 28px; }
.reservations__details > div { display: flex; align-items: flex-start; gap: 14px; }
.reservations__details .material-icons { font-size: 22px; color: var(--gold); margin-top: 2px; }
.reservations__details strong { display: block; font-size: var(--fs-sm); font-weight: 800; color: var(--white); margin-bottom: 2px; }
.reservations__details p { font-size: var(--fs-xs); color: var(--muted); }
.reservations__details a { color: var(--gold); font-weight: 600; }
.reservations__form { padding: 32px; border-radius: var(--radius-2xl); background: var(--dark-800); border: 1px solid var(--border); }
.reservations__form h3 { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--white); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }

/* MAP */
.map-section iframe { filter: grayscale(0.8) brightness(0.6) contrast(1.1); }

/* FOOTER */
.footer { padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.footer__logo { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--white); margin-bottom: 10px; display: inline-block; }
.footer__logo em { font-style: italic; color: var(--gold); }
.footer__brand p { font-size: var(--fs-sm); color: var(--dark-400); line-height: 1.6; margin-bottom: 14px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.04); color: var(--dark-400); transition: all var(--duration); }
.footer__social a:hover { background: var(--gold); color: var(--dark-950); }
.footer__social .material-icons { font-size: 16px; }
.footer__links h5, .footer__hours h5 { font-size: var(--fs-sm); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer__links a { display: block; font-size: var(--fs-sm); color: var(--dark-400); padding: 3px 0; transition: color var(--duration); }
.footer__links a:hover { color: var(--gold); }
.footer__hours p { font-size: var(--fs-sm); color: var(--dark-400); line-height: 1.6; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; font-size: var(--fs-xs); color: var(--dark-500); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--dark-500); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--gold); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--dark-950); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-gold); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(var(--gold-rgb), 0.4); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .intro__grid { grid-template-columns: repeat(2, 1fr); }
  .history__grid { grid-template-columns: 1fr; }
  .specials__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__item--wide { grid-column: auto; }
  .reservations__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--dark-950); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: block; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .intro__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__item--tall { grid-row: auto; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .menu__tabs { gap: 6px; }
  .menu__tab { padding: 8px 16px; font-size: var(--fs-xs); }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
