/* ============================================
   THE COVERED GROUND SOCIETY
   Core Stylesheet v1.0
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* --- Noise Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
  mix-blend-mode: multiply;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 2rem);
  max-width: 72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: rgba(27, 58, 45, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(0px);
  transition: background 0.45s ease, backdrop-filter 0.45s ease, border-color 0.45s ease;
}

#navbar.is-scrolled {
  background: rgba(27, 58, 45, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(255, 255, 255, 0.13);
}

#navbar.is-light {
  background: rgba(244, 239, 228, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(37, 37, 32, 0.1);
}

#navbar.is-light .navbar-logo,
#navbar.is-light .nav-link {
  color: #252520;
}

#navbar.is-light .btn-nav {
  background: #C4603A;
  color: #fff;
}

.navbar-logo {
  transition: color 0.3s ease;
}

.nav-link {
  transition: color 0.25s ease;
}

.btn-nav {
  background: #C4603A;
  color: #fff;
  transition: background 0.3s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-nav:hover {
  background: #a84e2d;
  transform: scale(1.04);
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
  min-height: 100svh;
  min-height: 100vh;
  padding-top: 8rem;
  padding-bottom: 5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  background-color: #1B3A2D;
  background-image:
    radial-gradient(ellipse 80% 60% at 65% 35%, rgba(44, 83, 64, 0.65) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(196, 96, 58, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(27, 58, 45, 0.8) 0%, transparent 60%);
}

@media (min-width: 768px) {
  .hero-section {
    padding-left: 4rem;
    padding-right: 4rem;
    padding-bottom: 7rem;
  }
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(196, 96, 58, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 58, 45, 0.97) 0%,
    rgba(27, 58, 45, 0.55) 40%,
    rgba(27, 58, 45, 0.15) 75%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-drama {
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 0.9;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 0.4rem 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-hero {
  background: #C4603A;
  color: #fff;
  transition: background 0.3s ease, transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.btn-hero:hover {
  background: #a84e2d;
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(196, 96, 58, 0.45);
}

.btn-laws {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-laws:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.03);
}

.btn-submit {
  background: #C4603A;
  transition: background 0.3s ease, transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.btn-submit:hover {
  background: #a84e2d;
  transform: scale(1.02);
  box-shadow: 0 6px 28px rgba(196, 96, 58, 0.42);
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-pledge {
  background: transparent;
  color: #252520;
  border: 1.5px solid rgba(37, 37, 32, 0.3);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-pledge:hover {
  background: #252520;
  color: #F4EFE4;
  border-color: #252520;
  transform: scale(1.03);
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-track {
  animation: marquee-scroll 28s linear infinite;
  width: max-content;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   WHO CARDS
   ============================================ */
.who-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.who-card:hover {
  transform: translateY(-5px);
}

.who-card-dark:hover {
  box-shadow: 0 20px 50px rgba(27, 58, 45, 0.3);
}

.who-card-light:hover {
  box-shadow: 0 20px 50px rgba(37, 37, 32, 0.08);
}

.who-card-terra:hover {
  box-shadow: 0 20px 50px rgba(196, 96, 58, 0.25);
}

/* ============================================
   LAWS
   ============================================ */
.law-item {
  transition: opacity 0.2s ease;
}

.law-item:hover .law-num {
  letter-spacing: 0.25em;
  transition: letter-spacing 0.3s ease;
}

/* ============================================
   MANIFESTO STRIPE
   ============================================ */
.manifesto-ring {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 50vw;
  height: 50vw;
  max-width: 400px;
  max-height: 400px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================
   CHECKLIST CARD
   ============================================ */
.checklist-card-pattern {
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.clist-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ============================================
   FORM
   ============================================ */
.form-input {
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: #9a9a8c;
}

.form-input:focus {
  border-color: #1B3A2D;
  background-color: #faf7f2;
}

.form-input.error {
  border-color: #dc2626;
}

/* ============================================
   FOOTER STATUS DOT
   ============================================ */
.status-dot {
  animation: dot-pulse 2.8s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-photo-frame {
  aspect-ratio: 4 / 5;
  background-color: #EDE5D7;
  position: relative;
}

.about-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 2.5rem;
}

/* Placeholder shown when image src fails to load */
.about-photo-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    #2C5340 0%,
    #1B3A2D 60%,
    #0f2218 100%
  );
  border-radius: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Placeholder shown via JS onerror on the img tag */

.about-photo-wrap {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-role {
  padding: 1rem;
  background: #F4EFE4;
  border: 1px solid rgba(37, 37, 32, 0.08);
  border-radius: 1rem;
}

/* ============================================
   LAWS — CSS REVEAL ANIMATION
   JS adds .will-animate; IntersectionObserver
   adds .is-visible when section enters viewport.
   Without JS: laws are always fully visible.
   ============================================ */
.law-item.will-animate {
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity  0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.law-item.will-animate.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   SCROLL ANIMATION PRE-STATES
   (GSAP sets these via JS; CSS provides fallback
    when JS hasn't loaded yet)
   ============================================ */
.js-fade-up {
  opacity: 0;
  transform: translateY(32px);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track        { animation: none; }
  .status-dot           { animation: none; }
  .who-card:hover       { transform: none; box-shadow: none; }
  .btn-hero:hover,
  .btn-nav:hover,
  .btn-laws:hover,
  .btn-submit:hover,
  .btn-pledge:hover     { transform: none; }
  .js-fade-up           { opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 480px) {
  #navbar {
    padding: 0.65rem 1.1rem;
  }

  .hero-drama {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .who-card {
    border-radius: 1.5rem;
  }

  .checklist-card {
    border-radius: 2rem;
    padding: 2rem;
  }

  footer {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
  }
}
