/* ==========================================================================
   Mewvellous blog — style.css
   Brand tokens lifted from brand-tokens-blog.md v1.0 + favicon/OG spec v1.0.
   Square-cornered lock (radius = 0px). 8px spacing scale. Self-hosted woff2.
   Sections:  1. Tokens  2. Font-face  3. Reset/base  4. Type scale
              5. Layout  6. Links/buttons  7. Components  8. Wordmark
              9. Motion/reduce
   ========================================================================== */


/* ---------- 1. Tokens -------------------------------------------------- */
:root {
  /* Surfaces */
  --surface-page:   #E1FAFF;
  --surface-card:   #AFD8E1;
  --surface-plain:  #FFFFFF;

  /* Text */
  --text:           #54595F;
  --heading:        #54595F;
  --text-muted:     #7A7A7A;
  --text-on-brand:  #FFFFFF;
  --cat-line:       #1D2327;

  /* Brand + interactive */
  --brand-periwinkle: #7383C7;
  --brand-green:      #61CE70;
  --link:         #5666AA;
  --link-hover:   #4A5BA0;
  --link-visited: #7B6BAA;
  --btn-primary-bg:    #5666AA;
  --btn-primary-hover: #4A5BA0;
  --btn-secondary-bg:  transparent;
  --green-cta-bg:    #2E7D38;
  --green-cta-hover: #256B30;
  --border-subtle:   #C9E8EF;
  --focus-ring:      #7383C7;

  /* Disclosure surface (rule-owned, separate from blog palette) */
  --disclosure-fg: #1d2327;
  --disclosure-bg: #fdf0f0;

  /* Radius — square-cornered lock (all 0px) */
  --radius:    0px;
  --radius-sm: 0px;
  --radius-lg: 0px;

  /* Spacing (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Shadows */
  --shadow-lift: 0 0 10px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 8px rgba(84,89,95,0.12);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Font family stacks (woff2 arrive with font fetch; font-display:swap covers gap) */
  --font-body:      'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-voice:     'Sofadi One', 'IBM Plex Sans', cursive;
  --font-subhead:   'Roboto Slab', 'IBM Plex Sans', Georgia, serif;
  --font-display:   'Fraunces', 'Roboto Slab', Georgia, serif;
  --font-decor:     'Princess Sofia', 'Fraunces', cursive;
}


/* ---------- 2. @font-face (paths declared; files arrive with font fetch) - */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/ibm-plex-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/assets/fonts/ibm-plex-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/ibm-plex-sans-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/roboto-slab-400.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/assets/fonts/roboto-slab-600.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/fraunces-400.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/assets/fonts/fraunces-600.woff2') format('woff2'); }
@font-face { font-family: 'Sofadi One'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/sofadi-one-400.woff2') format('woff2'); }
@font-face { font-family: 'Princess Sofia'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/princess-sofia-400.woff2') format('woff2'); }


/* ---------- 3. Reset / base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
}

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


/* ---------- 4. Type scale ---------------------------------------------- */
/* Headings — color from --heading token */
h1, h2, h3, h4, h5, h6 { color: var(--heading); margin: var(--space-6) 0 var(--space-3); }
h1 { /* post title — Display Fraunces 600 */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h2 { font-family: var(--font-subhead); font-weight: 600; font-size: 28px; line-height: 1.3; }
h3 { font-family: var(--font-subhead); font-weight: 600; font-size: 22px; line-height: 1.35; }
h4, h5, h6 { font-family: var(--font-subhead); font-weight: 600; font-size: 18px; line-height: 1.4; }

p { margin: 0 0 var(--space-4); }

/* Typographic role utilities */
.voice {       /* voice intro / pull-quote — Sofadi One, 22px+ only */
  font-family: var(--font-voice);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.5;
}
.signoff {    /* sign-off — Princess Sofia decorative */
  font-family: var(--font-decor);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
}
.caption, small { font-size: 13px; line-height: 1.45; color: var(--text-muted); }


/* ---------- 5. Layout -------------------------------------------------- */
.content {
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--space-4);
}

.site-header, .site-footer {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.site-footer { border-top: 1px solid var(--border-subtle); border-bottom: 0; }
.site-header nav a, .site-footer a { margin-right: var(--space-4); }
.site-header nav a:last-child, .site-footer a:last-child { margin-right: 0; }

.post-body { max-width: 68ch; }   /* reading measure */
.hero, .post-body img { max-width: 100%; height: auto; }


/* ---------- 6. Links + buttons ----------------------------------------- */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--link-hover); }
a:visited { color: var(--link-visited); }

.btn, .btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--text-on-brand);
}
.btn-primary:hover { background: var(--btn-primary-hover); color: var(--text-on-brand); }
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--link);
  border: 2px solid var(--link);
}
.btn-secondary:hover { color: var(--link-hover); border-color: var(--link-hover); }


/* ---------- 7. Components ---------------------------------------------- */
/* Affiliate disclosure — rule-owned surface, prominent + AA (>=14px §5.3).
   border-left switched from --brand-green to --cat-line (unified-brand-black). */
.affiliate-disclosure {
  background: var(--disclosure-bg);
  color: var(--disclosure-fg);
  border-left: 4px solid var(--cat-line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 15px;
  line-height: 1.5;
  margin: var(--space-4) 0;
}
.affiliate-disclosure p { margin: 0; }

/* Advert slot */
.advert-slot {
  background: var(--surface-card);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: var(--space-6) 0;
}
/* Slot label — bumped to 14px/600 with --text for AA contrast (12px/muted failed).
   Interp call: spec offered 13px/600 or --text@14px; chose 14px+--text for margin. */
.slot-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 0 0 var(--space-2);
}

/* Variant note — dev/preview affordance, not brand. Keep yellow tint. */
.variant-note {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  margin: var(--space-4) 0;
  border-radius: var(--radius);
}

/* Meta — post-date / byline / breadcrumbs / post-category */
.post-date, .byline, .breadcrumbs, .post-category {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 var(--space-3);
}
.byline { color: var(--text-muted); text-transform: none; font-weight: 400; font-size: 16px; }
.breadcrumbs a { color: var(--text-muted); }

.reviewer { font-style: italic; color: var(--text); margin: 0 0 var(--space-3); }

.related { margin: var(--space-6) 0; }
.related ul { padding-left: var(--space-5); }

.post { margin: 0 0 var(--space-8); }
.brand { font-family: var(--font-display); font-weight: 600; text-decoration: none; color: var(--heading); }


/* ---------- 8. Wordmark lockup (classes ready; SVGs land later) ------- */
.wordmark {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  text-decoration: none;
}
.wordmark .prefix {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted);
}
.wordmark .brand {
  font-family: var(--font-decor);
  font-weight: 600;
  color: var(--heading);
}
.wordmark-stacked {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.wordmark-stacked .prefix { font-size: 14px; }
.wordmark-stacked .brand { font-size: 28px; line-height: 1.1; }


/* ---------- 9. Motion + focus ----------------------------------------- */
*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
