/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --bg: #faf8f4;
  --bg-card: #ede8df;
  --bg-dark: #1c1410;
  --brown: #4a3728;
  --brown-light: #7a5c46;
  --sage: #6e9b5f;
  --sage-light: #a8c89a;
  --gold: #c8a440;
  --gold-dark: #a07c20;
  --text-primary: #1c1410;
  --text-secondary: #5a4a3a;
  --text-muted: #8a7a6a;
  --border: #d8cfc4;
  --white: #ffffff;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(28, 20, 16, 0.08);
  --shadow-md: 0 6px 24px rgba(28, 20, 16, 0.12);
  --shadow-lg: 0 16px 48px rgba(28, 20, 16, 0.16);

  --section-gap: 5rem;
  --content-width: 780px;
  --wide-width: 1080px;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--sage-light);
}

/* ─── Layout Utilities ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ─── Navigation ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
  max-width: var(--wide-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav__logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__logo-mark svg {
  width: 20px;
  height: 20px;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.2s,
    color 0.2s;
}

.nav__links a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Mobile navigation: desktop links remain unchanged. */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
}
.nav__toggle span {
  width: 21px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav__toggle:focus-visible,
.nav__links a:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .nav__inner { position: relative; gap: 0.6rem; }
  .nav__logo { min-width: 0; }
  .nav__logo-text { font-size: clamp(0.85rem, 3.6vw, 1.1rem); }
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 101;
  }
  .nav--open .nav__links {
  display: flex;
}
  .nav__links a {
    display: block;
    padding: 0.75rem 0.9rem;
    min-height: 44px;
  }
  .featured-card { padding: 1.35rem; }
  .prose-section { padding-inline: 1rem; }
  .article-page .prose-section { padding-inline: 1rem !important; }
  .container { padding-inline: 0.75rem; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .featured-card, .prose, .article-page, .container { min-width: 0; }
  .prose { overflow-wrap: break-word; }
}


/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  background: var(--bg-dark);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 80% 20%,
      rgba(110, 155, 95, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 60% at 10% 80%,
      rgba(200, 164, 64, 0.08) 0%,
      transparent 55%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--content-width);
  margin-inline: auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 1.5rem;
}

.hero__eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sage-light);
  border-radius: 2px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero__intro {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  max-width: 600px;
}



/* ─── Prose Section ─────────────────────────────────────── */
.prose-section {
  padding: var(--section-gap) 2rem;
}
.featured-card + .featured-card {
  margin-top: 2rem;
}
.article-page .prose-section {
  padding: 3.5rem 1.5rem !important;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
  font-size: 1rem;
  line-height: 1.8;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── Featured Guide Card ───────────────────────────────── */
.featured-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.featured-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.featured-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.featured-card__desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.featured-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brown);
  background: var(--bg-card);
  padding: 0.6rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition:
    background 0.18s,
    border-color 0.18s;
}

.featured-card__link:hover {
  background: var(--border);
  color: var(--brown);
  border-color: var(--brown-light);
}

/* ─── Guide Grid (Latest Guides) ────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.guide-card:hover {
  border-color: var(--sage);
}

.guide-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.guide-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.guide-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sage);
}

.guide-card__link:hover {
  color: var(--brown);
}

/* ─── Topics / Categories ───────────────────────────────── */
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  list-style: none;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brown);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 100px;
}

/* ─── Sale & Updates ─────────────────────────────────────── */
.updates-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ─── Bottom CTA Panel ───────────────────────────────────── */
.cta-panel {
  max-width: var(--wide-width);
  margin-inline: auto;
  background: var(--bg-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
}

.cta-panel__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.cta-panel__text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.cta-panel__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.2s,
    transform 0.15s;
}

.cta-panel__button:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* ─── Site Footer ───────────────────────────────────────── */
footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__disclaimer {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-inline: auto;
  line-height: 1.7;
}

.footer__copy {
  font-size: 0.74rem;
  color: var(--border);
  margin-top: 1rem;
}

/* ─── Responsive tweaks ─────────────────────────────────── */
@media (max-width: 600px) {
  :root {
    --section-gap: 3.5rem;
  }
  .hero {
    padding: 3.5rem 1.25rem 3rem;
  }
  .cta-panel {
    padding: 2.25rem 1.5rem;
  }
}

/* ===== FIXED MOBILE SIDE DRAWER ===== */

/* Hidden on desktop */
.mobile-overlay,
.mobile-drawer {
  display: none;
}

@media (max-width: 640px) {

  /* Keep original navigation hidden on mobile */
  .nav .nav__links,
  .nav.nav--open .nav__links {
    display: none !important;
  }

  .nav__toggle {
    display: flex;
  }

  /* Dark background overlay */
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(20, 15, 11, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 350ms ease,
      visibility 0s linear 350ms;
  }

  .mobile-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity 350ms ease,
      visibility 0s;
  }

  /* Fixed drawer attached to viewport */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 80vw;
    max-width: 380px;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;

    padding: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);

    background: #faf8f4;
    box-shadow: -12px 0 36px rgba(0,0,0,0.15);
    overflow-y: auto;
    overscroll-behavior: contain;

    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;

    transition:
      transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 450ms;
  }

  .mobile-drawer.is-active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition:
      transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s;
  }

  .mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #d8cfc4;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #4a3728;
  }

  .mobile-drawer__close {
    width: 44px;
    height: 44px;
    border: 1px solid #4a3728;
    border-radius: 50%;
    background: transparent;
    font-size: 26px;
    color: #4a3728;
    cursor: pointer;
  }

  .mobile-drawer nav {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
  }

  .mobile-drawer nav a {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 12px 8px;
    border-bottom: 1px solid #d8cfc4;
    color: #4a3728;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-drawer nav a:hover {
    background: #ede8df;
  }

  .mobile-drawer button:focus-visible,
  .mobile-drawer a:focus-visible {
    outline: 3px solid #6e9b5f;
    outline-offset: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-overlay,
  .mobile-drawer {
    transition: none !important;
  }
}
