/* === CITIZENSHIP ARCHITECTURE COUNCIL · SHARED STYLES === */

/* Self-hosted fonts */
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-latin.woff2') format('woff2'); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-latin.woff2') format('woff2'); font-weight: 300 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin.woff2') format('woff2'); font-weight: 300 600; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --violet: #2C1F42; --violet-deep: #120D1F; --violet-mid: #4A3168; --violet-bright: #6B4E8F;
  --parchment: #FAFBFC; --parchment-dark: #F3F4F6; --parchment-light: #FFFFFF;
  --ink: #111111; --burgundy: #9B1B30; --rule: #E5E7EB; --muted: #57606E;
}
html { scroll-behavior: smooth; }
body {
  background: var(--parchment); color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif; font-weight: 400; font-size: 15px; line-height: 1.7;
}

/* Grid texture, only where needed */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(44,31,66,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44,31,66,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* News ticker */
.ticker-bar { background: var(--ink); overflow: hidden; white-space: nowrap; padding: 8px 0; }
.ticker-content { display: inline-block; animation: tickerScroll 35s linear infinite; font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.02em; }
.ticker-content strong { font-weight: 600; }
.ticker-sep { margin: 0 40px; color: rgba(255,255,255,0.12); }
@keyframes tickerScroll { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* Micro-animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes barFill { from { width: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.animate-in { animation: fadeUp 0.5s ease both; }
.animate-pulse { animation: pulse 2.5s ease-in-out infinite; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.wrap-wide { max-width: 1400px; margin: 0 auto; padding: 0 48px; }

/* === MASTHEAD === */
.masthead { background: var(--violet); padding: 16px 0; position: sticky; top: 0; z-index: 500; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; }
.masthead-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.masthead-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--burgundy); box-shadow: 0 0 16px rgba(139,35,50,0.5); animation: pulse 2.5s ease-in-out infinite; }
.masthead-name { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 15px; letter-spacing: 0.14em; color: rgba(248,245,240,0.9); text-transform: uppercase; }
.masthead-links { display: flex; gap: 32px; list-style: none; }
.masthead-links a { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(248,245,240,0.5); text-decoration: none; transition: color 0.2s; }
.masthead-links a:hover, .masthead-links a.active { color: rgba(248,245,240,0.95); }

/* === SHARED TYPOGRAPHY === */
.section-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.section-heading { font-family: 'Cormorant Garamond', serif; font-size: clamp(32px, 3.2vw, 48px); font-weight: 400; line-height: 1.12; margin-bottom: 20px; }
.section-sub { font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 600px; margin-bottom: 32px; }
.page-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px, 4vw, 56px); font-weight: 400; line-height: 1.08; margin-bottom: 16px; }
.page-title em { font-style: italic; color: var(--violet); }

/* === BUTTONS === */
.btn-primary { display: inline-flex; align-items: center; padding: 14px 28px; background: var(--violet); color: var(--parchment); border-radius: 100px; font-size: 13px; font-weight: 500; text-decoration: none; letter-spacing: 0.04em; transition: opacity 0.2s; border: none; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-primary:hover { opacity: 0.88; }
.btn-burgundy { display: inline-flex; align-items: center; padding: 14px 28px; background: var(--burgundy); color: var(--parchment); border-radius: 100px; font-size: 13px; font-weight: 500; text-decoration: none; letter-spacing: 0.04em; transition: opacity 0.2s; border: none; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-burgundy:hover { opacity: 0.88; }
.btn-outline { display: inline-flex; align-items: center; padding: 14px 28px; background: transparent; color: var(--ink); border: 1px solid rgba(0,0,0,0.15); border-radius: 100px; font-size: 13px; font-weight: 500; text-decoration: none; letter-spacing: 0.04em; transition: background 0.2s; }
.btn-outline:hover { background: rgba(0,0,0,0.04); }

/* === CARDS === */
.card { background: #FFFFFF; border: 1px solid var(--rule); border-radius: 24px; padding: 32px 28px; transition: transform 0.3s cubic-bezier(0.25,0.8,0.25,1), box-shadow 0.3s ease, border-color 0.3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(44,31,66,0.1); border-color: rgba(44,31,66,0.2); }
.card-glass { background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); border: 1px solid var(--rule); border-radius: 24px; padding: 28px; box-shadow: 0 20px 60px rgba(44,31,66,0.08); }
.card-dark { background: linear-gradient(135deg, var(--violet-deep), var(--violet)); border: 1px solid rgba(44,31,66,0.4); border-radius: 24px; padding: 36px 32px; color: #FFFFFF; box-shadow: 0 24px 64px rgba(18,13,31,0.4); }

/* === SECTION CONTAINERS === */
.section-page { padding: 60px 0; }
.section-page.alt { background: var(--parchment-dark); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-page.dark { background: linear-gradient(135deg, var(--violet-deep), var(--violet)); color: var(--parchment); }
.section-page.dark .section-label { color: rgba(248,245,240,0.4); }
.section-page.dark .section-sub { color: rgba(248,245,240,0.55); }

/* === FULL-BLEED BAND === */
.band { padding: 48px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(255,255,255,0.2); }

/* === FRAMEWORK STRIP === */
.framework-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border-radius: 16px; overflow: hidden; }
.fw-item { background: var(--parchment); padding: 24px 20px; transition: background 0.2s; }
.fw-item:hover { background: var(--parchment-light); }
.fw-item-num { font-size: 10px; letter-spacing: 0.14em; color: var(--burgundy); font-weight: 500; margin-bottom: 10px; }
.fw-item-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.25; margin-bottom: 8px; }
.fw-item-desc { font-size: 12px; line-height: 1.7; color: var(--muted); }

/* === GCAI INDEX === */
.gcai-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; }
.gcai-list { background: rgba(255,255,255,0.4); border: 1px solid rgba(44,31,66,0.08); border-radius: 24px; padding: 20px; box-shadow: 0 16px 48px rgba(44,31,66,0.05); }
.gcai-list-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; margin-bottom: 8px; }
.gcai-country { border-radius: 16px; padding: 16px 18px; border: 1px solid transparent; cursor: pointer; transition: all 0.2s; margin-bottom: 6px; }
.gcai-country:hover { background: rgba(44,31,66,0.03); }
.gcai-country.active { border-color: rgba(44,31,66,0.2); background: rgba(44,31,66,0.04); }
.gcai-country-top { display: flex; justify-content: space-between; align-items: center; }
.gcai-country-name { font-weight: 500; font-size: 14px; }
.gcai-country-score { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; color: var(--violet); }
.gcai-country-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,0.06); margin-top: 10px; overflow: hidden; }
.gcai-country-fill { height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.4s ease; }
.gcai-detail-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(248,245,240,0.4); }
.gcai-detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 16px; margin-bottom: 28px; }
.gcai-detail-name { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 400; }
.gcai-detail-score { font-family: 'Cormorant Garamond', serif; font-size: 64px; font-weight: 300; line-height: 1; color: rgba(248,245,240,0.9); }
.gcai-detail-grid { display: grid; grid-template-columns: 200px 1fr; gap: 32px; margin-top: 24px; }
.gcai-radar { position: relative; width: 200px; height: 200px; }
.gcai-radar svg { width: 100%; height: 100%; }
.gcai-dim { margin-bottom: 16px; }
.gcai-dim-header { display: flex; justify-content: space-between; font-size: 13px; color: rgba(248,245,240,0.65); margin-bottom: 8px; }
.gcai-dim-bar { height: 6px; border-radius: 3px; background: rgba(248,245,240,0.1); overflow: hidden; }
.gcai-dim-fill { height: 100%; border-radius: 3px; background: var(--parchment); transition: width 0.5s ease; }
.gcai-detail-note { font-size: 14px; line-height: 1.75; color: rgba(248,245,240,0.55); margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(248,245,240,0.08); }
.gcai-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.gcai-filter-btn { padding: 8px 18px; border-radius: 100px; border: 1px solid var(--rule); background: transparent; font-family: 'Inter', sans-serif; font-size: 12px; cursor: pointer; transition: all 0.2s; color: var(--ink); }
.gcai-filter-btn:hover, .gcai-filter-btn.active { background: var(--violet); color: var(--parchment); border-color: var(--violet); }

