:root {
  --font-base: "Montserrat", sans-serif;
  --font-serif: "Crimson Text", serif;
  --ink: #ffffff;
  --muted: #c8d4de;
  --navy: #0e2338;
  --navy-deep: #07141f;
  --cyan: #0b9dd1;
  --cyan-press: #087aa3;
  --danger: #e85a5a;
  --glass: rgba(14, 35, 56, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-base);
  color: var(--ink);
  background: var(--navy-deep);
  min-height: 100dvh;
}

.stage {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 2.75rem;
  overflow-x: hidden;
}

.stage__photo {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.85) contrast(1.05);
  transform: scale(1.04);
}

.stage__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 20, 31, 0.55) 0%, rgba(14, 35, 56, 0.72) 46%, rgba(7, 20, 31, 0.88) 100%),
    radial-gradient(ellipse at 50% 20%, transparent 0%, rgba(7, 20, 31, 0.45) 70%);
}

.stage__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.qa-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  background: rgba(7, 20, 31, 0.92);
  border-bottom: 1px solid rgba(11, 157, 209, 0.35);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qa-bar[hidden] {
  display: none;
}

.qa-bar a,
.qa-bar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}

.qa-bar a:hover,
.qa-bar button:hover,
.qa-bar a[aria-current="page"] {
  color: var(--cyan);
}

.card {
  width: min(28rem, 100%);
  text-align: center;
  animation: rise 0.85s ease both;
}

.logo {
  width: 10rem;
  height: auto;
  margin: 0 auto 1.75rem;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.kicker {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: clamp(1.15rem, 3.6vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.title {
  margin: 0.15rem 0 0;
  font-weight: 600;
  font-size: clamp(2.15rem, 8vw, 3.4rem);
  line-height: 1.15;
}

.tagline {
  margin: 0.85rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  font-style: italic;
  color: var(--muted);
}

.ssid {
  margin: 1.35rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.ssid::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(11, 157, 209, 0.2);
}

.form {
  margin-top: 2rem;
  text-align: left;
}

.field {
  display: block;
  margin: 0 0 0.9rem;
}

.field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-base);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(7, 20, 31, 0.55);
  color: var(--ink);
  font-family: var(--font-base);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__input::placeholder {
  color: rgba(200, 212, 222, 0.45);
}

.field__input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(11, 157, 209, 0.22);
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.35rem 0 1.15rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.terms input {
  margin-top: 0.2rem;
  accent-color: var(--cyan);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.terms a {
  color: #fff;
  text-underline-offset: 0.18em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 4px;
  background: var(--cyan);
  color: #fff;
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover:not(:disabled) {
  background: var(--cyan-press);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn--ghost {
  margin-top: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray, #9e9e9e);
}

.error {
  display: none;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 4px;
  background: rgba(232, 90, 90, 0.16);
  color: #ffd4d4;
  font-size: 0.8rem;
}

.error.is-visible {
  display: block;
}

.meta {
  margin-top: 2.4rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #8ea0ae;
}

.meta a {
  color: inherit;
}

.legal {
  width: min(40rem, 100%);
  max-height: min(70dvh, 36rem);
  overflow: auto;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.15rem;
  text-align: left;
  background: rgba(7, 20, 31, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.legal h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.legal ul {
  padding-left: 1.1rem;
}

.success-mark {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--cyan);
}

.debug {
  position: fixed;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: rgba(7, 20, 31, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  color: #9e9e9e;
  text-align: left;
  word-break: break-all;
}

.debug[hidden] {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 720px) {
  .card {
    width: min(32rem, 100%);
  }

  .btn {
    width: auto;
    min-width: 14rem;
  }

  .form {
    text-align: center;
  }

  .field {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .terms {
    justify-content: center;
    text-align: left;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }
}
