/* Ashtown Brewing — shared styles.
 *
 * Golden hour: the taproom at dusk with the lights on. Barley paper, Douglas
 * fir green, amber light and red ale, with stout-brown ink. Headlines are set
 * in Fraunces, a soft serif with some wonk in it, the way a hand-painted
 * taproom sign is friendly before it is formal; everything else is Libre
 * Franklin. Colour also comes from the beer itself: every glass on the board
 * is filled with its beer's own colour.
 */

:root {
  --paper: #F4ECDD;      /* barley */
  --paper-2: #EADFCA;
  --paper-hi: #FFFBF3;
  --cream: #FFF6E6;
  --ink: #2A1D14;        /* stout */
  --text: #2A1D14;
  --text-2: #6B5A49;
  --rule: #D9CBB3;
  --fir: #1F4436;
  --fir-deep: #173229;
  --amber: #E2952E;      /* fills and large type only */
  --red: #A8402B;        /* red ale: accents and small text on paper (6.1:1) */
  --neon: #FF4FB4;       /* Skreeners Weeners only */
  --good: #3F9A5B;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 70px;
  --radius: 14px;

  color-scheme: light;

  /* Old names still used by pages not yet restyled. */
  --stencil: var(--display);
  --fireweed: var(--red);
  --fireweed-ink: var(--red);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; } /* width/height attributes reserve space; CSS decides the shape */
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--amber); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 10px 16px; font-weight: 600; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
/* Fraunces: SOFT rounds the serifs, WONK lets the italic-ish letters lean,
   opsz picks the cut drawn for the size. */
.display {
  font-family: var(--display);
  font-weight: 650;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  letter-spacing: 0;
  line-height: 1.1;
  text-wrap: balance;
}
.section-title {
  font-family: var(--display);
  font-weight: 650;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.14;
  letter-spacing: 0;
  color: var(--fir);
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--red); font-weight: 600; }
.section-title + * { margin-top: 24px; }
.kicker { font: 700 .9rem/1.2 var(--body); letter-spacing: .02em; color: var(--red); margin-bottom: 18px; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; max-width: 34em; }
.muted { color: var(--text-2); }
.prose p + p { margin-top: .8em; }
.prose { max-width: 36em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--fir-deep); color: var(--cream);
  box-shadow: 0 1px 0 rgba(255,246,230,.06);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand img { width: 48px; height: auto; }
.brand span {
  font-family: var(--display); font-weight: 700; font-variation-settings: "SOFT" 100, "opsz" 48;
  font-size: 1.5rem; line-height: 1; letter-spacing: -.01em;
}
.brand:hover { color: inherit; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); margin-left: auto; }
.nav a {
  font: 600 .98rem/1 var(--body); text-decoration: none; color: #EADFCA;
  padding: 8px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }
.status {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 600 .92rem/1 var(--body); padding: 9px 15px 9px 12px; border-radius: 999px;
  background: rgba(255,246,230,.08); border: 1px solid rgba(255,246,230,.2);
  color: var(--cream); text-decoration: none; white-space: nowrap;
}
.nav a.status { border-bottom: 1px solid rgba(255,246,230,.2); padding: 9px 15px 9px 12px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9C8F7E; flex: none; }
.status[data-open="true"]::before { background: #6FD08C; box-shadow: 0 0 0 4px rgba(111,208,140,.2); }
.nav a.status:hover { background: rgba(255,246,230,.16); border-color: rgba(255,246,230,.4); }
.menu-btn {
  display: none; margin-left: auto; background: none; border: 1px solid rgba(255,246,230,.4);
  color: var(--cream); border-radius: 999px; padding: 8px 16px; font: 600 .95rem/1 var(--body); cursor: pointer;
}
@media (max-width: 1080px) { .site-header .status { display: none; } }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--fir-deep); padding: 8px var(--gutter) 24px;
    border-top: 1px solid rgba(255,246,230,.1);
    transform: translateY(-110%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
  }
  .nav.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .nav a { font-size: 1.15rem; padding: 14px 0; border-bottom: 1px solid rgba(255,246,230,.1); }
  .nav .status { display: inline-flex; margin-top: 18px; align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .nav, .nav.open { transition: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px;
  font: 700 1rem/1 var(--body); letter-spacing: .01em; text-decoration: none;
  background: var(--amber); color: var(--ink); border: 2px solid var(--amber);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(42,29,20,.35); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn.fir { background: var(--fir); border-color: var(--fir); color: var(--cream); }
.btn.fir:hover { background: var(--ink); border-color: var(--ink); }
.btn.on-dark { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.on-dark:hover { background: var(--cream); border-color: var(--cream); }
.btn.ghost-light { background: transparent; color: var(--cream); border-color: rgba(255,246,230,.6); }
.btn.ghost-light:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn[disabled] { opacity: .55; cursor: wait; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- section scaffolding ---------- */
.band { padding-block: clamp(64px, 9vw, 120px); }
.band.dark { background: var(--fir-deep); color: var(--cream); }
.band.dark .section-title { color: var(--cream); }
.band.dark .section-title em { color: var(--amber); }
.band.dark .kicker { color: var(--amber); }
.band.paper-2 { background: var(--paper-2); }
.band.cream { background: var(--paper-hi); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 18px 40px; margin-bottom: clamp(28px, 4vw, 48px);
}

/* ---------- forms (planner + pour) ---------- */
.field { display: grid; gap: 6px; }
.field > label, .legend { font: 600 1rem/1.3 var(--body); color: var(--ink); }
.field .hint { font-size: .9rem; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 11px 14px;
  background: #fff; border: 1.5px solid #CDBDA2; border-radius: 10px;
  font-size: 1rem; color: var(--text);
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--fir); box-shadow: 0 0 0 3px rgba(31,68,54,.18); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(168,64,43,.15); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 22px; }
.form-error {
  border-left: 5px solid var(--red); background: #FBEDE6; color: #6E2618; padding: 12px 16px;
  border-radius: 0 10px 10px 0; font-weight: 600;
}

/* Choice chips: radios and checkboxes drawn as pills. */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 9px 18px;
  border: 1.5px solid #CDBDA2; border-radius: 999px; background: #fff;
  font-weight: 600; font-size: .98rem; line-height: 1.25; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--fir); border-color: var(--fir); color: var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.chip:hover span { border-color: var(--fir); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding-block: 56px 40px; }
.site-footer .wrap { display: grid; gap: 32px; grid-template-columns: auto 1fr auto; align-items: start; }
.site-footer img { width: 120px; height: auto; }
.site-footer h2 {
  font-family: var(--display); font-weight: 700; font-variation-settings: "SOFT" 100, "opsz" 48;
  font-size: 1.6rem; margin-bottom: 8px;
}
.site-footer p, .site-footer li { color: #D9CBB3; font-size: 1rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--amber); }
.foot-links { display: grid; gap: 6px; }
.foot-small { grid-column: 1 / -1; border-top: 1px solid rgba(255,246,230,.14); padding-top: 18px; font-size: .9rem; color: #A8977F; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; box-shadow: 0 8px 30px rgba(42,29,20,.3); transition: transform .25s ease;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- old class names, for pages not yet restyled ---------- */
.stencil { font-family: var(--display); font-weight: 650; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: 0; line-height: 1.1; text-wrap: balance; }
.band.ink { background: var(--fir-deep); color: var(--cream); }
.band.ink .section-title { color: var(--cream); }
.band.ash2 { background: var(--paper-2); }
.btn.pink { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.pink:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn.on-ink { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.on-ink:hover { background: var(--cream); border-color: var(--cream); }
