:root {
  --wine: #6d1a2b;
  --wine-deep: #3f0d18;
  --wine-soft: #9b3a4c;
  --paper: #f7f1e8;
  --paper-2: #efe5d6;
  --ink: #2a1d1a;
  --ink-soft: #5e4f4a;
  --gold: #b88a44;
  --brand: #8a1f5c;
  --sea: #1d4f91;
  --line: rgba(42, 29, 26, 0.14);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }

/* Language toggle: every bilingual string is <span class="es"> + <span class="en"> */
html[lang="es"] .en, html[lang="en"] .es { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font: 600 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--wine-soft); margin-bottom: 1rem; display: block;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
section { padding: clamp(64px, 10vw, 120px) 0; }
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 1px solid currentColor;
  font: 500 .95rem/1 var(--sans); text-decoration: none; transition: background .2s, color .2s;
}
.btn-solid { background: var(--wine); color: #fff; border-color: var(--wine); }
.btn-solid:hover { background: var(--wine-deep); color: #fff; }
.btn-ghost { color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--wine-deep); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s;
  color: #fff;
}
.site-header.scrolled { background: rgba(247, 241, 232, .96); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: baseline; gap: .4em; white-space: nowrap; }
.logo {
  display: block; width: 62px; height: 58px; background: currentColor;
  -webkit-mask: url("img/logo-cueva.svg") center / contain no-repeat;
          mask: url("img/logo-cueva.svg") center / contain no-repeat;
}
.site-header.scrolled .logo, .site-header.open .logo { color: var(--brand); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: inherit; text-decoration: none; font-size: .92rem; font-weight: 500; opacity: .9; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang {
  display: flex; border: 1px solid currentColor; border-radius: 999px; overflow: hidden; opacity: .9;
}
.lang button {
  background: none; border: 0; color: inherit; font: 600 .75rem/1 var(--sans); letter-spacing: .08em;
  padding: .55em .8em; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: currentColor; }
.lang button[aria-pressed="true"] span { color: var(--wine-deep); }
.site-header.scrolled .lang button[aria-pressed="true"] span { color: var(--paper); }
.menu-btn { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 8px; }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); color: var(--ink); padding: 8px var(--gutter) 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-header.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .site-header.open { background: var(--paper); color: var(--ink); }
}

/* Hero */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; padding: 0 0 clamp(56px, 10vh, 110px);
  background: var(--wine-deep) url("img/hero.jpg") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,6,12,.55) 0%, rgba(30,6,12,.15) 35%, rgba(30,6,12,.8) 100%);
}
.hero .wrap { position: relative; }
.hero .eyebrow { color: #f1d9b5; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.8rem); font-weight: 400; max-width: 12ch; margin-bottom: .3em; }
.hero h1 em { font-style: italic; color: #f1d9b5; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 52ch; opacity: .92; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-badge {
  position: absolute; right: var(--gutter); top: -40px; width: 132px; height: 132px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6); display: grid; place-items: center; text-align: center;
  font: 500 .72rem/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 16px;
}
.hero-badge strong { display: block; font: 500 2rem/1 var(--serif); letter-spacing: 0; margin: 4px 0; text-transform: none; }
@media (max-width: 720px) { .hero-badge { display: none; } }

