/* /css/components.css */

/* =========================
   Navigation
   ========================= */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

/* Stacked layout: logo on top, links below */
.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 8px;
}

.site-nav__logoLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.site-nav__logo {
  height: 100px;
  width: auto;
  object-fit: contain;
}

/* Mobile toggle */
.site-nav__toggle {
  position: absolute;
  right: 24px;
  top: 24px;              /* IMPORTANT for stacked layout */
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  display: none;          /* enabled on mobile */
}

.site-nav__toggleIcon {
  font-size: 22px;
  font-weight: 800;
}

/* Desktop links row */
.site-nav__desktop {
  width: 100%;
  display: flex;
  justify-content: center;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav__link {
  color: var(--coffee-dark);
  text-decoration: none;
  padding: 10px 0;
}

.site-nav__link:hover {
  text-decoration: underline;
}

/* ---------- Desktop Dropdown ---------- */
.nav-dd {
  position: relative;
}

.nav-dd__trigger {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--coffee-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 650;
  padding: 10px 0;
}

.nav-dd__trigger:hover {
  text-decoration: underline;
}

.nav-dd__caret {
  display: inline-block;
  transform: translateY(-1px);
}

/* Mega panel */
.nav-dd__panel {
  position: fixed;        /* full-width mega panel */
  left: 0;
  right: 0;
  top: 176px;             /* tuned for logo+links stacked */
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.10);
  padding: 12px 0 26px;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 60;
}

.nav-dd[data-open="true"] .nav-dd__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dd__grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;

  justify-items: center;
  text-align: center;
}

.nav-dd__link {
  color: var(--coffee-dark);
  text-decoration: none;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-dd__link:hover {
  text-decoration: underline;
}

/* ---------- Mobile panel ---------- */
.site-nav__mobile {
  border-top: 1px solid rgba(0,0,0,0.10);
  background: #fff;
}

.site-nav__mobileInner {
  padding: 18px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;

  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav__mobileLink {
  color: var(--coffee-dark);
  text-decoration: none;
  padding: 10px 0;
}

.site-nav__mobileLink:hover {
  text-decoration: underline;
}

/* Mobile dropdown */
.mobile-dd__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--coffee-dark);
  padding: 10px 0;

  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 750;
}

.mobile-dd__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 8px 14px;
  border-left: 2px solid rgba(0,0,0,0.14);
}

.mobile-dd__link {
  color: var(--coffee-dark);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 0;
}

.mobile-dd__link:hover {
  text-decoration: underline;
}

/* Responsive (nav) */
@media (max-width: 767px) {
  .site-nav__toggle { display: inline-flex; }
  .site-nav__desktop { display: none; }

  .site-nav__inner {
    padding: 12px 18px 10px;
  }

  .site-nav__logo {
    height: 74px;
  }

  .nav-dd__panel {
    top: 140px; /* safer when header is shorter on mobile */
  }
}

/* =========================
   Page Layout Components
   ========================= */

.page-main {
  padding-top: var(--nav-offset);
}

.page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-section {
  padding: 96px 0;
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: var(--coffee-dark);
}

.page-lead {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--coffee-dark);
}

.page-section--mission .page-container {
  max-width: 640px;
}

@media (max-width: 768px) {
  .page-section {
    padding: 64px 0;
  }

  .page-lead {
    font-size: 1.125rem;
  }
}

/* =========================
   Content Components (cards/lists)
   ========================= */

.content-lede {
  margin-top: 10px;
  font-size: 1.125rem;
  line-height: 1.45;
  max-width: 62ch;
  opacity: 0.9;
}

.content-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.content-card {
  grid-column: span 6;
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--coffee-dark);
  box-shadow: 8px 8px 0 var(--coffee-dark);
  padding: 18px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.content-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 var(--accent-orange);
}

.content-card__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.content-card__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  opacity: 0.9;
}

.content-list {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.6;
  font-weight: 600;
}

.content-list a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-note {
  margin-top: 28px;
  font-size: 0.95rem;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .content-card { grid-column: span 12; }
}

