/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0b1829;
  --navy2:   #112240;
  --navy3:   #1a3460;
  --gold:    #c9a84c;
  --gold2:   #e8c97a;
  --gold3:   #f5e6b8;
  --cream:   #faf7f0;
  --gray1:   #8a9bb0;
  --gray2:   #c4cdd8;
  --white:   #ffffff;
  --error:   #c0392b;
  --success: #1a6b4a;
  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'DM Sans', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--ff-body);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 100%, rgba(26,52,96,0.8) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(255,255,255,0.012) 80px,
      rgba(255,255,255,0.012) 81px
    );
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  padding: 32px 48px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeDown 0.8s var(--ease-out) both;
}

.logo-mark { width: 48px; height: 48px; position: relative; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; }

.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-text .name {
  font-family: var(--ff-display);
  font-size: 20px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--white); line-height: 1;
}
.logo-text .tagline {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); font-weight: 400;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.rule {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.3; margin: 28px 0;
}

/* ── Screens ──────────────────────────────────────────────────────────────── */
.screen { display: none; flex: 1; animation: fadeUp 0.7s var(--ease-out) both; }
.screen.active { display: flex; }

/* ══ GATE SCREEN ════════════════════════════════════════════════════════════ */
#gate-screen {
  flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 24px 80px; text-align: center;
}

.gate-state { display: flex; flex-direction: column; align-items: center; width: 100%; }

.gate-ornament {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 32px;
}

.gate-title {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 58px); font-weight: 300;
  line-height: 1.1; letter-spacing: 0.01em; color: var(--white); margin-bottom: 8px;
}
.gate-title em { font-style: italic; color: var(--gold2); }

.gate-subtitle {
  font-size: 14px; color: var(--gray1); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 48px;
}

.gate-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 2px; padding: 40px 40px 36px;
  width: 100%; max-width: 480px; position: relative;
}
.gate-card::before {
  content: ''; position: absolute;
  top: 0; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.gate-card p { font-size: 13px; color: var(--gray1); line-height: 1.7; }
.gate-card strong { color: var(--gray2); font-weight: 400; }
.gate-card .error-detail {
  margin-top: 20px; font-size: 12px;
  color: rgba(201,168,76,0.7); line-height: 1.6;
}
.gate-card .error-detail a { color: var(--gold); text-decoration: none; }
.gate-card .error-detail a:hover { text-decoration: underline; }

/* Loading spinner */
.gate-spinner {
  width: 36px; height: 36px;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}

/* ══ APPLICATION SCREEN ═════════════════════════════════════════════════════ */
#app-screen {
  flex-direction: column; padding: 0 24px 80px;
  max-width: 860px; margin: 0 auto; width: 100%;
}

.app-intro { padding: 48px 0 40px; animation: fadeUp 0.6s var(--ease-out) 0.1s both; }
.app-intro .eyebrow {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.app-intro h1 {
  font-family: var(--ff-display); font-size: clamp(28px, 4vw, 44px);
  font-weight: 300; line-height: 1.15; margin-bottom: 16px;
}
.app-intro h1 em { font-style: italic; color: var(--gold2); }
.app-intro p { font-size: 14px; color: var(--gray1); line-height: 1.7; max-width: 560px; }

/* Section cards */
.section-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 2px; margin-bottom: 2px; overflow: hidden;
  animation: fadeUp 0.6s var(--ease-out) both;
}
.section-card:nth-child(1) { animation-delay: 0.15s; }
.section-card:nth-child(2) { animation-delay: 0.22s; }
.section-card:nth-child(3) { animation-delay: 0.29s; }
.section-card:nth-child(4) { animation-delay: 0.36s; }
.section-card:nth-child(5) { animation-delay: 0.43s; }
.section-card:nth-child(6) { animation-delay: 0.50s; }

.section-head {
  padding: 18px 28px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(201,168,76,0.04);
}
.section-num {
  font-family: var(--ff-display); font-size: 11px; color: var(--gold);
  letter-spacing: 0.1em; opacity: 0.7; min-width: 24px;
}
.section-head h2 {
  font-family: var(--ff-display); font-size: 15px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--white);
}

.section-body {
  padding: 28px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 20px 24px;
}
.section-body.full { grid-template-columns: 1fr; }
.span2 { grid-column: 1 / -1; }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 400; display: flex; gap: 4px; align-items: center;
}
.req { color: var(--gold2); font-size: 14px; line-height: 1; margin-top: -2px; }

.field input,
.field select,
.field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1px; padding: 11px 14px;
  font-family: var(--ff-body); font-size: 13.5px; color: var(--white);
  width: 100%;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none; -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255,255,255,0.18); }
.field select { cursor: pointer; }
.field select option { background: var(--navy2); color: var(--white); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(201,168,76,0.6);
  background: rgba(201,168,76,0.03);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.06);
}
.field input[type="date"] { color-scheme: dark; }

