/* Veil — editorial design system
 * Tokens, base components, and shared layout shared by index.html and legislation.html
 * Source of truth: design_handoff_veil_landing/direction4.jsx + README.md
 */

:root {
  --bg: #f6f2ea;
  --paper: #ffffff;
  --tint: #faf7f0;
  --card: #ece5d5;
  --rule: #dcd4c3;
  --ink: #1a1a1a;
  --muted: #6e665a;
  --red: #b33a3a;
  --blue: #2f5cc4;
  --green: #4a8257;
  --gold: #e8c56c;

  --support-strong: #4a8257;
  --support: #7bad85;
  --unsure: #6e665a;
  --oppose: #d4786c;
  --oppose-strong: #b33a3a;

  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --gutter: 40px;
  --shadow-hero: 0 30px 60px -30px rgba(28, 27, 24, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

em {
  font-style: italic;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --- Masthead strip -------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--ink);
  padding: 10px var(--gutter);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.masthead-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.masthead-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* --- Nav ------------------------------------------------------------- */
.site-nav {
  padding: 22px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-word {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  font-style: italic;
  color: var(--ink);
}
.brand-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  list-style: none;
}
.nav-links a {
  color: var(--ink);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
}
.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-zip-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.nav-zip-pill input {
  width: 56px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-align: center;
}
.nav-zip-pill button {
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.nav-sign-in {
  font-size: 13px;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 8px;
  font-family: var(--sans);
  transition: background 0.15s ease;
}
.btn-ghost:hover {
  background: var(--tint);
}

/* --- Section labels + editorial markers ----------------------------- */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 24px;
  display: block;
}
.section-label--muted { color: var(--muted); }
.section-label--blue { color: var(--blue); }

/* --- Buttons for bill cards ----------------------------------------- */
.btn-dark-sm {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 6px;
  font-family: var(--sans);
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-dark-sm:hover { background: #000; }
.btn-red-sm {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  font-family: var(--sans);
  transition: background 0.15s ease;
  width: 100%;
}
.btn-red-sm:hover { background: #962d2d; }

/* --- Support bar ---------------------------------------------------- */
.support-bar {
  flex: 1;
  height: 6px;
  background: var(--card);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}
.support-bar-fill-yes { background: var(--green); }
.support-bar-fill-no { background: var(--red); opacity: 0.7; }

/* --- Topic / stage tags --------------------------------------------- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tag--red { background: var(--red); }
.tag--blue { background: var(--blue); }
.tag--green { background: var(--green); }
.tag--ink { background: var(--ink); }
.tag--muted { background: var(--muted); }

/* Bill stage mapping — shades from civic palette */
.stage--introduced { background: var(--muted); }
.stage--committee { background: var(--blue); }
.stage--passed-one { background: #5a7a2f; }
.stage--passed-both { background: var(--green); }
.stage--law { background: var(--ink); }

/* --- Bill card ------------------------------------------------------ */
.bill-card {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bill-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -20px rgba(28, 27, 24, 0.4);
}
.bill-card--featured {
  background: #fffdf7;
  border-left: 3px solid var(--red);
}
.bill-card-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.bill-card-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.bill-card-read {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.bill-card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--ink);
}
.bill-card-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.bill-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.bill-card-support-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
}

/* --- Misc utility --------------------------------------------------- */
.rule-h {
  height: 1px;
  background: var(--rule);
  border: 0;
}
.rule-ink {
  height: 1px;
  background: var(--ink);
  border: 0;
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.serif {
  font-family: var(--serif);
}

/* --- Footer masthead ------------------------------------------------ */
.site-footer {
  padding: 48px var(--gutter) 32px;
  border-top: 4px double var(--ink);
  background: var(--bg);
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.site-footer-brand {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  margin-bottom: 12px;
}
.site-footer-quote {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  max-width: 340px;
}
.site-footer-col-heading {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
}
.site-footer-col a,
.site-footer-col-item {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--ink);
  transition: color 0.15s ease;
}
.site-footer-col a:hover { color: var(--red); }
.site-footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Focus states --------------------------------------------------- */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

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

/* --- Responsive (shared tokens) ------------------------------------- */
@media (max-width: 1279px) {
  :root { --gutter: 32px; }
}
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  :root { --gutter: 20px; }
  .masthead { font-size: 10px; letter-spacing: 0.5px; justify-content: center; }
  .masthead > span:not(.masthead-live) { display: none; }
  .site-footer-grid { grid-template-columns: 1fr; }
  .site-footer-bottom { flex-direction: column; text-align: center; }
  .nav-zip-pill { display: none; }
}
