@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --teal: #175A5E;
  --teal-muted: #5B8A8D;
  --parchment: #F6F1E7;
  --ink: #14201E;
  --border: rgba(20, 32, 30, 0.12);

  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--parchment);
}
.site-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav__logo svg { height: 70px; width: auto; }
.site-nav__links { display: flex; gap: 28px; }
.site-nav__links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
}
.site-nav__toggle { display: none; }

@media (max-width: 720px) {
  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--parchment);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
  }
  .site-nav__links.is-open {
    display: flex;
    z-index: 20;
    box-shadow: 0 8px 16px rgba(20, 32, 30, 0.12);
  }
  .site-nav__links a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .site-nav__links a:last-child { border-bottom: none; }
  .site-nav__inner { position: relative; }
  .site-nav__toggle {
    display: flex; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 4px;
  }
  .site-nav__toggle span {
    width: 22px; height: 2px; background: var(--ink);
  }
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: left;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  max-width: 720px;
}
.hero p.lede {
  font-size: 18px;
  color: var(--ink);
  max-width: 560px;
  opacity: 0.85;
}

/* Pillar grid */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0 60px;
}
.pillar-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  background: rgba(255,255,255,0.35);
}
.pillar-card__watermark {
  position: absolute;
  bottom: -18px;
  right: 10px;
  width: 110px;
  height: 110px;
  color: var(--teal);
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}
.pillar-card__watermark svg { width: 100%; height: 100%; }
.pillar-card h2,
.pillar-card p,
.pillar-card a.pillar-link {
  position: relative;
  z-index: 1;
}
.pillar-card h2 {
  font-size: 22px;
  color: var(--teal);
  margin-bottom: 10px;
}
.pillar-card p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 16px;
}
.pillar-card a.pillar-link {
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 800px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Go deeper - community links at end of a guide */
.go-deeper {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 28px;
}
.go-deeper h2 { font-size: 20px; margin-bottom: 6px; }
.go-deeper > p { font-size: 15px; opacity: 0.8; margin-bottom: 20px; }
.go-deeper__list { display: flex; flex-direction: column; gap: 14px; }
.go-deeper__item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--ink);
}
.go-deeper__item:hover { border-color: var(--teal-muted); text-decoration: none; }
.go-deeper__item strong { color: var(--teal); display: block; margin-bottom: 4px; font-size: 15px; }
.go-deeper__item span { font-size: 14px; opacity: 0.85; }

/* News feed - editorial style, distinct from the guide-list cards */
.news-feed { padding-bottom: 60px; }
.news-feed__item {
  display: block;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--ink);
}
.news-feed__item:first-child { border-top: none; padding-top: 0; }
.news-feed__item:hover { text-decoration: none; }
.news-feed__meta {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-muted);
  margin-bottom: 10px;
}
.news-feed__item h2 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.news-feed__item:first-child h2 { font-size: 32px; }
.news-feed__item p {
  font-size: 16px;
  opacity: 0.85;
  margin: 0 0 12px;
  max-width: 640px;
}
.news-feed__cta { font-size: 14px; font-weight: 600; color: var(--teal); }

/* Guide list (pillar index pages) */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 80px;
}
.guide-list__item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.35);
  color: var(--ink);
}
.guide-list__item:hover { border-color: var(--teal-muted); text-decoration: none; }
.guide-list__item h2 { font-size: 20px; color: var(--teal); margin-bottom: 6px; }
.guide-list__item p { font-size: 15px; opacity: 0.85; margin: 0 0 10px; }
.guide-list__time { font-size: 13px; color: var(--teal-muted); }

/* Homepage feature grid - News teaser + Hardware pick */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 12px 0 40px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 28px;
  color: var(--ink);
}
.feature-card:hover { text-decoration: none; }
.feature-card__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.feature-card h3 { font-size: 20px; margin: 0 0 10px; line-height: 1.3; }
.feature-card p { font-size: 14.5px; opacity: 0.85; margin: 0 0 16px; flex-grow: 1; }
.feature-card__cta { font-size: 14px; font-weight: 600; }

.feature-card--news {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
}
.feature-card--news .feature-card__rule {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--border);
  padding-top: 5px;
  margin-bottom: 14px;
}
.feature-card--news .feature-card__eyebrow {
  margin-bottom: 0;
  color: var(--teal-muted);
}
.feature-card--news .feature-card__cta { color: var(--teal); }

