/* Design tokens, reset, typography and shared components from docs/build/DESIGN.md. */

:root {
  /* brand, restaurant (default) */
  --accent: #8E3038;        /* buttons, links, top bar */
  --accent-dk: #6E242C;     /* hover, pressed */
  --hand: #8E3038;          /* handwritten eyebrow colour */
  --tint: #F3E7D8;          /* soft section background */
  --tint-2: #F4D9D5;        /* borders on tint, quote marks, eyebrow on dark */
  --night: #241816;         /* dark sections, hero fallback */
  --hl-1: #E8655B;          /* first highlighted word on dark backgrounds */
  --hl-2: #F4D9D5;          /* second highlighted word on dark backgrounds */

  /* neutrals */
  --ink: #221B19;           /* body text, headings */
  --muted: #5E4A46;         /* secondary text (7.9:1 on white) */
  --soft: #6B5F5C;          /* captions, small labels (6.1:1 on white) */
  --line: #EFE4E2;          /* hairlines */
  --paper: #FBF6F0;
  --ph: #FFF1B8;            /* placeholder highlight (dev and staging only) */

  /* type */
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --script: "Caveat", "Segoe Script", "Bradley Hand", cursive;

  /* scale (phone first; desktop values in the media query below) */
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-eyebrow: 22px;
  --fs-h1: clamp(40px, 5.2vw, 72px);
  --fs-h2: clamp(30px, 3vw, 44px);
  --fs-h3: 22px;
  --lh-body: 1.6;

  /* space */
  --gutter: 16px;           /* side padding on phones */
  --section: 64px;          /* vertical padding of a section */
  --container: 1280px;
  --radius: 4px;
  --radius-lg: 12px;
  --shadow: 0 10px 30px rgba(34, 27, 25, 0.12);
  --header-h: 68px;
}
@media (min-width: 720px) {
  :root { --gutter: 24px; --fs-h3: 24px; --section: 88px; }
}
@media (min-width: 1024px) {
  :root { --section: 112px; --header-h: 84px; }
}

/* page themes: <body class="theme-...">  */
.theme-class {
  --accent: #5A3A28;        /* tiramisu brown */
  --accent-dk: #3F2819;
  --hand: #8A5A2B;
  --tint: #F6EEDF;          /* mascarpone */
  --tint-2: #E8B84A;        /* pasta yellow: fills and details only, never text on white */
  --night: #2A1B12;         /* cocoa */
  --hl-1: #F2C94C;          /* "pasta" */
  --hl-2: #D9A877;          /* "tiramisù" */
  --line: #EADFCC;
}
.theme-blog {
  --accent: #1D5C7A;        /* sea blue */
  --accent-dk: #154463;
  --accent-2: #5F6B2E;      /* olive: categories, small labels */
  --hand: #5F6B2E;
  --tint: #F5F1E8;          /* sand */
  --tint-2: #C5CF9E;
  --night: #17323F;
  --hl-1: #BFCB72;          /* "cucina italiana" */
  --hl-2: #7DBEE6;          /* "Milano" */
  --line: #E2E0D2;
}
/* .theme-home and .theme-story use the defaults */

/* The frame around the page always keeps the restaurant red, even when the page
   itself is in the class or blog colours. The phone menu sits inside the header. */
.theme-class .topbar, .theme-class .site-header, .theme-class .site-footer, .theme-class .back-to-top,
.theme-blog .topbar, .theme-blog .site-header, .theme-blog .site-footer, .theme-blog .back-to-top {
  --accent: #8E3038; --accent-dk: #6E242C; --hand: #8E3038; --tint: #F3E7D8; --tint-2: #F4D9D5; --night: #241816; --hl-1: #E8655B; --hl-2: #F4D9D5; --line: #EFE4E2;
}

/* --- Reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

/* --- Base body --- */

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Headings --- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: inherit;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.05;
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
}

/* --- Text helpers --- */

p {
  max-width: 68ch;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dk);
}

.lead {
  font-size: 20px;
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .lead {
    font-size: 22px;
  }
}

.small {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--soft);
}

.kicker {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--script);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  line-height: 1;
  color: var(--hand);
}

.on-dark .eyebrow {
  color: var(--tint-2);
}

/* --- Highlighted words from oev_title() --- */

.hl-1,
.hl-2 {
  color: var(--accent);
}

.on-dark .hl-1 {
  color: var(--hl-1);
}

.on-dark .hl-2 {
  color: var(--hl-2);
}

/* --- Layout --- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 760px;
}

.section {
  padding-block: var(--section);
}

.section--tint {
  background-color: var(--tint);
}

.section--dark,
.on-dark {
  background-color: var(--night);
  color: var(--paper);
}

.section--dark a:not(.btn),
.on-dark a:not(.btn) {
  color: var(--paper);
}

/* On dark backgrounds the ghost button needs a light outline to stay visible. */
.section--dark .btn--ghost,
.on-dark .btn--ghost {
  border-color: var(--paper);
  color: var(--paper);
}

.section--dark .btn--ghost:hover,
.on-dark .btn--ghost:hover {
  background-color: var(--paper);
  color: var(--ink);
}

/* --- Section head --- */

.section-head {
  margin-bottom: 32px;
}

.section-head .eyebrow {
  margin-bottom: 4px;
}

.section-head--center {
  text-align: center;
}

.section-head--center > * {
  margin-inline: auto;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.btn--primary:hover {
  background-color: var(--accent-dk);
  border-color: var(--accent-dk);
  color: var(--paper);
}

.btn--light {
  background-color: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background-color: var(--tint);
  border-color: var(--tint);
  color: var(--ink);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost:hover {
  background-color: var(--accent);
  color: var(--paper);
}

.btn--block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.link-arrow:hover {
  color: var(--accent-dk);
  text-decoration: underline;
}

.link-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* --- Chips --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--paper);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.is-current {
  background-color: var(--accent-2, var(--accent));
  border-color: var(--accent-2, var(--accent));
  color: var(--paper);
}

/* --- Utility --- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 12px 16px;
  background-color: var(--accent);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

mark.ph {
  background-color: var(--ph);
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* --- Focus --- */

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

.on-dark :focus-visible,
.section--dark :focus-visible {
  outline-color: var(--paper);
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print --- */

@media print {
  .topbar,
  .site-header,
  .site-footer,
  .booking-panel,
  .skip-link,
  .class-bar {
    display: none !important;
  }

  body {
    background: var(--paper);
    color: #000;
  }

  a {
    color: #000;
  }
}
