/* Wednesday Brews.
   Mobile first: this gets read on a phone, one-handed, in a bar. */

:root {
  --navy: #16264a;
  --navy-soft: #24365f;
  --amber: #e8973a;
  --amber-deep: #c97a1f;
  --sky: #8fb4dd;

  --bg: #f7f3e8;
  --surface: #fffdf7;
  --ink: #16264a;
  --muted: #5b6780;
  --line: #e2dbca;

  --radius: 14px;
  --shadow: 0 1px 2px rgb(22 38 74 / 6%), 0 8px 24px rgb(22 38 74 / 6%);
  --header-h: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1728;
    --surface: #16233c;
    --ink: #eef2fa;
    --muted: #9aa8c4;
    --line: #26375a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--amber-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--amber); } }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

/* --- masthead ---------------------------------------------------------- */
/* Sticky, and padded by the safe-area inset so the notch and the dynamic
   island never sit on top of the brand or the menu button. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.bar {
  max-width: 60rem;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { font-size: 1.35rem; }
.brand-text { font-size: 0.95rem; }

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* 44px: the smallest thing a thumb reliably hits. */
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.navtoggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
.navtoggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.5rem max(1rem, env(safe-area-inset-right)) 1rem;
}
.navtoggle:checked ~ .nav { display: flex; }

.nav a {
  padding: 0.75rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav a:last-child { border-bottom: 0; }
.nav .cta { color: var(--amber-deep); font-weight: 600; }

@media (min-width: 46rem) {
  .hamburger { display: none; }
  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .nav a { padding: 0.25rem 0; border-bottom: 0; }
  .brand-text { font-size: 1rem; }
}

/* --- layout ------------------------------------------------------------ */

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-left)) 3rem max(1rem, env(safe-area-inset-right));
}

h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin: 0 0 1.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.flash.error { border-color: #d4614b; color: #b4432c; }
.flash.success { border-color: #4f9668; }
@media (prefers-color-scheme: dark) {
  .flash.error { color: #ff9a80; }
}

/* --- forms ------------------------------------------------------------- */

label { display: block; font-weight: 600; margin: 0 0 0.35rem; }
/* Inside a <label>, the hint is a second line, not a continuation of it. */
.hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.checkline .hint { display: inline; }

input[type="text"], input[type="tel"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%;
  /* 16px minimum, or iOS zooms the whole page on focus. */
  font-size: 16px;
  font-family: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  margin: 0 0 1rem;
}

input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.otp {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
}

button, .btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--amber);
  color: #241300;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--amber-deep); color: #fff; }
button.wide, .btn.wide { display: block; width: 100%; }
button.quiet, .btn.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.danger {
  background: transparent;
  color: #b4432c;
  border: 1px solid currentColor;
}

.checkline {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 1rem;
}
.checkline input { margin-top: 0.3rem; width: 20px; height: 20px; flex: none; }
.checkline label { font-weight: 400; margin: 0; }

.steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.steps li { display: flex; align-items: center; gap: 0.5rem; }
.steps li::after { content: "→"; opacity: 0.5; }
.steps li:last-child::after { content: ""; }
.steps .now { color: var(--ink); font-weight: 600; }

/* --- footer ------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem max(1rem, env(safe-area-inset-left))
           calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p { margin: 0 0 0.35rem; }
.footer .fine { font-size: 0.85rem; }

/* --- prose (about, privacy, terms) ------------------------------------- */

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }

/* --- event card -------------------------------------------------------- */

.event-card .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.event-card .when { font-weight: 600; margin-bottom: 0.25rem; }
.event-card .venue { margin: 0.25rem 0 0.5rem; font-size: 1.5rem; }
.event-card .venue.locked { color: var(--muted); font-size: 1.15rem; }
.event-card .weather { color: var(--muted); }
.event-card .count { margin-bottom: 0.5rem; }
