/* ============================================================
   CUÁL VINO — Atlas de mesa chilena
   Una interfaz editorial: papel, tinta, arcilla, corcho y luz real.
   ============================================================ */

:root {
  --paper: #efe4d4;
  --paper-2: #e3d1b9;
  --paper-3: #d4b99a;
  --ink: #241920;
  --ink-soft: #604d4d;
  --ink-faint: #927c74;
  --plum: #55233f;
  --plum-deep: #2b1524;
  --wine: #9d3f5b;
  --wine-light: #d88982;
  --vine: #627844;
  --vine-soft: #dce0c6;
  --cork: #d39a43;
  --clay: #bb7057;
  --line: #d0baa0;
  --surface: #f8f0e5;
  --white: #fffaf2;
  --shadow-1: 0 1px 2px rgba(43,21,36,.08), 0 7px 18px rgba(43,21,36,.06);
  --shadow-2: 0 4px 10px rgba(43,21,36,.10), 0 22px 48px rgba(43,21,36,.13);
  --shadow-pop: 0 24px 70px -22px rgba(26,11,22,.6);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background: linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.5) 48.1% 48.25%, transparent 48.4%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine); }
svg { display: block; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--cork);
  outline-offset: 3px;
}
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }
.wrap-narrow { max-width: 800px; margin: 0 auto; padding: 0 26px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239,228,212,.93);
  border-bottom: 1px solid rgba(84,48,49,.16);
  backdrop-filter: blur(16px);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .wordmark { color: var(--ink); font-family: var(--serif); font-size: 1.42rem; font-weight: 700; letter-spacing: -.045em; }
