:root {
  --bg: #11100f;
  --bg-soft: #181614;
  --panel: rgba(28, 25, 22, 0.93);
  --panel-2: rgba(35, 31, 27, 0.9);
  --text: #f2eee7;
  --muted: #b9b0a4;
  --faint: #81786e;
  --line: rgba(232, 220, 202, 0.15);
  --line-strong: rgba(232, 220, 202, 0.3);
  --accent: #c7ad7f;
  --accent-soft: rgba(199, 173, 127, 0.16);
  --danger: #e0a79f;
  --success: #bfd0b0;
  --radius: 18px;
  --shadow: 0 30px 80px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(133, 106, 72, 0.13), transparent 32%),
    radial-gradient(circle at 88% 25%, rgba(102, 82, 61, 0.08), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: var(--accent); }

.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.brand-text { font-size: 0.78rem; letter-spacing: 0.18em; white-space: nowrap; }

.language-control { position: relative; }
.language-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.language-button:hover, .language-button:focus-visible { border-color: var(--line-strong); outline: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  padding: 7px;
  border: 1px solid var(--line);
  background: #1d1a17;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.language-menu button {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.language-menu button:hover, .language-menu button:focus-visible { background: var(--accent-soft); outline: none; }

main { padding: 52px 0 80px; }
.hero { max-width: 850px; margin-bottom: 36px; }
.eyebrow { color: var(--accent); letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.76rem; margin: 0 0 14px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2.1rem, 5vw, 4.3rem); line-height: 1.04; margin: 0 0 22px; max-width: 950px; }
.hero-copy { color: #d8d0c6; font-size: clamp(1rem, 2vw, 1.17rem); max-width: 810px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.9rem; margin-top: 22px; }

.application-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(22,20,18,0.95));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.progress-wrap { padding: 24px 28px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.012); }
.progress-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; }
.draft-status { color: var(--faint); }
.progress-track { height: 3px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 220ms ease; }
.step-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 13px; color: var(--faint); font-size: 0.68rem; }
.step-labels span.active { color: var(--text); }

#applicationForm { padding: 30px 28px 28px; }
.step-heading { margin-bottom: 28px; }
.step-heading h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); margin: 0 0 8px; }
.step-heading p { margin: 0; color: var(--muted); max-width: 760px; }

.fields { display: grid; gap: 24px; }
.field { display: grid; gap: 9px; }
.field > label, .field-legend { color: var(--text); font-weight: 600; font-size: 0.96rem; }
.required-mark { color: var(--accent); margin-left: 4px; }
.field-help { margin: 0; color: var(--muted); font-size: 0.82rem; }
.field-error { margin: 0; color: var(--danger); font-size: 0.82rem; }

input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%;
  color: var(--text);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  outline: none;
}
textarea { min-height: 132px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(199,173,127,0.09); }
select option { background: #1c1916; color: var(--text); }
input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line-strong);
  background: rgba(255,255,255,0.02);
  padding: 16px;
  border-radius: 11px;
  color: var(--muted);
}

.choice-list { display: grid; gap: 9px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
}
.choice:hover { border-color: var(--line-strong); }
.choice input { margin-top: 3px; accent-color: var(--accent); }

.callout {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  color: var(--muted);
  background: var(--accent-soft);
}

.global-message { margin: 24px 28px 0; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line); }
.global-message.error { border-color: rgba(224,167,159,0.45); color: #f0c7c1; background: rgba(224,167,159,0.08); }
.global-message.info { border-color: rgba(199,173,127,0.4); color: #e1d0b2; background: rgba(199,173,127,0.08); }

.turnstile-panel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-navigation { display: flex; justify-content: space-between; gap: 12px; padding-top: 30px; margin-top: 30px; border-top: 1px solid var(--line); }
.button {
  min-height: 45px;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.5; cursor: wait; transform: none; }
.button-primary { background: var(--accent); color: #17130f; border-color: var(--accent); font-weight: 700; }
.button-secondary { background: transparent; color: var(--text); }

.success-panel {
  margin-top: 30px;
  border: 1px solid rgba(191,208,176,0.3);
  background: rgba(191,208,176,0.06);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
}
.success-symbol { width: 54px; height: 54px; margin: 0 auto 18px; border: 1px solid rgba(191,208,176,0.5); border-radius: 50%; display:grid; place-items:center; color:var(--success); font-size:1.4rem; }
.success-panel h2 { margin: 0 0 10px; font-size: 2rem; }
.success-panel p { color: var(--muted); }
.success-reference { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

footer { padding: 24px 0 40px; color: var(--faint); border-top: 1px solid var(--line); font-size: 0.78rem; }

.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1120px); }
  .site-header { align-items: flex-start; }
  .brand-text { display: none; }
  main { padding-top: 34px; }
  .hero { margin-bottom: 25px; }
  .application-card { border-radius: 14px; }
  .progress-wrap, #applicationForm { padding-left: 18px; padding-right: 18px; }
  .step-labels { display: none; }
  .choice-grid { grid-template-columns: 1fr; }
  .form-navigation { flex-direction: column-reverse; }
  .button { width: 100%; }
}

/* Access gate, shown before the form until the shared code checks out. */
.access-gate {
  background: var(--surface, #17151300);
  border: 1px solid #2e2a25;
  border-radius: 4px;
  padding: 2rem 1.75rem;
  max-width: 34rem;
  margin: 0 auto;
}

.access-gate h2 {
  margin: 0 0 .6rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.access-gate p {
  margin: 0 0 1.4rem;
  color: #a89f93;
  line-height: 1.55;
}

.access-gate label {
  display: block;
  margin-bottom: .4rem;
}

.access-gate input {
  width: 100%;
  margin-bottom: 1rem;
  letter-spacing: .1em;
}

.access-gate .button {
  width: 100%;
}
