/* CASAIC — California Artificial Intelligence Consortium */

:root {
  --font-humanist: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono-accent: "JetBrains Mono", ui-monospace, monospace;

  --navy: #0f2942;          /* deep navy for authority */
  --navy-deep: #0b1f33;
  --accent: #e07a2e;        /* warm golden-orange */
  --accent-soft: #fef3c7;
  --ink: #1e293b;           /* dark slate */
  --ink-soft: #475569;      /* high-contrast secondary */
  --card: #ffffff;
  --bg: #fdfefe;
  --surface-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --navy-tint: #e7edf4;

  --radius-card: 12px;
  --radius-pill: 9999px;
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-humanist);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--navy);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 20px 2px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

.main-nav a:hover {
  color: var(--navy);
}

.main-nav a.active {
  color: var(--navy);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-humanist);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border-radius: 8px;
  padding: 13px 28px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-deep);
  box-shadow: 0 4px 14px rgba(15, 41, 66, 0.2);
}

.btn-outline {
  background: #fff;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy-tint);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 72px 0 56px;
}

.hero .kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-logo {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(15, 41, 66, 0.12);
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy);
  max-width: 720px;
  margin: 0 auto 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lede {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Feature cards ---------- */

.features {
  padding: 8px 0 64px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 24px -4px rgba(15, 41, 66, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--navy-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--navy);
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Kinetic link arrow ---------- */

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  margin-top: 1.25rem;
  transition: var(--transition-smooth);
}

.card-link .arrow {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .card-link .arrow,
.resource-card:hover .card-link .arrow {
  transform: translateX(4px);
}

/* ---------- Trust strip ---------- */

.trust-strip {
  text-align: center;
  padding: 0 0 64px;
}

.trust-strip p {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.trust-strip .dot {
  color: var(--accent);
  padding: 0 8px;
}

/* ---------- Page headers ---------- */

.page-head {
  padding: 56px 0 12px;
  max-width: 720px;
}

.page-head h1 {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 12px;
}

.page-head p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 65ch;
}

.notice {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin: 24px 0;
  font-size: 0.95rem;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.notice a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-smooth);
}

.notice a:hover {
  opacity: 0.85;
}

/* ---------- Resources ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 20px 0 8px;
}

.chip {
  font-family: var(--font-humanist);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chip:hover {
  border-color: var(--border-hover);
  background-color: var(--surface-subtle);
  color: var(--ink);
}

.chip.active {
  background-color: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 2px 6px rgba(15, 41, 66, 0.15);
}

.result-count {
  font-family: var(--font-mono-accent);
  font-size: 12px;
  color: var(--ink-soft);
  margin: 14px 0 20px;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: 64px;
}

.resource-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 24px -4px rgba(15, 41, 66, 0.08);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.875rem;
  width: fit-content;
  background-color: var(--navy-tint);
  color: var(--navy);
}

.tag.policy {
  background-color: #fef3c7;
  color: #92400e;
}

.tag.guidance {
  background-color: #e0f2fe;
  color: #0369a1;
}

.tag.classroom {
  background-color: #dcfce7;
  color: #166534;
}

.tag.families {
  background-color: #ede9fe;
  color: #5b21b6;
}

.resource-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.resource-card p {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.resource-card .coming-soon {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 1.25rem;
}

/* ---------- Meetings ---------- */

.meetings-section {
  padding-bottom: 32px;
}

.meetings-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 32px 0 16px;
}

.meetings-section h2 .count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.meeting-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.meeting-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 24px -4px rgba(15, 41, 66, 0.08);
}

.meeting-date {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--navy-tint);
  border-radius: 10px;
  padding: 10px 6px;
}

.meeting-date .month {
  display: block;
  font-family: var(--font-mono-accent);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--navy);
}

.meeting-date .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.meeting-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 4px;
}

.meeting-card p {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.empty-state {
  background: var(--surface-subtle);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-card);
  padding: 36px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* ---------- Contact ---------- */

.contact-wrap {
  max-width: 560px;
  padding-bottom: 64px;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-humanist);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  transition: var(--transition-smooth);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 41, 66, 0.12);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-alt {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
}

.contact-alt a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- Legal pages ---------- */

.legal-content {
  max-width: 720px;
  padding-bottom: 64px;
}

.legal-content .updated {
  font-family: var(--font-mono-accent);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 28px 0 10px;
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.legal-content ul {
  margin: 0 0 12px 22px;
}

.legal-content li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.legal-content strong {
  color: var(--ink);
}

.legal-content a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #c3cedb;
  padding: 40px 0 32px;
  margin-top: auto;
}

.footer-brand {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  margin-bottom: 6px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 14px;
  line-height: 1.55;
  max-width: 420px;
}

.footer-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: #c3cedb;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 28px;
  padding-top: 20px;
  font-size: 13px;
  color: #94a5ba;
}

.footer-bottom a {
  color: #94a5ba;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-smooth);
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px -4px rgba(15, 41, 66, 0.12);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a.active {
    border-bottom-color: var(--border);
    border-left: 3px solid var(--accent);
    background: var(--surface-subtle);
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- Member area ---------- */

.auth-wrap {
  max-width: 480px;
  padding-bottom: 64px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
}

.auth-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 10px;
}

.auth-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.auth-card a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.auth-note {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 14px;
}

.auth-error {
  font-size: 0.875rem;
  font-weight: 500;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 14px;
}

.btn-link {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  font-family: var(--font-humanist);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link:hover {
  color: var(--navy);
}

.member-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.member-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.member-nav-link:hover {
  color: var(--navy);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.loading-note {
  font-family: var(--font-mono-accent);
  font-size: 13px;
  color: var(--ink-soft);
  padding: 24px 0 64px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 40px 0 16px;
}

.section-title .count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.member-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.member-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.member-role {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.member-district {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.member-email {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 8px;
  word-break: break-all;
}

.member-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.admin-row-info {
  min-width: 0;
}

.admin-row-info .member-email {
  margin-top: 2px;
}

.admin-row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mono {
  font-family: var(--font-mono-accent);
  font-size: 0.85em;
}

#admin-content {
  padding-bottom: 64px;
}

@media (max-width: 768px) {
  .member-grid {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    width: 100%;
  }

  .admin-row-actions .btn {
    flex: 1;
  }
}

/* ---------- About page ---------- */

.about-section {
  max-width: 780px;
  margin-bottom: 40px;
}

.about-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 40px 0 14px;
}

.about-section p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.about-section a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

.timeline {
  list-style: none;
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin: 20px 0 8px;
}

.timeline li {
  position: relative;
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline .year {
  font-family: var(--font-mono-accent);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy);
  display: block;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pillar h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 8px;
}

.pillar p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.band-list {
  list-style: none;
  margin-top: 16px;
}

.band-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.band-list .band {
  font-family: var(--font-mono-accent);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--navy);
  flex-shrink: 0;
  width: 92px;
}

.band-list .focus {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 768px) {
  .pillar-grid {
    grid-template-columns: 1fr;
  }
}
