/* Sovereign Wines — classic edition
   A faithful rebuild of the original sovereignwines.co.za design,
   re-engineered for modern browsers, phones and accessibility. */

:root {
  --ink-dark: #222222;          /* header + footer band */
  --ink-darker: #1a1a1a;
  --gold: #a38f5e;              /* original brand gold: headings, large text */
  --gold-text: #806b3a;         /* body copy: same hue, deepened to pass AA on white */
  --gold-nav: #bca977;          /* nav labels on the dark band */
  --olive: #5c5833;             /* links (original #666239, nudged for contrast) */
  --wine: #a42929;              /* tagline red */
  --rule: #cecdc5;
  --rule-dot: #b0afa2;
  --footer-rule: #93876a;
  --footer-text: #a19e97;
  --paper: #ffffff;
  --bottle-shadow: rgba(0, 0, 0, 0.35);

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --quote-font: Georgia, "Times New Roman", Times, serif;

  --content: 800px;
  --frame: 960px;
  --header-h: 160px;
  --banner-h: 300px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--gold-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: #e9dfc4; color: #3d331a; }

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

a { color: var(--olive); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--wine); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--gold); color: #fff; padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
}
.site-header.menu-open { z-index: 40; }
.site-header {
  height: var(--header-h);
  background: var(--ink-dark);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55);
}

.site-header .frame {
  max-width: var(--frame);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
}

.nav-group {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-group--left { justify-content: flex-end; padding-right: 22px; }
.nav-group--right { justify-content: flex-start; padding-left: 22px; }

.nav-group a, .mobile-nav a {
  color: var(--gold-nav);
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  position: relative;
  padding: 6px 0;
}
.nav-group a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: center;
  transition: transform .35s var(--ease);
}
.nav-group a:hover { color: #e1d2a6; }
.nav-group a:hover::after,
.nav-group a[aria-current="page"]::after { transform: scaleX(1); }
.nav-group a[aria-current="page"] { color: #e1d2a6; }

.brand {
  display: block;
  width: 268px;
  align-self: start;
  margin-top: 3px;
}
.brand img { width: 268px; height: auto; }
.brand:hover { opacity: 0.92; }

.menu-toggle { display: none; }
.mobile-nav { display: none; }

/* ---------- Banner ---------- */

.banner {
  position: relative;
  height: var(--banner-h);
  background: #f3f1dc;
}
.banner-slides { position: absolute; inset: 0; overflow: hidden; }
.banner-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.banner-slide.is-active { opacity: 1; }

.bottle-frame {
  position: relative;
  z-index: 25; /* bottles sit over the header strip, as on the original */
  max-width: var(--frame);
  height: 100%;
  margin: 0 auto;
  pointer-events: none;
}
.bottles {
  position: absolute;
  left: 50px;
  top: -40px;
  width: 210px;
  height: 427px;
}
.bottles img {
  position: absolute; inset: 0;
  width: 210px; height: 427px;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.bottles img.is-active { opacity: 1; transition-delay: 0.7s; }

.slider-dots {
  position: absolute; right: 14px; bottom: 6px; z-index: 3;
  display: flex; gap: 0;
}
.slider-dots button {
  width: 30px; height: 30px; padding: 0; border: 0; background: none;
  cursor: pointer; display: grid; place-items: center;
}
.slider-dots button::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background .25s ease, transform .25s ease;
}
.slider-dots button:hover::before { transform: scale(1.2); }
.slider-dots button[aria-current="true"]::before { background: #fff; }

/* ---------- Content ---------- */

main { flex: 1; }

.content {
  width: 100%;
  max-width: calc(var(--content) + 32px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

h1, h2, h3 { color: var(--gold); line-height: 1.2; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 700; margin: 6px 0 22px; letter-spacing: -0.01em; }
h2 { font-size: 19px; font-weight: 400; margin: 34px 0 10px; }
h2:first-child { margin-top: 0; }
h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }

p { margin: 0 0 14px; }
em { color: inherit; }

hr, .rule {
  border: 0;
  border-top: 1px dotted var(--rule-dot);
  margin: 22px 0;
  height: 0;
}

/* Blockquote with the original oversized Georgia marks */
.quote {
  position: relative;
  margin: 0;
  padding: 2px 34px 26px 38px;
  font-size: 18px;
  line-height: 1.32;
  color: var(--gold-text);
}
.quote::before, .quote::after {
  font-family: var(--quote-font);
  font-size: 64px;
  line-height: 1;
  color: var(--gold);
  opacity: 0.55;
  position: absolute;
}
.quote::before { content: "\201C"; left: 0; top: -6px; }
.quote::after { content: "\201D"; right: 0; bottom: -24px; }
.quote p { margin: 0; }
.quote .lead { font-style: italic; font-size: 19px; }
.quote--small { font-size: 16px; line-height: 1.45; }

/* Tagline with globe */
.tagline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin: 56px 0 0 20px;
}
.tagline img { width: 66px; height: auto; flex: none; }
.tagline p {
  margin: 0 0 6px;
  text-wrap: balance;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--wine);
}

/* ---------- Home ---------- */

  content: ""; width: 1px; height: 60px; background: var(--rule); margin: 0 4px;
}

.home-top { padding-bottom: 30px; }
.home-welcome { margin: 18px 0 0 210px; max-width: 590px; }

/* Wine ranges band (home) */
.ranges-band {
  background: #f1eee8;
  border-top: 1px solid #e2ddd1;
  border-bottom: 1px solid #e2ddd1;
  padding: 18px 0 30px;
}
.ranges-band .content { padding-top: 34px; padding-bottom: 24px; }
.ranges-band .range { border-color: #cfc8b6; }
.section-title {
  display: flex; align-items: center; gap: 18px;
  margin: 0 0 26px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.section-title::before, .section-title::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(to right, rgba(163,143,94,0), rgba(163,143,94,0.7));
}
.section-title::after { background: linear-gradient(to left, rgba(163,143,94,0), rgba(163,143,94,0.7)); }
.range-more { margin-top: -4px; }
.range-more a {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(92, 88, 51, 0.35); padding-bottom: 2px;
}
.range-more a:hover { border-bottom-color: currentColor; }

/* Our Wines: every range with every wine */
.range-switch--top { margin: 6px 0 12px; }
.range-section { scroll-margin-top: 16px; padding-top: 6px; }
.range-section + .range-section { margin-top: 10px; }
.range-section .range { border-bottom: 0; padding-bottom: 6px; }
.range-section .range-logo { margin-top: 12px; }
.wine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px dotted var(--rule-dot);
}
.wine-card { border-top: 1px dotted var(--rule-dot); padding: 16px 0 6px; }
.wine-card h3 { font-size: 17px; margin: 0 0 8px; }
.wine-card p { margin: 0 0 8px; font-size: 14.5px; }

/* ---------- Our wines listing ---------- */

.page-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px;
  align-items: start;
  margin-bottom: 8px;
}
.page-intro h1 { margin: 6px 0 0; }