/* === COMMENTARY CARDS === */
.commentary-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.commentary-card { background: #FFFFFF; border: 1px solid rgba(44,31,66,0.08); border-radius: 24px; padding: 28px 24px; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.25,0.8,0.25,1), box-shadow 0.3s ease, border-color 0.3s ease; }
.commentary-card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(44,31,66,0.08); border-color: rgba(44,31,66,0.15); }
.commentary-date { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.commentary-tag { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--burgundy); font-weight: 500; margin-bottom: 12px; }
.commentary-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; line-height: 1.25; color: var(--ink); margin-bottom: 12px; }
.commentary-excerpt { font-size: 14px; line-height: 1.75; color: var(--muted); }
.commentary-read { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--burgundy); text-decoration: none; margin-top: auto; padding-top: 20px; }

/* === NEWSLETTER === */
.newsletter-input { background: rgba(248,245,240,0.06); border: 1px solid rgba(248,245,240,0.12); padding: 14px 18px; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--parchment); outline: none; transition: border-color 0.2s; width: 100%; }
.newsletter-input::placeholder { color: rgba(248,245,240,0.25); }
.newsletter-input:focus { border-color: var(--burgundy); }
.newsletter-submit { background: var(--burgundy); color: var(--parchment); border: none; padding: 14px 28px; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; font-weight: 500; transition: opacity 0.2s; width: 100%; }
.newsletter-submit:hover { opacity: 0.85; }
.newsletter-dl { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid rgba(248,245,240,0.1); border-radius: 16px; text-decoration: none; transition: border-color 0.2s; }
.newsletter-dl:hover { border-color: rgba(248,245,240,0.25); }
.newsletter-dl-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(139,35,50,0.2); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--burgundy); }
.newsletter-dl-title { font-size: 13px; color: var(--parchment); font-weight: 500; }
.newsletter-dl-meta { font-size: 10px; color: rgba(248,245,240,0.35); }

