/* ============================================================
   PITH LEARNING — design system
   Brand tokens pulled straight from the Pith brand field guide.
   Edit colors here once and the whole site follows.
   ============================================================ */

:root {
  /* --- color, read straight from the logo --- */
  --olive:    #546F3A;  /* primary green — the wordmark, headlines */
  --leaf:     #427638;  /* accent green — the leaf, italics */
  --lemon:    #FADE1B;  /* spotlight yellow — the fruit */
  --zest:     #F2C22C;  /* deep gold — eyebrows, small accents */
  --marigold: #FDCD5B;  /* the stamp frame */
  --sky:      #B4CDEB;  /* cool accent — stripes */
  --butter:   #FAE9B4;  /* warm cream field */
  --ink:      #3C4B27;  /* body text — a deepened olive for legibility */
  --hair:     #EBDFC0;  /* hairline borders */
  --cream:    #FBF5E6;  /* soft page-section background */
  --tint:     rgba(250,233,180,.34);
  --danger:   #B85A3A;  /* the one warm-red, used sparingly */

  /* --- type --- */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Work Sans', system-ui, -apple-system, sans-serif;

  /* --- layout --- */
  --wrap: 1080px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive); text-underline-offset: 3px; }
a:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* --- headings --- */
h1, h2, h3 { font-family: var(--serif); color: var(--olive); font-weight: 700; margin: 0; }
h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1.0; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
h3 { font-size: 21px; line-height: 1.25; margin: 0 0 6px; }

p { margin: 0 0 16px; }
.lead { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.5; color: var(--ink); max-width: 60ch; }
strong { font-weight: 600; color: var(--olive); }
em { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--zest);
  margin: 0 0 14px;
}

.serif-italic { font-family: var(--serif); font-style: italic; color: var(--leaf); }

/* --- the perforated stamp-edge divider --- */
.perf {
  height: 6px;
  background-image: radial-gradient(circle, var(--marigold) 2.4px, transparent 2.6px);
  background-size: 15px 15px;
  background-position: center;
  background-repeat: repeat-x;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 28px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand .name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 23px;
  color: var(--olive);
  letter-spacing: -.01em;
}
.brand .name small {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-top: -3px;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.nav a:hover, .nav a.active { color: var(--olive); }
.nav a.active { text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--olive); margin: 5px 0; border-radius: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--olive); color: var(--butter); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(84,111,58,.25); }
.btn-lemon { background: var(--lemon); color: var(--ink); }
.btn-lemon:hover { box-shadow: 0 6px 18px rgba(242,194,44,.35); }
.btn-ghost { background: #fff; color: var(--olive); border-color: var(--hair); }
.btn-ghost:hover { border-color: var(--marigold); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--hair);
  padding: 72px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: center;
}
.hero .tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 3vw, 27px);
  color: var(--leaf);
  margin: 16px 0 0;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-stamp img { width: 100%; max-width: 300px; margin: 0 auto; filter: drop-shadow(0 10px 24px rgba(84,111,58,.18)); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 64px 0; }
.section-head { margin: 0 0 36px; max-width: 62ch; }
.bg-cream { background: var(--cream); }
.bg-butter { background: var(--tint); }

/* --- value cards --- */
.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 26px 26px;
}
.card .ic {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--tint);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--olive);
  margin-bottom: 16px;
}
.card p:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 8px; }

