/* Quality Wine Import – site styles
   Palette: Vranec purple, limestone, brass (from the original brand), ink.
   Type: Bodoni Moda (display, tasting notes) + Public Sans (UI, data). */

:root {
  --vranec: #3a1430;
  --vranec-deep: #250b1e;
  --vranec-soft: #5a2a4c;
  --limestone: #ecebe7;
  --paper: #f8f8f6;
  --brass: #ab8b65;
  --brass-ink: #7b5f3c;      /* brass dark enough for text on light backgrounds */
  --ink: #23202a;
  --muted: #5f5966;
  --line: #d6d3cf;
  --on-dark: #f3eef1;
  --on-dark-muted: #c6b7c1;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Libre Bodoni", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* modular scale, ratio 1.333 */
  --s-1: .8125rem;
  --s0: 1rem;
  --s1: 1.333rem;
  --s2: 1.777rem;
  --s3: 2.369rem;
  --s4: 3.157rem;
  --s5: clamp(2.6rem, 1.6rem + 3.6vw, 4.209rem);

  --gutter: clamp(1rem, .5rem + 2.5vw, 2.5rem);
  --max: 1180px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: var(--s5); }
h2 { font-size: var(--s3); }
h3 { font-size: var(--s1); }
p { margin: 0 0 1em; max-width: 68ch; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

.lede { font-size: var(--s1); line-height: 1.5; color: var(--muted); max-width: 46ch; }

.link { color: var(--brass-ink); font-weight: 500; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 500 var(--s0)/1 var(--sans);
  padding: .95em 1.4em; border: 1px solid var(--vranec);
  background: var(--vranec); color: var(--on-dark);
  text-decoration: none; cursor: pointer; border-radius: 2px;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--vranec-soft); }
