:root {
  color-scheme: dark;
  --bg-top: #0d1621;
  --bg-bottom: #04070c;
  --panel: rgba(10, 16, 24, 0.96);
  --panel-border: rgba(193, 154, 86, 0.34);
  --text-main: #f3eadf;
  --text-muted: #b9ab97;
  --text-faint: #8f8373;
  --accent: #d5aa67;
  --accent-strong: #f0c988;
  --accent-shadow: rgba(213, 170, 103, 0.2);
  --success-bg: rgba(40, 77, 60, 0.34);
  --success-border: rgba(113, 196, 146, 0.34);
  --error-bg: rgba(91, 37, 37, 0.3);
  --error-border: rgba(223, 129, 129, 0.28);
  --field-bg: rgba(255, 248, 239, 0.05);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(213, 170, 103, 0.2), transparent 32%),
    radial-gradient(circle at 15% 20%, rgba(58, 84, 115, 0.42), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text-main);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 82%);
  pointer-events: none;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.gate-panel {
  position: relative;
  width: min(100%, 640px);
  padding: 34px 28px 30px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gate-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  pointer-events: none;
}

.eyebrow,
.field-label,
.success-label,
button,
.field-note,
.status-message,
.link-button {
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.78rem;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.4rem);
}

h2 {
  font-size: clamp(1.65rem, 4vw, 2.4rem);
}

.lede {
  margin: 16px 0 28px;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.access-form {
  display: grid;
  gap: 12px;
}

.field-label {
  color: var(--text-faint);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button {
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 56px;
}

input {
  width: 100%;
  padding: 0 18px;
  background: var(--field-bg);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

input:focus {
  border-color: rgba(240, 201, 136, 0.76);
  box-shadow: 0 0 0 4px var(--accent-shadow);
  background: rgba(255, 248, 239, 0.08);
}

button {
  padding: 0 22px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #1a1209;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    opacity 140ms ease;
}

button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.field-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
  line-height: 1.55;
}

.status-message {
  min-height: 1.5em;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.status-error {
  color: #f2c0c0;
}

.access-panel {
  margin-top: 24px;
  padding: 20px 22px 22px;
  border: 1px solid var(--success-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(119, 194, 148, 0.12), transparent),
    var(--success-bg);
}

.access-panel p {
  margin: 10px 0 0;
  color: #d4ecdd;
  line-height: 1.6;
}

.access-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.success-label {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8dd4a8;
  font-size: 0.78rem;
}

.access-summary {
  margin-top: 12px;
}

.lock-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.88rem;
}

.program-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.program-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(9, 15, 21, 0.34);
}

.program-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.program-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.program-card p {
  margin: 0;
}

.program-link-meta {
  color: var(--text-faint);
  font-size: 0.88rem;
  word-break: break-word;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #1a1209;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.link-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.link-button[aria-disabled="true"] {
  pointer-events: none;
  filter: saturate(0.7);
  opacity: 0.72;
}

body.launch-screen-open {
  overflow: hidden;
}

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(213, 170, 103, 0.16), transparent 34%),
    rgba(4, 7, 12, 0.98);
}

.launch-overlay[hidden] {
  display: none;
}

.launch-card {
  width: min(100%, 480px);
  padding: 36px 30px 32px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.launch-spinner {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border: 5px solid rgba(213, 170, 103, 0.2);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: launch-spin 900ms linear infinite;
}

.launch-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.launch-card h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.launch-status {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.launch-note {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
}

@keyframes launch-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .gate-panel {
    padding: 26px 18px 22px;
    border-radius: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .access-panel-header,
  .program-card-header {
    flex-direction: column;
  }

  .lock-button,
  .link-button {
    width: 100%;
  }

  .launch-card {
    padding: 30px 20px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-spinner {
    animation: none;
    border-color: rgba(213, 170, 103, 0.4);
    border-top-color: var(--accent-strong);
  }
}