/* =========================
   Brew Pages + Home Brew Sections
   ========================= */

/* --- Home hero --- */
.brew-hero {
  min-height: calc(100vh - var(--nav-offset));
  display: grid;
  place-items: center;
  padding: 24px 0 48px;
}

.brew-hero__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.brew-hero__logo {
  display: block;
  height: clamp(140px, 20vw, 320px);
  width: auto;
  margin: 0 auto 22px;
  object-fit: contain;
}

.brew-hero__desc {
  margin: 0 auto 24px;
  max-width: 62ch;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.45;
  font-weight: 600;
  opacity: 0.95;
}

.brew-hero__cta {
  display: inline-block;
  background: var(--coffee-dark);
  color: var(--cream);
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 160ms ease, transform 160ms ease;
}

.brew-hero__cta:hover {
  background: var(--accent-orange);
  transform: translateY(-1px);
}

/* --- Home method selection grid --- */
.method-select {
  padding: 72px 0;
}

.method-select__title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.method-gridWrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 24px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.method-card {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;

  aspect-ratio: 1 / 1;
  padding: 14px;

  background: rgba(255,255,255,0.92);
  border: 2px solid var(--coffee-dark);
  box-shadow: 8px 8px 0 var(--coffee-dark);
  text-decoration: none;
  color: var(--coffee-dark);

  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.method-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 var(--accent-orange);
  background: #fff;
}

.method-card__icon {
  height: 48px;
  width: auto;
  opacity: 0.65;
  transition: transform 160ms ease, opacity 160ms ease;
}

.method-card:hover .method-card__icon {
  opacity: 1;
  transform: scale(1.05);
}

.method-card__label {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

/* =========================
   Brew Method Page (shared)
   ========================= */

.brew-page__header {
  margin-bottom: 28px;
}

.brew-page__kicker {
  margin: 10px 0 0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-orange);
}

/* ✅ UPDATED: flex -> grid to control mobile stacking */
.brew-page__titleRow {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;

  padding-bottom: 18px;
  border-bottom: 2px solid rgba(0,0,0,0.12);
}

