/* ============================================================
   DRINK HERITAGE — shared design system
   Built strictly from the website design specification.
   Six colours. Two typefaces. An 8px rhythm. Generous quiet.
   ============================================================ */

:root {
  /* ---- Colour (§1.3) — six colours, used with discipline ---- */
  --bone:        #F4EFE6;  /* primary surface */
  --ink:         #1A1714;  /* primary ink */
  --green:       #1F3B2D;  /* Heritage Green — atmosphere */
  --clay:        #B95E3D;  /* single accent */
  --clay-dark:   #A14F32;  /* primary button hover */
  --ochre:       #C49642;  /* sparing — awards / limited tags */
  --grey:        #6B6258;  /* secondary text */
  --hair-light:  #E2DCD0;  /* hairline on bone */
  --hair-dark:   rgba(244,239,230,0.16); /* hairline on green */
  --input-border:#C7BFB1;
  --bone-dim:    rgba(244,239,230,0.72);

  /* ---- Spacing (§1.5) — 8px base ---- */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 40px;
  --s5: 64px; --s6: 96px; --s7: 144px; --s8: 200px;
  --container: 1320px;
  --measure: 680px;     /* long-form text column */
  --measure-sm: 560px;  /* hero / intro column */

  /* ---- Section padding ---- */
  --section-y: clamp(80px, 11vw, 144px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ---- Type families ---- */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---- Type scale (§1.4) — fluid between mobile & desktop ---- */
:root {
  --t-display-xl: clamp(44px, 6.6vw, 88px);
  --t-display-l:  clamp(36px, 5vw, 64px);
  --t-h1:         clamp(32px, 4vw, 48px);
  --t-h2:         clamp(26px, 3vw, 36px);
  --t-h3:         clamp(20px, 1.6vw, 24px);
  --t-body-l:     clamp(18px, 1.2vw, 20px);
  --t-body:       clamp(16px, 1vw, 17px);
  --t-caption:    clamp(13px, 0.9vw, 14px);
  --t-eyebrow:    12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   TYPOGRAPHY PRIMITIVES
   ============================================================ */
.display-xl, .display-l, h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
.display-xl { font-size: var(--t-display-xl); line-height: 1.02; }
.display-l  { font-size: var(--t-display-l);  line-height: 1.05; }
h1          { font-size: var(--t-h1); line-height: 1.1; }
h2          { font-size: var(--t-h2); line-height: 1.15; }

h3 {
  font-family: var(--body);
  font-weight: 500;
  font-size: var(--t-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.body-l { font-size: var(--t-body-l); line-height: 1.55; }
.body   { font-size: var(--t-body);   line-height: 1.6; }

.caption {
  font-size: var(--t-caption);
  font-weight: 500;
  line-height: 1.4;
  color: var(--grey);
}

.eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin: 0;
  display: block;
}
.eyebrow--ochre { color: var(--ochre); }

.measure    { max-width: var(--measure); }
.measure-sm { max-width: var(--measure-sm); }

/* On-green type sits in Bone, never white (§1.3 / §9) */
.on-green { background: var(--green); color: var(--bone); }
.on-green h1, .on-green h2, .on-green h3, .on-green .display-xl, .on-green .display-l { color: var(--bone); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 64px);
}
.section { padding-block: var(--section-y); }

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--ink); color: var(--bone);
  padding: 12px 16px; z-index: 200;
  font-size: 14px; transition: top 150ms var(--ease);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   LINKS (§2.5)
   ============================================================ */
a { color: inherit; }

.link {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--clay), var(--clay));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 2px;
  transition: background-size 150ms var(--ease);
}
.link:hover { background-size: 100% 2px; }
.on-green .link, .link--bone { color: var(--bone); }

/* Text CTA — name the action, chevron after (§1.7 / §2.3) */
.cta-text {
  font-family: var(--body);
  font-weight: 500;
  font-size: var(--t-body);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: fit-content;
}
.cta-text .chev {
  color: var(--clay);
  transition: transform 200ms var(--ease);
}
.cta-text:hover .chev { transform: translateX(4px); }
.cta-text .label {
  background-image: linear-gradient(var(--clay), var(--clay));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 2px;
  transition: background-size 150ms var(--ease);
}
.cta-text:hover .label { background-size: 100% 1px; }
.on-green .cta-text, .cta-text--bone { color: var(--bone); }

/* ============================================================
   BUTTONS (§2.3) — square corners, no radius
   ============================================================ */
.btn {
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  padding: 16px 28px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 200ms ease-out, color 200ms ease-out;
  width: fit-content;
}
.btn .chev { transition: transform 200ms var(--ease); }
.btn:hover .chev { transform: translateX(4px); }

.btn--primary { background: var(--clay); color: var(--bone); }
.btn--primary:hover { background: var(--clay-dark); }
.btn--primary:disabled { opacity: 0.4; cursor: default; }
.btn--primary:disabled:hover { background: var(--clay); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--bone); }

.on-green .btn--secondary { color: var(--bone); border-color: var(--bone); }
.on-green .btn--secondary:hover { background: var(--bone); color: var(--green); }

