:root {
  --crewsmatch-navy: #001b4e;
  --crewsmatch-blue-mid: #003a8c;
  --crewsmatch-blue: #006af4;
  --crewsmatch-gradient: linear-gradient(160deg, var(--crewsmatch-navy) 0%, var(--crewsmatch-blue-mid) 55%, var(--crewsmatch-blue) 100%);
  --ink: #0a0a14;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.08);
  --input-bg: #f3f3f5;
  --error: #b42318;
}

* { box-sizing: border-box; }

html { background: var(--crewsmatch-navy); }
html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--crewsmatch-gradient);
  color: var(--ink);
  font-family: "proxima-nova", "Proxima Nova", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vh, 40px);
  padding: clamp(24px, 3vh, 56px) 20px;
}

.hero { width: 100%; text-align: center; }

.welcome {
  margin: 0 0 clamp(8px, 1.5vh, 16px);
  color: #fff;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.logo {
  display: block;
  width: min(760px, 100%);
  height: auto;
  aspect-ratio: 4050 / 646;
  margin: 0 auto;
}

.card {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
}

.card h1 {
  margin: 0 0 24px;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 600;
  text-align: center;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.field { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px avoids iOS zoom-on-focus */
}

textarea { resize: vertical; min-height: 110px; }

input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid rgba(0, 106, 244, 0.35);
  outline-offset: 1px;
  border-color: var(--crewsmatch-blue);
}

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }

button {
  width: 100%;
  margin-top: 4px;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--crewsmatch-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
}

button:hover:not(:disabled) { filter: brightness(1.12); }
button:disabled { opacity: 0.65; cursor: progress; }

.form-error { margin: 0 0 12px; color: var(--error); font-size: 0.92rem; text-align: center; }

.success {
  margin: 0;
  padding: 24px 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

[hidden] { display: none !important; }

@media (max-width: 520px) {
  .page { justify-content: flex-start; padding-top: clamp(16px, 6vh, 56px); padding-bottom: 16px; gap: 16px; }
  .welcome { margin-bottom: 6px; letter-spacing: 0.02em; }
  .logo { width: 86%; }
  .card { padding: 18px 18px 20px; border-radius: 16px; }
  .card h1 { margin-bottom: 14px; font-size: 1.2rem; }
  .row { grid-template-columns: 1fr; }
  .field { margin-bottom: 11px; }
  label { margin-bottom: 4px; font-size: 0.8rem; }
  input, textarea { padding: 9px 12px; }
  textarea { min-height: 76px; height: 76px; }
  button { padding: 11px 20px; }
}
