/* =========================================================================
   SUMMER JAM 8 — "THE WARRIOR"
   Design tokens
   ========================================================================= */
:root{
  /* color */
  --bg:            #0a0806;
  --bg-alt:        #14100b;
  --bg-elevated:   #1c1610;
  --gold:          #d4af37;
  --gold-light:    #f3dfa0;
  --gold-dim:      #8a6a22;
  --orange:        #ff6a1a;
  --orange-deep:   #b8420a;
  --ink:           #f3ead8;
  --ink-muted:     #a89a82;
  --ink-faint:     #6b6052;
  --glass-bg:      rgba(20, 16, 12, 0.55);
  --glass-border:  rgba(212, 175, 55, 0.28);
  --danger:        #e0523a;
  --success:       #d4af37;

  /* type */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* scale */
  --step-hero: clamp(3.2rem, 10vw, 8rem);
  --step-h1: clamp(2.2rem, 6vw, 4rem);
  --step-h2: clamp(1.6rem, 4vw, 2.4rem);
  --step-body: 1rem;
  --step-small: 0.85rem;

  /* rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
  --radius: 18px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========================================================================
   Reset
   ========================================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
button{ font-family: inherit; }
a{ color: inherit; }
h1, h2, h3, p{ margin: 0; }

::selection{ background: var(--gold); color: #0a0806; }

/* focus visibility for accessibility */
:focus-visible{
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* skip link */
.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #0a0806;
  padding: 0.75rem 1.25rem;
  z-index: 999;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

/* =========================================================================
   Background texture + ember particle canvas
   ========================================================================= */
.texture-overlay{
  position: fixed;
  inset: 0;
  background-image: url('assets/warrior-pattern.svg');
  background-size: 240px 240px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

#ember-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* =========================================================================
   Layout shell
   ========================================================================= */
.app{
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container{
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: var(--space-4) var(--space-3);
}

.hero__bg{
  margin-top: 10px;
  position: absolute;
  inset: 0;
  background-image: url('assets/hero.jpeg'); /* your hero image */
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1.00);
}

.hero__overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,8,6,0.35) 0%, rgba(10,8,6,0.75) 55%, var(--bg) 100%);
}

