/* Calafia Cellars — site styles.
   White page, black text. Accents: the label red and the gold (#FCCC51) carried over from the previous site. Type: Lato. */

@font-face { font-family: Lato; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/lato-400.woff2) format("woff2"); }
@font-face { font-family: Lato; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/lato-400-italic.woff2) format("woff2"); }
@font-face { font-family: Lato; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/lato-700.woff2) format("woff2"); }
@font-face { font-family: Lato; font-style: italic; font-weight: 700; font-display: swap; src: url(/assets/fonts/lato-700-italic.woff2) format("woff2"); }
@font-face { font-family: Lato; font-style: normal; font-weight: 900; font-display: swap; src: url(/assets/fonts/lato-900.woff2) format("woff2"); }

:root {
  --bg: #fff;
  --text: #111;
  --muted: #5c5c5c;
  --line: #d9d9d9;
  --line-soft: #e9e9e9;
  --red: #a8141c;
  --red-hover: #7d0d14;
  --gold: #fccc51;
  --gold-hover: #f5bd2a;
  --gold-soft: #fff4d1;
  --field: #fff;
  --max: 960px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 Lato, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 0.18em; }
a:hover { color: var(--red-hover); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.hl, a.hl { color: var(--red); }
a.hl:hover { color: var(--red-hover); }

.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--gold); color: #111; padding: 10px 14px; border-radius: 6px; font-weight: 700; }

