/* Beaglecoin — Cartoon USA theme, flat colors only (no gradients) */

:root {
  --red: #c41e3a;
  --red-dark: #9a1830;
  --blue: #1a3a6e;
  --blue-dark: #0f2447;
  --white: #ffffff;
  --cream: #fff8e7;
  --gold: #f5c842;
  --gold-dark: #d4a82a;
  --ink: #1a1a2e;
  --green: #2d8a4e;
  --border: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 16px;
  --font-display: "Bangers", cursive;
  --font-body: "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* Paw pattern background */
.paw-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%231a1a2e'%3E%3Cellipse cx='40' cy='52' rx='14' ry='12'/%3E%3Cellipse cx='22' cy='30' rx='8' ry='10' transform='rotate(-30 22 30)'/%3E%3Cellipse cx='58' cy='30' rx='8' ry='10' transform='rotate(30 58 30)'/%3E%3Cellipse cx='14' cy='48' rx='7' ry='9' transform='rotate(-50 14 48)'/%3E%3Cellipse cx='66' cy='48' rx='7' ry='9' transform='rotate(50 66 48)'/%3E%3C/g%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: var(--border);
  box-shadow: 0 4px 0 var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--ink);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  margin-left: auto;
}

.nav-links a {
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.nav-links a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.nav-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--gold);
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--ink);
}

.btn-lg {
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
}

.btn-xl {
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
}

.hero-banner-wrap {
  position: relative;
  border-bottom: var(--border);
  overflow: visible;
}

.hero-banner {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 1.5rem 2.5rem;
  background-color: rgba(26, 26, 46, 0.45);
  overflow: visible;
}

/* 3D coin flip */
.hero-coin-scene {
  position: relative;
  width: clamp(110px, 24vw, 170px);
  height: clamp(110px, 24vw, 170px);
  margin-bottom: 0.75rem;
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

.hero-coin-flip {
  --coin-thick: 18px;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: coin-flip 3.5s ease-in-out infinite;
  will-change: transform;
}

.coin-rim {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.coin-rim-segment {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform-origin: center center;
  backface-visibility: hidden;
}

.coin-shadow {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 70%;
  height: 14px;
  margin-left: -35%;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(2px);
  animation: coin-shadow 3.5s ease-in-out infinite;
}

@keyframes coin-shadow {
  0%, 100% {
    transform: scaleX(1);
    opacity: 0.35;
  }
  25%, 75% {
    transform: scaleX(0.55);
    opacity: 0.2;
  }
  50% {
    transform: scaleX(0.85);
    opacity: 0.28;
  }
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid var(--ink);
  backface-visibility: hidden;
  overflow: hidden;
  transform-style: preserve-3d;
}

.coin-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coin-front {
  transform: translateZ(calc(var(--coin-thick) / 2));
  background: var(--gold);
}

.coin-back {
  transform: rotateY(180deg) translateZ(calc(var(--coin-thick) / 2));
  background: var(--gold-dark);
}

@keyframes coin-flip {
  0% {
    transform: rotateY(0deg) rotateX(12deg);
  }
  20% {
    transform: rotateY(72deg) rotateX(18deg) translateY(-14px);
  }
  40% {
    transform: rotateY(144deg) rotateX(12deg);
  }
  50% {
    transform: rotateY(180deg) rotateX(12deg);
  }
  60% {
    transform: rotateY(216deg) rotateX(18deg) translateY(-10px);
  }
  80% {
    transform: rotateY(288deg) rotateX(12deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-coin-flip {
    animation: none;
    transform: rotateY(0deg);
  }

  .coin-shadow {
    animation: none;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.usa-flag-icon {
  display: inline-block;
  flex-shrink: 0;
}

.usa-flag-icon--sm {
  width: 22px;
  height: 15px;
}

.usa-flag-icon--lg {
  width: 2.4rem;
  height: 1.6rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  color: var(--gold);
  text-shadow:
    4px 4px 0 var(--ink),
    -1px -1px 0 var(--red);
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
}

.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--white);
  font-weight: 900;
  margin: 0.5rem 0 1.25rem;
  text-shadow: 2px 2px 0 var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.stars-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--blue);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-bottom: var(--border);
  font-size: 1.1rem;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
}

.section:nth-child(even) {
  background: var(--white);
  border-top: var(--border);
  border-bottom: var(--border);
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 0.04em;
}

.section-sub {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  color: var(--blue);
  max-width: 520px;
  margin-inline: auto;
}

/* Comic cards */
.comic-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
}

.card-sticker {
  position: absolute;
  top: -18px;
  right: 16px;
  font-size: 2rem;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.about-main {
  grid-row: span 2;
}

.about-main p + p {
  margin-top: 1rem;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-icon {
  display: block;
  margin-bottom: 0.5rem;
}

.stat-icon .usa-flag-icon--lg {
  display: block;
  margin-inline: auto;
}

.stat-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue);
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.stat-card p {
  font-size: 0.9rem;
  font-weight: 700;
}

/* News / Tweet */
.news {
  background: var(--red);
  border-top: var(--border);
  border-bottom: var(--border);
}

.news .section-head h2 {
  color: var(--white);
  text-shadow: 3px 3px 0 var(--ink);
}

.news .section-sub {
  color: var(--cream);
}

.tweet-wrap {
  max-width: 600px;
  margin-inline: auto;
  padding: 1rem;
  background: var(--white);
}

.tweet-wrap .twitter-tweet {
  margin: 0 auto !important;
}

/* Buy */
.buy-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

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

.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--ink);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--blue);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.step-card p {
  font-size: 0.9rem;
}

.contract-box {
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.contract-box label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.contract-row {
  display: flex;
  gap: 0.75rem;
}

.contract-row input {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  min-width: 0;
}

.contract-row input:focus {
  outline: 3px solid var(--gold);
}

.contract-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--blue);
}

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

/* Community */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.community-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.community-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

.community-icon {
  font-size: 2.5rem;
  font-weight: 900;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  border: 3px solid var(--ink);
  margin-bottom: 0.75rem;
}

.community-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.card-link {
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 900;
  color: var(--blue);
}

.mascot-card {
  text-align: center;
  align-items: center;
}

.mascot-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  margin: 0 auto 0.75rem;
}

.mascot-card h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-dark);
  text-shadow: 2px 2px 0 var(--ink);
}

.mascot-card p {
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--blue);
  color: var(--white);
  border-top: var(--border);
  padding: 2.5rem 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.footer-disclaimer {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 600px;
  margin: 0 auto 1.25rem;
  opacity: 0.9;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-weight: 800;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

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

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 6px 0 var(--ink);
  }

  .nav.open .nav-cta {
    display: inline-flex;
    position: absolute;
    top: calc(100% + 180px);
    left: 1.5rem;
    right: 1.5rem;
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-main {
    grid-row: auto;
  }

  .buy-steps {
    grid-template-columns: 1fr;
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .contract-row {
    flex-direction: column;
  }

  .hero-overlay {
    padding-bottom: 1.5rem;
  }
}
