/* ==========================================================================
   Trattoria da Mario — one stylesheet, no dependencies.
   Order: tokens · reset · typography · layout · header · buttons · cards
          · footer · forms · breakpoints
   ========================================================================== */

/* --- tokens -------------------------------------------------------------- */

:root {
    --cream: #faf7f0;
    --cream-deep: #f2ebdd;
    --olive: #5b6b3a;
    --olive-dark: #3f4b28;
    --tomato: #b23a2f;
    --tomato-dark: #8f2c23;
    --charcoal: #2b2622;
    --muted: #6f665c;
    --line: #e2d9c8;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(43, 38, 34, 0.06), 0 8px 24px rgba(43, 38, 34, 0.07);
    --font-display: Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --measure: 68ch;
}

/* --- reset --------------------------------------------------------------- */

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--charcoal);
    font: 1rem/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

/* --- typography ---------------------------------------------------------- */

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 1rem;
}

h1 {
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    margin: 0 0 1rem;
    max-width: var(--measure);
}

a {
    color: var(--tomato-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--tomato);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.lede {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--muted);
    max-width: var(--measure);
}

/* --- layout -------------------------------------------------------------- */

.wrap {
    width: min(72rem, 100% - 2.5rem);
    margin-inline: auto;
}

.section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

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

.section__note {
    color: var(--muted);
    font-style: italic;
    margin-top: -0.5rem;
}

.split {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    background: var(--charcoal);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
}

/* --- header and nav ------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(250, 247, 240, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 0.9rem;
}

.brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--charcoal);
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.brand__since {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    order: 3;
    width: 100%;
}

.nav__link {
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.95rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--tomato);
    border-bottom-color: var(--tomato);
}

/* --- buttons ------------------------------------------------------------- */

.btn {
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.75rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--solid {
    background: var(--tomato);
    color: #fff;
}

.btn--solid:hover {
    background: var(--tomato-dark);
    color: #fff;
}

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

.btn--ghost:hover {
    background: var(--charcoal);
    color: var(--cream);
}

:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
}

/* --- cards and badges ---------------------------------------------------- */

.card-grid {
    display: grid;
    gap: 1.5rem;
}

.card {
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card p:last-child {
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    border: 1px solid transparent;
}

.badge--veg {
    background: rgba(91, 107, 58, 0.12);
    color: var(--olive-dark);
    border-color: rgba(91, 107, 58, 0.3);
}

.badge--gf {
    background: var(--cream-deep);
    color: var(--charcoal);
    border-color: var(--line);
}

.badge--star {
    background: rgba(178, 58, 47, 0.12);
    color: var(--tomato-dark);
    border-color: rgba(178, 58, 47, 0.3);
}

/* --- footer -------------------------------------------------------------- */

.site-footer {
    background: var(--charcoal);
    color: var(--cream);
    padding-block: 3rem 1.5rem;
}

.site-footer a {
    color: var(--cream);
}

.site-footer__grid {
    display: grid;
    gap: 2rem;
}

.site-footer__heading {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.site-footer__hours {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.site-footer__hours li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.2rem;
    border-bottom: 1px solid rgba(250, 247, 240, 0.12);
}

.site-footer__hours .is-closed {
    color: rgba(250, 247, 240, 0.55);
    font-style: italic;
}

.site-footer__social {
    display: flex;
    gap: 1rem;
}

.site-footer__legal {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(250, 247, 240, 0.15);
    font-size: 0.85rem;
    color: rgba(250, 247, 240, 0.7);
}

.site-footer__legal p {
    margin: 0;
    max-width: none;
}

/* --- forms --------------------------------------------------------------- */

.field {
    display: grid;
    gap: 0.4rem;
}

.field label {
    font-size: 0.9rem;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    font: inherit;
    color: inherit;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 0.8rem;
    width: 100%;
}

.field textarea {
    resize: vertical;
}

.field-error {
    color: var(--tomato);
    font-size: 0.85rem;
    margin: 0;
}

.notice {
    background: #fffdf8;
    border: 1px solid var(--line);
    border-left: 4px solid var(--muted);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.notice--ok {
    border-left-color: var(--olive);
    background: rgba(91, 107, 58, 0.07);
}

.notice--error {
    border-left-color: var(--tomato);
    background: rgba(178, 58, 47, 0.07);
}

.notice h2 {
    margin-bottom: 0.5rem;
}

.notice p:last-child {
    margin-bottom: 0;
}

/* --- tables -------------------------------------------------------------- */

.hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.hours-table caption {
    text-align: left;
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.hours-table th,
.hours-table td {
    text-align: left;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--line);
}

.hours-table th {
    font-weight: 400;
}

.hours-table .is-closed {
    color: var(--muted);
    font-style: italic;
}

/* --- home page ----------------------------------------------------------- */

.hero {
    padding-block: clamp(4rem, 12vw, 8rem);
    text-align: center;
    background-image:
        linear-gradient(to bottom, rgba(250, 247, 240, 0.82), rgba(250, 247, 240, 0.97)),
        url('/assets/img/tablecloth.svg');
    border-bottom: 1px solid var(--line);
}

.hero .lede,
.hero p {
    margin-inline: auto;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.split__art {
    text-align: center;
}

.card__price {
    font-family: var(--font-display);
    color: var(--tomato);
    font-size: 1.15rem;
    margin-top: 1rem;
}

.info-strip .wrap {
    border-top: 1px solid var(--line);
    padding-top: 2.5rem;
}

blockquote {
    margin: 0;
}

blockquote p {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.5;
}

cite {
    font-style: normal;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* --- menu page ----------------------------------------------------------- */

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.menu-list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.75rem;
}

.menu-item__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 0.35rem;
}

.menu-item__name {
    margin: 0;
}

.menu-item__price {
    font-family: var(--font-display);
    color: var(--tomato);
    white-space: nowrap;
}

.menu-item__desc {
    color: var(--muted);
    margin: 0.6rem 0 0;
    max-width: var(--measure);
}

.menu-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0;
}

.menu-cta {
    text-align: center;
}

.menu-cta p {
    margin-inline: auto;
}

/* --- our story page ------------------------------------------------------ */

.timeline {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.timeline li {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    align-items: baseline;
}

.timeline__year {
    font-family: var(--font-display);
    color: var(--tomato);
    font-size: 1.25rem;
}

.timeline__text {
    border-left: 1px solid var(--line);
    padding-left: 1.25rem;
    max-width: var(--measure);
}

/* --- contact page -------------------------------------------------------- */

.contact-grid {
    display: grid;
    gap: 2rem;
}

.contact-grid h2 {
    font-size: 1.3rem;
}

.contact-grid__note {
    font-size: 0.9rem;
    color: var(--muted);
}

.hours-table .is-today th,
.hours-table .is-today td {
    font-weight: 600;
    background: var(--cream-deep);
}

.booking-form {
    max-width: 34rem;
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.booking-form__row {
    display: grid;
    gap: 1.25rem;
}

.field__optional {
    font-weight: 400;
    color: var(--muted);
}

.notice__small,
.booking-form__small {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0;
}

/* --- breakpoints --------------------------------------------------------- */

@media (min-width: 48rem) {
    .nav {
        order: 0;
        width: auto;
        gap: 1.75rem;
    }

    .card-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: 3fr 2fr;
    }

    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .booking-form__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .card-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .menu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem 3rem;
    }

    .contact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
