/* ============================================================= */
/* Wellspring Beverage Group — styles                            */
/* ============================================================= */
:root {
  --black: #1D1D1D;
  --white: #FFFFFF;
  --gray: #8E8E8E;
  --light-gray: #F3F3F3;
  --dark-teal: #004C3F;
  --mid-dark-teal: #00796A;
  --teal: #009788;
  --mid-light-teal: #4CB6AC;
  --light-teal: #B2DFDC;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 88px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}

img { max-width: 100%; display: block; }

/* ---------- Persistent edge gradient fades ---------- */
.edge-fade {
  position: fixed;
  left: 0; right: 0;
  height: 140px;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.edge-fade--top {
  top: 0;
  background: linear-gradient(to bottom, var(--black) 8%, rgba(29,29,29,0));
}
.edge-fade--bottom {
  bottom: 0;
  background: linear-gradient(to top, var(--black) 8%, rgba(29,29,29,0));
}
body.scrolled .edge-fade { opacity: 1; }

/* ---------- Shared text-section pattern ---------- */
/* Full-bleed sections share the hero's left edge (var(--pad)) so their
   labels line up with the hero lead. */
.text-section,
.structure,
.quotes,
.founder,
.charities {
  max-width: none;
  margin: 0;
  padding: clamp(45px, 8vh, 100px) var(--pad);
}

/* Two-column rail: small label on the left, paragraph beside it. */
.text-section,
.structure {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  column-gap: clamp(24px, 5vw, 90px);
  align-items: start;
}
.structure__grid { grid-column: 1 / -1; }

.text-section__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0;
  padding-top: 0.55em;        /* drop to sit beside the paragraph's first line */
  letter-spacing: .01em;
}
.text-section__label .bullet { color: var(--gray); margin-right: 6px; }
/* Quotes label sits above the carousel (no adjacent paragraph). */
.quotes .text-section__label {
  padding-top: 0;
  margin-bottom: clamp(30px, 5vh, 56px);
}

.big-text {
  font-size: clamp(30px, 4.4vw, 45px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--gray);
  margin: 0;
}
.text-section__body { color: var(--gray); }
.big-text .hl,
.hl { color: var(--white); }

.text-section .big-text { margin-left: 0; max-width: none; }

/* ============================================================= */
/* HERO LOADER (beats 1-2)                                       */
/* ============================================================= */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__percent {
  position: absolute;
  left: var(--pad);
  bottom: clamp(28px, 8vh, 80px);
  font-size: clamp(64px, 13vw, 190px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  z-index: 3;
  transition: opacity .8s ease, transform .8s ease;
}
.hero__percent-sign { font-weight: 500; }
.hero.is-loaded .hero__percent {
  opacity: 0;
  transform: translateY(20px);
}

.hero__headline {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(40px, 11vh, 120px);
  z-index: 4;
  font-size: clamp(34px, 7vw, 104px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.03em;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero.is-loaded .hero__headline { opacity: 1; }
.hero__lead { color: var(--gray); display: block; }
.hero__rotator { color: var(--white); display: block; min-height: 1.1em; }

.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity .5s ease, transform .5s ease;
}
.hero__word.is-in { opacity: 1; transform: translateY(0); }

/* ============================================================= */
/* Scroll reveals                                                */
/* ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================= */
/* STRUCTURE (beat 4)                                            */
/* ============================================================= */
.structure__intro { max-width: none; margin-left: 0; }

.structure__grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.05fr);
  gap: clamp(30px, 6vw, 90px);
  margin-top: clamp(60px, 12vh, 130px);
  align-items: start;
}

/* Text <-> stroke spacing — tunable live via the ?dial accordion dialkit.
   --acc-head-pt : space between an item's top stroke and the head text
   --acc-head-pb : space between the head text and the line below it
   --acc-body-pb : space between the open body text and its bottom stroke */
.accordion {
  --acc-head-pt: 16px;
  --acc-head-pb: 16px;
  --acc-body-pb: 30px;
}

.accordion__item {
  border-top: 1px solid rgba(255,255,255,0.14);
}
.accordion__item:last-child { border-bottom: 1px solid rgba(255,255,255,0.14); }

.accordion__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: 0;
  color: var(--white);
  font-family: inherit;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  padding: var(--acc-head-pt) 4px var(--acc-head-pb);
  cursor: pointer;
  transition: color .25s ease;
}
.accordion__item:not(.is-open) .accordion__head { color: var(--gray); }
.accordion__head:hover { color: var(--white); }

.accordion__body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .45s ease, opacity .45s ease, padding .45s ease;
}
.accordion__item.is-open .accordion__body {
  max-height: 460px;
  opacity: 1;
  padding-bottom: var(--acc-body-pb);
}
.accordion__body p {
  margin: 0;
  color: var(--gray);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.6;
  max-width: 46ch;
}