.range-list { list-style: none; margin: 0; padding: 0; }
.range {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  padding: 14px 0 22px;
  border-bottom: 1px dotted var(--rule-dot);
}
.range:first-child { border-top: 1px dotted var(--rule-dot); }
.range-bottles { display: flex; justify-content: center; }
.range-bottles img { width: 125px; filter: drop-shadow(0 6px 6px rgba(0,0,0,0.12)); transition: transform .4s var(--ease); }
.range-bottles a:hover img { transform: translateY(-4px); }
.range-logo { display: inline-block; margin: 8px 0 14px; }
.range-logo img { height: 70px; width: auto; }
.range-body p { margin: 0 0 12px; }
.range-wines { color: var(--olive); }
.range-wines a { white-space: nowrap; }
.range-wines .sep { color: var(--rule-dot); }

/* ---------- Brand pages ---------- */

.brand-intro { margin: 0 0 18px 240px; }

.wine {
  padding: 2px 0 4px;
}
.wine h2 { font-weight: 700; font-size: 19px; margin: 0 0 12px; }
.wine + .rule { margin: 14px 0 20px; }

.range-switch {
  display: flex;
  justify-content: center;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
}
.range-switch a { display: block; padding: 10px; border-radius: 2px; transition: transform .35s var(--ease), opacity .2s ease; }
.range-switch a:hover { transform: translateY(-2px); }
.range-switch a[aria-current="page"] { opacity: 0.45; }
.range-switch img { height: 70px; width: auto; }
/* Our Wines logo shortcuts: muted grey with thin dividers, like the old site; colour on hover. */
.range-switch--top { gap: 0; }
.range-switch--top li + li { border-left: 1px solid #d9d4c6; }
.range-switch--top a { padding: 6px 28px; }
.range-switch--top img { filter: grayscale(1); opacity: .6; transition: filter .3s ease, opacity .3s ease; }
.range-switch--top a[href="#du-belle"] img { filter: grayscale(1) brightness(.7) contrast(1.3); }
.range-switch--top a:focus-visible img { filter: none; opacity: 1; }
@media (hover: hover) { .range-switch--top a:hover img { filter: none; opacity: 1; } }

/* ---------- Two-column article pages ---------- */

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 0;
}
.article-main { padding-right: 18px; padding-top: 16px; }
.article-aside {
  border-left: 1px solid var(--rule);
  padding-left: 20px;
  padding-top: 6px;
}
.article-aside figure {
  margin: 0 0 15px;
  padding-bottom: 15px;
  border-bottom: 1px dotted var(--rule);
}
.article-aside img { width: 200px; }

