/* ============================================
   Pledge Landing Page — Design System & Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

/* --- Custom Properties --- */
:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --accent: #F97316;
  --white: #FFFFFF;
  --black: #000000;

  --bg: #1C1C1E;
  --bg-card: #2C2C2E;
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.1);

  --completed: #10B981;
  --forfeited: #EF4444;
  --expired: #F97316;

  --card-radius: 4px 30px 30px 4px;

  --font-heading: 'Iceberg', cursive;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

.title1 {
  font-size: 2.5rem;
  color: var(--primary);
}

.title2 {
  font-size: 2rem;
}

.title3 {
  font-size: 1.25rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

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

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

.section {
  padding: 80px 0;
}

.section--gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

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

.text-center {
  text-align: center;
}

/* --- Components: Card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px 24px;
  transition: border-color 250ms ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Components: Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 150ms ease, opacity 150ms ease;
  min-height: 48px;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--primary-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

/* --- Components: Badge --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge--green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--completed);
}

.badge--coral {
  background: rgba(249, 115, 22, 0.15);
  color: var(--expired);
}

.badge--red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--forfeited);
}

/* --- Components: Step Number --- */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 16px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background-color 300ms ease, backdrop-filter 300ms ease;
}

.nav.scrolled {
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo img {
  width: 36px;
  height: 36px;
}

.nav__logo span {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
}

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

.nav__links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.nav__links a:hover {
  color: var(--white);
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__social a {
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.nav__social a:hover {
  color: var(--white);
}

.nav__social svg {
  width: 22px;
  height: 22px;
}

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--white);
}

.nav__hamburger svg {
  width: 28px;
  height: 28px;
}

/* Mobile nav overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 30, 0.97);
  backdrop-filter: blur(12px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text);
  transition: color 150ms ease;
}

.nav__mobile a:hover {
  color: var(--primary);
}

.nav__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  padding: 8px;
}

.nav__close svg {
  width: 28px;
  height: 28px;
}

/* --- Hero --- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero__content {
  max-width: 640px;
}

.hero__logo {
  width: 180px;
  margin: 0 auto 32px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
}

.hero__scroll svg {
  width: 28px;
  height: 28px;
}

/* --- How It Works --- */
.how-it-works .card {
  text-align: center;
}

.how-it-works .card h3 {
  margin-bottom: 12px;
  color: var(--white);
}

.how-it-works .card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* --- Fees --- */
.fee-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fee-card .fee-amount {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
}

.fee-card .fee-detail {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.fee-card .fee-example {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 8px;
}

/* --- Trust --- */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.trust-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.trust-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.trust-item__icon svg {
  width: 22px;
  height: 22px;
}

.trust-item h4 {
  font-size: 1.125rem;
  margin-bottom: 4px;
  color: var(--white);
}

.trust-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.trust-program {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trust-program__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.trust-program__address {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary);
  word-break: break-all;
  background: rgba(99, 102, 241, 0.1);
  padding: 12px 16px;
  border-radius: 8px;
}

.trust-program p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
  content: '';
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform 300ms var(--ease-out-cubic);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out-cubic);
}

.faq-item[open] .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer__inner {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 100px 24px;
}

.cta-section h2 {
  font-size: 2.25rem;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  margin-bottom: 40px;
}

.cta-section .hero__ctas {
  margin-bottom: 40px;
}

.cta-social {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.cta-social a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 150ms ease;
}

.cta-social a:hover {
  color: var(--white);
}

.cta-social svg {
  width: 28px;
  height: 28px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__logo img {
  width: 28px;
  height: 28px;
}

.footer__logo span {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--primary);
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.footer__links a:hover {
  color: var(--white);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.footer__social a:hover {
  color: var(--white);
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* --- Legal Pages --- */
.legal-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.legal-page .legal-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page ul li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  color: var(--white);
}

/* --- Points Page --- */
.points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.points-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.points-card__header .step-number {
  flex-shrink: 0;
}

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

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo,
  .hero__title,
  .hero__subtitle,
  .hero__ctas,
  .hero__scroll {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 700ms var(--ease-out-quint) forwards;
  }

  .hero__logo { animation-delay: 0ms; }
  .hero__title { animation-delay: 150ms; }
  .hero__subtitle { animation-delay: 300ms; }
  .hero__ctas { animation-delay: 450ms; }
  .hero__scroll { animation-delay: 600ms; }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
  }

  .hero__scroll {
    animation: fadeUp 700ms var(--ease-out-quint) 600ms forwards,
               bounce 2s ease-in-out 1.5s infinite;
  }

  .animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms var(--ease-out-quint),
                transform 600ms var(--ease-out-quint);
  }

  .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .stagger-1 { transition-delay: 0ms; }
  .stagger-2 { transition-delay: 150ms; }
  .stagger-3 { transition-delay: 300ms; }
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .hero__logo,
  .hero__title,
  .hero__subtitle,
  .hero__ctas,
  .hero__scroll {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
  }

  .btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
  }

  .btn--primary-outline:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.02);
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

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

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__logo {
    width: 140px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .title1 {
    font-size: 2rem;
  }

  .nav__links,
  .nav__social {
    display: none;
  }

  .nav__hamburger {
    display: block;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  .footer__social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.875rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

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

  .card {
    padding: 24px 20px;
  }

  .faq-item summary {
    padding: 16px 20px;
    font-size: 0.9375rem;
  }

  .faq-answer p {
    padding: 0 20px 16px;
    font-size: 0.875rem;
  }
}