/* ============================================================
   PHOTOGRAPHY (§1.6) — one unifying treatment
   slight desaturation, warm shift, lifted blacks
   ============================================================ */
image-slot {
  display: block;
  background: #E7E0D4;
  --slot-label: var(--grey);
}
image-slot::part(placeholder) { color: var(--grey); }
.photo, image-slot img {
  filter: saturate(0.88) contrast(0.96) brightness(1.02) sepia(0.08);
}
/* Empty-slot styling: a quiet toned frame with a hairline */
.slot {
  position: relative;
  background: #E7E0D4;
  outline: 1px solid var(--hair-light);
  outline-offset: -1px;
}
.slot--ratio-45 { aspect-ratio: 4 / 5; }
.slot--ratio-169 { aspect-ratio: 16 / 9; }
.slot--ratio-11 { aspect-ratio: 1 / 1; }

/* ============================================================
   FOCUS STATES (§9)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* ============================================================
   FADE-IN ON VIEWPORT ENTRY (§1.8) — opacity only, once
   ============================================================ */
.reveal { opacity: 0; transition: opacity 400ms var(--ease); }
.reveal.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transition: none !important; }
  .cta-text .chev, .btn .chev, .link, .cta-text .label { transition: none !important; }
  html { scroll-behavior: auto; }
}

html { scroll-behavior: smooth; }

/* ============================================================
   HEADER (§2.1)
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--bone);
  border-bottom: 1px solid var(--hair-light);
  transition: box-shadow 200ms var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(26,23,20,0.06); }
.site-header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-logo { display: inline-flex; align-items: center; }
.site-logo img { height: 40px; width: auto; display: block; }
.site-logo--overlay { position: absolute; top: 20px; left: clamp(24px, 8vw, 64px); }
.site-logo--overlay img { height: 34px; }
.footer-logo { display: inline-block; margin-bottom: 20px; }
.footer-logo img { height: 56px; width: auto; display: block; }
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
}
.nav a[aria-current="page"] {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px;
}
.nav a.nav__contact {
  background-image: linear-gradient(var(--clay), var(--clay));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px;
  text-underline-offset: 4px;
}
.nav__menu-btn, .nav__close-btn {
  display: none;
  background: none; border: 0; cursor: pointer;
  font-family: var(--body); font-weight: 500; font-size: 15px; color: var(--ink);
  padding: 0;
}

/* Mobile overlay */
.nav-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: var(--green);
  display: none;
  flex-direction: column;
  padding: 72px 0 0 clamp(24px, 8vw, 64px);
}
.nav-overlay.is-open { display: flex; }
.nav-overlay a {
  font-family: var(--display);
  font-weight: 400;
  font-size: 36px;
  color: var(--bone);
  text-decoration: none;
  padding: 12px 0;
}
.nav-overlay .nav__close-btn { display: block; color: var(--bone); position: absolute; top: 26px; right: clamp(24px,5vw,64px); }

@media (max-width: 768px) {
  .nav { display: none; }
  .nav__menu-btn { display: block; }
}

/* Spacer so fixed header doesn't cover content */
.header-pad { height: 72px; }

/* ============================================================
   FOOTER (§2.2)
   ============================================================ */
.site-footer {
  background: var(--green);
  color: var(--bone);
  padding-top: clamp(72px, 9vw, 120px);
  padding-bottom: clamp(56px, 6vw, 80px);
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
}
.site-footer .wordmark { color: var(--bone); font-size: 32px; display: block; margin-bottom: 16px; }
.site-footer__brand p { font-size: 16px; color: var(--bone-dim); max-width: 320px; line-height: 1.6; }
.footer-col__title {
  font-size: var(--t-caption); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--bone-dim); margin-bottom: 20px;
}
.footer-nav { display: flex; flex-direction: column; gap: 16px; }
.footer-nav a { font-weight: 500; font-size: 15px; color: var(--bone); text-decoration: none; width: fit-content; }
.footer-nav a:hover { color: var(--bone-dim); }
.footer-contact { display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: var(--bone-dim); }
.footer-contact a { color: var(--bone-dim); text-decoration: none; }
.footer-hair { height: 1px; background: var(--hair-dark); margin: clamp(40px,5vw,64px) 0 24px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--bone-dim); gap: 24px; flex-wrap: wrap;
}
.footer-social { display: flex; gap: 24px; }
.footer-social a { font-weight: 500; color: var(--bone); text-decoration: none; }

@media (max-width: 768px) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   PAGE HERO (interior pages) — two column
   ============================================================ */
.page-hero {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.page-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.page-hero__grid--60-40 { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 900px) {
  .page-hero__grid--60-40 { grid-template-columns: 1fr; }
}

/* ============================================================
   GRIDS & UTILITIES
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.stack-1 > * + * { margin-top: 8px; }
.stack-2 > * + * { margin-top: 16px; }
.stack-3 > * + * { margin-top: 24px; }
.stack-4 > * + * { margin-top: 40px; }
.stack-5 > * + * { margin-top: 64px; }

.flow-body > * + * { margin-top: 24px; }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

@media (max-width: 640px) {
  .cta-row .btn { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
}
