/* ============================================================
   Memory Magnets — scrapbook design system
   Warm paper, polaroid photos, washi tape, sticker badges
   ============================================================ */
:root {
  --paper: #f7efe1;
  --paper-2: #f0e5cf;
  --card: #fffdf7;
  --ink: #26221b;
  --ink-soft: #5f5849;
  --ink-faint: #8d8471;
  --accent: #e4572e;
  --accent-dark: #c2441f;
  --accent-soft: #fbe3d8;
  --mustard: #f2b134;
  --mustard-soft: #fdf0d2;
  --sage: #6b8f71;
  --sage-soft: #e4ecdf;
  --line: #e3d7bd;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 34px rgba(38, 34, 27, 0.10);
  --shadow-lg: 0 28px 60px rgba(38, 34, 27, 0.16);
  --hard: 5px 5px 0 rgba(38, 34, 27, 0.9);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(38, 34, 27, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

::selection { background: var(--mustard); color: var(--ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; margin: 0 auto; }
.section { padding: 76px 0; }
.section.tight { padding: 48px 0; }
.section.alt { background: var(--paper-2); border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 239, 225, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; max-width: var(--max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .logo-chip {
  width: 42px; height: 42px; flex: none; background: var(--accent); border: 2px solid var(--ink);
  border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px; color: #fff;
  transform: rotate(-4deg); transition: transform .2s ease;
}
.brand:hover .logo-chip { transform: rotate(4deg); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.brand-name span { color: var(--accent); }
.brand-tag { display: block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }

.main-nav ul { display: flex; gap: 4px; list-style: none; align-items: center; }
.main-nav a {
  display: block; padding: 8px 13px; border-radius: 999px; text-decoration: none;
  color: var(--ink-soft); font-weight: 600; font-size: 14.5px; transition: all .15s ease; border: 2px solid transparent;
}
.main-nav a:hover { color: var(--ink); border-color: var(--ink); background: #fff; transform: rotate(-1deg); }
.main-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.main-nav a.nav-cta { background: var(--accent); color: #fff; border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); margin-left: 6px; }
.main-nav a.nav-cta:hover { background: var(--accent-dark); color: #fff; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

.nav-toggle { display: none; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 7px 10px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 2px solid var(--ink); display: none; padding: 12px 20px 20px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .main-nav a { padding: 12px 16px; }
  .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; padding: 88px 0 84px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  background: var(--mustard); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px; transform: rotate(-1.5deg);
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; font-weight: 600; }
.hero h1 { font-size: clamp(40px, 5.4vw, 64px); margin-bottom: 22px; }
.hero h1 em, .page-hero h1 em, .section-head h2 em {
  font-style: italic; color: var(--accent-dark);
  background: linear-gradient(transparent 62%, rgba(242, 177, 52, 0.65) 62%);
  padding: 0 4px;
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 56ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; border-radius: 14px;
  font-weight: 700; font-size: 15.5px; text-decoration: none; transition: all .15s ease;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--hard); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(38,34,27,.9); }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: var(--hard); }
.btn-ghost:hover { background: var(--mustard); color: var(--ink); transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(38,34,27,.9); }

.trust-row { display: flex; gap: 26px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.trust-item svg { width: 20px; height: 20px; flex: none; }

/* polaroid hero photo with washi tape */
.hero-media { position: relative; transform: rotate(2deg); transition: transform .3s ease; }
.hero-media:hover { transform: rotate(0deg); }
.hero-media .frame {
  background: #fff; padding: 14px 14px 54px; border: 2px solid var(--ink);
  box-shadow: var(--shadow-lg); border-radius: 6px; position: relative;
}
.hero-media img { width: 100%; object-fit: cover; aspect-ratio: 1/0.92; border: 2px solid var(--ink); border-radius: 3px; }
.hero-media .caption-hand {
  position: absolute; bottom: 12px; left: 0; right: 18px; text-align: right;
  font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--ink-soft);
}
.tape {
  position: absolute; width: 110px; height: 32px; background: rgba(242, 177, 52, 0.75);
  border-left: 2px dashed rgba(38,34,27,.25); border-right: 2px dashed rgba(38,34,27,.25);
  top: -16px; left: 50%; transform: translateX(-50%) rotate(-3deg); z-index: 2;
}
.tape.tape-alt { background: rgba(107, 143, 113, 0.55); }

.hero-badge {
  position: absolute; bottom: -26px; left: -30px; background: var(--card); border: 2px solid var(--ink);
  border-radius: 14px; box-shadow: var(--hard); padding: 14px 18px; display: flex; gap: 12px; align-items: center;
  transform: rotate(-3deg); z-index: 3;
}
.hero-badge .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--accent); }
.hero-badge .lbl { font-size: 12px; color: var(--ink-soft); line-height: 1.35; max-width: 140px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; padding: 56px 0 72px; }
  .hero-badge { left: 8px; bottom: -20px; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { border-bottom: 2px dashed var(--line); }
.page-hero .wrap { padding-top: 64px; padding-bottom: 56px; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 18px; max-width: 21ch; }
.page-hero .lede { margin-bottom: 0; }

.breadcrumbs { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 26px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li::after { content: "›"; margin-left: 6px; color: var(--ink-faint); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- article typography ---------- */
.article { font-size: 17.5px; }
.article > * + * { margin-top: 22px; }
.article h2 { font-size: clamp(26px, 3vw, 34px); margin-top: 54px; margin-bottom: 4px; position: relative; display: inline-block; }
.article h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 10px;
  background: rgba(242, 177, 52, 0.5); z-index: -1; transform: rotate(-0.5deg);
}
.article h3 { font-size: 22px; margin-top: 38px; }
.article p { color: var(--ink-soft); }
.article p strong, .article li strong { color: var(--ink); }
.article ul, .article ol { padding-left: 24px; color: var(--ink-soft); }
.article li + li { margin-top: 10px; }
.article blockquote {
  border: 2px solid var(--ink); background: var(--mustard-soft); border-radius: 6px;
  box-shadow: var(--hard); transform: rotate(-0.6deg);
  padding: 24px 30px; font-family: var(--font-display); font-size: 21px; font-style: italic; color: var(--ink);
}
.article figure { margin: 40px 0; }
.article figure .frame, .article figure img { border-radius: 6px; }
.article figure img { border: 2px solid var(--ink); box-shadow: var(--shadow); transform: rotate(0.6deg); }
.article figcaption { font-size: 13.5px; color: var(--ink-faint); margin-top: 14px; text-align: center; font-style: italic; }
.article table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--hard); }
.article th { background: var(--ink); color: #fff; text-align: left; padding: 13px 16px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.article td { padding: 13px 16px; border-top: 2px solid var(--line); color: var(--ink-soft); }
.article tr:nth-child(even) td { background: var(--paper); }

.callout { background: var(--sage-soft); border: 2px dashed var(--sage); border-radius: var(--radius); padding: 24px 28px; color: var(--ink-soft); transform: rotate(0.4deg); }
.callout strong { color: #45604a; display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 18px; }

/* ---------- cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: 8px;
  padding: 16px 16px 26px; box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column; position: relative;
}
.grid-3 .card:nth-child(1) { transform: rotate(-1.4deg); }
.grid-3 .card:nth-child(2) { transform: rotate(0.8deg); }
.grid-3 .card:nth-child(3) { transform: rotate(-0.7deg); }
.card:hover { transform: rotate(0deg) translateY(-5px); box-shadow: var(--shadow-lg); z-index: 2; }
.card h3 { font-size: 21px; margin: 16px 8px 10px; }
.card p { color: var(--ink-soft); font-size: 15.5px; flex: 1; margin: 0 8px; }
.card .card-link { margin: 18px 8px 0; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }
.card img.card-img { border: 2px solid var(--ink); border-radius: 5px; aspect-ratio: 3/2; object-fit: cover; }
.card .tape { width: 84px; height: 26px; top: -13px; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 44px); margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step {
  display: grid; grid-template-columns: 70px 1fr; gap: 22px; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px 28px; align-items: start;
  box-shadow: var(--hard); transition: transform .18s ease;
}
.step:hover { transform: translate(2px, 2px); }
.step::before {
  counter-increment: step; content: counter(step);
  width: 52px; height: 52px; border-radius: 50%; background: var(--mustard); color: var(--ink);
  border: 2px solid var(--ink); font-family: var(--font-display); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; transform: rotate(-6deg);
}
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- stats band ---------- */
.stats-band {
  background: var(--ink); color: #fff; border-radius: 24px; border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(38,34,27,.25);
  padding: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; transform: rotate(-0.4deg);
}
.stat .stat-num { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--mustard); }
.stat .stat-lbl { font-size: 14px; color: #d8d2c4; margin-top: 6px; }
@media (max-width: 900px) { .stats-band { grid-template-columns: repeat(2, 1fr); padding: 36px; } }

/* ---------- faq ---------- */
.faq-item { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); position: relative; transition: transform .15s ease; }
.faq-item:hover { transform: rotate(-0.3deg); }
.faq-item + .faq-item { margin-top: 16px; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 700; font-size: 16.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font-display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 26px; color: var(--accent); flex: none; transition: transform .2s; font-family: var(--font-body); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--ink-soft); font-size: 15.5px; }

a.card { text-decoration: none; color: inherit; }
a.card:hover { color: inherit; }
a.card .card-link { color: var(--accent-dark); }
a.card:hover .card-link { color: var(--accent); text-decoration: underline; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--accent); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  overflow: hidden; transform: rotate(-1deg) scale(1.02); margin: 30px 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff;
  padding: 14px 0; white-space: nowrap;
}
.marquee-track b { color: var(--mustard); padding: 0 18px; font-weight: 400; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- related guides ---------- */
.related-section .section-head { margin-bottom: 36px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent); border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(38,34,27,.9);
  border-radius: 24px; padding: 60px; text-align: center; color: #fff; position: relative;
  transform: rotate(0.5deg);
}
.cta-band h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 14px; color: #fff; }
.cta-band p { color: #ffe9de; max-width: 52ch; margin: 0 auto 30px; font-size: 17px; }
.cta-band .btn-primary { background: var(--mustard); color: var(--ink); border-color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.cta-band .btn-primary:hover { background: #fff; color: var(--ink); }
.cta-band .sticker {
  position: absolute; top: -24px; right: 34px; background: var(--mustard); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 50%; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2;
  transform: rotate(8deg); box-shadow: 3px 3px 0 var(--ink); padding: 8px;
}
@media (max-width: 700px) { .cta-band { padding: 48px 24px; } .cta-band .sticker { width: 78px; height: 78px; font-size: 12.5px; right: 16px; top: -20px; } }

/* ---------- gallery strip ---------- */
.gallery-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.gallery-strip .polaroid {
  background: #fff; padding: 12px 12px 40px; border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: var(--shadow); transition: transform .25s ease; position: relative;
}
.gallery-strip .polaroid:nth-child(1) { transform: rotate(-1.8deg); }
.gallery-strip .polaroid:nth-child(2) { transform: rotate(1.2deg); }
.gallery-strip .polaroid:nth-child(3) { transform: rotate(-1deg); }
.gallery-strip .polaroid:hover { transform: rotate(0deg) scale(1.03); z-index: 2; box-shadow: var(--shadow-lg); }
.gallery-strip img { aspect-ratio: 1/1; object-fit: cover; border: 2px solid var(--ink); border-radius: 3px; }
@media (max-width: 700px) { .gallery-strip { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cfc8b8; margin-top: 90px; border-top: 2px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 48px; }
.site-footer h4 { color: var(--mustard); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 11px; }
.site-footer a { color: #cfc8b8; text-decoration: none; font-size: 14.5px; }
.site-footer a:hover { color: #ffb59d; }
.footer-brand p { font-size: 14.5px; margin-top: 16px; max-width: 34ch; }
.footer-bottom { border-top: 1px solid #453f34; padding: 22px 0; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.pill-list li { background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--ink-soft); box-shadow: 2px 2px 0 rgba(38,34,27,.85); }

.toc { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--hard); position: relative; }
.toc::before {
  content: ""; position: absolute; width: 90px; height: 26px; background: rgba(228, 87, 46, 0.5);
  border-left: 2px dashed rgba(38,34,27,.25); border-right: 2px dashed rgba(38,34,27,.25);
  top: -13px; left: 50%; transform: translateX(-50%) rotate(2deg);
}
.toc h2 { font-size: 16px !important; margin: 0 0 12px !important; font-family: var(--font-body) !important; letter-spacing: 0.1em; text-transform: uppercase; }
.toc h2::after { display: none; }
.toc ol { padding-left: 20px; }
.toc li { font-size: 15px; margin-top: 8px !important; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--accent); }

.two-col-media { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col-media img { border-radius: 6px; border: 2px solid var(--ink); box-shadow: var(--shadow); }
@media (max-width: 900px) { .two-col-media { grid-template-columns: 1fr; gap: 30px; } }

.author-line { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-faint); margin-top: 26px; }
.author-line .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 16px; transform: rotate(-4deg); }
