/* Thinking & Drinking: shared styles for every page */
/* ---------- 1. TOKENS ---------- */
:root {
  /* Palette: nothing outside these six */
  --stout:  #1C1613;
  --foam:   #FBF6EC;
  --malt:   #EFE3CC;
  --amber:  #E39A2D;
  --copper: #A8521B;
  --hop:    #51663B;

  --stout-70: rgba(28, 22, 19, .72);
  --stout-12: rgba(28, 22, 19, .12);
  --foam-70:  rgba(251, 246, 236, .74);
  --foam-16:  rgba(251, 246, 236, .16);

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale: fluid, ratio ~1.3 */
  --t-xs:  0.8125rem;
  --t-sm:  0.9375rem;
  --t-md:  1.0625rem;
  --t-lg:  clamp(1.1875rem, 1.05rem + .6vw, 1.375rem);
  --t-xl:  clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.8vw, 3.25rem);
  --t-3xl: clamp(2.625rem, 1.5rem + 5.2vw, 5rem);

  /* Spacing: 8px base */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-5: 48px; --s-6: 64px; --s-7: 96px;
  --section: clamp(80px, 11vw, 152px);
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1160px;

  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--foam);
  color: var(--stout);
  font-family: var(--body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.032em; }
h2 { font-size: var(--t-2xl); line-height: 1.08; }
h3 { font-size: var(--t-xl);  line-height: 1.2; letter-spacing: -0.015em; }
p  { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--malt  { background: var(--malt); }
.section--stout { background: var(--stout); color: var(--foam); }

.eyebrow {
  display: block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--s-3);
}
.section--stout .eyebrow { color: var(--amber); }

.section-head { max-width: 720px; margin-bottom: var(--s-6); }
.section-head p { margin-top: var(--s-3); font-size: var(--t-lg); color: var(--stout-70); max-width: 56ch; }
.section--stout .section-head p { color: var(--foam-70); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }

/* The one call to action */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 32px;
  background: var(--amber);
  color: var(--stout);
  font: 700 var(--t-md)/1 var(--body);
  letter-spacing: .01em;
  text-decoration: none;
  border: 2px solid var(--stout);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--stout);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
.btn::after { content: "\2192"; transition: transform .18s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--stout); background: #EDA63C; }
.btn:hover::after { transform: translateX(4px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--stout); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--copper); outline-offset: 3px;
}
.btn--sm { min-height: 44px; padding: 0 20px; font-size: var(--t-sm); box-shadow: 0 3px 0 var(--stout); }
/* On dark sections the border and shadow switch to foam so the button keeps its edge */
.section--stout .btn { border-color: var(--amber); box-shadow: 0 4px 0 var(--copper); }
.section--stout .btn:hover { box-shadow: 0 6px 0 var(--copper); }
.section--stout .btn:active { box-shadow: 0 1px 0 var(--copper); }
.section--stout .btn:focus-visible { outline-color: var(--foam); }

.microcopy { font-size: var(--t-sm); color: var(--stout-70); }
.section--stout .microcopy { color: var(--foam-70); }

/* Scroll reveal: only hides content when JS is running */
/* Uses `translate` (not `transform`) so hover transforms on buttons and tiles still work */
.js .reveal {
  opacity: 0; translate: 0 24px;
  transition: opacity .7s var(--ease), translate .7s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease), background-color .18s var(--ease);
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0s, 0s, 0s;
}
.js .reveal.is-in { opacity: 1; translate: none; }

/* ---------- 3. NAVIGATION ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 236, .9);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.nav.is-stuck { border-bottom-color: var(--stout-12); box-shadow: 0 8px 24px -18px rgba(28,22,19,.5); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); height: 72px; }
.logo { font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--copper); font-style: italic; }
.nav__links { display: flex; gap: var(--s-4); }
.nav__links a { font-size: var(--t-sm); font-weight: 500; text-decoration: none; padding-block: 8px; background: linear-gradient(var(--copper), var(--copper)) 0 100% / 0 2px no-repeat; transition: background-size .25s var(--ease), color .2s; }
.nav__links a:hover { color: var(--copper); background-size: 100% 2px; }

/* ---------- 4. HERO ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) var(--section); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-6); align-items: center; }
.hero__sub { margin-top: var(--s-4); font-size: var(--t-lg); line-height: 1.55; color: var(--stout-70); max-width: 34em; }
.hero__cta { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

.fan { position: relative; height: clamp(340px, 42vw, 480px); }
.fan .card { position: absolute; top: 50%; left: 50%; width: clamp(190px, 22vw, 250px); }
.fan .card:nth-child(1) { transform: translate(-92%, -50%) rotate(-11deg); }
.fan .card:nth-child(2) { transform: translate(-8%, -46%) rotate(9deg); }
.fan .card:nth-child(3) { transform: translate(-50%, -54%) rotate(-2deg); z-index: 2; }

/* A playing card, drawn in CSS so it always stays on-palette */
.card {
  aspect-ratio: 5 / 7;
  background: var(--foam);
  border: 2px solid var(--stout);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -22px rgba(28,22,19,.55), 0 4px 0 var(--stout);
  padding: 22px 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  text-align: left;
}
.card__tag { font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); }
.card__q { font-family: var(--display); font-weight: 500; font-size: clamp(1.125rem, .9rem + .8vw, 1.4375rem); line-height: 1.2; letter-spacing: -0.015em; }
.card__foot { display: flex; justify-content: space-between; font-size: .75rem; color: var(--stout-70); border-top: 1px solid var(--stout-12); padding-top: 12px; }
.card--malt { background: var(--malt); }
.card--hop { background: var(--hop); color: var(--foam); }
.card--hop .card__tag { color: var(--amber); }
.card--hop .card__foot { color: var(--foam-70); border-top-color: var(--foam-16); }

