/* ===== SITE CHROME — shared by every page except the homepage =====
   Tokens, header, footer, buttons and the page-title band, copied from the
   homepage (index.html) so secondary pages look like the same site.
   The homepage is the source of truth: if a colour or font changes there,
   change it here too.

   Header + footer markup lives in scripts/site-chrome.js (used by the build
   scripts) and is copied into the hand-written pages (store, legal pages). */

/* ===== TOKENS (same values as the homepage) ===== */
:root {
  --ink: #080808;        /* near-black */
  --cocoa: #302820;      /* warm dark brown */
  --cream: #F3EFE6;      /* main light background */
  --paper: #FAF9F5;      /* lighter off-white (cards) */
  --sand: #D9CDBB;       /* muted tan */
  --olive: #666B43;      /* small labels on light backgrounds */
  --dust: #B9AD9A;       /* fine print on dark backgrounds */
  --warm-white: #E8E2D6; /* body text on dark backgrounds */
  --lime: #DCE925;       /* brand accent */

  --display: 'Archivo Black', sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --hand: 'Caveat', cursive;
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Card treatment used across the secondary pages */
  --card-border: 1.5px solid rgba(48, 40, 32, .16);
  --card-shadow: 0 14px 28px -20px rgba(48, 40, 32, .55);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--ink); }

/* Page container. `.container` is the class the generated pages already use. */
.container, .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Text helpers (same as homepage) */
.lime, .accent-text { color: var(--lime); }
.note { margin: 0; font-family: var(--hand); line-height: 1.1; }
.mark { background: linear-gradient(transparent 55%, var(--lime) 55%, var(--lime) 92%, transparent 92%); }
.eyebrow {
  display: block; margin: 0;
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--olive);
}
.display { font-family: var(--display); font-weight: 400; line-height: .92; text-transform: uppercase; margin: 0; }

/* ===== BUTTONS (same as homepage) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: .08em;
  padding: 17px 24px; border-radius: 999px; white-space: nowrap; text-align: center;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { box-shadow: 0 10px 30px rgba(220, 233, 37, .25); }
.btn-ink { background: var(--ink); color: var(--lime); }
.btn-ghost-dark { color: var(--ink); border: 1.5px solid var(--ink); padding: 15.5px 24px; }
.btn-ghost-dark:hover { background: var(--paper); }
.btn-ghost-light { color: var(--paper); border: 1.5px solid rgba(250, 249, 245, .4); padding: 15.5px 24px; }
.btn-ghost-light:hover { border-color: var(--lime); color: var(--lime); }

/* ===== HEADER =====
   Same look as the homepage header. Open/close behaviour is in /assets/nav.js,
   which looks for #nav, #nav-toggle and .nav-links — keep those names. */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--lime); color: var(--ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { left: 8px; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 8, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(243, 239, 230, .08);
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark { font-family: var(--display); font-size: 17px; letter-spacing: .02em; color: var(--paper); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
/* Tighter spacing on small laptops so the menu + lime pill keep their right margin. */
@media (max-width: 1239px) { .nav-links { gap: 20px; } }
.nav-links a:not(.btn) { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--sand); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--lime); }
/* The page you're on */
.nav-links a[aria-current="page"] { color: var(--paper); box-shadow: inset 0 -2px 0 var(--lime); padding-bottom: 4px; }
.nav-links .btn { font-size: 12px; letter-spacing: .1em; padding: 11px 18px; }
.nav-mobile-bar { display: none; align-items: center; gap: 10px; }
.nav-mobile-bar .btn { font-size: 11px; letter-spacing: .1em; padding: 10px 14px; }
.nav-toggle {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(243, 239, 230, .25);
  background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--paper); }
.nav-toggle span:last-child { width: 12px; margin-left: 6px; background: var(--lime); }