/* Split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.photo-stack { position: relative; }
.photo-stack img { border-radius: 4px; box-shadow: 0 20px 50px rgba(42,29,26,.18); }
.photo-stack .small {
  position: absolute; width: 46%; right: -6%; bottom: -12%; border: 8px solid var(--paper);
}
@media (max-width: 860px) { .photo-stack .small { right: 0; } }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.facts div strong { display: block; font: 500 clamp(1.5rem, 5.5vw, 2.4rem)/1.1 var(--serif); color: var(--wine); white-space: nowrap; }
.facts div span { font-size: .85rem; color: var(--ink-soft); }

/* Band */
.band { background: var(--wine-deep); color: #f6ebe0; position: relative; overflow: hidden; }
.band .eyebrow { color: #e0b98a; }
.band a { color: #f1d9b5; }
.band-img {
  position: absolute; inset: 0; background: url("img/cava-botellas.jpg") center / cover; opacity: .18;
}
.band .wrap { position: relative; }
.quote {
  font: italic 400 clamp(1.6rem, 3.6vw, 2.6rem)/1.3 var(--serif); max-width: 30ch; margin: 0 0 1.5rem;
}

/* Wines */
.wines-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 20px; margin-bottom: 3rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a {
  font: 500 .85rem/1 var(--sans); padding: .7em 1.1em; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s;
}
.filters a:hover { background: var(--ink); color: var(--paper); }
.wine-group {
  font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 3rem 0 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.wine-groups > .wine-group:first-child { margin-top: 0; }
.wines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .wines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .wines { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wine { padding: 18px 14px 16px; }
  .wine-img { height: 210px; }
  .wine-img img { max-height: 200px; }
  .wine h3 { font-size: 1.2rem; }
  .wine .grapes { font-size: .85rem; }
  .wine .type { font-size: .62rem; letter-spacing: .1em; }
  .wine dl div { font-size: .7rem; padding: .3em .6em; }
  .soldout { font-size: .6rem; }
  .soon { font-size: .58rem; top: 4px; }
}
.wine {
  background: #fff; border-radius: 6px; padding: 28px 24px 24px; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .25s, box-shadow .25s;
}
.wine:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(42,29,26,.1); }
.wine[hidden] { display: none; }
.wine-img {
  position: relative; height: 300px; display: flex; align-items: flex-end; justify-content: center; margin: -8px -4px 20px;
  background: radial-gradient(ellipse 60% 12% at 50% 96%, rgba(42,29,26,.12), transparent 70%);
}
.wine-img img { max-height: 290px; width: auto; max-width: 100%; transition: transform .4s; }
.wine:hover .wine-img img { transform: translateY(-4px) rotate(-1.5deg); }
.soldout {
  position: absolute; top: 12px; left: 0; z-index: 1; transform: rotate(-6deg);
  border: 2px solid #c0392b; color: #c0392b; background: rgba(255,255,255,.85);
  font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .45em .7em; border-radius: 3px;
}
.soon {
  position: absolute; top: 12px; left: 0; z-index: 1;
  background: var(--gold); color: #fff; border-radius: 999px;
  font: 600 .68rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: .45em .8em;
}
.na-soon {
  align-self: flex-start; margin-bottom: 14px; background: var(--sea); color: #fff; border-radius: 999px;
  font: 600 .68rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .45em .85em;
}
.na-card .na-soon { margin-bottom: 18px; }
.wine details { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; }
.wine summary { cursor: pointer; font-weight: 500; color: var(--wine); list-style: none; }
.wine summary::-webkit-details-marker { display: none; }
.wine summary::after { content: " +"; }
.wine details[open] summary::after { content: " −"; }
.wine details p { margin: .6em 0 0; }
.wine .type { font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--wine-soft); }
.wine h3 { margin: .45em 0 .35em; }
.wine .grapes { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.wine dl, .na-feature dl, .na-card dl { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; }
.wine dl div, .na-feature dl div, .na-card dl div { background: var(--paper); border-radius: 999px; padding: .35em .8em; font-size: .78rem; }
.wine dt, .na-feature dt, .na-card dt { display: none; }
.wine dd, .na-feature dd, .na-card dd { margin: 0; }

/* Alcohol-free */
.nonalc { background: linear-gradient(180deg, var(--paper) 0%, #eef3f6 100%); }
.nonalc .eyebrow { color: var(--sea); }
.na-feature {
  display: grid; grid-template-columns: 1.25fr 1fr; margin-top: 3rem; background: #fff;
  border: 1px solid rgba(29,79,145,.15); border-radius: 8px; overflow: hidden;
}
.na-feature-img { background: #fff; display: flex; align-items: center; }
.na-feature-img img { width: 100%; }
.na-feature-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; }
.na-feature .type, .na-card .type { font: 600 .7rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sea); }
.na-feature h3 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--sea); margin: .4em 0 .5em; }
.na-feature h3 em { display: block; font-size: .7em; color: #3a8fc6; }
.na-feature p { color: var(--ink-soft); }
.na-claims { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: .88rem; }
.na-claims li::before { content: "✓ "; color: var(--sea); font-weight: 700; }
.na-feature dl div, .na-card dl div { background: #eef3f6; }
.na-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.na-card { border-radius: 8px; padding: 32px 28px; display: flex; flex-direction: column; border: 1px solid var(--line); }
.na-card h3 { margin: .4em 0 .35em; font-size: 1.9rem; }
.na-card p { color: var(--ink-soft); }
.na-icon { width: 44px; height: 44px; margin-bottom: 18px; }
.na-honey { background: #fbf3e2; }
.na-honey .na-icon, .na-honey .type { color: #a8741a; }
.na-honey dl div { background: #fff; }
.na-kefir { background: #eef5f0; }
.na-kefir .na-icon, .na-kefir .type { color: #3b7a57; }
.na-kefir dl div { background: #fff; }
@media (max-width: 860px) {
  .na-feature, .na-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .na-claims { grid-template-columns: 1fr; } }
.wines-note { margin-top: 2rem; color: var(--ink-soft); font-size: .95rem; }

/* Natural wine principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
.principle { background: var(--paper); padding: 28px 24px; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }
.principle .n { font: italic 400 2.6rem/1 var(--serif); color: var(--gold); }
.principle h3 { font-size: 1.35rem; margin: .4em 0 .4em; }
.principle p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.principle-end {
  display: flex; align-items: flex-end; min-height: 180px;
  background: linear-gradient(rgba(63,13,24,.55), rgba(63,13,24,.85)), url("img/botella-cepa.jpg") center / cover;
}
.principle-end p { font: italic 400 1.7rem/1.2 var(--serif); color: #f6ebe0; }

/* Awards timeline */
.awards { background: var(--paper-2); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--wine-soft); }
.timeline li { position: relative; padding: 0 0 2rem 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: .55em; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper-2); border: 2px solid var(--wine);
}
.timeline .year { font: 600 .85rem/1 var(--sans); color: var(--wine); letter-spacing: .08em; }
.timeline h3 { font-size: 1.35rem; margin: .35em 0 .2em; }
.timeline p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* Events */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 3rem; }
.event { border-top: 2px solid var(--wine); padding-top: 16px; }
.event .when { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wine-soft); }
.event h3 { font-size: 1.35rem; margin: .4em 0 .3em; }
.event p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* Gallery */
.gallery { columns: 3 260px; column-gap: 12px; margin-top: 3rem; }
.gallery button { all: unset; cursor: zoom-in; display: block; margin-bottom: 12px; break-inside: avoid; border-radius: 3px; overflow: hidden; }
.gallery button:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.gallery img { width: 100%; transition: transform .5s, filter .3s; }
.gallery button:hover img { transform: scale(1.03); filter: brightness(1.05); }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 8, 10, .94);
  display: none; place-items: center; padding: 24px;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; max-width: 92vw; width: auto; border-radius: 3px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 12px 18px; line-height: 1;
}
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Poem */
.poem { text-align: center; }
.poem .fachada { width: min(300px, 70%); margin: 0 auto 2rem; opacity: .85; }
.poem blockquote { font: italic 400 clamp(1.3rem, 2.6vw, 1.8rem)/1.55 var(--serif); max-width: 40ch; margin: 0 auto 1rem; }
.poem cite { font-style: normal; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* Where to buy */
.shops { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 3rem; }
.shops h3 { border-bottom: 1px solid var(--line); padding-bottom: .5em; }
.shops ul { list-style: none; padding: 0; margin: 0; }
.shops li { padding: .7em 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.shops li strong { display: block; font-weight: 600; }
.shops li span { color: var(--ink-soft); }
.export { margin-top: 3rem; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.export ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1rem 0 0; }
.export li { background: var(--paper); border-radius: 999px; padding: .35em .9em; font-size: .85rem; }

/* Visit / contact */
.visit { background: var(--wine-deep); color: #f6ebe0; }
.visit .eyebrow { color: #e0b98a; }
.visit a { color: #f1d9b5; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.contact-list svg { flex: none; width: 22px; height: 22px; margin-top: 3px; opacity: .8; }
.contact-list small { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.map { border-radius: 6px; overflow: hidden; min-height: 380px; height: 100%; background: #2a0a10; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: saturate(.8); }
.visit .btn-solid { background: #f1d9b5; color: var(--wine-deep); border-color: #f1d9b5; }
.visit .btn-solid:hover { background: #fff; }

/* Footer */
footer { background: #230810; color: rgba(246,235,224,.7); padding: 40px 0; font-size: .88rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer a { color: rgba(246,235,224,.9); }
.social { display: flex; gap: 16px; }
.logo-footer { width: 92px; height: 86px; color: #f6ebe0; margin-bottom: 12px; }
.footer-barrica { height: 110px; width: auto; filter: invert(1); opacity: .55; }
@media (max-width: 600px) { .footer-barrica { display: none; } }
.social a { display: inline-flex; }
.social svg { width: 22px; height: 22px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.age-note { font-size: .78rem; opacity: .7; }
