:root {
  /* Brand tokens sourced from branding/BRAND.md (Framer design tokens). */
  --bg: #04070D;
  --surface: #10131C;
  --surface-hover: #181C26;
  --surface-disabled: #0B0E15;
  --text: #FFFFFF;
  --text-body: #D5DBE6;
  --text-muted: rgba(213, 219, 230, 0.7);
  --text-placeholder: rgba(213, 219, 230, 0.4);
  --border-subtle: rgba(216, 231, 242, 0.07);
  --accent-blue: #A6DAFF;
  --brand-green: #07AB4B;
  --radius: 10px;
  --focus: rgba(166, 218, 255, 0.35);
  --error: #ff6b6b;
  --success: #6bcf9f;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* ── Back link (top-left, returns to brand homepage) ───────────────────── */

.back-link {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.back-link__arrow {
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 600px) {
  .back-link span:last-child { display: none; }
  .back-link {
    top: 16px;
    left: 16px;
    padding: 10px 12px;
    font-size: 18px;
  }
}

.page__title {
  text-align: center;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.page__title h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.page__title h1 em {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  /* Instrument Serif rides a bit smaller on the baseline than Inter at the
     same point size — bump it up a touch so the italic 'Aegis' visually
     matches the height of the surrounding Inter sans. */
  font-size: 1.05em;
}

/* Small "CONTACT" pill sitting above the heading. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.pill__icon {
  width: 16px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Brand column ──────────────────────────────────────────────────────── */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.brand__shield {
  width: clamp(140px, 22vw, 280px);
  height: auto;
}

.brand__wordmark {
  width: clamp(180px, 28vw, 360px);
  height: auto;
  margin-top: 20px;
}

@media (max-width: 800px) {
  .brand__shield { width: 120px; }
  .brand__wordmark { width: 180px; }
}

/* ── Form column ───────────────────────────────────────────────────────── */

.form-column {
  width: 100%;
  max-width: 480px;
  justify-self: start;
}

@media (max-width: 800px) {
  .form-column {
    justify-self: center;
  }
}

.form-column__heading {
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 24px;
  color: var(--text-body);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

@media (max-width: 500px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.field label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.field__hint {
  color: var(--text-placeholder);
  font-size: 13px;
}

/* Inputs, selects, textareas share the same shell. */
.field input,
.field select,
.field textarea,
.phone-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  background: var(--surface-hover);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.phone-input:focus-within {
  border-color: var(--focus);
  background: var(--surface-hover);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-placeholder);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23D5DBE6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.field select:invalid {
  color: var(--text-placeholder);
}

.field select option {
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
  font-family: inherit;
}

/* ── Phone input (US-only static prefix) ───────────────────────────────── */

.phone-input {
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.phone-input__prefix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 12px 14px 16px;
  color: var(--text-body);
  font-size: 16px;
  border-right: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.phone-input__flag {
  font-size: 18px;
  line-height: 1;
}

.phone-input__code {
  color: var(--text-muted);
}

.phone-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-body);
  outline: none;
  min-width: 0;
}

/* ── Submit button ─────────────────────────────────────────────────────── */

.submit {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}

.submit:hover:not(:disabled) {
  background: var(--surface-hover);
}

.submit:disabled {
  background: var(--surface-disabled);
  color: var(--text-placeholder);
  cursor: not-allowed;
}

/* ── Status line (success / error feedback) ────────────────────────────── */

.status {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-size: 14px;
  text-align: center;
  color: var(--text-muted);
}

.status[data-state="error"] { color: var(--error); }
.status[data-state="success"] { color: var(--success); }

/* ── Success dialog (native <dialog>, modal) ───────────────────────────── */

.dialog {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 32px);
  color: var(--text-body);
}

.dialog::backdrop {
  background: rgba(4, 7, 13, 0.72);
  backdrop-filter: blur(4px);
}

.dialog__card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.dialog__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.dialog__body {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
}

.dialog__close {
  width: 100%;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.dialog__close:hover {
  background: var(--surface);
}
