/* Packsay: shared stylesheet. Plain CSS, no build step. */

:root {
  --paper: #F6F2EA;
  --ink: #1B1B18;
  --muted: #6F6A60;
  --line: #E3DCCD;
  --card: #FBF8F2;
  --green: #1F6B3F;
  --amber: #B9780F;
  --stone: #7C776D;
  --highlight: #F5D547;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-hand: "Caveat", cursive;

  --container: 1120px;
  --radius: 10px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

html {
  background: var(--paper);
  color-scheme: light;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.125rem; /* 18px minimum body text */
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 2rem; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Focus states */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem);
  font-weight: 500;
}

h2 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw + 1rem, 1.75rem);
}

p { max-width: 62ch; }
p.lede {
  font-size: 1.25rem;
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Highlighter effect: behind selected words only, never whole paragraphs */
mark.highlight {
  background: var(--highlight);
  color: var(--ink);
  padding: 0.05em 0.3em;
  border-radius: 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Handwritten annotations: sparingly, never for essential meaning */
.handwritten {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--green);
  line-height: 1.3;
}

.stamp {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
}

/* Links */
.text-link {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}
.text-link:hover { text-decoration-thickness: 0.15em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: #000; }

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--card); }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.wordmark .say { color: var(--green); }

.header-inner .wordmark {
  font-size: clamp(2.25rem, 7vw, 3rem);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-width: 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  min-width: 0;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--green);
}

.nav-cta {
  background: var(--green);
  color: var(--paper);
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-cta:hover { background: #17552f; }

/* Hero */
.hero {
  padding-block: 3rem 3.5rem;
}
@media (min-width: 768px) {
  .hero { padding-block: 5rem 4.5rem; }
}

.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.25rem; max-width: 48ch; }

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* Section rhythm */
.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .section { padding-block: 4.5rem; }
}

.section-head { max-width: 60ch; margin-bottom: 2.5rem; }
.section-head h2 { margin-top: 0.5rem; }

/* Steps */
.steps {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green);
  display: block;
  margin-bottom: 0.5rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

/* Front/back pack comparison */
.pack-compare {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .pack-compare { grid-template-columns: 1fr 1fr; }
}

.pack-compare h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.pack-compare ul { display: flex; flex-direction: column; gap: 0.6rem; }
.pack-compare li {
  padding-left: 1.4rem;
  position: relative;
}
.pack-compare li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
}

.annotation-wrap { position: relative; margin-top: 2rem; text-align: center; }

/* Verdicts: colour is never the only signal, glyph and label always present */
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-size: 1rem;
}

.verdict .glyph {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1;
}

.verdict--ok { color: var(--green); background: rgba(31, 107, 63, 0.08); }
.verdict--worth { color: var(--ink); border-color: var(--amber); background: rgba(185, 120, 15, 0.12); }
.verdict--unknown { color: var(--ink); border-color: var(--stone); background: rgba(124, 119, 109, 0.12); }

.verdict-block {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-left-color: currentColor;
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--card);
}
.verdict-block.verdict--ok { border-left-color: var(--green); }
.verdict-block.verdict--worth { border-left-color: var(--amber); }
.verdict-block.verdict--unknown { border-left-color: var(--stone); }
.verdict-block p { color: var(--ink); margin-top: 0.5rem; }

/* Not-do list */
.not-do-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.not-do-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 1.15rem;
}
.not-do-list li::before {
  content: "-";
  color: var(--muted);
  flex-shrink: 0;
}

/* Pending notice */
.pending {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(185, 120, 15, 0.14);
  border: 1px solid var(--amber);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}

.notice-banner {
  background: var(--card);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* FAQ (native details/summary, no JS) */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding-block: 1.1rem;
}
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--green);
  font-weight: 700;
}
.faq-item[open] summary::before { content: "\2212"; }
.faq-item p { margin-top: 0.75rem; color: var(--muted); }

/* Definition-style rule blocks (why-packsay page) */
.rule-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--card);
}

/* Long-form legal content (privacy, terms) */
.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p,
.legal-content ul {
  margin-bottom: 1rem;
  max-width: none;
}
.legal-content ul { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.legal-content li { padding-left: 1.4rem; position: relative; }
.legal-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding-block: 2.5rem;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.footer-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.footer-links a:hover { text-decoration: underline; }

.footer-legal {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}
.footer-legal a { color: var(--muted); text-decoration: underline; }

/* Utility */
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
