/*
Theme Name: We Are Blind
Theme URI: https://weareblind.org
Author: Eric Yap
Author URI: https://weareblind.org
Description: Accessibility-first publication theme for weareblind.org. Body 24px default, AAA contrast, Listen-bar TTS, font-size toggle, high-contrast toggle, semantic HTML. Built from the prototype committed to Technicityland/weareblind-content.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: All rights reserved
Text Domain: weareblind
Tags: editorial, accessibility, two-columns, custom-colors, custom-menu, featured-images
*/

/* =====================================================================
   We Are Blind theme — full stylesheet
   Direction A · Editorial Cream · 22-24px body, AAA contrast, semantic
   Identical to prototype/styles.css. If you change one, change both.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:wght@500;600;700&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;1,400&family=Courier+Prime:wght@400;700&display=swap');

:root {
  --bg:        #F4EDE0;
  --surface:   #EBE2CD;
  --ink-deep:  #1B2D4F;
  --ink-body:  #2A2520;
  --ink-muted: #5A4F40;
  --border:    #D4C9B0;
  --gold:      #C9A227;
  --gold-soft: #E8D58E;
  --serif-display: 'Cormorant Garamond', Georgia, serif;
  --serif-head:    'Playfair Display', Georgia, serif;
  --serif-body:    'Source Serif 4', Georgia, serif;
  --mono:          'Courier Prime', 'Courier New', monospace;
  --col-width:     760px;
  --gutter:        clamp(20px, 5vw, 48px);
}

body.high-contrast {
  --bg:        #1B2D4F;
  --surface:   #2A3D5F;
  --ink-deep:  #FFFFFF;
  --ink-body:  #FFFFFF;
  --ink-muted: #E8D58E;
  --border:    #5A6F8F;
  --gold:      #FFD000;
  --gold-soft: #FFE38A;
}

*,*::before,*::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--serif-body);
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-size="S"]  { font-size: 87.5%; }
html[data-size="M"]  { font-size: 100%; }
html[data-size="L"]  { font-size: 112.5%; }
html[data-size="XL"] { font-size: 125%; }

.skip-link {
  position: absolute; top: -100px; left: 0;
  padding: 16px 24px; background: var(--ink-deep); color: var(--bg);
  font-family: var(--mono); font-size: 1.125rem; font-weight: 700;
  text-decoration: none; z-index: 9999;
}
.skip-link:focus { top: 0; outline: 3px solid var(--gold); outline-offset: 2px; }

a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}

.listen-bar {
  width: 100%; background: var(--ink-deep); color: var(--bg);
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.listen-bar button {
  background: transparent; border: 2px solid var(--bg); color: var(--bg);
  font-family: var(--mono); font-size: 1.125rem; font-weight: 700;
  letter-spacing: 0.1em; padding: 14px 22px; cursor: pointer;
  min-height: 52px; min-width: 52px;
}
.listen-bar button:hover { background: var(--bg); color: var(--ink-deep); }
.listen-bar .listen-meta {
  font-family: var(--mono); font-size: 1rem; letter-spacing: 0.05em; opacity: 0.85;
}

.settings-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.settings-bar .settings-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings-bar .settings-label {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--ink-deep);
}
.settings-bar button {
  background: transparent; border: 2px solid var(--border); color: var(--ink-body);
  font-family: var(--mono); font-size: 1.125rem; font-weight: 700;
  padding: 10px 16px; min-width: 52px; min-height: 52px; cursor: pointer;
}
.settings-bar button[aria-pressed="true"] {
  background: var(--ink-deep); color: var(--bg); border-color: var(--ink-deep);
}
.settings-bar button:hover { border-color: var(--ink-deep); }

.masthead {
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--ink-deep);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.masthead .brand {
  font-family: var(--serif-head); font-weight: 700; font-size: 1.75rem;
  color: var(--ink-deep); letter-spacing: -0.01em; text-decoration: none;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px 28px; }
.site-nav a {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--ink-deep); text-decoration: none; padding: 8px 0;
}
.site-nav a:hover, .site-nav .current-menu-item a {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}

main { display: block; }
article { max-width: var(--col-width); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 96px; }

article .kicker {
  font-family: var(--mono); font-size: 1.125rem; font-weight: 700;
  letter-spacing: 0.16em; color: var(--gold); margin-bottom: 24px;
  text-transform: uppercase;
}
article h1 {
  font-family: var(--serif-display); font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 5rem); line-height: 1.04;
  letter-spacing: -0.015em; color: var(--ink-deep); margin: 0 0 24px;
}
article .deck {
  font-family: var(--serif-display); font-style: italic; font-weight: 400;
  font-size: 1.625rem; line-height: 1.4; color: var(--ink-muted);
  margin: 0 0 32px; max-width: 600px;
}
article .byline {
  font-family: var(--mono); font-size: 1rem; font-weight: 400;
  letter-spacing: 0.08em; color: var(--ink-deep);
  padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 40px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
article .byline .read-time { color: var(--ink-muted); }

article p {
  font-family: var(--serif-body); font-size: 1.5rem;
  line-height: 1.62; color: var(--ink-body); margin: 0 0 28px;
}
article em, article i { font-style: italic; }
article strong, article b { font-weight: 600; color: var(--ink-deep); }
article a {
  color: var(--ink-deep); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
article a:hover { background: var(--gold-soft); }

article h2 {
  font-family: var(--serif-head); font-weight: 600;
  font-size: 2.5rem; line-height: 1.15; color: var(--ink-deep); margin: 48px 0 16px;
}

article blockquote {
  margin: 40px 0; padding: 8px 0 8px 32px; border-left: 4px solid var(--gold);
  font-family: var(--serif-display); font-style: italic;
  font-size: 2.25rem; line-height: 1.32; color: var(--ink-deep);
}

article .source-card {
  background: var(--surface); border-radius: 4px;
  padding: 20px 24px; margin: 32px 0;
}
article .source-card .source-label {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.14em; color: var(--gold); margin-bottom: 8px;
  text-transform: uppercase;
}
article .source-card .source-body {
  font-family: var(--serif-body); font-size: 1.25rem;
  line-height: 1.5; color: var(--ink-body); margin: 0;
}
article .source-card a { font-family: var(--mono); font-size: 1.0625rem; font-weight: 700; }

article .endmark { text-align: center; color: var(--gold); font-family: var(--mono); font-size: 1.5rem; letter-spacing: 0.5em; margin: 56px 0; }

article .signoff {
  font-family: var(--mono); font-size: 1rem; letter-spacing: 0.08em;
  color: var(--ink-muted); padding-top: 24px; border-top: 1px solid var(--border); line-height: 1.7;
}
article .signoff strong { color: var(--ink-deep); }

.help-card {
  max-width: var(--col-width); margin: 64px auto; padding: 32px;
  background: var(--surface); border-left: 6px solid var(--gold); border-radius: 4px;
}
.help-card .kicker {
  font-family: var(--mono); font-size: 1.125rem; font-weight: 700;
  letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; margin-bottom: 12px;
}
.help-card h2 {
  font-family: var(--serif-head); font-weight: 600;
  font-size: 2rem; color: var(--ink-deep); margin: 0 0 24px;
}
.help-card ul { list-style: none; margin: 0; padding: 0; }
.help-card li {
  display: flex; align-items: baseline; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.help-card li:last-child { border-bottom: 0; }
.help-card .ngo-short {
  font-family: var(--mono); font-size: 1.25rem; font-weight: 700;
  color: var(--ink-deep); min-width: 80px;
}
.help-card .ngo-desc { font-family: var(--serif-body); font-size: 1.25rem; color: var(--ink-body); flex: 1 1 200px; }
.help-card .ngo-link {
  font-family: var(--mono); font-size: 1.0625rem; font-weight: 700;
  color: var(--gold); text-decoration: none; letter-spacing: 0.06em;
}
.help-card .ngo-link:hover { text-decoration: underline; }

.hero { max-width: 1100px; margin: 0 auto; padding: 80px var(--gutter) 56px; }
.hero .kicker { font-family: var(--mono); font-size: 1.125rem; font-weight: 700; letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; margin-bottom: 24px; }
.hero h1 { font-family: var(--serif-display); font-weight: 500; font-size: clamp(3rem, 9vw, 6rem); line-height: 1.02; letter-spacing: -0.02em; color: var(--ink-deep); margin: 0 0 32px; }
.hero .lede { font-family: var(--serif-display); font-style: italic; font-size: 1.625rem; line-height: 1.4; color: var(--ink-muted); max-width: 800px; margin: 0 0 32px; }
.pillar-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding: 0; list-style: none; }
.pillar-row li { background: var(--surface); padding: 14px 22px; border-radius: 28px; list-style: none; }
.pillar-row a { font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-deep); text-decoration: none; }
.pillar-row a:hover { text-decoration: underline; }

.latest { border-top: 3px solid var(--ink-deep); padding: 56px var(--gutter); max-width: 1100px; margin: 0 auto; }
.latest-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.latest-head .kicker { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; }
.latest-head a { font-family: var(--mono); font-size: 1.0625rem; font-weight: 700; color: var(--ink-deep); text-decoration: none; }

.article-list { display: grid; gap: 56px; padding: 0; list-style: none; margin: 0; }
.article-card { border-bottom: 1px solid var(--border); padding-bottom: 40px; }
.article-card:last-child { border-bottom: 0; }
.article-card .meta { font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; color: var(--gold); text-transform: uppercase; margin-bottom: 12px; }
.article-card h2 { font-family: var(--serif-display); font-weight: 500; font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: -0.01em; color: var(--ink-deep); margin: 0 0 12px; }
.article-card h2 a { color: inherit; text-decoration: none; }
.article-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.article-card .deck { font-family: var(--serif-display); font-style: italic; font-size: 1.375rem; color: var(--ink-muted); margin: 0 0 12px; line-height: 1.4; }
.article-card .summary { font-family: var(--serif-body); font-size: 1.25rem; line-height: 1.55; color: var(--ink-body); margin: 0 0 16px; }
.article-card .read-cta { font-family: var(--mono); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-deep); text-decoration: none; }
.article-card .read-cta:hover { text-decoration: underline; }

.site-footer { border-top: 3px solid var(--ink-deep); padding: 48px var(--gutter); margin-top: 96px; background: var(--surface); }
.site-footer .footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.site-footer p, .site-footer a { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.06em; color: var(--ink-muted); }
.site-footer a { color: var(--ink-deep); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-brand { font-family: var(--serif-head); font-weight: 700; font-size: 1.5rem; color: var(--ink-deep); letter-spacing: -0.01em; }

::selection { background: var(--gold-soft); color: var(--ink-deep); }

@media (max-width: 600px) {
  .listen-bar { padding: 14px var(--gutter); }
  .settings-bar { padding: 12px var(--gutter); }
  .masthead { padding: 20px var(--gutter); }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}

/* WP-specific overrides */
.wp-block-image { margin: 32px 0; }
.wp-block-image figcaption { font-family: var(--mono); font-size: 1rem; color: var(--ink-muted); margin-top: 8px; text-align: left; }
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; }