/* ============================================================
   ISSUE (STAMP) CARDS — the collectible grid
   ============================================================ */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.stamp-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.stamp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(84,111,58,.16);
  border-color: var(--marigold);
}
/* the perforated postage-stamp top */
.stamp-card .cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--sky);
  background-image:
    repeating-linear-gradient(90deg, rgba(180,205,235,.9) 0 22px, var(--butter) 22px 44px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 2px dashed var(--marigold);
}
.stamp-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.stamp-card .cover .placeholder {
  font-family: var(--serif); font-weight: 700; color: var(--olive);
  font-size: 15px; text-align: center; padding: 20px; opacity: .8;
}
.stamp-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.stamp-card .meta {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--zest); margin-bottom: 8px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.stamp-card .meta .grade {
  color: var(--leaf); letter-spacing: .06em;
  padding-left: 9px; border-left: 1px solid var(--hair);
}
.stamp-card h3 { font-size: 20px; margin-bottom: 8px; }
.stamp-card .blurb { font-size: 14.5px; color: var(--ink); opacity: .85; margin-bottom: 16px; flex: 1; }
.stamp-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--olive);
}

/* price / free tag, sits top-left on the cover */
.pill {
  position: absolute; top: 12px; left: 12px;
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .02em;
  border-radius: 20px; padding: 3px 12px;
}
.pill-price { background: var(--olive); color: var(--butter); }
.pill-free  { background: var(--lemon); color: var(--ink); }

/* region badge, sits top-RIGHT on the cover (sky accent) */
.pill-region { background: var(--sky); color: var(--olive); }
.stamp-card .cover .pill-region { left: auto; right: 12px; }
/* same badge used inline inside body copy */
.pill-inline { position: static; display: inline-block; vertical-align: middle; }

/* empty-state when there are no packets yet */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  border: 2px dashed var(--marigold);
  border-radius: var(--radius-lg);
  background: var(--tint);
}
.empty h3 { margin-bottom: 8px; }
.empty p { max-width: 46ch; margin: 0 auto; }

/* ============================================================
   PACKET DETAIL PAGE
   ============================================================ */
.packet-hero { background: var(--tint); border-bottom: 1px solid var(--hair); padding: 48px 0 44px; }
.packet-hero .grid-2 { display: grid; grid-template-columns: 320px 1fr; gap: 44px; align-items: start; }
.packet-hero .stamp-frame {
  background: #fff; border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 10px 26px rgba(84,111,58,.14);
}
.packet-hero .stamp-frame .cover {
  aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
  background-image: repeating-linear-gradient(90deg, rgba(180,205,235,.9) 0 22px, var(--butter) 22px 44px);
  display:flex; align-items:center; justify-content:center;
}
.fineprint { font-size: 13px; color: var(--ink); opacity: .7; margin-top: 14px; }
.crumb { font-size: 13px; margin-bottom: 18px; }
.crumb a { color: var(--leaf); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.spec-list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--hair); }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14.5px; }
.spec-list li span:first-child { color: var(--olive); font-weight: 600; }
.spec-list li span:last-child { color: var(--ink); opacity: .8; text-align: right; }
.prose { max-width: 62ch; }
.prose h2 { margin: 32px 0 12px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--olive);
  color: var(--butter);
  padding: 54px 0 40px;
  margin-top: 20px;
}
.site-footer a { color: var(--butter); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .fbrand { font-family: var(--serif); font-weight: 800; font-size: 28px; color: #fff; }
.site-footer .ftag { font-family: var(--serif); font-style: italic; color: var(--marigold); margin-top: 6px; }
.site-footer h4 {
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--marigold);
  margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.site-footer li a { text-decoration: none; font-size: 15px; opacity: .92; }
.site-footer li a:hover { opacity: 1; text-decoration: underline; }
.footer-note {
  border-top: 1px solid rgba(250,233,180,.22);
  margin-top: 40px; padding-top: 22px;
  font-size: 13px; color: rgba(250,233,180,.7);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stamp { order: -1; }
  .hero-stamp img { max-width: 220px; }
  .g3 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .packet-hero .grid-2 { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .nav { position: fixed; inset: 0 0 auto auto; top: 68px; right: 14px;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: #fff; border: 1px solid var(--hair); border-radius: 14px;
    padding: 14px 18px; box-shadow: 0 12px 30px rgba(0,0,0,.12);
    display: none; min-width: 180px; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}
