:root {
  --navy: #0f1a2e;
  --navy-light: #1a2942;
  --navy-muted: #243552;
  --gold: #f5c518;
  --gold-bright: #ffcf2e;
  --gold-dim: rgba(245, 197, 24, 0.14);
  --gold-glow: rgba(245, 197, 24, 0.35);
  --gold-border: rgba(245, 197, 24, 0.65);
  --blue: #2b6cb0;
  --blue-light: #5eb3ff;
  --text: #f0f2f5;
  --text-muted: #9aa8bc;
  --white: #ffffff;
  --border: rgba(94, 179, 255, 0.18);
  --radius: 16px;
  --max: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(43, 108, 176, 0.18), transparent),
    var(--navy);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ── Hero ── */

.hero {
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(2.5rem, 7vw, 4rem);
  text-align: center;
  overflow: visible;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(245, 197, 24, 0.08), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(43, 108, 176, 0.28), transparent),
    linear-gradient(180deg, var(--navy-light) 0%, var(--navy) 100%);
  border-bottom: 2px solid var(--gold-border);
}

.hero-brand {
  position: relative;
  display: inline-block;
  margin: 0 auto 0.5rem;
  /* room for Patch beside card + feet on the ground below it */
  padding-right: clamp(4.5rem, 14vw, 7rem);
  padding-bottom: clamp(1.25rem, 4vw, 2rem);
}

.logo-frame {
  display: inline-block;
  margin: 0 auto;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(43, 108, 176, 0.35), rgba(15, 26, 46, 0.9));
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(245, 197, 24, 0.2),
    0 0 32px var(--gold-glow),
    0 12px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

.logo {
  width: min(260px, 72vw);
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

/* Mascot figures — height defines character size, not PNG canvas */
.mascot-figure {
  margin: 0;
  padding: 0;
  border: none;
  line-height: 0;
  pointer-events: none;
  user-select: none;
}

.mascot-figure img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

/* Hero: feet on the ground, overlapping bottom-right of card */
.mascot-figure--hero {
  position: absolute;
  right: 0;
  bottom: 0;
  height: clamp(250px, 28vw, 300px);
  z-index: 5;
  transform: translate(14%, 0);
}

.btn,
.social-btn,
.contact-links,
.contact-intro {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.tagline {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 3vw, 1.15rem);
  color: var(--gold-bright);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px var(--gold-glow);
}

.intro {
  margin: 1.5rem auto 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  padding: 0 0.25rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 0 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--gold);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
  color: var(--navy);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 4px 20px var(--gold-glow);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffe066 0%, var(--gold-bright) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 8px 28px rgba(245, 197, 24, 0.45);
  border-color: var(--gold-bright);
}

.btn-outline {
  background: rgba(26, 41, 66, 0.6);
  color: var(--white);
  border-color: var(--gold-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline:hover {
  background: var(--gold-dim);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 4px 20px var(--gold-glow);
}

/* ── Sections ── */

section {
  padding: clamp(2.5rem, 7vw, 4rem) 0;
}

section:nth-child(even) {
  background: rgba(26, 41, 66, 0.5);
}

.panel-inner {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

section h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.prose {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

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

#local-legends,
#contact {
  overflow: visible;
}

#local-legends .container,
#contact .container {
  overflow: visible;
}

.legends-layout {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin-top: 0.5rem;
}

.featured {
  flex: 1 1 28rem;
  max-width: 40rem;
  background: linear-gradient(135deg, var(--navy-muted) 0%, var(--navy-light) 100%);
  border: 2px solid var(--gold-border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow:
    0 0 24px rgba(245, 197, 24, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.25);
}

.featured-content {
  min-width: 0;
}

.featured-content h3 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  color: var(--gold-bright);
  margin-bottom: 0.75rem;
}

.featured-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 40rem;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

.featured-content p:last-of-type {
  margin-bottom: 1.5rem;
}

/* Seated Patch beside the card — full character, notebook visible */
.mascot-figure--legends {
  flex: 0 0 auto;
  height: clamp(200px, 26vw, 280px);
  align-self: flex-end;
}

.dev-note {
  margin-top: 2rem;
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
  background: var(--gold-dim);
  border-radius: var(--radius);
}

/* ── Social ── */

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 1.1rem 1rem;
  background: var(--navy-light);
  border: 2px solid var(--gold-border);
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 600;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
  text-decoration: none;
  border-color: var(--gold-bright);
  background: var(--gold-dim);
  color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--gold-glow);
}

.social-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

/* ── Contact ── */

/* ── Contact + Patch perched on card ── */

.contact-stage {
  position: relative;
  max-width: 32rem;
  margin: 0 auto;
  padding-top: clamp(6rem, 18vw, 8.5rem);
}

.contact-panel {
  border: 2px solid var(--gold-border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  padding-top: clamp(1.75rem, 4vw, 2.25rem);
  background: var(--navy-light);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  text-align: left;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.contact-intro {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  margin-bottom: 1.25rem;
  padding-right: clamp(3rem, 12vw, 5rem);
}

/* Perched on top-right edge of the panel — feet overlap the border */
.mascot-figure--contact {
  position: absolute;
  right: clamp(-0.5rem, 1vw, 0.75rem);
  bottom: calc(100% - 0.75rem);
  height: clamp(210px, 28vw, 270px);
  z-index: 4;
}

.contact-links {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.contact-item strong {
  color: var(--gold);
  min-width: 5.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-item a {
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 500;
  color: var(--white);
  word-break: break-word;
}

.contact-item a:hover {
  color: var(--gold-bright);
}

/* ── Footer ── */

footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 2px solid var(--gold-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(15, 26, 46, 0.8);
}

footer p + p {
  margin-top: 0.35rem;
}

footer .legal {
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ── Mobile ── */

@media (max-width: 540px) {
  .container {
    width: min(100% - 1.25rem, var(--max));
  }

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

  .btn {
    width: 100%;
  }

  .hero-brand {
    padding-right: clamp(2.75rem, 18vw, 4.5rem);
    padding-bottom: clamp(0.75rem, 3vw, 1.25rem);
  }

  .mascot-figure--hero {
    height: clamp(175px, 40vw, 225px);
    transform: translate(8%, 0);
  }

  .legends-layout {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .featured {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  .mascot-figure--legends {
    flex: 0 0 auto;
    height: clamp(140px, 36vw, 185px);
    margin: 0 auto;
  }

  .contact-stage {
    padding-top: clamp(7.5rem, 44vw, 9.5rem);
    max-width: 100%;
  }

  .mascot-figure--contact {
    height: clamp(145px, 34vw, 185px);
    right: clamp(-0.5rem, -1vw, 0.25rem);
  }

  .contact-intro {
    padding-right: clamp(2.5rem, 14vw, 4rem);
  }

  .logo-frame {
    width: auto;
  }

  .contact-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-item strong {
    min-width: unset;
  }

  .panel-inner {
    padding-left: 1rem;
  }
}

@media (max-width: 380px) {
  .social-btn {
    font-size: 0.85rem;
    padding: 1rem 0.75rem;
  }

  .mascot-figure--hero {
    height: clamp(160px, 44vw, 190px);
    transform: translate(5%, 0);
  }

  .mascot-figure--legends {
    height: clamp(125px, 34vw, 160px);
  }

  .contact-stage {
    padding-top: clamp(6.5rem, 48vw, 8rem);
  }

  .mascot-figure--contact {
    height: clamp(130px, 38vw, 165px);
  }
}
