/* pledge.css — Pleasant register for the 250 Years of Pleasant homepage.
   Scoped to home, accuracy, status, and join views. */

:root {
  --wasicu: #1B6E8C;
  --wasicu-lt: #EAF4F7;
  --pleasant: #F7F3E8;
  --pleasant-dark: #e8e1cc;
  --pleasant-text: #1a1a1a;
  --pleasant-muted: #555;
  --pleasant-border: #ccc9b8;
}

[data-view="home"],
[data-view="accuracy"],
[data-view="status"],
[data-view="join"] {
  font-family: 'Poppins', sans-serif;
  background: var(--pleasant);
  color: var(--pleasant-text);
  min-height: 100vh;
}

/* Wasicu sponsor bar */
.wasicu-bar {
  background: var(--wasicu);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
}

/* Nav */
.pleasant-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 2rem;
  border-bottom: 1px solid var(--pleasant-border);
  flex-wrap: wrap;
}
.pleasant-wordmark {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wasicu);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}
.pleasant-nav nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.pnav-link {
  font-size: 0.85rem;
  color: var(--pleasant-text);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.pnav-link:hover { opacity: 1; }

/* Hero */
.pleasant-hero {
  max-width: 680px;
  margin: 3.5rem auto 2rem;
  padding: 0 1.5rem;
  text-align: center;
}
.pleasant-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wasicu);
  margin: 0 0 0.6rem;
}
.pleasant-h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: var(--pleasant-text);
}
.pleasant-lede {
  font-size: 1.1rem;
  color: var(--pleasant-muted);
  margin: 0 0 1.1rem;
  line-height: 1.6;
}
.pleasant-date {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--pleasant-text);
  margin: 0 0 0.5rem;
}
.pleasant-countlabel {
  font-size: 0.85rem;
  color: var(--pleasant-muted);
  margin: 0 0 1.5rem;
}

/* Countdown clock */
.cd-clock {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}
.cd-num {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--wasicu);
}
.cd-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pleasant-muted);
  margin-top: 0.2rem;
}

/* Glitch overlay — clue 5 */
.cd-glitch {
  display: none;
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.cd-glitch.on { display: flex; animation: glitch-in 3.1s forwards; }
.cd-glitch-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem;
}
.cd-glitch-kicker {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e64;
  animation: rgb-split 0.2s infinite;
}
.br-n {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  animation: rgb-split 0.15s infinite;
}
.br-t {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  color: #ccc;
  max-width: 600px;
  line-height: 1.4;
}
.cd-glitch-credit {
  font-size: 0.75rem;
  color: #666;
  margin-top: 1rem;
  font-style: italic;
}

/* Curtain stripes */
@keyframes glitch-in {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; display: none; }
}
@keyframes rgb-split {
  0%   { text-shadow: 2px 0 #f00, -2px 0 #0ff; }
  33%  { text-shadow: -2px 0 #f0f, 2px 0 #0f0; }
  66%  { text-shadow: 2px 0 #ff0, -2px 0 #00f; }
  100% { text-shadow: 2px 0 #f00, -2px 0 #0ff; }
}
@keyframes static-sweep {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-glitch { display: none !important; }
  .cd-glitch.on { display: none !important; }
  .cd-glitch-kicker, .br-n { animation: none; }
}

/* CTAs */
.pleasant-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem 2.5rem;
  flex-wrap: wrap;
}
.btn-pleasant {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-pleasant-solid {
  background: var(--wasicu);
  color: #fff;
  border: 2px solid var(--wasicu);
}
.btn-pleasant-solid:hover { background: #155a75; }
.btn-pleasant-outline {
  background: transparent;
  color: var(--wasicu);
  border: 2px solid var(--wasicu);
}
.btn-pleasant-outline:hover { background: var(--wasicu-lt); }

/* Icons strip */
.pleasant-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 0 1rem 2.5rem;
  flex-wrap: wrap;
}
.icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: default;
}
.icon-emoji { font-size: 2.2rem; line-height: 1; }
.icon-label { font-size: 0.75rem; color: var(--pleasant-muted); }

/* Turtle walk-off animation (clue 3) */
#turtle-icon { cursor: pointer; transition: transform 8s ease-in; }
#turtle-icon.walking-off { transform: translateX(120vw); }
@media (prefers-reduced-motion: reduce) {
  #turtle-icon.walking-off { visibility: hidden; transition: none; }
}

/* Program table */
.pleasant-program {
  max-width: 540px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}
.pleasant-program-h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.8rem;
  color: var(--pleasant-text);
}
.program-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.program-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--pleasant-border);
  color: var(--pleasant-text);
}
.program-table td:first-child {
  color: var(--pleasant-muted);
  white-space: nowrap;
  width: 4.5rem;
}
.program-table tr:last-child td { border-bottom: none; }

/* Member counter */
.pleasant-counter {
  text-align: center;
  font-size: 0.9rem;
  color: var(--pleasant-muted);
  margin: 0 0 2.5rem;
}
#member-count { font-weight: 600; color: var(--wasicu); }

