/* =========================================================================
   article.css — shared shell for long-form pages (Sun School articles,
   Privacy, Terms). Pairs with colors_and_type.css for the design tokens.
   Article pages sit in /articles/, so every page sets <base href="/">.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; background: var(--paper); min-height: 100vh; }

img, picture, svg, video { max-width: 100%; height: auto; display: block; }
main, section, header, footer, nav, aside, article, div, ul, ol, li { min-width: 0; }
a, button { -webkit-tap-highlight-color: rgba(217, 119, 87, 0.18); }
button { font: inherit; }

/* Film grain — matches the rest of the site */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  z-index: 9999; opacity: 0.24; mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(61,47,35,.035) 0 1px, transparent 1px 3px);
}

/* ── Prose ──────────────────────────────────────────────────────────────── */
.hws-prose { font-family: var(--font-body); color: var(--brown); font-size: 17px; line-height: 1.75; }
.hws-prose > * + * { margin-top: 22px; }
.hws-prose h2 {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.01em; line-height: 1.15; color: var(--brown);
  margin: 52px 0 0; text-transform: uppercase; font-weight: 400;
}
.hws-prose h3 {
  font-family: var(--font-body); font-size: 19px; font-weight: 800;
  letter-spacing: 0.01em; color: var(--brown); margin: 34px 0 0;
}
.hws-prose p { margin: 0; }
.hws-prose strong { font-weight: 800; }
.hws-prose a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.hws-prose ul, .hws-prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.hws-prose li::marker { color: var(--orange); font-weight: 700; }

/* Lede — the opening paragraph */
.hws-lede { font-size: 21px; line-height: 1.6; font-weight: 600; color: var(--brown); }

/* Pull-quote / callout box with the house "stamp" shadow */
.hws-callout {
  background: var(--paper-soft); border: 2px solid rgba(61,47,35,0.12);
  border-left: 6px solid var(--orange); border-radius: 14px;
  padding: 22px 24px; font-size: 16px; line-height: 1.65;
}
.hws-callout .hws-callout-h {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 14px; color: var(--orange); margin-bottom: 8px;
}

/* Stat strip — big numbers pulled from the research */
.hws-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hws-stat {
  background: var(--brown); color: var(--paper); border-radius: 16px; padding: 22px 18px;
}
.hws-stat b { display: block; font-family: var(--font-display); font-size: 38px; line-height: 1; color: var(--sun); }
.hws-stat span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; opacity: 0.85; }

/* Data table */
.hws-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hws-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 420px; }
.hws-table th, .hws-table td { text-align: left; padding: 12px 14px; border-bottom: 1.5px solid rgba(61,47,35,0.12); }
.hws-table th {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 13px; font-weight: 400; color: var(--paper); background: var(--brown);
}
.hws-table th:first-child { border-top-left-radius: 10px; }
.hws-table th:last-child  { border-top-right-radius: 10px; }
.hws-table tbody tr:nth-child(even) { background: rgba(61,47,35,0.03); }

/* Sources */
.hws-sources { font-size: 14px; line-height: 1.6; }
.hws-sources ol { padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.hws-sources a { color: var(--orange); word-break: break-word; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hws-prose { font-size: 16px; }
  .hws-lede  { font-size: 18px; }
  .hws-stats { grid-template-columns: 1fr; }
  .hws-stat b { font-size: 32px; }
}

/* =========================================================================
   SITE SHELL — Nav drawer + footer accordion.
   <Nav> renders its mobile drawer through ReactDOM.createPortal into
   document.body on every page, open or not. Without these rules the drawer
   is unstyled and falls to the bottom of the page as a stray "Menu" block.
   The four original pages carry the same rules inline in their own <style>;
   this copy is what the /articles/* and legal pages use.
   ========================================================================= */

.hws-nav-burger { display: none; }

.hws-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(61, 47, 35, 0.45);
  z-index: 9000; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease-out);
}
.hws-drawer-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }

.hws-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(82vw, 360px);
  background: var(--paper-soft);
  box-shadow: 4px 0 30px -8px rgba(61, 47, 35, 0.35);
  z-index: 9001;
  transform: translateX(-100%);
  transition: transform .3s var(--ease-out);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.hws-drawer[data-open="true"] { transform: translateX(0); }

.hws-drawer-section-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange);
  padding: 18px 14px 6px;
}
.hws-drawer-link {
  display: block; padding: 14px 16px;
  color: var(--brown);
  font-family: var(--font-display); font-size: 18px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none;
  border-radius: 10px;
  transition: background .15s, color .15s;
  min-height: 44px;
}
.hws-drawer-link:hover,
.hws-drawer-link:active { background: var(--sun); color: var(--brown); }
.hws-drawer-divider { height: 1.5px; background: rgba(61, 47, 35, 0.12); margin: 6px 14px; }

/* Footer columns — static on desktop, accordion on mobile */
.hws-footer-col-trigger { cursor: default !important; pointer-events: none; }
.hws-footer-col-trigger > .hws-footer-chevron { display: none !important; }
.hws-footer-col-list { max-height: none; overflow: visible; }

@media (max-width: 760px) {
  /* NAV — show burger, hide the centre menu and the Shop Now pill */
  .hws-nav-burger { display: inline-flex !important; }
  .hws-nav-center { display: none !important; }
  .hws-nav-right > .hws-pill { display: none !important; }
  nav > div { padding: 10px 16px !important; gap: 12px !important; }
  nav img { height: 52px !important; }
  nav span[style*="font-display"] { font-size: 15px !important; }
  nav span[style*="font-script"]  { font-size: 13px !important; }
  nav a[aria-label="Cart"] { width: 44px !important; height: 44px !important; }

  .hws-pill { padding: 12px 18px !important; font-size: 11px !important; }

  /* FOOTER ACCORDION */
  .hws-footer-col-trigger {
    cursor: pointer !important;
    pointer-events: auto !important;
    padding: 14px 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 1.5px solid rgba(252, 213, 182, 0.14) !important;
    min-height: 44px;
  }
  .hws-footer-col-trigger > .hws-footer-chevron {
    display: inline-flex !important; align-items: center; opacity: 0.7;
  }
  .hws-footer-col[data-open="true"] .hws-footer-col-trigger {
    opacity: 1 !important;
    border-bottom-color: var(--orange) !important;
  }
  .hws-footer-col-list {
    max-height: 0; overflow: hidden; opacity: 0;
    margin: 0 !important; padding: 0 !important;
    transition: max-height .3s ease, opacity .25s ease, padding .25s ease;
  }
  .hws-footer-col[data-open="true"] .hws-footer-col-list {
    max-height: 500px; opacity: 1; padding: 14px 0 18px !important;
  }
  .hws-footer-col { grid-column: 1 / -1 !important; }
  footer > div > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
