/* ==========================================================================
   MIKA RISTORANTE | VIA TOSCANA — giapponese contemporaneo, Bologna
   Direction: washi-white editorial minimal, sumi ink, one vermilion (朱) accent.
   Type: Shippori Mincho (display) + Zen Kaku Gothic New (body).
   Radius system: 2px everywhere (no pills). Mobile-first at 390px.
   ========================================================================== */

:root {
  --bg: #f4f3ee;            /* washi off-white canvas */
  --surface: #faf9f5;       /* lifted paper */
  --band: #edece4;          /* warm concrete band (their walls) */
  --ink: #1f1b17;           /* sumi near-black text */
  --muted: #6b645b;         /* taupe-grey secondary (concrete) */
  --hair: rgba(31, 27, 23, 0.14);
  --hair-soft: rgba(31, 27, 23, 0.08);
  --accent: #d2401f;        /* vermilion 朱 — CTA / marks (white on it = 4.67:1) */
  --accent-deep: #b0341a;   /* deeper tone for small text links / hover (5.3:1) */
  --accent-ink: #ffffff;    /* text on accent */
  --font-display: "Shippori Mincho", Georgia, "Times New Roman", serif;
  --font-body: "Zen Kaku Gothic New", -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius: 2px;
  --measure: 64ch;
  --maxw: 1180px;
  --pad: clamp(1.15rem, 5vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent-deep); text-underline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: 0.005em;
  font-weight: 700;
}
h2 { font-size: clamp(1.55rem, 4.2vw, 2.35rem); letter-spacing: 0.01em; }
h3 { font-size: 1.12rem; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }

/* -- shared container ------------------------------------------------------ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--pad);
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair-soft);
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 0.4rem;
}
.brand-mark { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.topbar-cta {
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.5rem 1.1rem; border-radius: var(--radius);
  transition: transform 0.18s ease, background 0.18s ease;
}
.topbar-cta:hover { background: var(--accent-deep); }
.topbar-cta:active { transform: translateY(1px); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block; text-decoration: none;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 0.72rem 1.5rem; font-weight: 700; font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

/* ==========================================================================
   HERO — asymmetric editorial split
   ========================================================================== */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.4rem, 7vw, 4rem) var(--pad) clamp(2.8rem, 8vw, 4.5rem);
  display: grid; gap: clamp(1.8rem, 5vw, 3rem);
}
.hero-kicker {
  color: var(--accent-deep); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.35rem);
  font-weight: 800; letter-spacing: 0.01em; line-height: 1.12;
  margin-bottom: 1.25rem;
}
.hero-sub {
  color: var(--muted); max-width: 40ch; font-size: 1.075rem;
  margin-bottom: 1.9rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%; border-radius: var(--radius);
  aspect-ratio: 4 / 3; object-fit: cover; object-position: center 56%;
  box-shadow: 0 24px 50px -28px rgba(31, 27, 23, 0.5);
}
.tategaki {
  position: absolute; top: 0.5rem; left: -0.65rem; z-index: 2;
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.1rem); letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--bg); padding: 0.5rem 0.15rem; border-radius: var(--radius);
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    min-height: calc(100dvh - 61px);
    padding-top: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: clamp(2rem, 4vw, 3.5rem);
  }
  .hero-media img { aspect-ratio: 3 / 4; object-position: center 72%; max-height: 78dvh; margin-left: auto; }
  .tategaki { left: -1.4rem; top: 1.2rem; }
}

/* ==========================================================================
   FORMULA — hairline-divided trio (not cards)
   ========================================================================== */
.formula { background: var(--surface); max-width: none; }
.formula > * { max-width: var(--maxw); margin-inline: auto; }
.formula h2 { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.formula-grid { display: grid; gap: 0; }
.formula-item { padding: 1.5rem 0; border-top: 1px solid var(--hair); }
.formula-item:first-child { border-top: 0; padding-top: 0; }
.formula-mark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.9rem; color: var(--accent); line-height: 1;
  display: block; margin-bottom: 0.6rem;
}
.formula-item h3 { font-size: 1.28rem; margin-bottom: 0.35rem; }
.formula-item p { color: var(--muted); max-width: 42ch; }