@media (max-width: 1099px) {
  .nav-mobile-bar { display: flex; }
  /* Links become a dropdown panel under the bar */
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-top: 1px solid rgba(243, 239, 230, .08);
    padding: 12px var(--gutter) 28px;
  }
  .site-header[data-menu="open"] .nav-links { display: flex; }
  .nav-links a:not(.btn) {
    font-family: var(--display); font-size: 28px; font-weight: 400; letter-spacing: 0;
    color: var(--paper); padding: 12px 0; border-bottom: 1px solid rgba(243, 239, 230, .08);
  }
  .nav-links a[aria-current="page"] { color: var(--lime); box-shadow: none; }
  .nav-links .btn { margin-top: 20px; font-size: 13px; padding: 16px; }
}
/* Small phones: logo + "Join free" + menu button must fit in one row */
@media (max-width: 440px) {
  .header-inner { gap: 8px; padding: 0 14px; }
  .wordmark { font-size: 13px; letter-spacing: 0; }
  .nav-mobile-bar { gap: 8px; }
  .nav-mobile-bar .btn { font-size: 10.5px; padding: 10px 12px; }
}
@media (max-width: 370px) {
  .nav-mobile-bar .btn { font-size: 10px; padding: 9px 10px; letter-spacing: .06em; }
}
@media (max-width: 350px) {
  .nav-mobile-bar .btn { display: none; } /* still in the menu */
}

/* ===== PAGE TITLE BAND =====
   The one decorative moment on a secondary page: a warm dark band with the
   title, faint palm silhouettes, and a torn-paper edge into the cream page.
   Deliberately much smaller than the homepage hero. */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--cocoa); color: var(--cream);
  padding: clamp(52px, 7vw, 92px) 0 clamp(64px, 8vw, 104px);
}
/* Palm silhouettes: the cream palm image multiplied onto brown leaves only
   darker fronds, faded out toward the text. */
.page-head::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 55%; z-index: -1; pointer-events: none;
  background: url(/assets/home/palms-cream.webp) right top / auto 130% no-repeat;
  mix-blend-mode: multiply; opacity: .75;
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 90%);
          mask-image: linear-gradient(to left, #000 20%, transparent 90%);
}
/* Torn-paper edge into the cream page below (same shape as the homepage) */
.page-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; background: var(--cream);
  clip-path: polygon(0 62%,4% 40%,7% 58%,11% 30%,15% 52%,19% 36%,23% 60%,27% 34%,31% 50%,35% 28%,39% 56%,43% 38%,47% 62%,51% 32%,55% 54%,59% 30%,63% 58%,67% 40%,71% 60%,75% 34%,79% 52%,83% 28%,87% 56%,91% 36%,95% 60%,100% 38%,100% 100%,0 100%);
}
.page-head-inner { max-width: 820px; }
.page-head .eyebrow { color: var(--lime); }
.page-h {
  margin: 18px 0 0; font-family: var(--display); font-weight: 400; color: var(--paper);
  font-size: clamp(44px, 6.4vw, 92px); line-height: .9; letter-spacing: -.01em; text-transform: uppercase;
  overflow-wrap: break-word;
}
.page-sub {
  margin: 22px 0 0; max-width: 620px;
  font-family: var(--serif); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: var(--warm-white); text-wrap: pretty;
}
.page-note { margin-top: 14px; font-size: 28px; color: var(--sand); transform: rotate(-3deg); transform-origin: left; }
/* Small "← All resources" style link above a title */
.page-back { display: inline-block; margin-bottom: 26px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--sand); transition: color .2s; }
.page-back:hover { color: var(--lime); }

/* ===== FOOTER (same as homepage) ===== */
.site-footer { position: relative; overflow: hidden; background: var(--ink); color: var(--cream); }
.site-footer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.footer-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,8,.62) 0%, rgba(8,8,8,.82) 55%, rgba(8,8,8,.95) 100%); }
.footer-inner { position: relative; padding-top: clamp(64px, 8vw, 104px); padding-bottom: 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 40px; }
.footer-brand { font-family: var(--display); font-size: 24px; line-height: 1; display: block; }
.footer-cols .note { margin-top: 18px; font-size: 32px; color: var(--lime); transform: rotate(-3deg); transform-origin: left; }
.socials { margin-top: 22px; display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(243,239,230,.35); display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s, border-color .2s; }
.socials a:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.footer-label { margin: 0 0 16px; font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--sand); }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 15px; font-weight: 600; }
.footer-links a:hover, .legal-row a:hover { color: var(--lime); }
.footer-tag { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.05; }
.footer-cols .btn { margin-top: 18px; font-size: 13px; letter-spacing: .1em; padding: 14px 20px; }
.legal-row { margin-top: clamp(48px, 6vw, 88px); padding-top: 22px; border-top: 1px solid rgba(243,239,230,.18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--sand); }
.legal-row nav { display: flex; gap: 22px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .btn { font-size: 13px; padding: 16px 18px; }
  .btn-ghost-dark, .btn-ghost-light { padding: 14.5px 18px; }
}
/* Very small phones: long single words in titles can't wrap */
@media (max-width: 360px) {
  .page-h { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
