/* ============================================================
   Bringleton's Coffee House — styles.css
   Single stylesheet for the whole site.
   Design tokens at top; component styles below.
   ============================================================ */

:root {
  /* Color — warm espresso/cream palette */
  --color-bg:           #faf5ed;   /* page background: warm cream */
  --color-bg-alt:       #f3ead9;   /* alternating section */
  --color-surface:      #ffffff;   /* cards */
  --color-ink:          #2b1d14;   /* primary text: deep espresso */
  --color-ink-muted:    #6b5544;   /* secondary text */
  --color-accent:       #b8542f;   /* terracotta — CTAs, links */
  --color-accent-dark:  #8c3e20;   /* hover */
  --color-border:       #e3d8c6;   /* hairline dividers */
  --color-shadow:       rgba(43, 29, 20, 0.08);

  /* Typography */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-4xl:  3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw + 0.5rem, var(--text-4xl)); }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, var(--text-3xl)); }
h3 { font-size: var(--text-xl); }
p  { margin: 0 0 var(--space-4); }
.lede { font-size: var(--text-lg); color: var(--color-ink-muted); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin: 0 0 var(--space-3);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
section { padding: var(--space-16) 0; }
section.alt { background: var(--color-bg-alt); }

/* ---------- Header & Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 237, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-ink);
}
.brand:hover { color: var(--color-ink); text-decoration: none; }
.brand img { height: 40px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.site-nav a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: var(--text-sm);
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }
.site-nav a.btn { color: var(--color-surface); }

/* Mobile nav — checkbox-hack, zero JS */
.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
  padding: 0;
  background: none;
  border: 0;
}
.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-6);
    gap: var(--space-3);
    display: none;
    box-shadow: 0 12px 24px -12px var(--color-shadow);
  }
  .nav-toggle-input:checked ~ .site-nav { display: flex; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }
  .site-nav a { padding: var(--space-2) 0; }
  .site-nav a.btn { text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-surface);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-surface);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}
.btn-outline:hover {
  background: var(--color-ink);
  color: var(--color-surface);
  text-decoration: none;
}
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  color: var(--color-surface);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(43, 29, 20, 0.35) 0%,
    rgba(43, 29, 20, 0.55) 60%,
    rgba(43, 29, 20, 0.75) 100%
  );
  z-index: -1;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-content {
  max-width: 720px;
  padding: var(--space-16) var(--space-6);
}
.hero h1 {
  color: var(--color-surface);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--space-4);
}
.hero p {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.hero-ctas .btn-outline {
  color: var(--color-surface);
  border-color: var(--color-surface);
}
.hero-ctas .btn-outline:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}
.hero-meta {
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-8);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
}
.hero-meta strong { color: var(--color-surface); font-weight: 600; }

/* ---------- Open/closed status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: var(--text-sm);
  color: var(--color-surface);
}
.status-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #9be0a0;
}
.status-pill[data-open="false"]::before { background: #e89a9a; }

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px var(--color-shadow), 0 8px 24px -12px var(--color-shadow);
  display: flex;
  flex-direction: column;
}
.card-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--color-ink-muted); }

/* Signature drinks get a slightly richer card */
.drink-card .card-body { gap: var(--space-2); }
.drink-card .eyebrow { margin-bottom: 0; }

/* ---------- Section header ---------- */
.section-header {
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-12);
  text-align: center;
}
.section-header p { color: var(--color-ink-muted); font-size: var(--text-lg); }

/* ---------- Split — image + text ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.split-img img {
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: var(--space-8); }
  .split-img img { aspect-ratio: 3 / 2; }
}

/* ---------- Hours table ---------- */
.hours-table {
  width: 100%;
  max-width: 420px;
  border-collapse: collapse;
}
.hours-table td {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.hours-table td:last-child { text-align: right; color: var(--color-ink-muted); }
.hours-table tr.today td { color: var(--color-ink); font-weight: 600; }

/* ---------- Forms ---------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink);
}
.form-field input,
.form-field textarea {
  font: inherit;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(184, 84, 47, 0.18);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.honeypot { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: #d6c8b7;
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-16);
}
.site-footer a { color: #f0e3cf; }
.site-footer a:hover { color: var(--color-surface); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer-grid h4 {
  color: var(--color-surface);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}
.footer-grid p { color: #c3b49f; margin: 0 0 var(--space-2); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--space-2); }
.footer-bottom {
  border-top: 1px solid #3d2a1e;
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: #9e8e7a;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.center { text-align: center; }
.muted { color: var(--color-ink-muted); }