@media (min-width: 760px) {
  .formula-grid { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .formula-item {
    border-top: 0; padding: 0 2rem;
    border-left: 1px solid var(--hair);
  }
  .formula-item:first-child { padding-left: 0; border-left: 0; }
  .formula-item:last-child { padding-right: 0; }
}

/* ==========================================================================
   SALA — image-led band
   ========================================================================== */
.sala-figure { overflow: hidden; border-radius: var(--radius); margin: 0; }
.sala-figure img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 40%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.sala-figure:hover img { transform: scale(1.03); }
.sala-copy { margin-top: 1.8rem; max-width: var(--measure); }
.sala-copy h2 { margin-bottom: 0.7rem; }
.sala-copy p { color: var(--muted); font-size: 1.075rem; }

@media (min-width: 900px) {
  .sala { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
  .sala-figure img { aspect-ratio: 4 / 3; }
  .sala-copy { margin-top: 0; }
}

/* ==========================================================================
   MENU — editorial category index
   ========================================================================== */
.menu-head { max-width: var(--measure); margin-bottom: 2rem; }
.menu-lead { color: var(--muted); margin-top: 0.6rem; }

.menu-feature {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem; margin-bottom: 2.6rem;
  max-width: 56ch;
}
.menu-feature h3 {
  font-size: 1.5rem; margin-bottom: 0.4rem; letter-spacing: 0.01em;
}
.menu-feature p { color: var(--muted); }

.menu-cols { display: grid; gap: clamp(2rem, 5vw, 3rem) clamp(2rem, 6vw, 4.5rem); }
.menu-group h3 {
  font-size: 1.02rem; text-transform: uppercase; letter-spacing: 0.16em;
  font-family: var(--font-body); font-weight: 700; color: var(--ink);
  padding-bottom: 0.6rem; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--hair);
}
.menu-list { list-style: none; padding: 0; }
.menu-list li {
  display: flex; gap: 0.85rem; align-items: baseline;
  padding: 0.62rem 0; border-bottom: 1px solid var(--hair-soft);
}
.menu-list li:last-child { border-bottom: 0; }
.num {
  font-variant-numeric: tabular-nums; font-weight: 700;
  color: var(--accent-deep); font-size: 0.82rem; min-width: 2.1ch;
  padding-top: 0.15rem;
}
.dish { font-weight: 500; }
.dish em {
  display: block; font-style: normal; color: var(--muted);
  font-size: 0.9rem; font-weight: 400; margin-top: 0.1rem;
}
.menu-list--priced li { justify-content: space-between; }
.price {
  font-variant-numeric: tabular-nums; color: var(--muted);
  font-size: 0.95rem; white-space: nowrap; padding-left: 1rem;
}
.menu-note { margin-top: 2.2rem; color: var(--muted); font-size: 0.92rem; }

@media (min-width: 720px) {
  .menu-cols { grid-template-columns: 1fr 1fr; }
  .menu-group--dolci { grid-column: 1 / -1; }
  .menu-group--dolci .menu-list { columns: 2; column-gap: 4.5rem; }
  .menu-group--dolci .menu-list li { break-inside: avoid; }
}

/* ==========================================================================
   DAL BANCO — asymmetric gallery
   ========================================================================== */
.banco-grid { display: grid; gap: 0.9rem; }
.banco figure { margin: 0; overflow: hidden; border-radius: var(--radius); }
.banco img {
  width: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.banco-a img { aspect-ratio: 4 / 3; object-position: center 55%; }
.banco-b img { aspect-ratio: 3 / 2; object-position: center 30%; }
.banco figure:hover img { transform: scale(1.04); }
.banco figcaption {
  margin-top: 0.55rem; font-size: 0.86rem; color: var(--muted);
  letter-spacing: 0.01em;
}

@media (min-width: 760px) {
  .banco-grid { grid-template-columns: 1.25fr 1fr; align-items: start; }
  .banco-a img { aspect-ratio: 3 / 4; }
  .banco-b img { aspect-ratio: 3 / 2; margin-top: 3.5rem; }
}

/* ==========================================================================
   ORARI & DOVE
   ========================================================================== */
.dove { background: var(--surface); max-width: none; }
.dove > * { max-width: var(--maxw); margin-inline: auto; }
.dove h2 { margin-bottom: 1.6rem; }
.info-grid { display: grid; gap: 2.2rem; }

.oggi {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.oggi-badge {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 0.22rem 0.6rem;
}
.oggi.is-open .oggi-badge { background: var(--accent); border-color: var(--accent); color: #fff; }
.oggi.is-closed .oggi-badge { color: var(--ink); }
.oggi-hours { color: var(--ink); font-weight: 500; }

.hours { border-collapse: collapse; width: 100%; max-width: 30rem; }
.hours td { padding: 0.55rem 0; border-bottom: 1px solid var(--hair-soft); color: var(--muted); }
.hours td:first-child { color: var(--ink); font-weight: 500; padding-right: 1.5rem; }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today td { color: var(--ink); }
.hours tr.is-today td:first-child { position: relative; }

.contact-lines { margin-bottom: 1.5rem; font-size: 1.08rem; line-height: 1.9; }
.contact-lines a { font-weight: 600; }

@media (min-width: 720px) {
  .info-grid { grid-template-columns: 1.2fr 1fr; gap: 3rem; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 3rem var(--pad) 3.5rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--hair-soft);
}
.footer-brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); margin-bottom: 0.5rem;
}
.footer-brand span { color: var(--accent); font-size: 0.9rem; margin: 0 0.15rem; }
.demo-note { margin-top: 0.7rem; opacity: 0.7; }

/* ==========================================================================
   MOTION — CSS only (MOTION 3): load fade-up + hover. Honors reduced-motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-media {
    animation: riseIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-copy > *:nth-child(1) { animation-delay: 0.02s; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.09s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.23s; }
  .hero-media { animation-delay: 0.12s; }

  @keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