.subhead { font-size: 19px; font-weight: 700; margin: 28px 0 12px; }

.map { margin: 8px auto 0; max-width: 537px; }

/* Pairing table */
.table-scroll {
  overflow-x: auto;
  margin: 20px 0 0;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
}
.pairing {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  font-size: 13px;
  line-height: 1.35;
}
.pairing th, .pairing td {
  border: 1px solid var(--rule);
  padding: 7px 6px;
  vertical-align: top;
  text-align: left;
}
.pairing thead th { color: var(--gold); background: #faf8f1; font-weight: 700; }
.pairing tbody th { font-weight: 700; color: var(--gold); background: #faf8f1; width: 70px; }
.pairing tbody tr:hover td { background: #fcfbf6; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 6px;
}
.contact-grid h2 { text-transform: uppercase; font-size: 19px; margin: 18px 0 16px; }
.contact-grid p { margin: 0 0 12px; }
.contact-grid dt { display: inline; font-weight: 700; }
.contact-grid dd { display: inline; margin: 0; }
.contact-grid dd::before { content: ": "; }
.contact-grid .row { margin: 0 0 12px; }
.contact-grid dd a { text-decoration: underline; text-decoration-color: rgba(92, 88, 51, 0.35); text-underline-offset: 3px; }
.contact-grid dd a:hover { text-decoration-color: currentColor; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-dark);
  border-top: 2px solid var(--footer-rule);
  color: var(--footer-text);
  text-align: center;
  font-size: 12px;
  padding: 12px 16px 20px;
  margin-top: 20px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.footer-nav a {
  color: var(--gold-nav);
  text-transform: uppercase;
  font-size: 13.5px;
  padding: 4px 0;
  display: inline-block;
}
.footer-nav a:hover { color: #e1d2a6; }
.site-footer p { margin: 0; }
.site-footer .footer-contact { margin-top: 6px; }
.site-footer .footer-contact a { color: var(--footer-text); display: inline-block; padding: 8px 4px; }
.site-footer .footer-contact a:hover { color: #e1d2a6; }

/* =========================================================
   Responsive: the original was fixed at 960px.
   ========================================================= */

@media (max-width: 1000px) {
  .nav-group { gap: 24px; }
  .nav-group a { font-size: 14.5px; }
  .brand, .brand img { width: 230px; }
}

@media (max-width: 860px) {
  :root { --header-h: 112px; --banner-h: 220px; }

  .site-header .frame { grid-template-columns: 48px 1fr 48px; }
  .nav-group { display: none; }
  .brand { grid-column: 2; justify-self: center; width: 170px; margin-top: 8px; }
  .brand img { width: 170px; }

  .menu-toggle {
    display: inline-flex; grid-column: 3; justify-self: end;
    width: 44px; height: 44px; align-items: center; justify-content: center;
    background: none; border: 0; color: var(--gold-nav); cursor: pointer; padding: 0;
  }
  .menu-toggle svg { width: 26px; height: 26px; }
  .menu-toggle .icon-close { display: none; }
  .menu-open .menu-toggle .icon-open { display: none; }
  .menu-open .menu-toggle .icon-close { display: block; }

  .mobile-nav {
    display: block;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink-darker);
    border-top: 1px solid #333;
    box-shadow: 0 10px 18px rgba(0,0,0,0.35);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .45s var(--ease), visibility 0s linear .45s;
  }
  .menu-open .mobile-nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .45s var(--ease), visibility 0s;
  }
  .mobile-nav ul { list-style: none; margin: 0; padding: 6px 0 12px; }
  .mobile-nav a {
    display: block; padding: 13px 24px; font-size: 15px;
    border-bottom: 1px solid #2c2c2c;
  }
  .mobile-nav li:last-child a { border-bottom: 0; }
  .mobile-nav a[aria-current="page"] { color: #e1d2a6; }

  .bottles { left: 8px; top: -18px; width: 124px; height: 252px; }
  .bottles img { width: 124px; height: 252px; }
  .home-welcome { margin: 28px 0 0; max-width: none; }
  .wine-grid { grid-template-columns: 1fr; }
  .footer-nav a { padding: 10px 0; }


  .brand-intro { margin: 0 0 14px; }

  .page-intro { grid-template-columns: 1fr; }
  .page-intro h1 { margin-bottom: 14px; }

  .article { grid-template-columns: minmax(0, 1fr); }
  .article-main { padding-right: 0; }
  .article-aside {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 16px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
  }
  .article-aside figure { margin: 0; padding: 0; border: 0; }
  .article-aside img { width: 100%; height: 120px; object-fit: cover; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  h1 { font-size: 26px; }
  .quote { font-size: 16.5px; padding: 0 22px 26px 30px; }
  .quote::before, .quote::after { font-size: 50px; }

  .home-top { padding-bottom: 18px; }

  .range { grid-template-columns: 96px 1fr; gap: 12px; }
  .range-bottles img { width: 92px; }
  .range-logo img { height: 56px; }

  .range-switch { gap: 4px; }
  .range-switch img { height: 52px; }
  .range-switch--top a { padding: 4px 12px; }
  .range-switch--top img { height: 44px; }

  .contact-grid { grid-template-columns: 1fr; gap: 0; }

  .tagline { margin-left: 0; }
  .tagline img { width: 56px; }
  .tagline p { font-size: 12px; }

  .footer-nav { gap: 2px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* =========================================================
   Motion: curtain load + scroll reveals
   ========================================================= */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }


@media (prefers-reduced-motion: reduce) {
  .curtain { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Bottles rise into place as the curtain lifts */
.js .bottles { animation: bottles-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }
.curtain-off .bottles { animation-delay: 0.05s; }
@keyframes bottles-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .js .bottles { animation: none; } }

/* Feedback round tidy-ups */
.ranges-band .range:first-child { border-top: 0; }
.ranges-band .range:last-child { border-bottom: 0; }
.wine-grid { border-bottom: 0; padding-bottom: 6px; }
.range-section + .range-section { border-top: 1px dotted var(--rule-dot); padding-top: 16px; }
.range-bottles { align-items: flex-start; }
.range-bottles img { align-self: flex-start; height: auto; }
@media (max-width: 560px) {
  .range-wines .sep { display: none; }
  .range-wines a { display: block; padding: 3px 0; }
}
.range-section .range { border-top: 0; }

/* Our Wines (client round, 30 Nov): smaller logo shortcuts sitting closer to the intro,
   and Sovereign / Du Belle on the same warm grey as the home Wine Ranges band. */
.range-switch--top { margin: -14px 0 22px; }
.range-switch--top a { padding: 2px 22px; }
.range-switch--top img { height: 46px; }
.range-section--band {
  background: #f1eee8;
  box-shadow: 0 0 0 100vmax #f1eee8;
  clip-path: inset(0 -100vmax);
  border-top: 1px solid #e2ddd1;
  border-bottom: 1px solid #e2ddd1;
  padding-top: 18px;
  padding-bottom: 4px;
}
.range-section + .range-section { border-top: 0; margin-top: 0; padding-top: 18px; }
.range-section--band .wine-card { border-top-color: #cfc8b6; }
.range-section:last-of-type { margin-bottom: 0; }
@media (max-width: 560px) {
  .range-switch--top { margin: 4px 0 18px; }
  .range-switch--top a { padding: 2px 10px; }
  .range-switch--top img { height: 34px; }
}