.hero__content{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero__logo{
  width: 84px;
  height: 84px;
  margin-bottom: var(--space-1);
  filter: drop-shadow(0 0 18px rgba(212,175,55,0.45));
  animation: fadeInUp 900ms var(--ease-out) both;
}

.hero__eyebrow{
  font-family: var(--font-body);
  font-size: var(--step-small);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  animation: fadeInUp 900ms var(--ease-out) 120ms both;
}

.hero__title{
  font-family: var(--font-display);
  font-size: var(--step-hero);
  line-height: 0.95;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, var(--orange-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(212,175,55,0.25);
  animation: fadeInUp 900ms var(--ease-out) 220ms both;
}

.hero__subtitle{
  font-family: var(--font-display);
  font-size: var(--step-h2);
  letter-spacing: 0.12em;
  color: var(--ink);
  animation: fadeInUp 900ms var(--ease-out) 320ms both;
}

.hero__detials{
    font-family: var(--font-display);
    font-size: var(--step-body);
    letter-spacing: 0.12em;
    color: var(--ink);
    animation: fadeInUp 900ms var(--ease-out) 320ms both;
}

.hero__theme{
  color: var(--orange);
  font-family: var(--font-display);
  letter-spacing: 0.2em;
}

.hero__invitee{
  margin-top: var(--space-2);
  font-size: 1.05rem;
  color: var(--ink-muted);
  min-height: 1.6em;
  animation: fadeInUp 900ms var(--ease-out) 420ms both;
}

.hero__invitee strong{
  color: var(--gold-light);
  font-weight: 600;
}

.hero__scroll{
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid var(--gold-dim);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0.7;
}
.hero__scroll::after{
  content: '';
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 4px;
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot{
  0%{ transform: translateY(0); opacity: 1; }
  70%{ opacity: 0; }
  100%{ transform: translateY(14px); opacity: 0; }
}

/* =========================================================================
   Invitation card / glassmorphism
   ========================================================================= */
.stage{
  position: relative;
  flex: 1;
  padding: var(--space-5) 0 var(--space-5);
}

.card{
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}

.card::before{
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.panel{
  display: none;
}
.panel.is-active{
  display: block;
  animation: fadeInUp 700ms var(--ease-out) both;
}

.panel__heading{
  font-family: var(--font-display);
  font-size: var(--step-h1);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-1);
  color: var(--ink);
}

.panel__lede{
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
  font-size: 1.05rem;
}

.panel__lede strong{ color: var(--gold-light); }

/* action buttons */
.action-row{
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

@media (min-width: 560px){
  .action-row{ flex-direction: row; }
}

.btn{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: none;
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  flex: 1;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), filter 220ms;
}

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

.btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--primary{
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--orange-deep));
  color: #170f05;
  box-shadow: 0 10px 30px rgba(212,175,55,0.25);
}
.btn--primary:hover{
  filter: brightness(1.08);
  box-shadow: 0 14px 40px rgba(255,106,26,0.35);
}

.btn--ghost{
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid rgba(168,154,130,0.35);
}
.btn--ghost:hover{
  color: var(--ink);
  border-color: var(--gold-dim);
  background: rgba(255,255,255,0.03);
}

/* ripple */
.btn__ripple{
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: ripple 650ms var(--ease-out);
  pointer-events: none;
  z-index: -1;
}
@keyframes ripple{
  to{ transform: scale(3.2); opacity: 0; }
}

.btn__spinner{
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 0.6rem;
  border: 2px solid rgba(23,15,5,0.35);
  border-top-color: #170f05;
  border-radius: 50%;
  vertical-align: -3px;
  animation: spin 700ms linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* =========================================================================
   Form
   ========================================================================= */
.form-group{
  margin-bottom: var(--space-2);
  text-align: left;
}

.form-label{
  display: block;
  font-size: var(--step-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.form-control{
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(212,175,55,0.22);
  color: var(--ink);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 200ms, box-shadow 200ms;
}

.form-control:focus{
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
  outline: none;
}

.form-control[readonly]{
  color: var(--gold-light);
  background: rgba(212,175,55,0.06);
  cursor: not-allowed;
}

textarea.form-control{
  min-height: 110px;
  resize: vertical;
}

.form-error{
  display: none;
  color: var(--danger);
  font-size: var(--step-small);
  margin-top: 0.4rem;
}
.form-error.is-visible{ display: block; }

.form-group.has-error .form-control{
  border-color: var(--danger);
}

.form-note{
  color: var(--ink-faint);
  font-size: var(--step-small);
  margin-top: var(--space-2);
}

.form-status{
  min-height: 1.4em;
  margin-top: var(--space-2);
  font-size: var(--step-small);
}
.form-status[data-state="error"]{ color: var(--danger); }
.form-status[data-state="offline"]{ color: var(--orange); }

/* =========================================================================
   Decline illustration
   ========================================================================= */
.illustration{
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-2);
  color: var(--gold);
  animation: fadeInUp 700ms var(--ease-out) 100ms both;
}

/* =========================================================================
   Success / seal stamp (signature element)
   ========================================================================= */
.seal{
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-2);
  position: relative;
}
.seal img{
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(212,175,55,0.5));
  transform: scale(0.4) rotate(-25deg);
  opacity: 0;
  animation: sealStamp 900ms var(--ease-out) 150ms forwards;
}
@keyframes sealStamp{
  0%{ transform: scale(2.2) rotate(-25deg); opacity: 0; }
  55%{ transform: scale(0.92) rotate(4deg); opacity: 1; }
  75%{ transform: scale(1.05) rotate(-2deg); }
  100%{ transform: scale(1) rotate(0deg); opacity: 1; }
}
.seal::after{
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.4);
  animation: sealRing 900ms var(--ease-out) 150ms forwards;
  opacity: 0;
}
@keyframes sealRing{
  0%{ transform: scale(0.2); opacity: 0.9; }
  100%{ transform: scale(1.6); opacity: 0; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer{
  position: relative;
  z-index: 3;
  padding: var(--space-3);
  text-align: center;
  border-top: 1px solid rgba(212,175,55,0.12);
  color: var(--ink-faint);
  font-size: var(--step-small);
}

.site-footer__brand{
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  margin-bottom: var(--space-1);
}

.social-icons{
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}

.social-icons a{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.social-icons a:hover{
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212,175,55,0.2);
}
.social-icons svg{ width: 16px; height: 16px; fill: var(--ink-muted); }
.social-icons a:hover svg{ fill: var(--gold-light); }

/* =========================================================================
   Invalid invitation state
   ========================================================================= */
.invalid-state{
  text-align: center;
  padding: var(--space-5) var(--space-3);
}
.invalid-state__code{
  font-family: var(--font-display);
  font-size: 6rem;
  letter-spacing: 0.05em;
  color: var(--gold-dim);
  line-height: 1;
}

/* =========================================================================
   Utility animations
   ========================================================================= */
@keyframes fadeInUp{
  from{ opacity: 0; transform: translateY(24px); }
  to{ opacity: 1; transform: translateY(0); }
}
.fade-in{ animation: fadeInUp 700ms var(--ease-out) both; }

.is-hidden{ display: none !important; }

/* confetti canvas */
#confetti-canvas{
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #ember-canvas, #confetti-canvas{ display: none; }
}

/* =========================================================================
   Responsive tweaks
   ========================================================================= */
@media (max-width: 480px){
  .card{ padding: var(--space-3) var(--space-2); }
  .invalid-state__code{ font-size: 4.2rem; }
}
