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

:root {
  --navy:         #252A45;
  --navy-deep:    #1C2038;
  --navy-mid:     #2E3456;
  --teal:         #2DD4C8;
  --teal-dim:     rgba(45, 212, 200, 0.18);
  --teal-glow:    rgba(45, 212, 200, 0.35);
  --white:        #FFFFFF;
  --gray-1:       rgba(255,255,255,0.85);
  --gray-2:       rgba(255,255,255,0.55);
  --input-bg:     rgba(255,255,255,0.07);
  --input-border: rgba(255,255,255,0.22);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--navy-deep);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Atmospheric background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 68% 15%, rgba(45, 212, 200, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(45, 100, 200, 0.10) 0%, transparent 60%),
    linear-gradient(170deg, var(--navy-mid) 0%, var(--navy-deep) 55%, #181D35 100%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout wrapper ── */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 clamp(24px, 6vw, 96px);
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  padding: clamp(20px, 3.5vh, 36px) 0;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px var(--teal-glow));
}

/* ── Main content ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vh, 60px) 0 clamp(24px, 4vh, 48px);
  max-width: 860px;
}

/* ── Pre-headline ── */
.pre-headline {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 400;
  color: var(--gray-2);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

/* ── Headline ── */
h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--teal);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.32s forwards;
}

h1 em {
  font-style: italic;
  font-weight: 300;
}

/* ── Subheadline ── */
.subheadline {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: var(--gray-1);
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.44s forwards;
}

.subheadline strong {
  font-weight: 500;
  color: var(--white);
}

/* ── Teal accent rule ── */
.accent-rule {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  margin: 36px 0;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.54s forwards;
}

/* ── Form section ── */
.form-section {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.62s forwards;
}

.form-intro {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--gray-2);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 460px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 580px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  position: relative;
}

.field input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 13px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--white);
  outline: none;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  -webkit-appearance: none;
}

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

.field input:focus {
  border-color: var(--teal);
  background: rgba(45, 212, 200, 0.06);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.field input.filled {
  border-color: rgba(45, 212, 200, 0.4);
}

.field input.error {
  border-color: rgba(255, 100, 100, 0.7);
}

.field .err-msg {
  display: none;
  font-size: 0.7rem;
  color: rgba(255, 120, 120, 0.9);
  margin-top: 4px;
  padding-left: 4px;
}

.field input.error + .err-msg {
  display: block;
}

/* ── Submit button ── */
.submit-btn {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal);
  color: var(--navy-deep);
  border: none;
  border-radius: 8px;
  padding: 13px 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 4px 20px rgba(45, 212, 200, 0.28);
}

.submit-btn:hover:not(:disabled) {
  background: #3de8db;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45, 212, 200, 0.42);
}

.submit-btn:active {
  transform: translateY(0);
}

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

.submit-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.submit-btn:hover:not(:disabled) svg {
  transform: translateX(3px);
}

/* ── Success message ── */
.success-msg {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 18px;
  background: rgba(45, 212, 200, 0.1);
  border: 1.5px solid rgba(45, 212, 200, 0.3);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--teal);
  max-width: 580px;
}

.success-msg.show {
  display: flex;
  animation: fadeUp 0.4s ease forwards;
}

/* ── Footer ── */
footer {
  padding: clamp(20px, 3vh, 36px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  opacity: 0;
  animation: fadeIn 0.7s ease 0.8s forwards;
}

.footer-copy {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--gray-2);
}

.footer-email {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.18s ease;
}

.footer-email:hover {
  color: #7de8e2;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ── */
@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: 1;
  }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
}
