/* Font */
@font-face { font-family: 'harbour'; src: url('lib/ConcertOne-Regular.ttf'); }
@font-face { font-family: 'normal'; src: url('lib/Lexend-VariableFont_wght.ttf'); }

/* Brand vars */
:root{
  --navy: #150D44;
  --teal: #70C6C5;
  --bg1: #8fd3f4;
  --bg2: #cfd9df;

  /* scrollbar */
  --sb-size: 12px;
  --sb-track: rgba(255,255,255,.14);
}

/* Reset */
*{ box-sizing: border-box; }

/* ===== Single scroll container: HTML only ===== */
html{
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body{
  margin: 0;
  min-height: 100%;
  font-family: 'harbour';
  user-select: none;
  overflow: clip;                 /* avoid a second scrollbar on body */
  color: #fff;
  background: linear-gradient(-45deg, var(--bg1), var(--bg2));
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;
}

/* Generic container */
.container{ width: min(1100px, 92vw); margin: 0 auto; padding: 60px;}

/* ===== HERO ===== */
#full-area{
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(15px);
  padding: 90px;
}
#game-area{ position: relative; text-align: center; animation: float 6s ease-in-out infinite; padding: 70px; }
#text-area{ display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Soft, theme-friendly motion for the logo */
#logo{ width: min(760px, 72vw); height: auto; }


#logo{
  display:block;
  will-change: transform, filter;
  /* compose transforms so we can add tilt later */
  --ty: 0; --rx: 0deg; --ry: 0deg;
  transform: translateY(var(--ty)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  filter: drop-shadow(0 10px 24px rgba(21,13,68,.18));
  animation: logoGlow 6s ease-in-out infinite;
  transition: transform .18s ease, filter .3s ease;
}

/* micro-float */
@keyframes logoFloat{
  0%,100% { --ty: 0; }
  50%     { --ty: -6px; }
}

/* barely noticeable “breathing” glow */
@keyframes logoGlow{
  0%,100% { filter: drop-shadow(0 10px 24px rgba(21,13,68,.18)) brightness(1); }
  50%     { filter: drop-shadow(0 14px 28px rgba(21,13,68,.28)) brightness(1.03); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  #logo{ animation: none; filter: drop-shadow(0 10px 24px rgba(21,13,68,.18)); }
}

#text-area h1{
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin: 6px 0 2px;
  font-weight: 700;
  text-shadow: 2px 4px 0 rgba(0,0,0,.35);
  animation: textEntrance 1.2s ease both .2s;
}
#text-area p{
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  color: #f4f7fb;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 2px 2px 0 rgba(0,0,0,.35);
  animation: textEntrance 1.2s ease both .5s;
  font-family: 'normal';
}

#contact-links{ margin-top: 16px; display: flex; gap: 24px; align-items:center; justify-content:center; }
.icon{
  height: 62px; width: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
  transition: transform .18s ease, filter .2s ease;
}
#contact-links a:hover .icon{ transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }

/* Playful runner */
#player{
  position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%);
  width: clamp(70px, 8vw, 100px); height: auto; z-index: 9;
  animation: bob 3.2s ease-in-out infinite; pointer-events: none; border-radius: 14px;
}

/* ===== Clouds: fixed full-screen background behind everything ===== */
#fx-clouds{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow-y: visible;
}
#fx-clouds .cloud{ position:absolute; will-change: transform; }
#fx-clouds .cloud img{
  transform-origin: 50% 60%;
  animation: cloudWobble 8s ease-in-out infinite alternate;
}
#fx-clouds .cloud.soft img { filter: blur(12px); opacity: .35; }

/* Keep content above clouds */
#full-area, #signup-section { position: relative; z-index: 1; }

/* ===== Signup section ===== */
#signup-section{
  position: relative;
  color: var(--navy);
  margin-top: 40px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  font-family: "normal";
}