/* Info callout */
.info-callout {
  grid-column: 1 / -1; display: flex; gap: 14px; align-items: flex-start;
  background: rgba(201,168,76,0.06); border: 1px solid rgba(201,168,76,0.2);
  border-radius: 2px; padding: 14px 18px;
}
.info-callout .icon { color: var(--gold); font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.info-callout p { font-size: 12px; color: var(--gray1); line-height: 1.7; }
.info-callout strong { color: var(--gold2); font-weight: 500; }

/* Agreement block */
.agreement-block {
  grid-column: 1 / -1; background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 2px; padding: 20px;
}
.agreement-block p { font-size: 12px; color: var(--gray1); line-height: 1.8; margin-bottom: 12px; }
.agreement-block ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.agreement-block li {
  font-size: 12px; color: var(--gray1); line-height: 1.6;
  padding-left: 18px; position: relative;
}
.agreement-block li::before {
  content: '—'; position: absolute; left: 0; color: var(--gold); opacity: 0.6;
}

/* Submit zone */
.submit-zone {
  padding: 36px 28px; display: flex; flex-direction: column;
  align-items: flex-start; gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  animation: fadeUp 0.6s var(--ease-out) 0.55s both;
}
.submit-note { font-size: 12px; color: var(--gray1); line-height: 1.7; max-width: 420px; }
.submit-note a { color: var(--gold); text-decoration: none; }
.submit-note a:hover { text-decoration: underline; }

/* Buttons */
.btn-submit {
  padding: 15px 48px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  border: none; border-radius: 1px; font-family: var(--ff-body); font-size: 11px;
  font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--navy); cursor: pointer; position: relative; overflow: hidden;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-submit::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-submit:hover { opacity: 0.92; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,168,76,0.25); }
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(11,24,41,0.3); border-top-color: var(--navy);
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin-right: 8px; vertical-align: middle;
}

/* Submit error banner */
.submit-error {
  display: none; padding: 12px 16px; border-radius: 1px;
  background: rgba(192,57,43,0.1); border: 1px solid rgba(192,57,43,0.3);
  color: #e88; font-size: 13px; line-height: 1.5;
}
.submit-error.visible { display: block; }

/* Honeypot — must be invisible to real users */
.hp-field {
  position: absolute; left: -9999px; top: -9999px;
  opacity: 0; pointer-events: none; tabindex: -1;
  width: 0; height: 0; overflow: hidden;
}

/* ══ CONFIRMATION SCREEN ════════════════════════════════════════════════════ */
#confirm-screen {
  flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 24px 80px; text-align: center;
}

.confirm-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px; animation: pulse 2s ease-in-out infinite;
}
.confirm-icon svg { width: 32px; height: 32px; }

.confirm-title {
  font-family: var(--ff-display); font-size: clamp(32px, 5vw, 52px);
  font-weight: 300; line-height: 1.1; margin-bottom: 12px;
}
.confirm-title em { font-style: italic; color: var(--gold2); }

.confirm-sub {
  font-size: 14px; color: var(--gray1); line-height: 1.7;
  max-width: 420px; margin: 0 auto 40px;
}

.confirm-details {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 2px; padding: 28px 36px; max-width: 440px; width: 100%; text-align: left;
}
.confirm-details h3 {
  font-family: var(--ff-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
}

.confirm-ref {
  font-family: monospace; font-size: 11px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 2px;
  color: var(--gray2); letter-spacing: 0.05em; margin-bottom: 20px; word-break: break-all;
}

.confirm-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.confirm-steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--gold); font-weight: 500; flex-shrink: 0; margin-top: 1px;
}
.step-text { font-size: 13px; color: var(--gray1); line-height: 1.6; }
.step-text strong { color: var(--white); font-weight: 400; }

.confirm-contact { margin-top: 36px; font-size: 12px; color: var(--gray1); }
.confirm-contact a { color: var(--gold); text-decoration: none; }
.confirm-contact a:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1; padding: 20px 48px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.05); margin-top: auto;
}
footer p { font-size: 11px; color: rgba(138,155,176,0.5); letter-spacing: 0.05em; }
footer a { color: var(--gold); text-decoration: none; opacity: 0.7; }
footer a:hover { opacity: 1; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes pulse    {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.15); }
  50%       { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  header { padding: 24px 20px 0; }
  .section-body { grid-template-columns: 1fr; gap: 16px; }
  .span2 { grid-column: 1; }
  #app-screen { padding: 0 16px 60px; }
  .section-body { padding: 20px; }
  .section-head { padding: 16px 20px; }
  .submit-zone { padding: 28px 20px; }
  footer { flex-direction: column; gap: 8px; padding: 16px 20px; }
}