.brand .wordmark em { color: var(--wine); font-style: normal; }
.main-nav { display: flex; gap: 2px; margin-left: 10px; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 11px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s, background .15s, transform .15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--plum); background: rgba(255,250,242,.7); transform: translateY(-1px); }
.header-search { position: relative; margin-left: auto; }
.header-search input {
  width: 224px;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23604d4d" stroke-width="2.4" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>') 13px center no-repeat;
  font: inherit;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.header-search input:focus { width: 300px; outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(85,35,63,.14); }
.search-suggest {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 20;
  display: none; width: 380px; max-height: 70vh; overflow: auto; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-2);
}
.search-suggest.open { display: block; }
.search-suggest .sg-group { padding: 8px 10px 4px; color: var(--ink-faint); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.search-suggest a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink); font-size: .94rem; text-decoration: none; }
.search-suggest a:hover, .search-suggest a.active { color: var(--plum); background: var(--paper-2); }
.search-suggest a small { color: var(--ink-faint); white-space: nowrap; }
.search-suggest .sg-empty { padding: 14px 12px; color: var(--ink-soft); font-size: .93rem; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { 
  position: relative;
  display: grid;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  color: #f7eee4;
  background: var(--plum-deep);
}
.hero--compact { min-height: 520px; }
.hero--compact .wrap { padding-top: 82px; padding-bottom: 68px; }
.hero--compact .hero-note { margin-top: 22px; }
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 12% 82%, rgba(187,112,87,.3), transparent 31%), radial-gradient(circle at 72% 10%, rgba(211,154,67,.18), transparent 35%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 104px; padding-bottom: 92px; }
.hero h1 { max-width: 10ch; color: var(--white); font-size: clamp(3.1rem, 6.3vw, 5.7rem); }
.hero h1 em { color: #efc77e; font-style: italic; }
.hero .lede { max-width: 48ch; margin-bottom: 2em; color: #e7d4c5; font-size: 1.18rem; }
.hero-img { position: absolute; inset: 0 0 0 47%; z-index: 0; }
.hero-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--plum-deep) 0%, rgba(43,21,36,.78) 10%, rgba(43,21,36,.06) 58%, rgba(43,21,36,.22) 100%); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.decision-bar { display: flex; gap: 10px; max-width: 720px; padding: 9px; border-radius: 999px; background: var(--white); box-shadow: var(--shadow-pop); }
.decision-bar input { flex: 1; min-width: 0; padding: 12px 20px; border: 0; color: var(--ink); background: transparent; font: inherit; font-size: 1.04rem; }
.decision-bar input:focus { outline: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 23px; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; background: var(--plum); font: inherit; font-size: .96rem; font-weight: 700; text-decoration: none;
  transition: transform .14s, background .15s, box-shadow .15s;
}
.btn:hover { color: #fff; background: var(--wine); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.btn--accent { background: var(--wine); }
.btn--accent:hover { background: var(--clay); }
.btn--ghost { color: var(--plum); border: 1px solid var(--line); background: transparent; }
.btn--ghost:hover { color: var(--plum); border-color: var(--plum); background: var(--paper-2); box-shadow: none; }
.btn--lime { background: var(--vine); }
.quick-modes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.quick-modes a { display: inline-flex; align-items: center; min-height: 40px; gap: 8px; padding: 9px 15px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #ecdacc; font-size: .9rem; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.quick-modes a svg { flex: 0 0 auto; width: 16px; height: 16px; }
.quick-modes a:hover { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.12); transform: translateY(-1px); }
.hero-note { margin-top: 34px; color: #caa996; font-size: .78rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

/* ---------- Layout and section rhythm ---------- */
main { overflow: clip; }
.section { padding: 82px 0; border-top: 1px solid rgba(84,48,49,.1); }
.section--tinted { background: var(--paper-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head .more { color: var(--plum); font-size: .92rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-head .more::after { content: "  ↗"; color: var(--wine); }
.section-sub { max-width: 60ch; margin: -18px 0 32px; color: var(--ink-soft); }
.section-head > div > .section-sub { margin: 6px 0 0; }
.home-explorer { padding-top: 68px; }
.home-explorer-head { margin-bottom: 20px; }
.home-tabs {
  display: flex; gap: 7px; width: min(100%, 720px); margin-bottom: 28px; padding: 5px;
  border: 1px solid rgba(84,48,49,.14); border-radius: 999px; background: var(--paper-2);
}
.home-tabs button {
  display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 14px;
  border: 0; border-radius: 999px; color: var(--ink-soft); background: transparent; font: inherit; font-size: .91rem; font-weight: 700; cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s, transform .15s;
}
.home-tabs button:hover { color: var(--plum); background: rgba(255,250,242,.66); transform: translateY(-1px); }
.home-tabs button.is-active { color: var(--white); background: var(--plum); box-shadow: var(--shadow-1); }
.home-tabs button svg { flex: 0 0 auto; }
.home-tab-panel { min-width: 0; }
.js .home-tab-panel:not(.is-active) { display: none; }
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.rail-head h3 { margin: 0 0 4px; font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
.rail-head p { margin: 0; color: var(--ink-soft); font-size: .94rem; }
.rail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; flex-wrap: wrap; }
.rail-controls { display: inline-flex; gap: 6px; }
.rail-controls button {
  display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  color: var(--plum); background: var(--surface); font: inherit; font-size: 1.05rem; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.rail-controls button:hover:not(:disabled) { color: var(--white); border-color: var(--plum); background: var(--plum); transform: translateY(-1px); }
.rail-controls button:disabled { color: var(--ink-faint); background: transparent; cursor: default; opacity: .55; }
.scroll-rail {
  display: flex; gap: 18px; margin-right: -26px; margin-left: -2px; padding: 4px 26px 18px 2px; overflow-x: auto;
  overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-color: var(--clay) transparent; scrollbar-width: thin;
}
.scroll-rail::-webkit-scrollbar { height: 8px; }
.scroll-rail::-webkit-scrollbar-track { background: transparent; }
.scroll-rail::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--clay); }
.scroll-rail > .card { flex: 0 0 min(292px, 28vw); scroll-snap-align: start; }
.scroll-rail--grapes > .card { flex-basis: min(300px, 29vw); }
.scroll-rail--editorial > .card { flex-basis: min(320px, 31vw); }
.home-tab-panel .scroll-rail { margin-bottom: -4px; }
.wine-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 154px; padding: 26px 30px;
  border-radius: 2px 32px 2px 32px; color: #f5e9de; background: var(--plum); box-shadow: var(--shadow-1);
}
.wine-entry h3 { margin: 0 0 6px; color: var(--white); font-size: clamp(1.55rem, 3vw, 2.15rem); }
.wine-entry p { max-width: 60ch; margin: 0; color: #dfc9ba; }
.wine-entry .btn { white-space: nowrap; }
.page-head { padding: 58px 0 34px; }
.page-head .kicker { margin-bottom: 12px; color: var(--wine); font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-head .lede { max-width: 62ch; color: var(--ink-soft); font-size: 1.14rem; }
.page-head--visual { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: end; gap: 42px; }
.page-head--visual .page-head-copy { max-width: 700px; }
.page-head-media { position: relative; min-height: 210px; overflow: hidden; border: 1px solid rgba(84,48,49,.18); border-radius: 2px 52px 2px 52px; box-shadow: var(--shadow-2); transform: rotate(1.2deg); }
.page-head-media img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.page-head-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.17); pointer-events: none; }

/* ---------- Cards / image-led surfaces ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  display: block; padding: 22px; border: 1px solid rgba(84,48,49,.18); border-radius: var(--radius);
  color: var(--ink); background: rgba(248,240,229,.65); box-shadow: var(--shadow-1);
  text-decoration: none; transition: transform .16s, box-shadow .2s, border-color .15s, background .15s;
}
a.card:hover { color: var(--ink); border-color: var(--wine-light); background: var(--surface); box-shadow: var(--shadow-2); transform: translateY(-4px) rotate(-.25deg); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card-media { display: block; overflow: hidden; background: var(--paper-3); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.045); }
.card--photo { padding: 0; overflow: hidden; }
.card--photo .card-media { aspect-ratio: 1.55; }
.card--photo .card-copy { display: flex; align-items: center; gap: 12px; padding: 16px 18px 19px; }
.card--photo .card-copy h3 { margin: 0; font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.card--photo .card-copy small { color: var(--ink-faint); }
.card--photo .card-copy .ico { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--plum); background: var(--paper-2); }
.card--grape { padding: 0 0 18px; overflow: hidden; }
.card--grape .card-media { aspect-ratio: 1.35; }
.card--grape .grape-top, .card--grape > p, .card--grape .card-foot { margin-right: 20px; margin-left: 20px; }
.card--grape .grape-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 18px; }
.card--grape .grape-top h3 { margin: 0; }
.card--grape > p { min-height: 3.1em; }
.card--grape .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.color-dot { width: 12px; height: 12px; flex: none; margin-top: 7px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,250,242,.7), 0 0 0 4px var(--line); }
.color-dot--tinto { background: #64203e; }
.color-dot--blanco { background: #ded27c; }
.color-dot--rosado { background: #df9998; }
.beginner-tag { padding: 3px 9px; border-radius: 999px; color: var(--vine); background: var(--vine-soft); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.card--post { padding: 0 0 22px; overflow: hidden; }
.card--post .thumb { aspect-ratio: 1.55; margin: 0 0 16px; overflow: hidden; background: var(--paper-3); }
.card--post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card--post:hover .thumb img { transform: scale(1.045); }
.card--post > :not(.thumb) { display: block; margin-right: 21px; margin-left: 21px; }
.card--post .post-meta { margin-bottom: 7px; color: var(--ink-faint); font-size: .77rem; font-weight: 700; letter-spacing: .03em; text-transform: capitalize; }
.card--post h3 { font-size: 1.28rem; }

/* ---------- Meters and recommendation surfaces ---------- */
.meter { display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.meter + .meter { margin-top: 8px; }
.meter .m-label { width: 74px; flex: none; color: var(--ink-soft); }
.meter .m-bars { display: flex; flex: 1; gap: 4px; }
.meter .m-bars i { height: 6px; flex: 1; border-radius: 3px; background: var(--line); }
.meter .m-bars i.on { background: var(--plum); }
.meter .m-bars--vine i.on { background: var(--vine); }
.meter .m-value { color: var(--ink-faint); font-size: .77rem; white-space: nowrap; }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px; border-radius: 999px; font-size: .79rem; font-weight: 700; }
.verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict--excelente { color: #477536; background: #e5ead3; }
.verdict--muy-buena { color: #617d39; background: #e8edd8; }
.verdict--buena { color: #768b42; background: #edf0df; }
.verdict--puede-funcionar { color: #a9742e; background: #f4e8c8; }
.verdict--depende { color: #a05f32; background: #f1dfc9; }
.verdict--evitar { color: #a23c2e; background: #f1d7d0; }
.rec-card { padding: 24px; border: 1px solid rgba(84,48,49,.18); border-radius: var(--radius); background: rgba(248,240,229,.82); box-shadow: var(--shadow-1); }
.rec-card + .rec-card { margin-top: 15px; }
.rec-card .rec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rec-card h3 { margin: 0; font-size: 1.4rem; }
.rec-card .rec-reason { margin: 10px 0 0; color: var(--ink-soft); }
.rec-card .rec-meters { max-width: 420px; margin-top: 15px; }
.rec-card .rec-temp,
.result-hero .rec-temp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: .84rem;
  line-height: 1.35;
}
.rec-temp svg { flex: 0 0 auto; }
.rec-card--avoid { border-color: #d9a99c; background: #f3ded7; }
.result-hero { margin-bottom: 24px; padding: 34px; border-radius: 2px 38px 2px 38px; color: #f3e4d7; background: var(--plum-deep); box-shadow: var(--shadow-pop); }
.result-hero .rh-label { margin-bottom: 7px; color: #d4a97b; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-hero h3 { margin: 0 0 6px; color: var(--white); font-size: 2rem; }
.result-hero p { max-width: 58ch; margin: 0; color: #e3cfc0; }

/* ---------- Navigation and editorial pages ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; color: var(--ink-faint); font-size: .82rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--plum); }
.crumbs span::before { content: "／"; margin-right: 8px; color: var(--clay); }
.hub-band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin: 8px 0 54px; }
.hub-band-copy { padding: 30px; border-radius: 2px 44px 2px 44px; color: #f5e9de; background: var(--plum); }
.hub-band-copy h2 { color: var(--white); }
.hub-band-copy p { max-width: 52ch; color: #dfc9ba; }
.hub-band-media { min-height: 250px; overflow: hidden; border-radius: 44px 2px 44px 2px; box-shadow: var(--shadow-2); transform: rotate(-1deg); }
.hub-band-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-block { margin-bottom: 52px; }
.cat-block h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-family: var(--sans); font-size: .88rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.cat-block h3 .ico { color: var(--wine); }
.cat-block h3 .ico svg { width: 22px; height: 22px; }
.valley-section { margin-top: 46px; }
.valley-section > h2 { display: flex; align-items: center; gap: 12px; font-size: 1.65rem; }
.valley-section > h2::before { content: ""; width: 33px; height: 5px; border-radius: 5px; background: var(--clay); }
.valley-card { padding: 0 0 20px; overflow: hidden; }
.valley-card .card-media { aspect-ratio: 1.65; }
.valley-card .card-copy { padding: 17px 20px 0; }
.valley-card .card-copy h3 { margin-bottom: 5px; }
.article-body { font-size: 1.07rem; }
.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.4em; }
.article-body img { margin: 26px 0; border-radius: var(--radius); }
.article-body blockquote { margin: 26px 0; padding: 18px 24px; border-radius: var(--radius); color: var(--plum-deep); background: var(--paper-2); font-family: var(--serif); font-size: 1.15rem; font-style: italic; box-shadow: inset 0 3px 0 var(--cork); }
.article-body ul li, .article-body ol li { margin-bottom: 6px; }
.article-body table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: .95rem; }
.article-body th, .article-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.article-body th { background: var(--paper-2); }
.tip-box { margin: 27px 0; padding: 18px 22px; border: 1px solid #b7c694; border-radius: var(--radius); background: var(--vine-soft); font-size: .96rem; }
.tip-box strong { color: #4e642e; }
.feature-image { width: 100%; max-height: 480px; margin: 0 0 32px; object-fit: cover; border-radius: 2px 50px 2px 50px; box-shadow: var(--shadow-2); }

/* ---------- Selector ---------- */
.tool-panel { padding: 34px; border: 1px solid rgba(255,255,255,.14); border-radius: 2px 34px 2px 34px; color: #f5e8dc; background: var(--plum-deep); box-shadow: var(--shadow-pop); }
.tool-panel h2, .tool-panel h3, .tool-panel label { color: var(--white); }
.tool-panel-intro { display: grid; grid-template-columns: 1fr 170px; align-items: center; gap: 22px; margin-bottom: 28px; }
.tool-panel-intro p { margin: 0; color: #dbc4b4; }
.tool-panel-intro .tool-panel-label { margin-bottom: 5px; color: #efc77e; font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; }
.tool-panel-intro img { width: 170px; height: 112px; object-fit: cover; border-radius: 2px 24px 2px 24px; opacity: .9; }
.tool-steps { display: flex; gap: 8px; margin-bottom: 30px; }
.tool-steps .step-dot { height: 4px; flex: 1; border-radius: 5px; background: rgba(255,255,255,.2); }
.tool-steps .step-dot.on { background: var(--cork); }
.tool-field { margin-bottom: 26px; }
.tool-field > label { display: block; margin-bottom: 11px; font-size: 1.03rem; font-weight: 700; }
.tool-field .hint { color: #cdb9ab; font-size: .87rem; font-weight: 400; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); font: inherit; font-size: .92rem; cursor: pointer; transition: all .13s; }
.chip:hover { border-color: var(--wine); color: var(--plum); }
.chip[aria-pressed="true"] { border-color: var(--cork); color: var(--white); background: var(--wine); }
.chip--skip { border-style: dashed; }
.tool-panel .chip { border-color: rgba(255,255,255,.24); color: #f3e6dc; background: rgba(255,255,255,.07); }
.tool-panel .chip:hover { border-color: var(--cork); color: var(--white); background: rgba(255,255,255,.14); }
.tool-panel .chip[aria-pressed="true"] { border-color: var(--cork); background: var(--wine); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.combo-input { position: relative; }
.combo-input input { width: 100%; padding: 13px 18px; border: 1.5px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); color: var(--white); background: rgba(255,255,255,.09); font: inherit; font-size: 1.02rem; }
.combo-input input::placeholder { color: #cdb9ab; }
.combo-input input:focus { outline: none; border-color: var(--cork); box-shadow: 0 0 0 3px rgba(211,154,67,.18); }
.combo-list { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 20; display: none; max-height: 280px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-2); }
.combo-list.open { display: block; }
.combo-list button { display: block; width: 100%; padding: 10px 16px; border: 0; color: var(--ink); background: none; font: inherit; text-align: left; cursor: pointer; }
.combo-list button:hover, .combo-list button.active { background: var(--paper-2); }
.combo-list .cg { padding: 8px 16px 2px; color: var(--ink-faint); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Profile, search, footer ---------- */
.grape-profile { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }
.profile-box { position: sticky; top: 92px; padding: 28px; border: 1px solid rgba(84,48,49,.2); border-radius: 2px 30px 2px 30px; background: var(--paper-2); box-shadow: var(--shadow-1); }
.profile-box .meter { margin-bottom: 10px; }
.profile-facts { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .93rem; }
.profile-facts dt { margin-top: 12px; color: var(--ink-soft); font-weight: 700; }
.profile-facts dd { margin: 2px 0 0; }
.profile-image { width: 100%; max-height: 390px; margin-bottom: 28px; object-fit: cover; border-radius: 2px 40px 2px 40px; }
.match-list { display: grid; gap: 10px; }
.match-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid rgba(84,48,49,.16); border-radius: var(--radius-sm); background: rgba(248,240,229,.72); }
.match-item .mi-name { font-weight: 700; }
.match-item .mi-cat { color: var(--ink-faint); font-size: .85rem; }
.match-item .verdict { margin-left: auto; }
.match-item--avoid { border-color: #d9a99c; background: #f3ded7; }
.note-future { padding: 26px; border: 1px dashed var(--cork); border-radius: var(--radius); background: var(--paper-2); text-align: center; }

/* ---------- Banner de sitios amigos ---------- */
.partner-banner-section { margin-top: 56px; }
.partner-banner {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.54fr);
  min-height: 214px;
  overflow: hidden;
  border: 1px solid rgba(84,48,49,.2);
  border-radius: 2px 30px 2px 30px;
  color: var(--white);
  background: var(--plum-deep);
  box-shadow: var(--shadow-1);
  isolation: isolate;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .2s ease, border-color .18s ease;
}
.partner-banner:hover { color: var(--white); border-color: var(--wine-light); box-shadow: var(--shadow-2); transform: translateY(-3px); }
.partner-banner:focus-visible { color: var(--white); outline-offset: 5px; }
.partner-banner--return { grid-template-columns: minmax(0, .86fr) minmax(0, 1.54fr); color: var(--ink); background: var(--surface); }
.partner-banner--return:hover { color: var(--ink); border-color: var(--vine); }
.partner-banner--return:focus-visible { color: var(--ink); }
.partner-banner-media { position: relative; min-height: 214px; overflow: hidden; background: var(--plum); }
.partner-banner-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43,21,36,.1), rgba(43,21,36,.72)); pointer-events: none; }
.partner-banner--return .partner-banner-media::after { background: linear-gradient(90deg, rgba(36,25,25,.66), rgba(36,25,25,.08)); }
.partner-banner-media img { width: 100%; height: 100%; min-height: 214px; object-fit: cover; filter: saturate(.84) brightness(.78); transition: transform .5s ease, filter .25s ease; }
.partner-banner:hover .partner-banner-media img { filter: saturate(.98) brightness(.84); transform: scale(1.035); }
.partner-banner-content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: 24px clamp(22px, 3.1vw, 36px); }
.partner-banner-eyebrow { margin-bottom: 4px; color: #d4a97b; font-size: .66rem; font-weight: 800; letter-spacing: .13em; line-height: 1.35; text-transform: uppercase; }
.partner-banner--return .partner-banner-eyebrow { color: var(--vine); }
.partner-banner-brand { color: #efc77e; font-family: var(--serif); font-size: 1.12rem; font-weight: 700; line-height: 1.1; }
.partner-banner--return .partner-banner-brand { color: var(--wine); }
.partner-banner h2 { max-width: 23ch; margin: 4px 0 7px; color: var(--white); font-size: clamp(1.45rem, 2.55vw, 2.05rem); line-height: 1.04; }
.partner-banner--return h2 { color: var(--ink); }
.partner-banner-description { max-width: 56ch; color: #dfc9ba; font-size: .86rem; line-height: 1.45; }
.partner-banner--return .partner-banner-description { color: var(--ink-soft); }
.partner-banner-action { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; color: #efc77e; font-size: .74rem; font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.partner-banner--return .partner-banner-action { color: var(--vine); }
.partner-banner-action span { font-size: 1rem; line-height: .7; transition: transform .18s ease; }
.partner-banner:hover .partner-banner-action span { transform: translate(2px, -2px); }

.site-footer { margin-top: 88px; color: #cdb7aa; background: var(--plum-deep); }
.site-footer .wrap { padding-top: 66px; padding-bottom: 42px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 42px; }
.site-footer h4 { margin-bottom: 14px; color: var(--white); font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { display: block; padding: 3px 0; color: #cdb7aa; font-size: .93rem; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-brand .wordmark { color: var(--white); }
.footer-brand p { max-width: 34ch; color: #cdb7aa; font-size: .93rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.15); font-size: .82rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; top: 0; left: -999px; z-index: 100; padding: 10px 18px; border-radius: 0 0 8px 0; color: #fff; background: var(--plum); }
.skip-link:focus { left: 0; color: #fff; }
.err-page { padding: 90px 0 110px; text-align: center; }
.err-page .err-code { color: var(--plum); font-family: var(--serif); font-size: 6rem; font-weight: 700; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; width: 42px; height: 42px; margin-left: 0; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
  .main-nav { position: absolute; top: 72px; right: 0; left: 0; flex-direction: column; padding: 12px 26px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .main-nav.open { display: flex; }
  .main-nav a { border-radius: 8px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grape-profile { grid-template-columns: 1fr; }
  .profile-box { position: static; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding-right: 18px; padding-left: 18px; }
  .site-header .wrap { min-height: 64px; gap: 10px; }
  .header-search { margin-left: auto; }
  .header-search input { width: 148px; }
  .header-search input:focus { width: 180px; }
  .nav-toggle { width: 40px; height: 40px; }
  .search-suggest { width: min(92vw, 380px); }
  .hero { display: flex; min-height: auto; flex-direction: column; }
  .hero .wrap { padding-top: 64px; padding-bottom: 52px; }
  .hero--compact .wrap { padding-top: 54px; padding-bottom: 42px; }
  .hero h1 { max-width: 12ch; font-size: clamp(2.9rem, 14vw, 4.1rem); }
  .hero .lede { font-size: 1.05rem; }
  .hero-img { position: relative; inset: auto; height: 300px; order: 2; }
  .hero-img::before { background: linear-gradient(180deg, var(--plum-deep), transparent 35%, rgba(43,21,36,.2)); }
  .decision-bar { flex-direction: column; border-radius: var(--radius); }
  .decision-bar .btn { width: 100%; }
  .quick-modes a { font-size: .84rem; }
  .section { padding: 58px 0; }
  .section-head { display: block; margin-bottom: 24px; }
  .section-head .more { display: inline-block; margin-top: 8px; }
  .home-explorer { padding-top: 52px; }
  .home-tabs { width: 100%; margin-bottom: 24px; border-radius: 16px; }
  .home-tabs button { min-height: 48px; padding: 8px 7px; font-size: .79rem; }
  .home-tabs button svg { width: 16px; height: 16px; }
  .rail-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .rail-actions { width: 100%; justify-content: space-between; gap: 12px; }
  .scroll-rail { gap: 14px; margin-right: -18px; padding-right: 18px; }
  .scroll-rail > .card,
  .scroll-rail--grapes > .card,
  .scroll-rail--editorial > .card { flex-basis: 78vw; }
  .wine-entry { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; }
  .wine-entry .btn { width: 100%; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .page-head { padding-top: 40px; }
  .page-head h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .page-head--visual { display: block; }
  .page-head-media { min-height: 190px; margin-top: 16px; }
  .hub-band { grid-template-columns: 1fr; margin-bottom: 38px; }
  .hub-band-media { min-height: 220px; }
  .tool-panel { padding: 26px 18px; }
  .tool-panel-intro { grid-template-columns: 1fr; }
  .tool-panel-intro img { width: 100%; height: 150px; }
  .result-hero { padding: 28px 22px; }
  .match-item { align-items: flex-start; flex-direction: column; gap: 8px; }
  .match-item .verdict { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 18px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .home-tabs button span { max-width: 8ch; text-align: center; }
  .scroll-rail > .card,
  .scroll-rail--grapes > .card,
  .scroll-rail--editorial > .card { flex-basis: 82vw; }
  .partner-banner-section { margin-top: 42px; }
  .partner-banner { grid-template-columns: 34% 66%; min-height: 174px; }
  .partner-banner--return { grid-template-columns: 66% 34%; min-height: 174px; }
  .partner-banner--return .partner-banner-media { order: 2; }
  .partner-banner-media, .partner-banner-media img { min-height: 174px; }
  .partner-banner-content { padding: 17px 15px; }
  .partner-banner-eyebrow { font-size: .55rem; letter-spacing: .08em; }
  .partner-banner-brand { font-size: .94rem; }
  .partner-banner h2 { margin-top: 3px; margin-bottom: 5px; font-size: clamp(1.15rem, 5.5vw, 1.45rem); }
  .partner-banner-description { display: -webkit-box; overflow: hidden; font-size: .74rem; line-height: 1.34; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .partner-banner-action { margin-top: 9px; font-size: .62rem; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
