/* ---- Arizona (ABC Arizona Mix) — brand font ----
   Weight range set so 400/500 both map to this single cut (no faux-bold). */
@font-face {
  font-family: "Arizona";
  src: url("fonts/ABCArizonaMix-Thin.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #191936;
  --ink: #1a1830;
  --border: #d7d7dc;
  --anim: 3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #fff; /* keep overscroll area white */
}
html { overscroll-behavior: none; }

body {
  font-family: "Arizona", Georgia, "Times New Roman", serif;
  background: #fff;
  color: var(--navy);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    calc(env(safe-area-inset-top) + 28px)
    calc(env(safe-area-inset-right) + 24px)
    calc(env(safe-area-inset-bottom) + 28px)
    calc(env(safe-area-inset-left) + 24px);
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: min(330px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.8s ease both;
}

/* Logo */
.logo {
  width: clamp(140px, 40vw, 168px);
  height: auto;
  display: block;
}

/* Intro copy */
.lede {
  margin-top: 30px;
  font-size: clamp(1.02rem, 4.4vw, 1.15rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--navy);
}

/* Signup */
.signup {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem; /* >=16px so iOS doesn't zoom */
  text-align: left;
  padding: 15px 16px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
}
.input::placeholder { color: #9a9aa2; }
.input:focus { border-color: var(--navy); }
.input.invalid { border-color: #b23b3b; }

.btn {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  padding: 15px 16px;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.9; }

.error {
  min-height: 1.1em;
  margin-top: 2px;
  font-size: 0.85rem;
  color: #b23b3b;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.error.show { opacity: 1; }

/* Hand-drawn "Still brewing xx" */
.brewing {
  width: clamp(130px, 36vw, 160px);
  height: auto;
  margin-top: 44px;
}

/* ---- Success view ---- */
.wrap.submitted .lede,
.wrap.submitted .signup,
.wrap.submitted .brewing {
  display: none;
}

.done {
  margin-top: 40px;
}

/* Hand-drawn "See you at the pub." drawing itself in */
.pub {
  width: min(300px, 82vw);
  height: auto;
  display: block;
  clip-path: polygon(0 0, 0 0, -30% 100%, 0 100%);
  animation: pubDraw 1.7s cubic-bezier(0.6, 0, 0.35, 1) 0.1s forwards;
}
@keyframes pubDraw {
  to { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .wrap { animation: none; }
  .pub {
    animation: none;
    clip-path: none;
  }
}