.hero__img { border: 2px solid var(--stout); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 0 var(--stout); background: var(--foam); rotate: 1.5deg; }
.hero__img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

/* ---------- 5. PRESS + SAMPLE CARDS ---------- */
/* Real card artwork. Tapping a card flips it over to a new one from the pool. */
.draw { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1400px; }
.draw__inner { display: block; position: relative; aspect-ratio: 7 / 5; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.draw:hover .draw__inner { transform: translateY(-6px) rotateY(calc(var(--turn, 0deg) - 6deg)); }
.draw .draw__inner { transform: rotateY(var(--turn, 0deg)); }
.draw__face { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 4.5% / 6.3%; background: var(--malt); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 18px 36px -20px rgba(28,22,19,.6), 0 2px 0 rgba(28,22,19,.18); }
.draw__face--back { transform: rotateY(180deg); }
.draw__face img { width: 100%; height: 100%; object-fit: cover; }
/* Landscape cards that mirror the real ones: question on top, brewery strip below */
.qcard { aspect-ratio: 7 / 5; background: var(--foam); border: 2px solid var(--stout); border-radius: var(--radius); box-shadow: 0 4px 0 var(--stout), 0 18px 40px -22px rgba(28,22,19,.55); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.qcard:hover { transform: translateY(-6px) rotate(-1deg); }
.qcard--malt { background: var(--malt); }
.qcard__q { padding: 24px 22px 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.125rem, .9rem + .8vw, 1.4375rem); line-height: 1.2; letter-spacing: -0.015em; }
.qcard__brew { padding: 12px 22px 14px; background: var(--hop); color: var(--foam); font-size: var(--t-xs); line-height: 1.5; }
.qcard__brew span { display: block; font-style: italic; color: var(--foam-70); }
.deck__img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: var(--s-3); }
.wild { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.wild__item { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.wild__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.wild__item:hover img { transform: scale(1.05); }
.press { border-block: 1px solid var(--stout-12); padding-block: var(--s-4); }
.press__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2) var(--s-5); }
.press__label { font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--stout-70); }
.press__name { font-family: var(--display); font-size: 1.1875rem; font-style: italic; color: var(--stout-70); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }

.flip { perspective: 1200px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; max-width: 300px; margin-inline: auto; display: block; }
.flip__inner { display: block; width: 100%; position: relative; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip:hover .flip__inner { transform: rotateY(-8deg) translateY(-6px); }
.flip[aria-pressed="true"] .flip__inner { transform: rotateY(180deg); }
.flip .card { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .card--back { transform: rotateY(180deg); }
.cards-note { margin-top: var(--s-6); text-align: center; color: var(--stout-70); max-width: 52ch; margin-inline: auto; }

/* ---------- 6. BENEFITS ---------- */
.benefit { border-top: 2px solid var(--stout); padding-top: var(--s-4); }
.benefit__num { font-family: var(--display); font-style: italic; font-size: var(--t-lg); color: var(--copper); }
.benefit h3 { margin-top: var(--s-2); }
.benefit p { margin-top: var(--s-2); color: var(--stout-70); }

/* Photo slots: one ratio, one radius, one gap */
.photos { margin-top: var(--s-7); }
.photo { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 7. HOW IT WORKS ---------- */
.steps { counter-reset: step; }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border: 2px solid var(--amber); border-radius: 50%;
  font-family: var(--display); font-size: 1.5rem; color: var(--amber);
  margin-bottom: var(--s-3);
}
.step p { margin-top: var(--s-1); color: var(--foam-70); }

/* ---------- 8. PROOF ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); border-block: 2px solid var(--stout); padding-block: var(--s-5); }
.stat__n { font-family: var(--display); font-size: var(--t-2xl); line-height: 1; letter-spacing: -0.03em; }
.stat__l { margin-top: var(--s-1); font-size: var(--t-sm); color: var(--stout-70); }

.quote { margin-block: var(--s-7); max-width: 860px; margin-inline: auto; text-align: center; }
.quote p { font-family: var(--display); font-size: var(--t-xl); line-height: 1.3; letter-spacing: -0.015em; }
.quote cite { display: block; margin-top: var(--s-3); font-style: normal; font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); }

.review { background: var(--foam); border: 1px solid var(--stout-12); border-radius: var(--radius); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.review p { font-family: var(--display); font-size: var(--t-lg); line-height: 1.35; letter-spacing: -0.01em; }
.review footer { margin-top: auto; font-size: var(--t-sm); font-weight: 700; }
.review footer span { display: block; margin-top: 2px; font-size: var(--t-xs); font-weight: 400; color: var(--stout-70); }
.deck-proof { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); max-width: 880px; margin: var(--s-5) auto 0; }

/* ---------- 9. DECKS ---------- */
.decks { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); max-width: 880px; margin-inline: auto; }
.deck {
  position: relative;
  background: var(--foam);
  border: 2px solid var(--stout);
  border-radius: var(--radius);
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.deck:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(28,22,19,.6); }
.deck--featured { background: var(--stout); color: var(--foam); }
.deck__badge { position: absolute; top: -14px; left: var(--s-4); background: var(--hop); color: var(--foam); font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.deck__price { font-family: var(--display); font-size: var(--t-2xl); line-height: 1; margin-top: var(--s-2); letter-spacing: -0.03em; }
.deck__price small { font-family: var(--body); font-size: var(--t-sm); letter-spacing: 0; color: var(--stout-70); }
.deck--featured .deck__price small { color: var(--foam-70); }
.deck ul { margin-block: var(--s-4); display: grid; gap: 12px; }
.deck li { padding-left: 28px; position: relative; color: var(--stout-70); }
.deck--featured li { color: var(--foam-70); }
.deck li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 7px; border-left: 2px solid var(--copper); border-bottom: 2px solid var(--copper); transform: rotate(-45deg); }
.deck--featured li::before { border-color: var(--amber); }
.deck .btn { margin-top: auto; width: 100%; }
.deck--featured .btn { border-color: var(--amber); box-shadow: 0 4px 0 var(--copper); }
.deck--featured .btn:hover { box-shadow: 0 6px 0 var(--copper); }
.deck--featured .btn:focus-visible { outline-color: var(--foam); }
.decks-note { margin-top: var(--s-4); text-align: center; }

/* ---------- 10. FAQ, CLOSE, FOOTER ---------- */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--stout-12); }
.faq details:first-of-type { border-top: 2px solid var(--stout); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding-block: var(--s-3);
  font-family: var(--display); font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.01em;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--copper); }
.faq summary::after { content: "+"; font-family: var(--body); font-size: 1.5rem; line-height: 1; color: var(--copper); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-4); color: var(--stout-70); max-width: 60ch; }

.close { text-align: center; }
.close h2 { font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.032em; max-width: 14ch; margin-inline: auto; }
.close p.lead { margin: var(--s-4) auto 0; font-size: var(--t-lg); color: var(--foam-70); max-width: 44ch; }
.close .btn { margin-top: var(--s-5); }
.close .microcopy { margin-top: var(--s-3); }

.footer { background: var(--stout); color: var(--foam-70); border-top: 1px solid var(--foam-16); padding-block: var(--s-5); font-size: var(--t-sm); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-5); align-items: center; }
.footer .logo { color: var(--foam); }
.footer .logo span { color: var(--amber); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.footer nav a { text-decoration: none; transition: color .2s; }
.footer nav a:hover { color: var(--amber); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero__img { max-width: 440px; }
  .wild { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; gap: var(--s-5); }
  .grid-3.photos { grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--s-5) var(--s-3); }
  .decks { grid-template-columns: 1fr; gap: var(--s-5); }
  .deck-proof { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav__inner { height: 64px; }
  .logo { font-size: 1.0625rem; }
  .hero__cta .btn { width: 100%; }
  .grid-3.photos { grid-template-columns: 1fr 1fr; }
  .grid-3.photos .photo:last-child { display: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; translate: none; }
}

/* ---------- FORMS (wholesale + brewery sign-up) ---------- */
.wform { background: var(--foam); border: 2px solid var(--stout); border-radius: var(--radius); padding: var(--s-4); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.wform .full { grid-column: 1 / -1; }
.wform label { display: block; font-size: var(--t-sm); font-weight: 700; margin-bottom: 6px; }
.wform input, .wform textarea { width: 100%; min-height: 52px; padding: 12px 14px; font: 400 var(--t-md) var(--body); color: var(--stout); background: #fff0; border: 1.5px solid rgba(28,22,19,.45); border-radius: var(--radius-sm); background: var(--foam); }
.wform textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.wform input:focus-visible, .wform textarea:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-color: var(--stout); }
.wform button { cursor: pointer; }
.wform__note { font-size: var(--t-sm); color: var(--stout-70); }
.wform__done { font-weight: 700; color: var(--hop); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wform button:disabled { opacity: .6; cursor: default; }
.bform { max-width: 760px; margin: var(--s-5) auto 0; text-align: left; }
.bform textarea { min-height: 96px; }
@media (max-width: 520px) { .wform { grid-template-columns: 1fr; padding: var(--s-3); } .wform button { width: 100%; } }
.wform label:has(+ [required])::after { content: " *"; color: var(--copper); }
.bform .wform__note { margin: 0; max-width: none; font-size: var(--t-sm); text-align: left; }