/* Floating glass card with animated border & soft lift (consolidated) */
#signup-wrap{
  width: min(760px, 94vw);
  margin: 0 auto;
  padding: clamp(26px, 4vh, 38px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.86));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--navy);
  box-shadow: 0 28px 80px rgba(21,13,68,.28), 0 10px 26px rgba(21,13,68,.16);
  border: 1px solid rgba(255,255,255,.55);
  position: relative; isolation: isolate;
  transform: perspective(1200px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(0);
  transition: box-shadow .25s ease, transform .12s ease;
}
#signup-wrap::before{
  content:"";
  position:absolute; inset:-1px;
  padding: 1px; border-radius: 24px;
  background: conic-gradient(from var(--spin,0deg), #2ac6c6, #8fd3f4, #150D44, #69c7c2, #8fd3f4, #2ac6c6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  animation: spin 8s linear infinite;
  z-index:-1;
}
@keyframes spin{ to { --spin: 360deg; } }

#signup{ display: flex; flex-direction: column; gap: 16px; }
#signup .label{
  text-align: center;
  font-weight: 800;
  letter-spacing:.2px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--navy), #2e2473 40%, var(--teal));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-family: 'normal';
}
#signup .grid{ display:flex; flex-direction: column; gap: 16px; }

.input{
  height: 56px;
  padding: 0 18px 0 46px;
  border-radius: 14px;
  border: 1px solid rgba(21,13,68,.16);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(180deg, rgba(21,13,68,.08), rgba(42,198,198,.10)) border-box;
  color: var(--navy);
  transition: border-color .2s ease, box-shadow .2s ease, transform .08s ease;
  outline: none;
}
.input:hover{ border-color: rgba(21,13,68,.28); }
.input:focus{
  border-color: rgba(42,198,198,.75);
  box-shadow: 0 0 0 6px rgba(42,198,198,.18), 0 8px 22px rgba(21,13,68,.12) inset;
  transform: translateY(-1px);
}
.input::placeholder{ color: rgba(21,13,68,.45); }

/* inline SVG icons */
#signup .grid .input[type="text"]{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23150D44' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px 50%; background-size: 22px;
}
#signup .grid .input[type="email"]{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23150D44' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px 50%; background-size: 22px;
}

/* Textarea styling + icon */
.textarea{
  min-height: 160px;
  padding: 16px 18px 16px 46px;
  line-height: 1.5; resize: vertical;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23150D44' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px 16px; background-size: 22px;
}

#signup small{ color: rgba(21,13,68,.65); }

/* CTA */
.actions{ display:flex; justify-content:center; }
.btn{
  position: relative;
  height: 56px; padding: 0 28px;
  border-radius: 14px; border: none; cursor: pointer;
  color:#fff; font-weight: 900; letter-spacing:.25px;
  background: linear-gradient(90deg, var(--navy) 0%, #2e2473 45%, var(--teal) 100%);
  box-shadow: 0 16px 36px rgba(21,13,68,.28), inset 0 -2px 0 rgba(255,255,255,.25);
  transition: transform .12s ease, box-shadow .22s ease, filter .2s ease;
  overflow: hidden;
}
.btn::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.28) 18%, transparent 36%);
  transform: translateX(-120%);
  animation: shine 2.8s ease-in-out infinite;
}
@keyframes shine{ 0%{ transform: translateX(-120%);} 55%,100%{ transform: translateX(140%);} }
.btn:hover{ transform: translateY(-1px); box-shadow: 0 20px 40px rgba(21,13,68,.34); filter: saturate(1.1); }
.btn:active{ transform: translateY(0); box-shadow: 0 14px 28px rgba(21,13,68,.22); }
.btn[disabled]{ opacity:.65; cursor:not-allowed; }

/* Header keeps room for divider at bottom */
#full-area{ padding-bottom: 44px; }
#full-area > .divider{
  position: absolute;
  left: 50%; bottom: -1px;
  transform: translateX(-50%);
  margin: 0;
  width: min(1100px, 92vw);
  z-index: 2;
  pointer-events: none;
}