.feature-card--hardware {
  background: var(--teal);
  color: var(--parchment);
}
.feature-card--hardware .feature-card__eyebrow { color: rgba(246,241,231,0.7); }
.feature-card--hardware .feature-card__cta { color: var(--parchment); }
.feature-card__photo {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  margin-bottom: 18px;
}
.feature-card__photo img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* FAQ accordion */
.faq { padding: 40px 0 80px; border-top: 1px solid var(--border); }
.faq h2 { margin-bottom: 20px; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '›';
  color: var(--teal);
  font-size: 22px;
  transition: transform 0.2s ease;
}
.faq-item[open] > summary::after { transform: rotate(90deg); }
.faq-item .faq-answer { padding: 0 0 18px; opacity: 0.85; }

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--teal);
  z-index: 50;
}

/* Guide layout */
.guide-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.guide-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.guide-sidebar__back {
  font-size: 14px;
  font-weight: 500;
}
.guide-sidebar__sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.guide-sidebar__sections a {
  font-size: 14px;
  color: var(--ink);
  opacity: 0.75;
}
.guide-sidebar__sections a:hover { opacity: 1; }

.guide-header { margin-bottom: 24px; }
.guide-header__tag {
  color: var(--teal-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}
.guide-header h1 { font-size: clamp(28px, 4vw, 40px); }
.guide-header__desc { font-size: 17px; opacity: 0.85; max-width: 640px; }
.guide-header__meta {
  font-size: 13px;
  color: var(--teal-muted);
  margin-top: 8px;
}
.guide-signature {
  font-size: 13px;
  color: var(--teal-muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 40px;
}

.guide-section { padding: 32px 0; border-top: 1px solid var(--border); }
.guide-section:first-of-type { border-top: none; }
.guide-section h2 { font-size: 24px; }
.guide-section h3 { font-size: 19px; margin-top: 1.4em; }
.guide-section p, .guide-section li { font-size: 16px; opacity: 0.9; }
.guide-section pre {
  background: var(--ink);
  color: var(--parchment);
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
.guide-section code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9em;
}
.guide-section :not(pre) > code {
  background: rgba(23, 90, 94, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.callout {
  border-left: 3px solid var(--teal);
  background: rgba(23, 90, 94, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
}
.callout strong { color: var(--teal); }
.callout--warn {
  border-left-color: #B4791C;
  background: rgba(180, 121, 28, 0.08);
}
.callout--warn strong { color: #B4791C; }
.callout--success {
  border-left-color: #2E6B3E;
  background: rgba(46, 107, 62, 0.08);
}
.callout--success strong { color: #2E6B3E; }

@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
}

.hardware-photo {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

/* Affiliate / hardware pages */
.affiliate-cta {
  display: inline-block;
  background: var(--teal);
  color: var(--parchment);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  margin: 24px 0 12px;
}
.affiliate-cta:hover { background: #0F4144; text-decoration: none; }
.affiliate-disclosure {
  font-size: 13px;
  color: var(--teal-muted);
  opacity: 0.9;
  max-width: 560px;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 50px 0 30px;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}

/* Left column: logo + nav links, spaced independently of the right column's height */
.site-footer__col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.site-footer__brand svg { height: 70px; width: auto; display: block; }
.site-footer__links { display: flex; gap: 20px; flex-wrap: wrap; margin: 0; }
.site-footer__links a { color: var(--parchment); opacity: 0.85; font-size: 14px; }

/* Right column: social icons, coffee button, support note */
.site-footer__col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 340px;
}

.site-footer__social { display: flex; gap: 14px; height: 34px; align-items: center; }
.site-footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(246,241,231,0.25);
  color: var(--parchment);
}
.site-footer__social a:hover { border-color: var(--parchment); }
.site-footer__social svg { width: 16px; height: 16px; }

.bmc-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--parchment);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.bmc-button svg { width: 20px; height: 20px; color: var(--teal); }
.bmc-button:hover { background: #fff; text-decoration: none; }

.site-footer__support-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--parchment);
  opacity: 0.6;
  text-align: right;
  margin: 0;
}

.site-footer__copy { font-size: 12px; opacity: 0.6; margin: 0; }
