/* ==========================================================================
   LE TRE CARAVELLE — pizzeria e cucina di mare, Barcellona Pozzo di Gotto
   Direction: hand-painted seaside / sunny sea-trattoria.
   Canvas = sun-warmed plaster (their facade), one accent = sea-blue
   (their painted wave + anchor + tablecloths). Signature = hand-drawn
   wave dividers + a three-sail caravel mark. Mobile-first (390px).
   ========================================================================== */

:root {
  --bg: #f5ecda;          /* sun-warmed plaster (facade wall) */
  --surface: #fbf5e8;     /* lighter tile / cards */
  --line: #e7dcc4;        /* hairlines */
  --text: #152230;        /* sea-ink near-black (the anchor / wrought iron) */
  --muted: #5b6b74;       /* driftwood slate */
  --accent: #1f5d78;      /* THE accent: sea-blue (action, links, marks) */
  --accent-deep: #164759; /* hover / darker sea */
  --wave-mid: #5d94ab;    /* decorative wave fill only */
  --wave-lt: #9cc0d1;     /* decorative wave fill only */
  --ink-on-accent: #fbf5e8;
  --dark: #14212e;        /* reviews grounding band */
  --dark-mark: #7fb0c4;
  --font-display: "Domine", Georgia, "Times New Roman", serif;
  --font-body: "Assistant", -apple-system, "Segoe UI", sans-serif;
  --radius: 8px;
  --measure: 60ch;
  --wrap: 1080px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.005em;
  font-weight: 700;
}
h2 { font-size: clamp(1.55rem, 5.2vw, 2.2rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
p { max-width: var(--measure); }

/* -- reveal on scroll (only when JS is present; reduced-motion disables) --- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -- caravel mark ---------------------------------------------------------- */
.mark { width: 1.9em; height: 1.65em; flex: none; }
.m-sail { fill: var(--accent); }
.m-sail-lt { fill: var(--wave-mid); }
.m-hull { fill: var(--text); }

/* -- hand-drawn wave dividers (their facade mural) ------------------------- */
.wave { height: 22px; background-repeat: repeat-x; background-position: center; }
.wave-band {
  margin: 0.5rem 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M0 12 q30 -10 60 0 t60 0' fill='none' stroke='%231f5d78' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: 0.85;
}
.wave-double {
  height: 40px; margin: 1.6rem auto 0.5rem; max-width: var(--wrap);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M0 12 q30 -10 60 0 t60 0' fill='none' stroke='%231f5d78' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M0 12 q30 -9 60 0 t60 0' fill='none' stroke='%235d94ab' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x, repeat-x;
  background-position: 0 6px, 60px 22px;
}

/* -- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.6rem 1.1rem;
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.92rem;
  color: var(--ink-on-accent); background: var(--accent);
  padding: 0.42rem 1.05rem; border-radius: 999px;
  transition: background .2s ease, transform .1s ease;
}
.topbar-cta:hover { background: var(--accent-deep); }
.topbar-cta:active { transform: translateY(1px); }

/* -- hero ------------------------------------------------------------------ */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2.6rem, 8vh, 4.5rem) 1.25rem 2.5rem;
  text-align: center;
}
.hero-kicker {
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 auto 0.9rem; max-width: none;
}
.hero h1 {
  font-size: clamp(2.6rem, 11vw, 5rem); margin-bottom: 0.9rem;
}
.hero-sub { color: var(--muted); max-width: 42ch; margin: 0 auto 1.6rem; }
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; color: var(--text);
  border: 1.5px solid var(--accent); border-radius: 999px;
  padding: 0.62rem 1.4rem; font-weight: 600; font-size: 0.98rem;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* -- framed photos --------------------------------------------------------- */
.frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--text) 55%, transparent);
}
.frame img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 3px;
}
.frame figcaption {
  color: var(--muted); font-size: 0.86rem; text-align: center;
  padding: 0.55rem 0.25rem 0.2rem;
}
.hero-photo { max-width: 620px; margin: 0 auto; }

/* -- sections -------------------------------------------------------------- */
.section {
  max-width: var(--wrap); margin: 0 auto;
  padding: 2.6rem 1.25rem;
}
.section > p { color: var(--text); }