/* === ABOUT === */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; color: var(--ink); margin-bottom: 20px; }
.about-body { font-size: 14px; line-height: 1.85; color: var(--muted); }
.about-body p + p { margin-top: 14px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.about-stat { background: #FFFFFF; border: 1px solid rgba(44,31,66,0.06); border-radius: 16px; padding: 20px; }
.about-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 400; color: var(--violet); line-height: 1; margin-bottom: 4px; }
.about-stat-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.principle { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.principle:first-child { border-top: 1px solid var(--rule); }
.principle-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.principle-body { font-size: 13px; line-height: 1.75; color: var(--muted); }

/* === FORMS === */
.form-input, .form-select, .form-textarea { background: #FFFFFF; border: 1px solid var(--rule); padding: 12px 16px; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--ink); outline: none; transition: border-color 0.2s; appearance: none; width: 100%; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--violet); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; display: block; }

/* === FOOTER === */
footer { background: var(--violet); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0; margin-bottom: 32px; }
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 14px; color: var(--parchment); margin-bottom: 6px; }
.footer-tag { font-size: 9px; letter-spacing: 0.18em; color: rgba(248,245,240,0.55); text-transform: uppercase; margin-bottom: 14px; }
.footer-desc { font-size: 12px; line-height: 1.7; color: rgba(248,245,240,0.6); }
.footer-col-title { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(248,245,240,0.55); margin-bottom: 14px; font-weight: 500; }
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col-links a { font-size: 12px; color: rgba(248,245,240,0.65); text-decoration: none; transition: color 0.2s; }
.footer-col-links a:hover { color: var(--parchment); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid rgba(248,245,240,0.06); }
.footer-copy { font-size: 10px; color: rgba(248,245,240,0.5); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .wrap, .wrap-wide { padding: 0 20px; }
  .masthead-links { display: none; }
  .section-page { padding: 40px 0; }
  .framework-strip { grid-template-columns: 1fr; }
  .gcai-layout { grid-template-columns: 1fr; }
  .gcai-detail-grid { grid-template-columns: 1fr; }
  .commentary-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
