/* ============================================================
   Santa Marta Gastronomía — menú digital
   ============================================================ */

:root {
    --bg:          #0A0A0A;
    --surface:     #131313;
    --surface-2:   #1A1A1A;
    --line:        rgba(200, 168, 114, 0.15);
    --line-strong: rgba(200, 168, 114, 0.40);
    --text:        #F5F1E8;
    --text-dim:    #9A958A;
    --accent:      #C8A872;
    --accent-soft: rgba(200, 168, 114, 0.12);
    --radius:      18px;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

/* Evita que hijos de flex/grid rompan el ancho en mobile */
body *:not(.card__media) { min-width: 0; }

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

.wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(14px, 4vw, 44px);
}

@supports (overflow: clip) {
    body { overflow-x: clip; }
}

/* ============================================================
   HEADER
   ============================================================ */
.hero {
    text-align: center;
    padding: clamp(36px, 8vw, 80px) 0 clamp(20px, 4vw, 36px);
}

.hero__logo {
    max-width: min(420px, 78vw);
    margin: 0 auto clamp(28px, 6vw, 56px);
}

/* Fallback de texto si todavía no subiste el logo */
.hero__wordmark {
    margin: 0 auto clamp(28px, 6vw, 56px);
}

.hero__wordmark small {
    display: block;
    font-size: clamp(11px, 1.6vw, 14px);
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 6px;
}

.hero__wordmark strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(38px, 9vw, 76px);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.hero__wordmark em {
    display: block;
    font-style: normal;
    font-size: clamp(11px, 2vw, 16px);
    letter-spacing: 0.5em;
    text-transform: lowercase;
    color: var(--text);
    margin-top: 6px;
}

.hero__meta {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 80%, transparent 100%);
    padding: 16px 0 20px;
    margin-bottom: 20px;
}

.nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.nav__link {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .25s, border-color .25s, background-color .25s;
}

.nav__link:hover, .nav__link:focus-visible {
    color: var(--text);
    border-color: var(--accent);
    outline: none;
}

.nav__link.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* ============================================================
   SECCIONES
   ============================================================ */
.sections {
    display: flex;
    flex-direction: column;
    gap: clamp(36px, 6vw, 68px);
    padding-bottom: clamp(30px, 5vw, 50px);
}

.section { scroll-margin-top: 90px; }

.section__header {
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 38px);
}

.section__deco {
    display: block;
    color: var(--accent);
    font-size: 11px;
    letter-spacing: .5em;
    margin-bottom: 10px;
    opacity: .7;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(26px, 5vw, 42px);
    line-height: 1.15;
    margin: 0 0 8px;
}

.section__desc {
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.grid {
    display: grid;
    gap: clamp(14px, 2.5vw, 24px);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s;
    opacity: 0;
    transform: translateY(12px);
}

.card.is-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
        border-color: var(--line-strong);
    }
    .card:hover .card__media img { transform: scale(1.05); }
}

.card__media {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--surface-2);
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}

.card__body {
    padding: clamp(16px, 2.5vw, 22px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: baseline;
}

.card__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.3;
    margin: 0;
}

.card__badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.card__price {
    font-size: clamp(13px, 1.5vw, 15px);
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    text-align: right;
}

.card__desc {
    color: var(--text-dim);
    font-size: clamp(12.5px, 1.4vw, 14px);
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 28px 0 60px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer p {
    color: var(--text-dim);
    font-size: 10px;
    letter-spacing: .25em;
    text-transform: uppercase;
    margin: 0;
}

/* ============================================================
   VOLVER ARRIBA
   ============================================================ */
.to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s, background-color .2s, color .2s;
}

.to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.to-top:hover {
    background: var(--accent);
    color: var(--bg);
}

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

@media (max-width: 480px) {
    .to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
    .card__title { font-size: 16px; }
    .card__price { font-size: 14px; }
    .nav__link { padding: 8px 14px; font-size: 11px; }
}

@media (max-width: 360px) {
    .section__title { font-size: 24px; }
    .nav__link { padding: 7px 12px; font-size: 10.5px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card, .card.is-in { opacity: 1; transform: none; transition: none; }
    .card:hover { transform: none; }
    .card:hover .card__media img { transform: none; }
}