.brew-page__titleLeft {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.brew-page__device {
  height: 140px;
  width: auto;
  object-fit: contain;
}

.brew-page__h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.brew-page__back {
  display: inline-block;
  margin-top: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brew-page__back:hover {
  background: var(--accent-orange);
}

/* ratio strip box */
.ratio-box {
  width: 100%;
  max-width: 360px;
  background: rgba(255,107,53,0.10);
  border: 2px solid #000;
  padding: 14px;
}

.ratio-box__label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.ratio-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ratio-chip {
  border: 1px solid rgba(0,0,0,0.12);
  padding: 10px 8px;
  text-align: center;
  background: transparent;
}

.ratio-chip__ratio {
  font-weight: 900;
  font-size: 0.9rem;
}

.ratio-chip__note {
  margin-top: 2px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.5;
  letter-spacing: 0.06em;
}

.ratio-chip--best {
  border: 2px solid var(--accent-orange);
  background: #fff;
  box-shadow: 2px 2px 0 #000;
}

.ratio-chip--best .ratio-chip__note {
  opacity: 1;
  color: var(--accent-orange);
}

/* ✅ UPDATED: Mobile stacking + horizontal ratios */
@media (max-width: 768px) {
  .brew-page__titleRow {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .brew-page__titleLeft {
    flex-direction: column;
    align-items: flex-start;
  }

  .brew-page__device {
    height: auto;
    max-width: 50px;
  }

  .ratio-box {
    max-width: none;
  }

  /* ✅ Keep ratios horizontal on mobile */
  .ratio-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* ✅ Compact chips so 3 fit cleanly */
  .ratio-chip {
    padding: 8px 6px;
  }

  .ratio-chip__ratio {
    font-size: 0.85rem;
  }

  .ratio-chip__note {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  /* ✅ Undo “best spans full width” */
  .ratio-chip--best {
    grid-column: auto;
  }
}

/* quick stats row */
.quick-stats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.quick-stat {
  grid-column: span 6;
}

@media (min-width: 900px) {
  .quick-stat { grid-column: span 2; }
}

.quick-stat__label {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.55;
}

.quick-stat__value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

/* steps */
.steps {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}

.step__num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.75rem;
  margin-top: 2px;
}

.step__title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step__desc {
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 650;
  opacity: 0.65;
  max-width: 68ch;
}

/* fix flavor */
.fix-box {
  margin-top: 26px;
  border-top: 2px solid rgba(0,0,0,0.10);
  padding-top: 18px;
}

.fix-inner {
  background: rgba(255,179,15,0.18);
  border: 2px solid #000;
  padding: 18px;
}

.fix-title {
  margin: 0 0 14px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.fix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .fix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fix-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}

.fix-tag {
  font-weight: 900;
  text-transform: uppercase;
  font-style: italic;
  font-size: 0.75rem;
  opacity: 0.9;
}

.fix-tag--sour { color: #dc2626; }
.fix-tag--bitter { color: #1c1917; }
.fix-tag--weak { color: #6b7280; }

.fix-text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

/* utility: spacing wrapper using your existing brew-card */
.brew-shell {
  padding: 24px;
}
@media (min-width: 900px) {
  .brew-shell { padding: 40px; }
}

/* =========================
   Brew Troubleshooting Article
   ========================= */

.brew-article {
  background: #fff;
  border-top: 2px solid rgba(0,0,0,0.08);
  padding: 96px 24px;
}

.brew-article__inner {
  max-width: 720px;
  margin: 0 auto;
}

.brew-article__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--coffee-dark);
}

.brew-article__block {
  margin-bottom: 48px;
}

.brew-article__heading {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--coffee-dark);
}

.brew-article__block p {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--coffee-dark);
  margin-bottom: 14px;
}

.brew-article__block p:last-child {
  margin-bottom: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .brew-article {
    padding: 64px 18px;
  }
}

/* =========================
   Legal Page (Privacy/Cookies)
   ========================= */

.legal-section {
  background: #fff;
  border-top: 2px solid #000;
  padding: 96px 24px;
}

.legal-wrap {
  max-width: 900px; /* replaces max-w-4xl */
  margin: 0 auto;
  padding: 0 24px;
}

.legal-title {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--coffee-dark);
}

.legal-updated {
  margin: 0 0 24px;
  font-weight: 800;
}

.legal-intro {
  margin: 0 0 24px;
  font-weight: 800;
}

.legal-paragraph {
  margin: 0 0 24px;
  font-weight: 550;
  line-height: 1.6;
}

.legal-label {
  margin: 0 0 10px;
  font-weight: 800;
}

.legal-list {
  margin: 0 0 24px;
  padding-left: 22px;
  list-style: disc;
  line-height: 1.6;
}

.legal-list--spaced {
  margin-bottom: 32px;
}

.legal-link {
  color: var(--coffee-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-link:hover {
  color: var(--accent-orange);
}

.legal-footnote {
  margin: 0;
  font-size: 0.9rem;   /* replaces text-sm */
  opacity: 0.6;        /* replaces opacity-60 */
  line-height: 1.5;
}

@media (max-width: 768px) {
  .legal-section {
    padding: 64px 18px;
  }

  .legal-wrap {
    padding: 0 18px;
  }
}

/* =========================
   Site Footer
   ========================= */

.site-footer {
  border-top: 1px solid rgba(0,0,0,0.15);
  padding: 48px 24px;

  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  color: var(--coffee-dark);
  opacity: 0.45;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.site-footer__left {
  justify-self: start;
}

.site-footer__nav {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.site-footer__link {
  color: inherit;
  text-decoration: none;
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__right {
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 36px 18px;
    text-align: center;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .site-footer__left,
  .site-footer__right {
    justify-self: center;
  }

  .site-footer__nav {
    flex-wrap: wrap;
    gap: 14px;
  }
}

/* =========================
   Navigation Dropdown Fixes
   ========================= */
