/* ============ VARIABLES ============ */
:root{
  --bg-black:#08080a;
  --bg-dark:#121214;
  --bg-dark-2:#1a1a1d;
  --gold-1:#fff3c4;
  --gold-2:#f0c04a;
  --gold-3:#c9922e;
  --gold-4:#8a611a;
  --glass-bg:rgba(255,255,255,0.055);
  --glass-bg-strong:rgba(255,255,255,0.09);
  --glass-border:rgba(255,255,255,0.16);
  --text-main:#f5f3ec;
  --text-dim:#b9b6ad;
  --radius:20px;
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth; overflow-x:hidden;}
body{
  margin:0;
  background:var(--bg-black);
  color:var(--text-main);
  font-family:'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x:hidden;
  width:100%;
}

h1,h2,h3{
  font-weight:800;
  letter-spacing:0.02em;
  margin:0;
}

p{line-height:1.6;color:var(--text-dim);}

.gold-text{
  background:linear-gradient(135deg,var(--gold-1),var(--gold-2) 45%,var(--gold-4));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* ============ GLASS COMPONENTS ============ */
.glass-card{
  position:relative;
  z-index:1;
  background:var(--glass-bg);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 0 40px rgba(255,255,255,0.02);
  padding:2.5rem;
}
/* Soft ambient gold halo behind every glass card */
.glass-card::before{
  content:"";
  position:absolute;
  inset:-70px;
  z-index:-1;
  background:radial-gradient(ellipse at center, rgba(240,192,74,0.12), transparent 70%);
  filter:blur(12px);
  pointer-events:none;
}
.glass-card h2::after{
  content:"";
  display:block;
  width:60px;
  height:3px;
  margin:0.9rem auto 0;
  background:linear-gradient(90deg, transparent, var(--gold-2), transparent);
  box-shadow:0 0 12px rgba(240,192,74,0.65);
}
.form-card h2::after{ margin:0.9rem 0 0; }

.badge-glass{
  display:inline-block;
  background:var(--glass-bg-strong);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid var(--glass-border);
  border-radius:999px;
  padding:0.55rem 1.3rem;
  font-weight:600;
  font-size:0.95rem;
  color:var(--gold-1);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Gold liquid button */
.btn-gold{
  position:relative;
  display:inline-block;
  overflow:hidden;
  background:linear-gradient(135deg,var(--gold-1),var(--gold-2) 40%,var(--gold-3) 70%,var(--gold-4));
  color:#1a1206;
  font-weight:800;
  letter-spacing:0.03em;
  text-decoration:none;
  border:none;
  border-radius:999px;
  padding:0.95rem 2.4rem;
  font-size:1rem;
  cursor:pointer;
  box-shadow:
    0 6px 20px rgba(212,175,55,0.35),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -3px 6px rgba(0,0,0,0.2);
  transition:transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-gold::before{
  content:"";
  position:absolute;
  top:0; left:-60%;
  width:40%; height:100%;
  background:linear-gradient(120deg, transparent, rgba(255,255,255,0.65), transparent);
  transform:skewX(-20deg);
  transition:left 0.6s ease;
}
.btn-gold:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(212,175,55,0.55),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -3px 6px rgba(0,0,0,0.2);
}
.btn-gold:hover::before{ left:130%; }
.btn-gold:active{ transform:translateY(0) scale(0.99); }
.btn-gold:disabled{ opacity:0.6; cursor:not-allowed; }

/* Secondary liquid-glass button — same pill shape as btn-gold but lighter,
   so it doesn't compete with the primary CTA. */
.btn-glass{
  display:inline-block;
  background:var(--glass-bg-strong);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  color:var(--gold-1);
  font-weight:700;
  letter-spacing:0.02em;
  text-decoration:none;
  border:1px solid var(--glass-border);
  border-radius:999px;
  padding:0.9rem 2.2rem;
  font-size:0.95rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.15);
  transition:transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn-glass:hover{
  transform:translateY(-2px);
  border-color:var(--gold-2);
  background:rgba(255,255,255,0.13);
}
.btn-glass:active{ transform:translateY(0); }

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

/* ============ HERO ============ */
.hero{
  position:relative;
  min-height:100vh;
  min-height:100svh; /* evita "saltul" cauzat de bara de adresa pe mobil */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 50% 20%, #201a10 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, #14100a 0%, transparent 60%),
    linear-gradient(180deg, #050506 0%, #0c0c0e 55%, #050506 100%);
  padding-bottom:4rem;
}

/* Full-bleed looping background video, cropped like background-size:cover
   without distortion, plus the poster's dark base as a pre-load fallback.
   object-position is biased down so the sponsor line baked into the
   bottom of the footage stays in view instead of being cropped off. */
.hero-video{
  position:absolute;
  inset:0;
  z-index:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 68%;
  pointer-events:none;
}

/* Fixed to the viewport (not the hero) so the gold dust drifts over
   every section as the page scrolls, not just the hero. */
.particles{
  position:fixed;
  inset:0;
  z-index:5;
  pointer-events:none;
  transition:opacity 0.6s ease;
}
.particles.particles-hidden{ opacity:0; }
.particle{
  position:absolute;
  border-radius:50%;
  background:radial-gradient(circle, var(--gold-1), var(--gold-2) 60%, transparent 100%);
  opacity:0;
  animation:particleFloat linear infinite;
  box-shadow:0 0 10px rgba(240,192,74,0.85), 0 0 22px rgba(240,192,74,0.35);
}
@keyframes particleFloat{
  0%{ transform:translateY(0) translateX(0); opacity:0; }
  10%{ opacity:0.9; }
  90%{ opacity:0.55; }
  100%{ transform:translateY(-110vh) translateX(var(--drift,20px)); opacity:0; }
}

/* ============ HERO CONTENT ============ */
.hero-content{
  position:relative;
  z-index:3;
  width:100%;
  min-width:0;
  max-width:900px;
  text-align:center;
  margin-top:2rem;
  padding:0 1.2rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.9rem;
}
/* Flex children default to min-width:auto (their unwrapped text width),
   which silently overflows the viewport on narrow screens instead of
   wrapping — force them to respect the container's width instead. */
.hero-content > *{
  min-width:0;
  max-width:100%;
}
.hero-eyebrow{
  text-transform:uppercase;
  letter-spacing:0.35em;
  font-size:0.75rem;
  color:var(--gold-2);
  margin:0;
}
.hero-title{
  font-size:clamp(2.6rem, 8vw, 5.2rem);
  line-height:0.95;
  text-shadow:0 4px 30px rgba(0,0,0,0.6);
}
.hero-badges{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:0.7rem;
  margin-top:0.4rem;
}
.hero-sub{
  text-transform:uppercase;
  letter-spacing:0.15em;
  font-weight:700;
  color:var(--text-main);
  font-size:1rem;
  margin:0;
}

/* Reveal-on-load animation */
.reveal{
  opacity:0;
  transform:translateY(24px);
  animation:revealUp 0.9s ease forwards;
}
.hero-content .btn-gold.reveal{ animation-delay:0.3s; }
.hero-content .btn-glass.reveal{ animation-delay:0.45s; }
@keyframes revealUp{
  to{ opacity:1; transform:translateY(0); }
}

.scroll-hint{
  position:absolute;
  bottom:1.4rem;
  left:50%;
  transform:translateX(-50%);
  z-index:3;
  width:24px;
  height:38px;
  border:2px solid rgba(255,255,255,0.35);
  border-radius:14px;
}
.scroll-hint span{
  position:absolute;
  top:6px; left:50%;
  width:4px; height:8px;
  margin-left:-2px;
  background:var(--gold-2);
  border-radius:2px;
  animation:scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot{
  0%{ transform:translateY(0); opacity:1; }
  70%{ transform:translateY(12px); opacity:0; }
  100%{ opacity:0; }
}

/* ============ ABOUT ============ */
.about{
  position:relative;
  padding:5rem 1.2rem;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(212,175,55,0.08), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(212,175,55,0.06), transparent 55%),
    linear-gradient(180deg,#050506, #0b0b0d);
}
.about::before{
  content:"";
  position:absolute;
  top:0; left:50%;
  transform:translateX(-50%);
  width:min(80%, 700px);
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(240,192,74,0.5), transparent);
  box-shadow:0 0 16px rgba(240,192,74,0.4);
}
.about-card{
  max-width:760px;
  text-align:center;
}
.about-card h2{
  font-size:2rem;
  margin-bottom:1.2rem;
  color:var(--gold-1);
}

/* ============ REGISTRATION ============ */
.registration{
  position:relative;
  padding:2rem 1.2rem 6rem;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(ellipse at 10% 100%, rgba(212,175,55,0.07), transparent 55%),
    radial-gradient(ellipse at 90% 0%, rgba(212,175,55,0.07), transparent 55%),
    linear-gradient(180deg,#0b0b0d, #050506);
}
.form-card{ width:100%; max-width:880px; }
.form-card h2{ font-size:2rem; color:var(--gold-1); margin-bottom:0.4rem; }
.form-intro{ margin-bottom:2rem; }

.form-section{
  border:1px solid var(--glass-border);
  border-radius:16px;
  padding:1.6rem 1.4rem 1.8rem;
  margin:0 0 1.8rem;
  background:rgba(255,255,255,0.02);
}
.form-section legend{
  padding:0 0.6rem;
  font-weight:700;
  color:var(--gold-2);
  font-size:1.05rem;
  letter-spacing:0.02em;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1.1rem 1.3rem;
}
.field{ display:flex; flex-direction:column; gap:0.4rem; }
.field-full{ margin-top:1.1rem; }
.field label{ font-size:0.85rem; color:var(--text-dim); font-weight:600; }
.field input,
.field textarea{
  background:rgba(255,255,255,0.05);
  border:1px solid var(--glass-border);
  border-radius:10px;
  padding:0.75rem 0.9rem;
  color:var(--text-main);
  font-size:0.95rem;
  font-family:inherit;
  outline:none;
  resize:vertical;
  transition:border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder{ color:#75726a; }
.field input:focus,
.field textarea:focus{
  border-color:var(--gold-2);
  background:rgba(255,255,255,0.08);
  box-shadow:0 0 0 3px rgba(240,192,74,0.15);
}
/* :user-invalid (not :invalid) so empty required fields don't show red
   the instant the page loads — only after the user actually interacts. */
.field input:user-invalid,
.field textarea:user-invalid{ border-color:#c2564f; }

.upload-label{
  margin:1.6rem 0 0.8rem;
  font-weight:600;
  color:var(--text-dim);
  font-size:0.9rem;
}
.upload-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:1rem;
}
.sr-file-input{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Vizual ascuns dar prezent pentru screen reader-e / SEO */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.upload-slot{
  position:relative;
  aspect-ratio:1/1;
  border:1.5px dashed var(--glass-border);
  border-radius:14px;
  background:rgba(255,255,255,0.03);
  cursor:pointer;
  overflow:hidden;
  display:flex;
  transition:border-color 0.2s ease, background 0.2s ease;
}
.upload-slot:hover{ border-color:var(--gold-2); background:rgba(255,255,255,0.06); }
.upload-slot.filled{ border-style:solid; border-color:var(--gold-3); }
.upload-visual{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.4rem;
  color:var(--text-dim);
  text-align:center;
  padding:0.4rem;
}
.upload-icon{
  font-size:1.6rem;
  color:var(--gold-2);
  font-weight:300;
  line-height:1;
}
.upload-text{ font-size:0.78rem; font-weight:600; }
.upload-slot .preview-img{
  width:100%; height:100%;
  object-fit:cover;
  position:absolute;
  inset:0;
}
.upload-slot .preview-file{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.3rem;
  background:rgba(255,255,255,0.04);
  padding:0.5rem;
  text-align:center;
}
.upload-slot .preview-file span{
  font-size:0.68rem;
  color:var(--text-dim);
  word-break:break-word;
}
.upload-slot .filename-badge{
  position:absolute;
  bottom:0; left:0; right:0;
  background:rgba(0,0,0,0.6);
  color:var(--gold-1);
  font-size:0.65rem;
  padding:0.25rem 0.3rem;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.form-footer{
  margin-top:2rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.8rem;
}
.form-message{
  min-height:1.2em;
  font-size:0.9rem;
  margin:0;
  color:var(--text-dim);
}
.form-message.success{ color:#7fd88a; }
.form-message.error{ color:#e07a72; }
.btn-submit{ min-width:240px; }

/* ============ FOOTER ============ */
.site-footer{
  text-align:center;
  padding:2rem 1rem;
  color:#6d6a63;
  font-size:0.82rem;
  border-top:1px solid rgba(255,255,255,0.06);
}

/* ============ SCROLL REVEAL ============ */
.reveal-scroll{
  opacity:0;
  transform:translateY(30px);
  transition:opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scroll.in-view{ opacity:1; transform:translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width:860px){
  .form-grid{ grid-template-columns:1fr; }
  .upload-grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width:640px){
  .hero{ padding-bottom:2.5rem; padding-top:1.5rem; }
  .hero-title{ font-size:clamp(2.2rem, 12vw, 3.4rem); }
  .hero-content{ padding:0 1rem; }

  /* object-fit:cover decupeaza titlul/data arse in video pe ecrane
     inguste — le reafisam ca text HTML normal doar sub acest breakpoint. */
  .hero-copy.sr-only{
    position:static;
    width:auto; height:auto;
    padding:0; margin:0;
    overflow:visible;
    clip:auto;
    white-space:normal;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:0.6rem;
    margin-bottom:0.6rem;
    text-shadow:0 2px 12px rgba(0,0,0,0.8);
  }
  .hero-copy > *{ min-width:0; max-width:100%; }
  .glass-card{ padding:1.6rem; }
  .badge-glass{ font-size:0.8rem; padding:0.45rem 1rem; }
  .about{ padding:3.5rem 1rem; }
  .registration{ padding:1.5rem 1rem 4rem; }
  .btn-submit{ width:100%; min-width:0; }

  /* backdrop-filter blur e costisitor pe GPU-uri mobile mai slabe */
  .glass-card,
  .badge-glass{
    backdrop-filter:blur(14px) saturate(150%);
    -webkit-backdrop-filter:blur(14px) saturate(150%);
  }
}

@media (max-width:420px){
  .glass-card{ padding:1.3rem; }
  .upload-grid{ gap:0.6rem; }
  .form-section{ padding:1.2rem 1rem 1.4rem; }
}

/* Telefoane in landscape: viewport-ul e scund, nu ingust — reducem
   inaltimile fixe ca sa nu se inghesuie continutul hero-ului */
@media (max-height:500px) and (orientation:landscape){
  .hero{ min-height:auto; padding:5.5rem 1rem 2rem; }
  .hero-title{ font-size:clamp(1.8rem, 6vw, 2.6rem); }
  .scroll-hint{ display:none; }
}

/* Utilizatorii care cer miscare redusa nu trebuie sa vada animatiile continue */
@media (prefers-reduced-motion:reduce){
  .particle, .reveal, .reveal-scroll{
    animation:none !important;
    transition:none !important;
  }
  .reveal, .reveal-scroll{ opacity:1 !important; transform:none !important; }
}