/* Right-side circle stage */
.structure__stage {
  position: relative;
  height: clamp(420px, 56vh, 620px);
  width: 100%;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  will-change: transform;
  transform: translate(-50%, -50%);
  left: 0; top: 0;
}
.bubble--enter { animation: bubblePop .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes bubblePop {
  0% { transform: translate(-50%, -50%) scale(0); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.bubble--exit { animation: bubbleVanish .35s ease forwards; }
@keyframes bubbleVanish {
  to { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

/* ============================================================= */
/* NUMBERS (beat 5)                                              */
/* ============================================================= */
.numbers {
  position: relative;
  width: 100%;
  padding: 76px 0 clamp(30px, 5vh, 60px);
  overflow: hidden;
}
.numbers__field {
  position: relative;
  height: clamp(680px, 100vh, 980px);
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.num-circle {
  position: absolute;
  border-radius: 50%;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.num-card {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  width: max-content;
  max-width: 320px;
  will-change: transform;
  pointer-events: none;
}
.num-card__value {
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.num-card__label {
  font-size: clamp(15px, 1.4vw, 22px);
  font-weight: 400;
  line-height: 1.25;
  margin-top: 10px;
}

/* ============================================================= */
/* CHARITIES (beat 6)                                            */
/* ============================================================= */
.charities { position: relative; }
.charities__text { max-width: 1100px; margin-left: 0; }

/* ============================================================= */
/* GALAXY (beat 7)                                               */
/* ============================================================= */
.galaxy {
  position: relative;
  width: 100%;
  padding: clamp(20px, 4vh, 45px) 0;
  overflow: hidden;
}
.galaxy__field {
  position: relative;
  height: clamp(520px, 80vh, 760px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.galaxy__dot {
  position: absolute;
  border-radius: 50%;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* ============================================================= */
/* QUOTES (beat 8)                                               */
/* ============================================================= */
.quotes { position: relative; }
.quotes__viewport {
  overflow: hidden;
  cursor: grab;
  margin-top: 10px;
}
.quotes__viewport.is-dragging { cursor: grabbing; }
.quotes__track {
  display: flex;
  gap: clamp(20px, 2.5vw, 36px);
  will-change: transform;
}
.quote-card {
  flex: 0 0 min(88%, 880px);
  display: grid;
  grid-template-columns: clamp(180px, 26%, 300px) 1fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 60px);
  min-height: clamp(360px, 52vh, 520px);
  user-select: none;
  overflow: hidden;            /* clip each circle to its own card */
}
.quote-card--teal { background: var(--mid-light-teal); color: var(--black); }
.quote-card--gray { background: var(--light-gray); color: var(--black); }
.quote-card__media {
  /* circle size + position are tunable live via ?quotes; defaults keep the
     original responsive sizing (fills its grid column, no offset). */
  width: var(--circle-size, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--black);
  transform: translate(var(--circle-x, 0px), var(--circle-y, 0px));
}
.quote-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.quote-card__count {
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: clamp(20px, 3vw, 44px);
}
.quote-card__text {
  font-size: clamp(20px, 2.4vw, 34px);
  line-height: 1.28;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(24px, 4vw, 48px);
}
.quote-card__source {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
}
.quote-card__source strong { font-weight: 600; }

.quotes__nav {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 34px;
}
.quotes__btn {
  width: 56px; height: 56px;
  border-radius: 16px;
  border: 0;
  background: var(--light-gray);
  color: var(--black);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.quotes__btn:hover { transform: translateY(-2px); }
.quotes__btn:disabled { opacity: .35; cursor: default; transform: none; }

/* ============================================================= */
/* FOUNDER (beat 10)                                             */
/* ============================================================= */
.founder {
  display: grid;
  /* left column: label stacked above the paragraphs; right column: photo */
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  column-gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.founder > .text-section__label {
  grid-column: 1;
  grid-row: 1;
  padding-top: 0;                 /* label now sits above the text, not beside it */
  margin-bottom: clamp(20px, 3vh, 32px);
}
.founder__text {
  grid-column: 1;
  grid-row: 2;
}
.founder__more {
  font-size: 20px;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 20px;
}
.founder__media {
  grid-column: 2;
  grid-row: 1 / 3;               /* span both label + text rows */
  position: relative;
  position: sticky;
  top: 12vh;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
}
.founder__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.founder__orbit {
  position: absolute;
  border-radius: 50%;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
  z-index: 3;
}

/* ============================================================= */
/* FOOTER                                                        */
/* ============================================================= */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px var(--pad) 80px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--gray);
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================= */
/* RESPONSIVE                                                    */
/* ============================================================= */
@media (max-width: 880px) {
  /* Collapse the label rails: label stacks above its paragraph. */
  .text-section,
  .structure,
  .founder { grid-template-columns: 1fr; }
  .text-section__label { padding-top: 0; margin-bottom: 18px; }
  .structure__grid { grid-template-columns: 1fr; }
  .structure__stage { height: 420px; }
  /* reset the founder's explicit grid placement so items stack in source order */
  .founder > .text-section__label,
  .founder__text,
  .founder__media { grid-column: auto; grid-row: auto; }
  .founder > .text-section__label { margin-bottom: 18px; }
  .founder__media { position: relative; top: 0; max-width: 420px; }
  .quote-card { grid-template-columns: 1fr; justify-items: start; }
  .quote-card__media { width: clamp(120px, 30vw, 180px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
