*{box-sizing:border-box}

:root{
  --navy:#020b22;
  --gold:#f7c567;
  --cream:#fff4dc;
  --ink:#06133a;
}

html,body{
  margin:0;
  width:100%;
  min-height:100%;
  background:var(--navy);
  color:white;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  overflow-x:hidden;
}

.page{
  min-height:100svh;
  width:100%;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 8%, rgba(31,67,160,.92) 0%, rgba(7,25,67,.96) 36%, var(--navy) 78%);
  position:relative;
  overflow:hidden;
}

.page:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.42;
  background-image:
    radial-gradient(circle, rgba(255,230,166,.95) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 2px);
  background-size:70px 70px, 134px 134px;
}

.shell{
  position:relative;
  z-index:2;
  width:min(100%, 520px);
  min-height:100svh;
  padding:38px 24px 34px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.logo{
  width:min(78vw, 370px);
  height:auto;
  display:block;
  margin:0 auto 22px;
}

.divider{
  width:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  color:var(--gold);
  margin:0 0 24px;
}

.divider span{
  width:60px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--gold));
}

.divider span:last-child{
  background:linear-gradient(90deg, var(--gold), transparent);
}

.divider b{
  font-size:20px;
}

.book{
  width:100%;
  max-width:500px;
  height:auto;
  display:block;
  margin:0 auto 28px;
  filter:drop-shadow(0 26px 42px rgba(0,0,0,.42));
}

h1{
  margin:0 0 26px;
  max-width:460px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(29px, 7.5vw, 42px);
  line-height:1.18;
  font-weight:500;
  color:var(--cream);
  text-shadow:0 8px 26px rgba(0,0,0,.35);
}

form{
  width:100%;
  max-width:430px;
  display:grid;
  gap:16px;
}

.input-wrap{
  width:100%;
  height:68px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 22px;
  border:1.5px solid rgba(247,197,103,.66);
  border-radius:18px;
  background:rgba(6,20,55,.8);
  box-shadow:0 12px 28px rgba(0,0,0,.22), inset 0 0 18px rgba(255,255,255,.03);
}

.input-wrap span{
  color:rgba(255,255,255,.7);
  font-size:26px;
}

input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:white;
  font-size:21px;
  font-weight:500;
}

input::placeholder{
  color:rgba(255,255,255,.58);
}

button{
  width:100%;
  min-height:72px;
  border:0;
  border-radius:18px;
  background:linear-gradient(180deg, #ffe9b6 0%, #f6c15f 100%);
  color:var(--ink);
  font-size:24px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 18px 34px rgba(0,0,0,.28), inset 0 2px 0 rgba(255,255,255,.35);
}

button:active{
  transform:translateY(1px);
}

.launch{
  margin:24px 0 0;
  color:var(--gold);
  font-size:22px;
  font-weight:500;
  letter-spacing:.01em;
}

.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;
}

@media(max-width:430px){
  .shell{
    padding:30px 20px 30px;
  }

  .logo{
    width:min(82vw, 330px);
    margin-bottom:18px;
  }

  .divider{
    margin-bottom:18px;
  }

  .book{
    margin-bottom:22px;
  }

  h1{
    margin-bottom:22px;
  }

  .input-wrap{
    height:62px;
  }

  input{
    font-size:18px;
  }

  button{
    min-height:64px;
    font-size:21px;
  }

  .launch{
    font-size:20px;
  }
}

@media(max-height:760px){
  .shell{
    padding-top:20px;
    padding-bottom:22px;
  }

  .logo{
    width:min(70vw, 280px);
    margin-bottom:12px;
  }

  .divider{
    margin-bottom:12px;
  }

  .book{
    width:88%;
    margin-bottom:14px;
  }

  h1{
    font-size:24px;
    margin-bottom:16px;
  }

  form{
    gap:11px;
  }

  .input-wrap{
    height:54px;
  }

  input{
    font-size:16px;
  }

  button{
    min-height:56px;
    font-size:18px;
  }

  .launch{
    margin-top:12px;
    font-size:17px;
  }
}


.form-error{
  min-height:20px;
  margin:0;
  color:#ffd1d1;
  font-size:14px;
  font-weight:700;
}

.success-message{
  width:100%;
  max-width:430px;
  display:grid;
  gap:8px;
  padding:22px 20px;
  border:1.5px solid rgba(247,197,103,.72);
  border-radius:18px;
  background:rgba(6,20,55,.86);
  box-shadow:0 18px 48px rgba(0,0,0,.34), inset 0 0 18px rgba(255,255,255,.03);
  color:var(--cream);
  animation:popIn .35s ease-out;
}

.success-message strong{
  color:var(--gold);
  font-size:22px;
}

.success-message span{
  font-size:16px;
  line-height:1.35;
}

@keyframes popIn{
  from{opacity:0; transform:translateY(10px) scale(.98)}
  to{opacity:1; transform:translateY(0) scale(1)}
}

.confetti{
  position:fixed;
  top:-10px;
  width:8px;
  height:12px;
  background:var(--gold);
  z-index:999;
  animation:fall 1.1s ease-out forwards;
  pointer-events:none;
}

@keyframes fall{
  to{
    transform:translateY(110vh) rotate(540deg);
    opacity:0;
  }
}


/* Keep success message hidden until the form submits */
.success-message[hidden]{
  display:none !important;
}