/* Pleasant footer */
.pleasant-footer {
  background: var(--pleasant-dark);
  border-top: 1px solid var(--pleasant-border);
  padding: 2rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.pleasant-disclaimer {
  font-size: 0.75rem;
  color: var(--pleasant-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}
.pleasant-footer-org {
  font-size: 0.8rem;
  color: var(--pleasant-muted);
  line-height: 1.6;
  margin: 0 0 0.8rem;
}
.pleasant-footer-links {
  font-size: 0.8rem;
  margin: 0;
}
.pleasant-footer-links a {
  color: var(--wasicu);
  text-decoration: none;
}
.pleasant-footer-links a:hover { text-decoration: underline; }

/* Accuracy / Status / Document register */
.pleasant-doc { padding-top: 3rem; }
.glitch-text {
  font-family: 'IM Fell English', serif;
  font-size: 1.2rem;
  color: #7a2e2a;
  letter-spacing: 0.02em;
}
.status-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 1rem; }
.status-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--pleasant-border); }
.status-table td.state-degraded { color: #7a2e2a; font-weight: 600; }
.status-table tr:last-child td { border-bottom: none; }

/* Join view extras */
.pleasant-h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
}

/* Overshare drawer */
#overshare { margin: 1.5rem 0; }
#overshare summary { cursor: pointer; font-size: 0.9rem; }
#overshare summary strong { display: block; margin-bottom: 0.3rem; }
.os-fields { display: flex; flex-direction: column; gap: 0.7rem; margin: 1rem 0; }
.os-fields label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--pleasant-muted); gap: 0.3rem; }
.os-fields input {
  border: 1px solid var(--pleasant-border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  background: #fff;
}
#os-refuse { color: #7a2e2a; font-size: 0.9rem; margin-top: 0.5rem; }

/* Reveal columns */
.reveal-cols { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1rem 0; }
.reveal-cols > div { flex: 1; min-width: 180px; }
.reveal-didnt { text-decoration: line-through; color: var(--pleasant-muted); }

/* Hide global footer on home / pledge views */
[data-view="home"] ~ .site-footer { display: none; }

/* Join view: auth choices + profile form (reuses .pleasant-* below, not the
   pine/gold .field/.btn classes from styles.css, so the join view stays in
   the Pleasant register instead of picking up the Radical palette). */
.join-auth, .join-profile {
  max-width: 420px;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.join-btn-block { display: block; width: 100%; text-align: center; }
.btn-pleasant { cursor: pointer; }
.join-divider {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--pleasant-muted);
  margin: 0.2rem 0;
}
.join-profile-h4 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.5rem 0 0;
}
.pleasant-field-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pleasant-muted);
  margin-bottom: -0.4rem;
}
.pleasant-field {
  border: 1px solid var(--pleasant-border);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  color: var(--pleasant-text);
}
.pleasant-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--pleasant-muted);
}
.pleasant-checkbox input { accent-color: var(--wasicu); width: 16px; height: 16px; }
.pleasant-fine-print { font-size: 0.8rem; color: var(--pleasant-muted); margin: 0.2rem 0 0; }
#turnstile { margin-top: 0.3rem; }

/* Reveal headline + Passport card (Task 9) — card styles ported from the
   member-card.html mockup, option C ("The Passport"). Deliberately named
   .pass-card, not .card — the site already has an unrelated global .card
   class (pine-bordered tier cards on /donate) that would otherwise leak in. */
.reveal-headline {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  text-align: center;
  margin: 1.5rem 0 1.2rem;
}
.reveal-headline strong { color: var(--wasicu); }

.pass-card {
  max-width: 320px;
  margin: 0 auto 1.8rem;
  border-radius: 10px;
  padding: 22px 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-family: 'Newsreader', Georgia, serif;
  background: linear-gradient(168deg, #24422f, #1E3A2A 42%, #152a1e);
  color: #FAF6EC;
}
.pass-head { display: flex; justify-content: space-between; align-items: flex-start; }
.pass-mark { font-family: 'IM Fell English', serif; font-size: 14px; line-height: 1.05; letter-spacing: 0.04em; }
.pass-mark span { display: block; color: #D9A441; }
.pass-yr {
  font-family: 'IM Fell English', serif;
  font-size: 11px;
  color: #D9A441;
  border: 1px solid #a37a1c;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pass-numlabel {
  font-variant: small-caps;
  letter-spacing: 0.2em;
  font-size: 9.5px;
  text-transform: uppercase;
  color: #a9bcae;
  margin: 14px 0 0;
}
.pass-num { font-family: 'IM Fell English', serif; font-size: 62px; line-height: 0.95; color: #D9A441; }
.pass-name { font-family: 'IM Fell English', serif; font-size: 24px; margin: 10px 0 1px; }
.pass-town { font-size: 12.5px; color: #a9bcae; font-style: italic; }
.pass-foot {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(217, 164, 65, 0.3);
  font-size: 10.5px;
  color: #93a698;
  line-height: 1.45;
  font-style: italic;
}

/* Confetti (Task 9) — CSS does the one-shot fall; app.js only spawns/removes
   the pieces. Disabled entirely under reduced motion. */
.confetti-piece {
  position: fixed;
  top: -12px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(360deg); opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-piece { display: none; }
}