/* statement + chips */
.band-statement { text-align: center; }
.band-statement > p { margin: 0 auto; }
.rating { margin: 1rem auto 0; color: var(--muted); }
.rating strong { color: var(--accent); font-size: 1.05em; }
.chips {
  list-style: none; padding: 0; margin: 1.3rem auto 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  max-width: 46rem;
}
.chips li {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.86rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* -- menu (numbered editorial courses) ------------------------------------- */
.menu > h2 { text-align: center; margin-bottom: 1.8rem; }
.course {
  display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem;
  align-items: start;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.course:first-of-type { border-top: none; }
.course-no {
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent); font-size: 1.5rem; line-height: 1;
}
.course-body { min-width: 0; }
.course-body p { color: var(--muted); margin-top: 0.15rem; }
.course .plate { grid-column: 1 / -1; margin-top: 0.4rem; }
.plate img { aspect-ratio: 4 / 3; }
.menu-note { color: var(--muted); font-size: 0.9rem; text-align: center; margin: 1.4rem auto 0; }

/* -- showcase -------------------------------------------------------------- */
.showcase > h2 { text-align: center; margin-bottom: 1.6rem; }
.showcase-grid { display: grid; gap: 1.1rem; }

/* -- atmosfera (the single image+text split) ------------------------------- */
.atmosfera-grid { display: grid; gap: 1.4rem; }
.atmosfera .frame img { aspect-ratio: 4 / 3; }
.atmosfera-text h2 { margin-top: 0.2rem; }
.atmosfera-text p { color: var(--text); margin-top: 0.7rem; }
.atmosfera-text p:first-of-type { color: var(--muted); }

/* -- reviews (dark grounding band) ----------------------------------------- */
.reviews {
  background: var(--dark);
  color: var(--surface);
  padding: 3rem 1.25rem;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M0 12 q30 -9 60 0 t60 0' fill='none' stroke='%237fb0c4' stroke-width='2' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center 22px;
}
.reviews-inner { max-width: var(--wrap); margin: 0 auto; padding-top: 1.6rem; }
.reviews-rating { color: var(--dark-mark); font-weight: 600; text-align: center; margin: 0 auto 1.6rem; }
.quotes { display: grid; gap: 1.4rem; }
.reviews blockquote { margin: 0; }
.reviews blockquote p {
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1.45;
  color: var(--surface); max-width: 48ch;
}
.reviews cite {
  display: block; margin-top: 0.7rem;
  font-style: normal; font-size: 0.85rem; font-weight: 600;
  color: var(--dark-mark); text-transform: uppercase; letter-spacing: 0.08em;
}

/* -- orari & dove ---------------------------------------------------------- */
.dove > h2 { text-align: center; margin-bottom: 1.6rem; }
.info-grid { display: grid; gap: 2rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.hours td:first-child { color: var(--text); font-weight: 600; }
.hours tr:last-child td { border-bottom: none; }
.hours tr.is-today td { color: var(--accent); font-weight: 700; }
.hours tr.is-today td:first-child::after {
  content: " · oggi"; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
}
.contact-lines { margin-bottom: 1.3rem; line-height: 1.9; }
.contact-lines a { font-weight: 600; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 1.25rem 3rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
}
.brand-footer { justify-content: center; font-size: 1.15rem; margin-bottom: 0.8rem; }
.footer p { max-width: none; }
.demo-note { margin-top: 0.6rem; opacity: 0.72; font-size: 0.82rem; }

/* ==========================================================================
   DESKTOP / WIDER
   ========================================================================== */
@media (min-width: 760px) {
  h2 { font-size: clamp(2rem, 3vw, 2.5rem); }
  .section { padding: 3.6rem 1.5rem; }

  .hero { padding-top: clamp(3.5rem, 9vh, 5.5rem); }
  .hero-sub { font-size: 1.15rem; }

  /* numbered courses become a calm two-column row (text | plate) */
  .course {
    grid-template-columns: 2.5rem 1fr 300px;
    align-items: center;
    gap: 1.4rem;
    padding: 1.8rem 0;
  }
  .course .plate { grid-column: auto; margin-top: 0; }
  .plate img { aspect-ratio: 4 / 3; }

  .showcase-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }

  /* the single split: photo left, text right */
  .atmosfera-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 2.6rem; }
  .atmosfera .frame img { aspect-ratio: 4 / 5; }   /* taller allowed only here, in a half-width column */

  .quotes { grid-template-columns: 1fr 1fr; gap: 2.4rem; }
  .reviews blockquote p { font-size: 1.25rem; }

  .info-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (min-width: 1040px) {
  .hero h1 { font-size: 5.2rem; }
}
