/* --- Stronghold Lock & Key — Cartoony theme (sunset / street scene reference) --- */

:root {
  /* Sunset sky: horizon → top */
  --sunset-deep: #c45c2a;
  --sunset-mid: #e07d3a;
  --sunset-light: #f0a050;
  --sunset-sky: #ffb347;
  --ground: #2d1b0e;
  /* Cel-shaded cartoon: bold black outlines */
  --outline: #1a1a1a;
  --outline-thick: 4px;
  /* Accents from reference: navy, gold, warm white */
  --navy: #1e3a5f;
  --navy-light: #2d4a6f;
  --gold: #d4a84b;
  --gold-light: #e8c366;
  --streetlight: #ffd93d;
  --white: #fffef9;
  --cream: #f5eed8;
  --beige: #e8dfc4;
  /* Red pop (stripes) */
  --red-pop: #c23a3a;
  --shadow: 6px 6px 0 var(--outline);
  --shadow-sm: 3px 3px 0 var(--outline);
  --radius: 20px;
  --radius-lg: 28px;
  --font-display: "Fredoka", sans-serif;
  --font-body: "Nunito", sans-serif;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wobble: cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sunset-sky) 0%, var(--sunset-light) 25%, var(--sunset-mid) 55%, var(--sunset-deep) 80%, var(--ground) 100%);
  color: var(--outline);
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Streetlight-style glows (reference: warm yellow lights in scene) */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.5) 0%, rgba(255, 180, 71, 0.2) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: 18%;
  left: 8%;
}
body::after {
  top: 22%;
  right: 10%;
  width: 60px;
  height: 60px;
}

/* ----- Intro overlay ----- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ground);
  transition: opacity 0.6s var(--bounce), visibility 0.6s;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-skip {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 101;
  padding: 0.5rem 1rem;
  background: var(--streetlight);
  color: var(--outline);
  border: var(--outline-thick) solid var(--outline);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--bounce), box-shadow 0.2s;
}

.intro-skip:hover {
  transform: scale(1.05);
  box-shadow: 5px 5px 0 var(--outline);
}

.intro-skip:active {
  transform: scale(0.98);
}

.intro-reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ground);
}

/* ----- Main content ----- */
.main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  opacity: 0;
  transition: opacity 0.5s var(--bounce) 0.15s;
}

.main-content.visible {
  opacity: 1;
}

.main-content.visible .hero-title-line {
  animation: cartoony-pop 0.5s var(--bounce) backwards;
}
.main-content.visible .hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.main-content.visible .hero-title-line:nth-child(2) { animation-delay: 0.2s; }

@keyframes cartoony-pop {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.header {
  margin-bottom: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.75rem;
  filter: drop-shadow(2px 2px 0 var(--outline));
  animation: gentle-wobble 3s var(--wobble) infinite;
}

@keyframes gentle-wobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--outline);
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.35);
}

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 1rem 0.35rem 1.25rem;
  background: var(--beige);
  color: var(--outline);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 3px solid var(--outline);
  border-left: 5px solid var(--red-pop);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  animation: cartoony-pop 0.5s var(--bounce) 0.25s backwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 11vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--outline);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  text-shadow: 3px 3px 0 rgba(255,255,255,0.3);
}

.hero-title-line {
  display: block;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--outline);
  max-width: 360px;
  margin: 0 auto 1.75rem;
  opacity: 0.95;
  animation: cartoony-pop 0.5s var(--bounce) 0.35s backwards;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  border: var(--outline-thick) solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s var(--bounce), box-shadow 0.2s, background 0.2s;
  animation: cartoony-pop 0.5s var(--bounce) 0.45s backwards;
}

.cta-button:hover {
  background: var(--navy-light);
  transform: scale(1.08);
  box-shadow: 8px 8px 0 var(--outline);
}

.cta-button:active {
  transform: scale(0.98);
  box-shadow: 3px 3px 0 var(--outline);
}

.cta-button.cta-press {
  transform: scale(0.95);
  box-shadow: 2px 2px 0 var(--outline);
}

.hero-owner {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--outline);
  opacity: 0.9;
  animation: cartoony-pop 0.5s var(--bounce) 0.55s backwards;
}

.footer {
  margin-top: auto;
  padding: 2rem 0 0.5rem;
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--outline);
  opacity: 0.85;
  margin: 0;
}

/* Unmute button in intro (if present) - streetlight warm yellow */
.intro-unmute {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  padding: 0.5rem 1rem;
  background: var(--streetlight);
  color: var(--outline);
  border: 3px solid var(--outline);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--bounce);
}
.intro-unmute:hover {
  transform: translateX(-50%) scale(1.05);
}
.intro-unmute-label {
  display: block;
}