/* Divider */
:root{
  --saber-a: var(--teal);
  --saber-b: #799FD0;
  --saber-thickness: 3px;
  --saber-glow: 14px;
  --saber-speed: 9s;
}
.divider{
  position: relative;
  display:flex;
  align-items:center;
  gap: .75rem;
  margin: 1.25rem -1rem;
  text-align:center;
  font-weight: 800;
  letter-spacing:.2px;
  color:#fff;
  z-index: 8;
  font-size: 45px;
  text-shadow: 2px 4px 0 rgba(0,0,0,.35);
}
.divider::before,
.divider::after{
  content:"";
  flex:1;
  height: var(--saber-thickness);
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--saber-a), var(--saber-b));
  background-size: 260% 100%;
  animation: saberFlow var(--saber-speed) linear infinite;
  position: relative;
  box-shadow:
    0 0 1px 1px rgba(255,255,255,.85) inset,
    0 0 var(--saber-glow) var(--saber-a),
    0 0 calc(var(--saber-glow)*1.4) var(--saber-b);
}
.divider::after{
  background: linear-gradient(270deg, var(--saber-a), var(--saber-b));
  animation-direction: reverse;
}
.divider.glow::before,
.divider.glow::after{
  filter: drop-shadow(0 0 8px var(--saber-a)) drop-shadow(0 0 16px var(--saber-b));
}
.line{ margin: 1em -1em; }
@keyframes saberFlow{ 0%{background-position:0% 50%} 100%{background-position:200% 50%} }

/* Toast */
#toast{
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  opacity: 0; padding: 12px 16px; border-radius: 12px;
  background: rgba(21,13,68,.96); color: #fff; box-shadow: 0 12px 30px rgba(21,13,68,.35);
  z-index: 9999; transition: opacity .25s ease, transform .25s ease;
}
#toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Animations ===== */
@keyframes gradient{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}
@keyframes float{ 0%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} 100%{ transform: translateY(0);} }
@keyframes bob{
  0%{ transform: translateX(-50%) translateY(0); }
  50%{ transform: translateX(-50%) translateY(-8px); }
  100%{ transform: translateX(-50%) translateY(0); }
}
@keyframes textEntrance{ 0%{opacity:0; transform: translateY(12px);} 100%{opacity:1; transform: translateY(0);} }
@keyframes cloudWobble{
  0%{ transform: translateY(0) translateX(-4px) rotate(-0.8deg) scale(1); }
  50%{ transform: translateY(-10px) translateX(2px) rotate(0.8deg) scale(1.02); }
  100%{ transform: translateY(0) translateX(4px) rotate(-0.4deg) scale(1); }
}

/* ===== Responsive ===== */
@media (max-width: 720px){
  #signup-wrap{ border-radius: 20px; }
  .btn{ width: 100%; }
  .icon{ height: 36px; }
}

/* ===== Scrollbar on the root only ===== */
/* Firefox */
html{ scrollbar-width: thin; scrollbar-color: var(--teal) var(--sb-track); }
/* WebKit */
html::-webkit-scrollbar{ width: var(--sb-size); height: var(--sb-size); }
html::-webkit-scrollbar-track{
  background: var(--sb-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
html::-webkit-scrollbar-thumb{
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), #8fd3f4 50%, var(--navy));
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 10px rgba(255,255,255,.35), 0 1px 0 rgba(0,0,0,.06);
}

.link{color: #79A0D0}
.meta{color: #150D44;}

#logo-wrap{ position: relative; display: inline-block; }
#logo-wrap::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.15) 35%, rgba(255,255,255,.45) 48%, transparent 60%);
  transform: translateX(-120%); mix-blend-mode: screen;
  /* mask to logo shape so the sheen only hits the pixels of the logo */
  -webkit-mask-image: url("./media/normal-XXL.png"); mask-image: url("./media/normal-XXL.png");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-position: center; mask-position: center;
  animation: logoShine 12s ease-in-out infinite 1.4s;
}
@keyframes logoShine{
  0%,75%  { transform: translateX(-120%); opacity:.0; }
  85%     { opacity:.85; }
  100%    { transform: translateX(120%); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  #logo-wrap::after{ animation: none; }
}
