/* Restaurante Taberna Parrilla — design system */
:root {
    --chalk: #1d2420;
    --chalk-2: #272f2a;
    --chalk-line: rgba(242, 238, 230, .16);
    --stucco: #f2eee6;
    --stucco-2: #e7e1d4;
    --red: #b3261e;
    --red-dark: #8c1c16;
    --ochre: #d6a01f;
    --tile: #22408f;
    --ink: #231d18;
    --ink-soft: #5b5148;
    --on-chalk: #f2eee6;
    --on-chalk-soft: rgba(242, 238, 230, .72);

    --font-display: "Young Serif", Georgia, "Times New Roman", serif;
    --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-chalk: "Caveat Brush", "Segoe Print", cursive;

    --gutter: clamp(1rem, 4vw, 2rem);
    --maxw: 1180px;
    --radius: 6px;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--stucco);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ochre); color: var(--iron, #14110f); padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* Stucco wall: SVG turbulence gives the rough plaster look */
.surface-stucco {
    background-color: var(--stucco);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .09' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.surface-chalk {
    background-color: var(--chalk);
    color: var(--on-chalk);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.surface-chalk p { color: var(--on-chalk-soft); }

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; }
.surface-chalk .section-head p { color: var(--on-chalk-soft); }

/* Talavera tile strip — the one decorative device */
.tile-strip {
    height: 22px;
    background:
        radial-gradient(circle at 11px 11px, var(--ochre) 0 3px, transparent 3.5px),
        conic-gradient(from 45deg at 50% 50%, var(--tile) 0 25%, #fff 0 50%, var(--tile) 0 75%, #fff 0);
    background-size: 22px 22px, 22px 22px;
    border-block: 2px solid var(--tile);
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 700; font-size: 1rem;
    padding: .85rem 1.6rem; border-radius: var(--radius);
    border: 2px solid transparent; cursor: pointer; text-decoration: none;
    transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.surface-stucco .btn-ghost:hover { background: rgba(0, 0, 0, .06); }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(29, 36, 32, .94);
    backdrop-filter: blur(8px);
    color: var(--on-chalk);
    border-bottom: 1px solid var(--chalk-line);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.1; letter-spacing: .01em; }
.brand-name small { display: block; font-family: var(--font-body); font-size: .78rem; opacity: .7; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; padding: .5rem .8rem; border-radius: var(--radius); font-weight: 600; font-size: .98rem; position: relative; }
.nav a:not(.btn)::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
    background: var(--ochre); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { margin-left: .5rem; }

/* Language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--chalk-line); border-radius: 999px; overflow: hidden; margin-left: .5rem; }
.nav .lang-switch a { padding: .3rem .7rem; font-size: .85rem; font-weight: 700; border-radius: 0; }
.nav .lang-switch a::after { display: none; }
.nav .lang-switch a[aria-current="true"] { background: var(--ochre); color: var(--chalk); }
.nav .lang-switch a:not([aria-current="true"]):hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 920px) { .lang-switch { margin: .5rem 0 0; align-self: flex-start; } }
.nav-toggle { display: none; background: none; border: 1px solid var(--chalk-line); color: inherit; border-radius: var(--radius); width: 46px; height: 46px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: var(--chalk); padding: 1rem var(--gutter) 1.5rem; gap: .25rem;
        border-bottom: 1px solid var(--chalk-line);
        clip-path: inset(0 0 100% 0); visibility: hidden;
        transition: clip-path .3s ease, visibility 0s linear .3s;
    }
    .nav.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .3s ease; }
    .nav a { padding: .8rem .5rem; font-size: 1.1rem; }
    .nav a:not(.btn)::after { display: none; }
    .nav .btn { margin: .75rem 0 0; }
}

/* Hero with chalkboard */
.hero {
    position: relative; isolation: isolate; color: var(--on-chalk);
    min-height: min(88vh, 760px); display: grid; align-items: center;
    padding-block: clamp(3rem, 8vw, 5rem);
    background: var(--chalk) center / cover no-repeat;
}
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(95deg, rgba(20, 17, 15, .92) 0%, rgba(20, 17, 15, .6) 52%, rgba(20, 17, 15, .25) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: var(--on-chalk); }
.hero .lede { font-size: 1.25rem; color: var(--on-chalk-soft); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-meta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .98rem; color: var(--on-chalk-soft); }
.hero-meta b { color: var(--ochre); font-weight: 700; }

.chalkboard {
    position: relative; transform: rotate(1.4deg);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.25rem);
    border: 12px solid #3b2a1d; border-radius: 4px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .35);
    font-family: var(--font-chalk); color: #f4f1ea; font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}
.chalkboard-title { font-size: 1.15em; text-align: center; margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 2px dashed rgba(244, 241, 234, .45); }
.chalk-line { display: flex; align-items: baseline; gap: .6rem; margin: .35rem 0; line-height: 1.25; }
.chalk-line .dots { flex: 1; border-bottom: 2px dotted rgba(244, 241, 234, .4); transform: translateY(-.25em); }
.chalk-line .price { color: var(--ochre); }
.chalk-note { margin-top: .85rem; font-size: .88em; color: rgba(244, 241, 234, .78); max-width: none; }

/* One orchestrated moment: the board writes itself line by line */
@media (prefers-reduced-motion: no-preference) {
    .chalk-write { clip-path: inset(0 100% 0 0); animation: chalk-write .9s steps(26, end) forwards; animation-delay: calc(.5s + var(--i, 0) * .55s); }
    @keyframes chalk-write { to { clip-path: inset(0 0 0 0); } }
}

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .chalkboard { transform: none; }
    .hero::before { background: linear-gradient(180deg, rgba(20, 17, 15, .88), rgba(20, 17, 15, .72)); }
}

/* Cards used across the site */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.dish-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 12px 28px -18px rgba(35, 29, 24, .5); transition: transform .25s ease, box-shadow .25s ease; }
.dish-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 22px 36px -18px rgba(35, 29, 24, .55); }
.dish-card .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--stucco-2); }
.dish-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.dish-card:hover .ph img { transform: scale(1.05); }
.dish-card .body { padding: 1.1rem 1.25rem 1.3rem; }
.dish-card h3 { margin-bottom: .3rem; }
.dish-card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: .5rem; }
.price-tag { font-family: var(--font-display); color: var(--red); font-size: 1.15rem; }
.note-tag { font-size: .88rem; color: var(--ink-soft); }

