/* ── Walk Cycle to the Polls — Main Stylesheet ─────────────────────────── */

/* Google Fonts loaded in HTML <head> */

:root {
  --orange:      #F2A500;
  --orange-dark: #D18F00;
  --black:       #111111;
  --white:       #FFFFFF;
  --purple:      #9B6DCA;
  --purple-dark: #7A4FAF;
  --gray-light:  #F5F5F5;
  --gray-mid:    #E0E0E0;
  --gray:        #666666;
  --text:        #111111;

  --font: 'Roboto', Arial, sans-serif;
  --nav-height: 64px;
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

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

a {
  color: var(--purple-dark);
  text-decoration: underline;
}
a:hover { color: var(--orange-dark); }
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Skip Link (accessibility) ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--black);
  color: var(--white);
  padding: 10px 20px;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Navigation ───────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
}

.nav-inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}
.nav-logo img {
  height: 40px;
  width: auto;
}
.nav-logo-text {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: none; /* shown on larger screens */
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a,
.nav-links > li > button.nav-parent {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  font-family: var(--font);
}
.nav-links > li > a:hover,
.nav-links > li > button.nav-parent:hover,
.nav-links > li > a:focus-visible,
.nav-links > li > button.nav-parent:focus-visible {
  background: rgba(255,255,255,0.12);
  color: var(--orange);
  outline: none;
}
.nav-links > li > a.active,
.nav-links > li > button.nav-parent.active {
  color: var(--orange);
}

.nav-arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
  display: inline-block;
}
.nav-parent[aria-expanded="true"] .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  min-width: 200px;
  list-style: none;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 10px 18px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.12s, color 0.12s;
}
.dropdown li a:hover,
.dropdown li a:focus-visible {
  background: rgba(255,255,255,0.1);
  color: var(--orange);
  outline: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 12px;
  border-radius: 4px;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--orange);
}

/* Instagram link in nav */
.nav-instagram {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--white);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s;
  font-size: 1.2rem;
}
.nav-instagram:hover { opacity: 1; color: var(--orange); }

/* ── Mobile nav ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: -100vh;
    left: 0; right: 0;
    background: var(--black);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 24px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: top 0.25s ease;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  .nav-links.open {
    top: var(--nav-height);
  }
  .nav-links > li > a,
  .nav-links > li > button.nav-parent {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 0;
    justify-content: space-between;
  }
  .dropdown {
    position: static;
    border: none;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    opacity: 1;
    visibility: visible;
    transform: none;
    border-radius: 0;
    padding: 0;
    display: none;
  }
  .dropdown.open { display: block; }
  .dropdown li a { padding: 10px 40px; }
  .nav-instagram { padding: 12px 24px; }
}

@media (min-width: 900px) {
  .nav-logo-text { display: block; }
}

/* ── Page layout ──────────────────────────────────────────────────────── */
.page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section spacing ──────────────────────────────────────────────────── */
.section {
  padding: 64px 0;
}
.section--orange {
  background: var(--orange);
  color: var(--black);
}
.section--black {
  background: var(--black);
  color: var(--white);
}
.section--gray {
  background: var(--gray-light);
}

/* ── Typography ───────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; margin-bottom: 0.5em; }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.4em; }
h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3em; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  font-weight: 400;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
  display: block;
}
.section--black .eyebrow { color: var(--orange); }
.section--orange .eyebrow { color: var(--black); opacity: 0.6; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.btn--orange {
  background: var(--orange);
  color: var(--black);
  border-color: var(--orange);
}
.btn--orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: var(--black); }
.btn--white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn--white:hover { background: var(--gray-light); border-color: var(--gray-mid); color: var(--black); }
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline-white:hover { background: var(--white); color: var(--black); }
.btn--purple {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.btn--purple:hover { background: var(--purple-dark); border-color: var(--purple-dark); color: var(--white); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ── Hero (home page) ─────────────────────────────────────────────────── */
.hero {
  background: var(--orange);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 48px 24px 120px;
}

.hero__logo {
  width: min(360px, 80vw);
  margin: 0 auto 32px;
  position: relative;
  z-index: 2;
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 500;
  color: var(--black);
  max-width: 520px;
  margin: 0 auto 8px;
  position: relative;
  z-index: 2;
}

/* Wavy line background — echoes the logo motif */
.hero__waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 1;
  pointer-events: none;
}

/* Walking character strip */
.hero__character-strip {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  height: 100px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.hero__character {
  position: absolute;
  bottom: 0;
  height: 90px;
  width: auto;
  animation: walk-across 12s linear infinite;
}

@keyframes walk-across {
  0%   { left: -120px; }
  100% { left: calc(100% + 20px); }
}

/* ── Page hero (inner pages) ──────────────────────────────────────────── */
.page-hero {
  background: var(--black);
  padding: 56px 24px 48px;
  text-align: center;
  color: var(--white);
}
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,0.8); max-width: 640px; margin: 16px auto 0; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  padding: 28px 24px;
}
.section--black .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: var(--white);
}
.card__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 6px;
}
.section--black .card__label { color: var(--orange); }

/* ── Collaborator list ────────────────────────────────────────────────── */
.collaborator {
  padding: 28px 0;
  border-bottom: 1px solid var(--gray-mid);
}
.collaborator:last-child { border-bottom: none; }
.collaborator__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 2px;
}
.collaborator__role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 10px;
  display: block;
}
.collaborator p { color: var(--gray); font-size: 0.95rem; }

/* ── Content sections ─────────────────────────────────────────────────── */
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; color: var(--purple-dark); }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--gray);
}

/* ── Tool embed page ──────────────────────────────────────────────────── */
.tool-frame-wrapper {
  width: 100%;
  height: calc(100vh - var(--nav-height) - 80px);
  min-height: 600px;
  border: none;
}
.tool-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Vote page ────────────────────────────────────────────────────────── */
.vote-highlight {
  background: var(--orange);
  border-radius: 8px;
  padding: 40px 36px;
  text-align: center;
  margin: 40px 0;
}
.vote-highlight h2 { font-size: 2rem; }
.vote-highlight p { font-size: 1.1rem; margin: 12px 0 24px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.65);
  padding: 48px 24px 32px;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.footer-logo img { height: 56px; margin-bottom: 12px; }
.footer-copy { line-height: 1.8; }
.footer-copy a { color: rgba(255,255,255,0.65); }
.footer-copy a:hover { color: var(--orange); }
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.footer-social a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.footer-social a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 960px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-social { align-items: flex-start; }
  .section { padding: 48px 0; }
}

/* ── Utility ──────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-0  { margin-bottom: 0 !important; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero__character { animation: none; left: 50%; transform: translateX(-50%); }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