/* ---------- header ---------- */
.site-header { max-width: var(--max); margin: 0 auto; padding: clamp(8px, 2vw, 20px) clamp(8px, 2vw, 16px) 0; }
.banner { display: block; border-radius: var(--radius); overflow: hidden; background: #eee; }
.banner img { display: block; width: 100%; height: auto; }

.site-nav { margin: 8px 0 0; padding-bottom: 8px; border-bottom: 3px solid var(--gold); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.site-nav a {
  display: block; padding: 11px clamp(10px, 1.9vw, 22px); border-radius: 8px;
  color: var(--text); font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--gold-soft); color: var(--red); }
.site-nav a[aria-current="page"] { background: var(--gold); color: #111; }
.nav-toggle { display: none; }

@media (max-width: 719px) {
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    min-height: 48px; padding: 10px 16px; border: 1px solid #bbb; border-radius: 8px;
    background: #fff; color: var(--text); font: 700 1rem/1 Lato, sans-serif; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--red); border-radius: 2px; content: ""; position: relative;
  }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .site-nav ul { display: none; flex-direction: column; gap: 0; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
  .site-nav.open ul { display: flex; }
  .site-nav li + li { border-top: 1px solid var(--line-soft); }
  .site-nav a { padding: 14px 18px; border-radius: 0; font-size: 1.0625rem; }
}

/* ---------- main ---------- */
.panel { max-width: var(--max); margin: 0 auto; padding: clamp(20px, 4vw, 44px) var(--gutter) clamp(32px, 5vw, 56px); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; }
h1 { color: var(--red); font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 700; margin-bottom: 1em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 400; text-decoration: underline; text-underline-offset: 0.2em; margin: 1.2em 0 0.4em; }
p, ul, ol, dl { margin: 0 0 1em; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.8em; }
.prose > h2:first-child { margin-top: 0; }

.btn {
  display: inline-block; padding: 12px 24px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--gold); color: #111; font: 700 1.0625rem/1.2 Lato, sans-serif; text-decoration: none;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--gold-hover); color: #111; }

/* ---------- home ---------- */
.home-intro { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.home-bottle img { display: block; width: 100%; max-width: 118px; margin: 0 auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.22)); }
@media (max-width: 599px) {
  .home-intro { grid-template-columns: 1fr; }
  .home-bottle img { max-width: 92px; }
}

/* ---------- wines ---------- */
.wine { display: grid; grid-template-columns: 1fr minmax(90px, 150px); gap: clamp(20px, 5vw, 56px); align-items: start; padding: 0 0 2.5rem; margin: 0 0 2.5rem; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.wine:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.wine-text { grid-column: 1; grid-row: 1; max-width: 68ch; }
.wine-bottle { grid-column: 2; grid-row: 1; text-align: center; }
.wine-bottle img { max-height: 440px; width: auto; max-width: 100%; filter: drop-shadow(0 10px 14px rgba(0,0,0,.22)); }
.wine-bottle--missing img { opacity: .35; filter: none; margin-top: 3rem; }
.specs { display: grid; gap: 4px 0; margin: 1.4em 0; }
.specs > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 0 12px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
@media (max-width: 599px) {
  .wine { grid-template-columns: 1fr; }
  .wine-text, .wine-bottle { grid-column: 1; grid-row: auto; }
  .wine-bottle { order: -1; }
  .wine-bottle img { max-height: 260px; }
  .wine-bottle--missing { display: none; }
}

/* ---------- club ---------- */
.letter { max-width: 72ch; }
.letter-from { color: var(--muted); }
.letter-griffin { float: left; width: 210px; margin: 4px 28px 12px 0; }
.letter::after { content: ""; display: block; clear: both; }
@media (max-width: 599px) { .letter-griffin { float: none; display: block; width: 180px; margin: 0 auto 16px; } }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 1.5rem 0 2rem; }
.tier { padding: 20px 20px 8px; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); background: #fff; }
.tier h3 { font-size: 1.1rem; }
.tier ul { padding-left: 1.15em; }
.tier li { margin-bottom: 0.35em; }
ul.plain { list-style: none; padding-left: 0; }
ul.plain.indent { padding-left: 1em; }

/* ---------- photos ---------- */
.gallery { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: 14px; }
.gallery li { break-inside: avoid; margin: 0 0 14px; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; background: #eee; }
.gallery img { display: block; width: 100%; height: auto; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 6px 2px 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }

/* the photo viewer stays dark so the pictures stand out */
.lightbox { border: 0; padding: 0; background: transparent; color: #f3f1ec; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,10,.93); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { display: block; max-width: min(94vw, 1500px); max-height: 80vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { min-height: 1.6em; padding: 12px 16px 0; }
.lightbox button { position: fixed; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(60,60,60,.85); color: #fff; font: 400 30px/1 Arial, sans-serif; cursor: pointer; }
.lightbox button:hover { background: var(--gold); color: #111; }
.lightbox :focus-visible { outline-color: var(--gold); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: calc(50% - 24px); }
.lb-next { right: 12px; top: calc(50% - 24px); }

/* ---------- about / contact ---------- */
.about-portrait { float: right; width: 200px; margin: 4px 0 16px 28px; border-radius: 6px; }
@media (max-width: 499px) { .about-portrait { float: none; display: block; margin: 0 0 16px; } }
.contact-blocks { display: flex; flex-wrap: wrap; gap: 8px 56px; margin-bottom: 1.5rem; }
.contact-blocks p { margin-bottom: 1em; }

/* ---------- order form ---------- */
.order-form fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 1.75rem 0 0.75rem; min-width: 0; }
.order-form legend { padding: 0 12px 0 0; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.hint { color: var(--muted); font-size: 0.9375rem; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 1rem; }
.field { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field.narrow { grid-column: span 3; }
@media (min-width: 600px) { .field.narrow { grid-column: span 1; } .field.narrow + .field.narrow { grid-column: span 2; } }
@media (max-width: 599px) { .field { grid-column: 1 / -1; } .field.narrow { grid-column: span 3; } }
label { font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #8a8a8a; border-radius: 6px;
  background: var(--field); color: var(--text); font: 400 1rem/1.4 Lato, sans-serif;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
::placeholder { color: #767676; opacity: 1; }
.table-wrap { overflow-x: auto; margin: 0.5rem 0 1rem; }
.order-table { width: 100%; border-collapse: collapse; }
.order-table th, .order-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.order-table thead th { color: var(--text); font-weight: 700; border-bottom-color: var(--line); }
.order-table tbody th { font-weight: 400; }
.order-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-table .qty { width: 5.5em; padding-right: 0; }
.order-table .qty input { width: 5.5em; text-align: center; }
.order-table .note { color: var(--red); white-space: nowrap; margin-left: 0.5em; }
@media (max-width: 479px) { .order-table .note { display: block; margin-left: 0; } .order-table th, .order-table td { padding-right: 8px; } }
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 16px; margin: 0.5rem 0 1.25rem; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { padding: 12px 16px; border: 1px solid var(--gold-hover); border-left-width: 5px; border-radius: 8px; background: var(--gold-soft); }
.form-status.error { border-color: var(--red); background: #fdecec; }

/* ---------- footer ---------- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 40px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.9375rem; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-nav, .skip, .btn, .lightbox { display: none !important; }
  h1, a, .hl { color: #000 !important; }
}