/* Forms */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field textarea, .field select {
    font: inherit; padding: .8rem .9rem; border: 2px solid rgba(35, 29, 24, .22); border-radius: var(--radius);
    background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--tile); outline: none; box-shadow: 0 0 0 3px rgba(34, 64, 143, .2); }
.field .error { color: var(--red); font-size: .9rem; }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 600; }
.alert-ok { background: #e3f1e1; color: #1f5a22; border: 1px solid #b5d9b1; }
.alert-err { background: #f8e0de; color: var(--red-dark); border: 1px solid #e7b3af; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Newsletter + footer */
.newsletter { padding-block: clamp(2.5rem, 6vw, 4rem); }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.newsletter form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1 1 220px; font: inherit; padding: .85rem 1rem; border-radius: var(--radius); border: 2px solid var(--chalk-line); background: rgba(255, 255, 255, .08); color: var(--on-chalk); }
.newsletter input::placeholder { color: rgba(242, 238, 230, .55); }
.newsletter .alert { flex-basis: 100%; margin: 0; }
@media (max-width: 760px) { .newsletter-inner { grid-template-columns: 1fr; } }

.site-footer { background: var(--chalk); color: var(--on-chalk); padding-top: clamp(2.5rem, 6vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-grid h4 { font-size: 1.1rem; color: var(--ochre); }
.footer-grid p, .footer-grid li, .footer-grid a { color: var(--on-chalk-soft); font-size: .98rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--on-chalk); text-decoration: underline; }
.hours-list { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; }
.hours-list dt { font-weight: 700; color: var(--on-chalk); }
.hours-list dd { margin: 0; color: var(--on-chalk-soft); }
.footer-bottom { border-top: 1px solid var(--chalk-line); padding-block: 1.1rem; font-size: .9rem; color: var(--on-chalk-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* Scroll reveal (kept subtle; used only on a few blocks) */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
    .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
