:root {
  --page: #0f2740;
  --panel: #14304c;
  --panel-deep: #0b2036;
  --text: #f7f3e8;
  --muted: #94a8ba;
  --line: #55718b;
  --line-strong: #3b5872;
  --accent: #d5b242;
  --layout-max: 82.5rem;
  --screen-max-height: 48rem;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--panel-deep);
}

.page-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.55rem, 1.5vw, 1rem);
  width: min(100%, var(--layout-max));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(0.85rem, 2.2vw, 1.8rem);
}

.one-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  align-self: center;
  min-height: min(var(--screen-max-height), calc(100svh - 5rem));
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(4, 20, 36, 0.4);
}

.brand-panel,
.application-form {
  padding: clamp(1.15rem, 3.2vw, 3rem);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.2rem, 3vh, 2.2rem);
  border-right: 1px solid var(--line-strong);
  background: var(--panel-deep);
  color: var(--text);
}

h1,
h2,
p {
  margin-top: 0;
}

.thesis {
  max-width: 13.8em;
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.16;
}

.plain-note,
.format-note {
  max-width: 48rem;
  margin: 0;
  color: rgba(247, 243, 232, 0.68);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
  line-height: 1.65;
}

.format-note {
  max-width: 40rem;
  margin-top: 0.9rem;
  color: rgba(247, 243, 232, 0.52);
  font-size: clamp(0.88rem, 1.05vw, 0.96rem);
}

.application-form {
  display: grid;
  align-content: center;
  gap: clamp(1rem, 2.2vh, 1.45rem);
  background: var(--panel);
  color: var(--text);
}

.city-strip {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.45rem 0;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.form-heading {
  max-width: 32rem;
  margin-bottom: 0.45rem;
}

.form-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 2.7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

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

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

label {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-deep);
  color: var(--text);
  padding: 0.82rem 0.9rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: clamp(8.5rem, 22vh, 13rem);
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 243, 232, 0.42);
}

input:hover,
textarea:hover,
input:focus,
textarea:focus {
  border-color: var(--accent);
  background: #071b2e;
}

input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(213, 178, 66, 0.14);
}

.form-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.form-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
}

.submit-button,
.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--panel-deep);
  padding: 0.8rem 1.05rem;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.submit-button:hover,
.button:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-1px);
}

.submit-button[disabled],
.button[disabled] {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.form-status {
  min-height: 1.45rem;
  margin: 0;
}

.form-status[data-state="success"] {
  color: #b7d8bd;
}

.form-status[data-state="error"] {
  color: #e6a69b;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  text-decoration: underline;
}

.heart {
  color: var(--accent);
}

.success-page {
  min-height: 100svh;
}

.success-shell {
  display: grid;
  min-height: 100svh;
  align-content: center;
  gap: 1.2rem;
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.success-shell h1 {
  display: block;
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.success-shell p {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.7;
}

.success-shell .button {
  justify-self: start;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .one-screen {
    grid-template-columns: 1fr;
    align-self: stretch;
    min-height: auto;
  }

  .brand-panel {
    min-height: 52svh;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .application-form {
    align-content: start;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 0.65rem;
  }

  .brand-panel,
  .application-form {
    padding: 1rem;
  }

  .thesis {
    font-size: clamp(2rem, 12vw, 3.6rem);
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .submit-button,
  .button {
    width: 100%;
  }
}

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