.btn-outline { background: transparent; color: var(--vranec); }
.btn-outline:hover { background: var(--vranec); color: var(--on-dark); }
.btn-light { background: var(--on-dark); color: var(--vranec); border-color: var(--on-dark); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(243,238,241,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248,248,246,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand img { width: 120px; }
.site-nav ul { list-style: none; display: flex; gap: clamp(1rem, 2vw, 2.25rem); margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: .9375rem; font-weight: 500; padding: .5rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { border-color: var(--brass); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .brand img { width: 96px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    background: none; border: 0; font: 500 .9375rem var(--sans); color: var(--ink); padding: .5rem 0; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s; }
  .nav-toggle-bars::before { content: ""; position: absolute; top: 6px; }
  .nav-toggle-bars { top: -3px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(3px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav { position: absolute; inset: var(--header-h) 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .site-nav a { display: block; padding: .8rem 0; font-size: var(--s1); font-family: var(--serif); border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { color: var(--brass-ink); border-color: var(--line); }
  .no-js .site-nav, html:not(.js) .site-nav { position: static; }
}

/* Hero: the wine shelf */
.hero {
  background: var(--vranec);
  color: var(--on-dark);
  padding-top: clamp(3rem, 2rem + 5vw, 6.5rem);
  overflow: hidden;
  position: relative;
}
.hero::after { /* soft cellar light behind the bottles */
  content: ""; position: absolute; inset: auto 0 0 0; height: 70%;
  background: radial-gradient(60% 70% at 50% 100%, rgba(171,139,101,.22), transparent 70%);
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero h1 { max-width: 19ch; font-weight: 400; }
.hero .lede { color: var(--on-dark-muted); }

.shelf { position: relative; z-index: 1; margin-top: clamp(1.5rem, 4vw, 3rem); }
.shelf-row {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter);
  max-width: calc(var(--max) + 80px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(.25rem, 1vw, 1rem);
  border-bottom: 3px solid var(--brass);
  box-shadow: 0 18px 30px -12px rgba(0,0,0,.45);
}
.shelf-row li { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.shelf-row a { position: relative; display: block; text-decoration: none; outline-offset: 6px; }
.shelf-row img {
  height: clamp(190px, 12vw + 120px, 330px); width: auto; max-width: none;
  transform-origin: 50% 100%;
  transition: transform .25s ease;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.35));
}
.shelf-row a:hover img, .shelf-row a:focus-visible img { transform: translateY(-10px); }
.shelf-label {
  position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%);
  width: max-content; max-width: 14rem; text-align: center;
  background: var(--paper); color: var(--ink); padding: .5rem .75rem; border-radius: 2px;
  font: 500 .875rem/1.3 var(--sans);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.shelf-label small { display: block; color: var(--muted); font-weight: 400; }
.shelf-row a:hover .shelf-label, .shelf-row a:focus-visible .shelf-label { opacity: 1; }
.shelf-row li:first-child .shelf-label { left: 0; transform: none; }
.shelf-row li:last-child .shelf-label { left: auto; right: 0; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .shelf-row img { animation: place .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
  @keyframes place { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 760px) {
  .shelf-row { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.25rem; padding-top: 4.5rem; margin-top: -4.5rem; scrollbar-width: none; }
  .shelf-row::-webkit-scrollbar { display: none; }
  .shelf-row li { flex: 0 0 auto; scroll-snap-align: center; }
  .shelf-row img { height: 230px; }
  .shelf-label { display: none; }
}

/* Section heads */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* Producer list */
.producer-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.producer { border-bottom: 1px solid var(--line); }
.producer-link {
  display: grid; align-items: center; gap: .25rem 2rem;
  grid-template-columns: 120px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  grid-template-areas: "logo name bottles count" "logo region bottles count";
  padding: 1.25rem 0; text-decoration: none;
}
.producer-logo {
  grid-area: logo; display: grid; place-items: center;
  background: #fff; aspect-ratio: 5 / 4; border: 1px solid var(--line);
}
.producer-logo img { width: 86%; }
.producer-name { grid-area: name; align-self: end; font: 500 var(--s2)/1.1 var(--serif); }
.producer-region { grid-area: region; align-self: start; color: var(--muted); }
.producer-bottles { grid-area: bottles; display: flex; align-items: flex-end; gap: 4px; height: 96px; justify-self: end; }
.producer-bottles img { height: 96px; width: auto; transition: transform .2s; }
.producer-count { grid-area: count; color: var(--brass-ink); font-weight: 500; min-width: 4.5rem; text-align: right; }
.producer-link:hover .producer-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.producer-link:hover .producer-bottles img { transform: translateY(-4px); }
@media (max-width: 760px) {
  .producer-link { grid-template-columns: 88px 1fr; grid-template-areas: "logo name" "logo region" "logo count"; gap: .1rem 1rem; }
  .producer-bottles { display: none; }
  .producer-name { font-size: var(--s1); }
  .producer-region { font-size: .9375rem; }
  .producer-count { text-align: left; font-size: .9375rem; }
}

/* Split section */
.split { background: var(--limestone); }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split-media { margin: 0; }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 760px) { .split-grid { grid-template-columns: 1fr; } }

/* Contact strip */
.contact-strip-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 3rem; align-items: center; }
.contact-strip h2 { margin: 0; font-size: var(--s2); }
.contact-strip p { margin: 0; color: var(--muted); }
.contact-strip p a { color: var(--ink); }
@media (max-width: 860px) { .contact-strip-grid { grid-template-columns: 1fr; justify-items: start; } }

/* Page heads */
.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(1rem, 2vw, 2rem); }
.page-head h1 { margin-bottom: .3em; }
.crumb { margin: 0 0 .75rem; font-size: .9375rem; }
.crumb a { color: var(--brass-ink); text-underline-offset: .2em; }

/* Winery page */
.winery-head { background: var(--vranec); color: var(--on-dark); padding-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.winery-head .crumb a { color: var(--brass); }
.winery-head-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: center; padding-bottom: 2.5rem; }
.producer-logo-lg { border: 0; grid-area: auto; }
.winery-head h1 { margin: 0 0 .2em; font-weight: 400; }
.winery-meta { color: var(--on-dark-muted); margin: 0; }
.wine-index { display: flex; flex-wrap: wrap; gap: 0 2rem; border-top: 1px solid rgba(243,238,241,.18); padding-block: 1rem; }
.wine-index a { color: var(--on-dark-muted); text-decoration: none; font-size: .9375rem; padding: .35rem 0; }
.wine-index a:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 600px) { .winery-head-grid { grid-template-columns: 110px 1fr; } .winery-head h1 { font-size: var(--s3); } }

.wine { padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-bottom: 1px solid var(--line); }
.wine:nth-child(even) { background: var(--limestone); }
.wine-grid { display: grid; grid-template-columns: minmax(150px, 280px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.wine-bottle { margin: 0; position: sticky; top: calc(var(--header-h) + 2rem); display: flex; justify-content: center; }
.wine-bottle img { max-height: min(560px, 70vh); width: auto; filter: drop-shadow(0 14px 14px rgba(35,32,42,.22)); }
.wine-body h2 { font-size: var(--s4); font-weight: 400; max-width: 18ch; margin-bottom: 1.5rem; }
.wine-body h3 { font-family: var(--sans); font-size: var(--s0); font-weight: 600; margin: 2rem 0 .4rem; }
.note { font-family: var(--serif); font-size: var(--s1); line-height: 1.6; max-width: 60ch; }
.wine-actions { margin-top: 2rem; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.facts > div { padding: .8rem 1rem .9rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: .1rem 0 0; font-weight: 500; }
.facts > div:first-child { grid-column: 1 / -1; }
.facts > div:first-child dd { font-family: var(--serif); font-size: var(--s1); font-weight: 500; }
.facts-list { grid-template-columns: 1fr; }
.facts-list > div:first-child dd { font-family: var(--sans); font-size: var(--s0); }
@media (max-width: 760px) {
  .wine-grid { grid-template-columns: 1fr; }
  .wine-bottle { position: static; }
  .wine-bottle img { max-height: 360px; }
  .wine-body h2 { font-size: var(--s3); }
  .facts { grid-template-columns: 1fr 1fr; }
}

.next-winery { background: var(--vranec-deep); }
.next-winery a { display: block; text-decoration: none; color: var(--on-dark); }
.next-winery span { color: var(--on-dark-muted); display: block; margin-bottom: .3rem; }
.next-winery strong { font: 400 var(--s4)/1.1 var(--serif); }
.next-winery a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }

/* About */
.about-film { position: relative; min-height: min(78vh, 720px); display: grid; align-items: center; background: #e9e8e6; overflow: hidden; }
.about-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.about-film-text { position: relative; display: grid; justify-items: end; }
.about-film-text > * { width: min(100%, 30rem); }
.about-film-text h1 { color: var(--vranec); font-weight: 400; }
.about-film-text p { font-size: var(--s1); line-height: 1.5; }
@media (max-width: 760px) {
  .about-film { min-height: 0; display: block; }
  .about-video { position: static; height: 240px; object-position: 25% 50%; }
  .about-film-text { justify-items: start; padding-block: 2.5rem 1rem; }
}

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.figures { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); align-self: start; }
.figures > div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.figures dt { color: var(--muted); font-size: .9375rem; }
.figures dd { margin: 0; font: 400 var(--s3)/1.15 var(--serif); color: var(--vranec); }
.wide-photo { margin: 0; }
.wide-photo img { width: 100%; height: clamp(260px, 40vw, 520px); object-fit: cover; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* Two columns (contact, tender) */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.two-col h2 { font-size: var(--s2); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Forms */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .9375rem; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  padding: .75rem .85rem; border: 1px solid #b9b5b1; border-radius: 2px; background: #fff; width: 100%;
}
.form input[type="file"] { padding: .55rem; background: var(--paper); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
.form .btn { justify-self: start; }
.form-status { margin: 0; padding: .8rem 1rem; background: var(--limestone); border-left: 3px solid var(--brass); }

/* Tenders */
.empty { border-top: 1px solid var(--ink); padding-top: 1.5rem; max-width: 40rem; }
.empty h2 { font-size: var(--s2); }
.tender-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.tender { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: .5rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.tender-title { font: 500 var(--s1) var(--serif); }
.tender-meta { color: var(--muted); }
.tender-deadline { color: var(--brass-ink); font-weight: 500; }
@media (max-width: 760px) { .tender { grid-template-columns: 1fr; gap: .2rem; } }

/* Map */
.map iframe { width: 100%; height: 380px; border: 0; filter: grayscale(.85) contrast(.95); }
.map-link { padding-block: .75rem 2rem; font-size: .9375rem; }
.map-link a { color: var(--brass-ink); }

/* 404 */
.notfound { position: relative; min-height: 70vh; display: grid; align-items: center; background: #fff; overflow: hidden; }
.notfound-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .9; }
.notfound-text { position: relative; }
.notfound-text h1 { color: var(--vranec); max-width: 12ch; font-weight: 400; }
.notfound-text .btn { margin: 0 .5rem .5rem 0; }

/* Footer */
.site-footer { background: var(--vranec-deep); color: var(--on-dark-muted); font-size: .9375rem; padding-top: 3.5rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; line-height: 1.9; }
.footer-brand img { width: 130px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; border-top: 1px solid rgba(243,238,241,.14); padding-block: 1.25rem 1.5rem; font-size: .875rem; }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Age gate */
.agegate { border: 0; padding: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; }
.agegate::backdrop { background: rgba(37,11,30,.82); backdrop-filter: blur(6px); }
.agegate-inner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(calc(100% - 2rem), 30rem); padding: clamp(1.75rem, 5vw, 3rem);
  background: var(--vranec); color: var(--on-dark); border-top: 3px solid var(--brass);
  text-align: center;
}
.agegate-inner img { width: 120px; margin: 0 auto 1.5rem; }
.agegate h2 { font-size: var(--s3); font-weight: 400; }
.agegate p { color: var(--on-dark-muted); margin-inline: auto; }
.agegate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.agegate-denied { margin-top: 1.25rem; color: #fff !important; }
@media (prefers-reduced-motion: no-preference) {
  .agegate[open] .agegate-inner { animation: rise .35s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translate(-50%, -46%); } }
}
a[href^="tel:"] { white-space: nowrap; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
