:root {
  color-scheme: dark;
  --bg: #050505;
  --fg: #f5f1e8;
  --muted: #9d978c;
  --line: rgba(245, 241, 232, 0.16);
  --line-strong: rgba(245, 241, 232, 0.28);
  --accent: #bba675;
  --danger: #ff8a8a;
  --success: #a9e6bd;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a,
button,
input,
label {
  touch-action: manipulation;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  padding: calc(30px + env(safe-area-inset-top)) 0 18px;
}

.brand-mark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1.82rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.header-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease;
}

.header-link:hover {
  color: var(--fg);
}

.page-main {
  flex: 1;
}

.hero {
  display: grid;
  place-items: center;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100svh - 138px);
  margin: 0 auto;
  padding: 64px 0 72px;
}

.hero-content {
  width: min(780px, 100%);
}

h1 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 8.8rem;
  font-weight: 500;
  line-height: 0.95;
}

.intro {
  max-width: 660px;
  margin: 30px 0 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 2.02rem;
  font-weight: 400;
  line-height: 1.22;
}

.preapply-form {
  max-width: 640px;
  margin-top: 44px;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 500;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 12px;
  align-items: stretch;
}

.input-row input {
  min-width: 0;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #080808;
  color: var(--fg);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.input-row input::placeholder {
  color: rgba(168, 164, 154, 0.62);
}

.input-row input:focus {
  border-color: var(--line-strong);
  background: #0c0c0c;
}

.submit-button {
  position: relative;
  display: inline-flex;
  min-width: 154px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fg);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--fg);
  color: #050505;
  font-weight: 700;
  overflow: hidden;
  transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.button-label,
.button-loading {
  min-width: 112px;
  text-align: center;
}

.submit-button:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.86;
}

.button-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #050505;
  opacity: 0.34;
  animation: loading-dot 900ms ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.submit-button.is-loading .button-label {
  display: none;
}

.submit-button.is-loading .button-loading {
  display: inline-flex;
}

.consent-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.consent-row input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.turnstile-panel {
  min-height: 65px;
  margin-top: 18px;
}

.turnstile-panel:empty {
  display: none;
}

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

.form-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-message.is-success {
  color: var(--success);
}

.form-message.is-error {
  color: var(--danger);
}

.faq-section {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 112px;
}

.faq-header {
  display: grid;
  grid-template-columns: 160px minmax(0, 720px);
  gap: 32px;
  align-items: start;
  margin-bottom: 42px;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.faq-header h2 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 3.05rem;
  font-weight: 400;
  line-height: 1.08;
}

.faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  max-width: 760px;
  margin-left: 192px;
}

.faq-item {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.faq-item h3 {
  margin: 0;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.faq-item p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.76;
}

.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 calc(36px + env(safe-area-inset-bottom));
  color: rgba(245, 241, 232, 0.58);
}

.site-footer::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: 44px;
  background: linear-gradient(
    90deg,
    rgba(245, 241, 232, 0),
    rgba(245, 241, 232, 0.18),
    rgba(245, 241, 232, 0)
  );
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 72px;
  align-items: end;
}

.footer-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-brand h2 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 9vw, 7.6rem);
  font-weight: 500;
  line-height: 0.95;
}

.footer-copy {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.36rem;
  line-height: 1.38;
}

.footer-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 42px;
}

.footer-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-label {
  color: rgba(245, 241, 232, 0.44);
  font-size: 0.78rem;
  font-weight: 700;
}

.footer-link,
.footer-status,
.footer-text {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--fg);
  font-size: 0.94rem;
  line-height: 1.35;
}

.footer-link {
  width: fit-content;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.footer-link:hover {
  color: #ffffff;
  opacity: 0.86;
}

.footer-status {
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(169, 230, 189, 0.1);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 241, 232, 0.08);
  color: rgba(245, 241, 232, 0.44);
  font-size: 0.84rem;
  line-height: 1.45;
}

.footer-bottom > span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.footer-credit-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.footer-credit-link:hover,
.footer-credit-link:focus-visible {
  color: var(--fg);
  opacity: 0.9;
}

[data-animate],
.faq-item {
  will-change: opacity, transform;
}

@keyframes loading-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  40% {
    opacity: 0.9;
    transform: translateY(-3px);
  }
}

@media (max-width: 780px) {
  .site-header,
  .site-footer,
  .hero {
    width: min(100% - 32px, 1120px);
  }

  .site-header {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .hero {
    place-items: start;
    min-height: auto;
    padding: 48px 0 64px;
  }

  h1 {
    font-size: 5rem;
  }

  .intro {
    max-width: 620px;
    font-size: 1.52rem;
  }

  .preapply-form {
    max-width: none;
    margin-top: 36px;
  }

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

  .input-row input,
  .submit-button {
    width: 100%;
    min-height: 54px;
  }

  .faq-section {
    width: min(100% - 32px, 1120px);
    padding: 58px 0 78px;
  }

  .faq-header {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
  }

  .faq-header h2 {
    font-size: 2.22rem;
  }

  .faq-list {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: none;
    margin-left: 0;
  }

  .faq-item {
    min-height: auto;
    padding: 0;
    background: transparent;
  }

  .site-footer {
    padding-top: 72px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 44px;
    align-items: start;
  }

  .footer-copy {
    max-width: 620px;
    font-size: 1.16rem;
  }

  .footer-meta {
    max-width: 620px;
    gap: 24px 34px;
  }
}

@media (max-width: 430px) {
  .site-header,
  .site-footer,
  .hero,
  .faq-section {
    width: min(100% - 24px, 1120px);
  }

  .brand-mark {
    font-size: 1.55rem;
  }

  h1 {
    font-size: 3.72rem;
  }

  .intro {
    margin-top: 24px;
    font-size: 1.22rem;
    line-height: 1.3;
  }

  .header-link {
    font-size: 0.82rem;
  }

  .hero {
    padding: 38px 0 58px;
  }

  .field-label {
    margin-bottom: 10px;
  }

  .consent-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    font-size: 0.84rem;
  }

  .faq-section {
    padding: 48px 0 70px;
  }

  .faq-header h2 {
    font-size: 1.92rem;
    line-height: 1.14;
  }

  .faq-list {
    gap: 24px;
  }

  .faq-item p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .site-footer {
    padding-top: 56px;
  }

  .site-footer::before {
    margin-bottom: 34px;
  }

  .footer-brand h2 {
    font-size: 3.72rem;
  }

  .footer-copy {
    margin-top: 22px;
    font-size: 1.04rem;
    line-height: 1.48;
  }

  .footer-meta {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    margin-top: 42px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .hero {
    padding-top: 28px;
    padding-bottom: 44px;
  }

  h1 {
    font-size: 4.25rem;
  }

  .intro {
    max-width: 720px;
    margin-top: 20px;
    font-size: 1.22rem;
  }

  .preapply-form {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
