﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

@property --shimmer-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ── Custom Properties ────────────────────────────────────────────────────── */
:root {
  --bg: #f5f3f0;
  --surface: #ffffff;
  --surface-subtle: #fafaf8;
  --text: #111111;
  --text-header: #4e4e4e;
  --text-secondary: #6a6560;
  --text-muted: #a09a95;
  --accent: #ff6b01;
  --accent-hover: #cc5500;
  --accent-light: #ffdbb8;
  --border: #e3dfd9;
  --border-strong: #c8c3bc;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #bbf7d0;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --font:
    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

/* ── Overrides: remove Bootstrap body margin ──────────────────────────────── */
body {
  margin-bottom: 0 !important;
}

/* ── Layout container ─────────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main.pb-3 {
  flex: 1;
  padding-bottom: 0 !important;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-header);
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin-bottom: 0;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 120ms;
}

.site-nav a:hover {
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 120ms;
}

.footer-link:hover {
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════
   HOME - HERO
   ══════════════════════════════════════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 64px 24px 64px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text-header);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Form Selection Cards ─────────────────────────────────────────────────── */
.form-cards-section {
  padding: 0 24px 96px;
}

.form-cards {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .form-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .form-cards {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 64px 24px 48px;
  }
}

.form-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    border-color 350ms var(--ease),
    box-shadow 350ms var(--ease),
    transform 350ms var(--ease);
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    transparent 60%,
    rgba(26, 86, 219, 0.03) 100%
  );
  pointer-events: none;
}

/* Shimmer border — mask punches out the interior so only the border ring is visible */
.form-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-sm) + 2px);
  padding: 2px;
  background: conic-gradient(
    from var(--shimmer-angle),
    transparent 0%,
    transparent 35%,
    rgba(1, 121, 192, 0.35) 44%,
    rgba(180, 220, 242, 0.9) 50%,
    rgba(1, 121, 192, 0.35) 56%,
    transparent 65%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 450ms var(--ease);
  pointer-events: none;
}

.form-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  color: inherit;
  text-decoration: none;
}

.form-card:hover::after {
  opacity: 1;
  animation: shimmer-spin 2.8s linear infinite;
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
  transition:
    background 280ms var(--ease),
    transform 280ms var(--ease);
  flex-shrink: 0;
}

.form-card:hover .card-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 28px;
}

.card-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 20px;
  line-height: 16px;
}

.card-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 200ms var(--ease);
}

.form-card:hover .card-cta {
  gap: 10px;
}

.card-cta svg {
  display: inline;
  transition: transform 200ms var(--ease);
}

.form-card:hover .card-cta svg {
  transform: translateX(2px);
}

.form-card.is-loading {
  pointer-events: none;
  opacity: 0.72;
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.form-card.is-loading .card-cta svg {
  display: none;
}

.form-card.is-loading .card-cta::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   FORM PAGES
   ══════════════════════════════════════════════════════════════════════════ */
.form-page {
  padding: 48px 0 96px;
}

.form-page-header {
  margin-bottom: 40px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 120ms;
}

.breadcrumb-nav a:hover {
  color: var(--text);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.form-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.form-page-sub {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Form Container ───────────────────────────────────────────────────────── */

/* ── Sections ─────────────────────────────────────────────────────────────── */
.form-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 32px;
  margin-bottom: 16px;
}

.section-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

.form-section p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.form-section p:last-child {
  margin-bottom: 0;
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 24px;
  }
}

.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.field-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  transition:
    border-color 120ms,
    box-shadow 120ms;
  appearance: none;
  -webkit-appearance: none;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--text-muted);
}

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A09A95' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.field-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.field-input.is-invalid,
.field-select.is-invalid,
.field-textarea.is-invalid,
.check-input.is-invalid {
  border-color: var(--danger);
}

.field-input.is-invalid:focus,
.field-select.is-invalid:focus,
.field-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: block;
}

.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 5px;
  display: block;
}

.field-error:empty {
  display: none;
}

/* Bootstrap validation overrides */
.field-validation-error {
  font-size: 0.75rem;
  color: var(--danger);
  display: block;
  margin-top: 5px;
}

.input-validation-error {
  border-color: var(--danger) !important;
}

/* ── Checkbox ─────────────────────────────────────────────────────────────── */
.check-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin-top: 2px;
  position: relative;
  transition:
    background 120ms,
    border-color 120ms;
}

.check-input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check-input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}

.check-input:focus {
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
  outline: none;
}

.check-label {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  cursor: pointer;
}

.terms-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 120ms;
}

.terms-btn:hover {
  text-decoration-color: currentColor;
}

/* ── File Drop Zone ───────────────────────────────────────────────────────── */
.file-drop {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-subtle);
  transition:
    border-color 150ms,
    background 150ms;
  margin-bottom: 18px;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: var(--accent);
  background: #fff9f5;
}

.file-drop.file-drop--drag {
  border-color: var(--accent);
  background: #fff5ec;
}

.file-drop.input-validation-error {
  border-color: var(--danger);
  border-style: solid;
}

.file-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.file-drop__zone {
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.file-drop__icon {
  display: block;
  margin: 0 auto 10px;
  color: var(--text-muted);
  transition: color 150ms;
  line-height: 0;
  display: grid;
  place-content: center;
}

.file-drop:hover .file-drop__icon,
.file-drop--drag .file-drop__icon {
  color: var(--accent);
}

.file-drop__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 4px;
}

.file-drop__text strong {
  color: var(--accent);
  font-weight: 600;
}

.file-drop__formats {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.file-list {
  list-style: none;
  padding: 0 12px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  min-width: 0;
}

.file-item__icon {
  color: var(--accent);
  flex-shrink: 0;
  line-height: 0;
}

.file-item__name {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.file-item__size {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.file-item__remove {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  transition:
    color 120ms,
    background 120ms;
}

.file-item__remove:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 150ms var(--ease);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  color: var(--text);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
  color: var(--text);
  text-decoration: none;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.9375rem;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
}

/* ── Form Actions Bar ─────────────────────────────────────────────────────── */
.form-actions {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.form-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── HTMX Loading Indicator ───────────────────────────────────────────────── */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer-spin {
  to {
    --shimmer-angle: 360deg;
  }
}

.loading-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   API ERROR STATE
   ══════════════════════════════════════════════════════════════════════════ */
.api-error-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 64px 40px;
  text-align: center;
  max-width: 520px;
  margin: 48px auto;
}

.api-error-icon {
  width: 60px;
  height: 60px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #dc2626;
}

.api-error-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.api-error-msg {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.api-error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   SUCCESS STATE
   ══════════════════════════════════════════════════════════════════════════ */
.success-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.success-hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 40px;
  text-align: center;
}

.success-check {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
}

.success-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.success-ref {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.success-ref strong {
  color: var(--accent);
  font-weight: 500;
  font-family: monospace;
  font-size: 0.9375rem;
}

.success-body {
  padding: 40px;
}

.success-info {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 24px;
  margin-bottom: 32px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 520px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .success-body {
    padding: 28px 24px;
  }

  .success-hero {
    padding: 36px 24px;
  }
}

.info-item-key {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.info-item-val {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.success-section + .success-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}

.success-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.info-item-blank {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.success-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
}

.modal-box {
  background: var(--surface);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  .modal-box {
    max-width: 640px;
    border-radius: var(--r-sm);
    max-height: 82vh;
  }
}

.modal-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-head-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  transition:
    background 120ms,
    color 120ms;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 28px;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--surface-subtle);
}

/* ── Terms Content ────────────────────────────────────────────────────────── */
.terms-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 8px;
  letter-spacing: -0.01em;
}

.terms-body h3:first-child {
  margin-top: 0;
}

.terms-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0 0 12px;
}

.terms-body ol,
.terms-body ul {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.72;
  padding-left: 20px;
  margin: 0 0 12px;
}

.terms-body li {
  margin-bottom: 4px;
}

.terms-effective {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--r-sm);
  border-bottom-right-radius: var(--r-sm);
  padding: 3px 12px;
  transform: translateY(-33px);
}

/* ── Terms loading placeholder ────────────────────────────────────────────── */
.terms-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.terms-loading .spinner {
  width: 24px;
  height: 24px;
}

/* ══════════════════════════════════════════════════════════════════════════
   TERMS PAGE
   ══════════════════════════════════════════════════════════════════════════ */
.terms-page {
  padding: 48px 0 80px;
}

.terms-page-header {
  margin-bottom: 28px;
  padding-bottom: 32px;
}

.terms-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.terms-page-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

.terms-doc {
}

.terms-section {
  margin-bottom: 40px;
}

.terms-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.terms-section p,
.terms-section li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.terms-section p {
  margin-bottom: 12px;
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section ol,
.terms-section ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.terms-section li {
  margin-bottom: 8px;
}

.terms-section li > ol {
  margin-top: 8px;
  margin-bottom: 0;
}

.terms-address {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 16px 20px;
  display: inline-block;
  margin-top: 4px;
}

.terms-caps {
  font-size: 0.8125rem !important;
  letter-spacing: 0.01em;
}

.terms-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 600px) {
  .terms-page-title {
    font-size: 1.5rem;
  }

  .terms-page {
    padding: 32px 0 60px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════ */
@media print {
  body {
    background: white !important;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .no-print,
  .form-actions,
  .success-actions,
  .breadcrumb-nav,
  .modal-overlay {
    display: none !important;
  }

    .success-wrap {
    border: none;
    box-shadow: none;
    overflow: visible !important;
  }

  .success-body {
    padding: 0;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }


  .print-header {
    display: block !important;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #111;
  }

  @page {
    margin: 1.5cm 2cm;
  }
}

.print-header {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   HOME PAGE — viewport-locked, no scroll on desktop
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 901px) {
  body.page-home {
    height: 100vh;
    overflow: hidden;
  }

  body.page-home main {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  body.page-home .hero {
    padding-top: clamp(24px, 5vh, 72px);
    padding-bottom: clamp(16px, 3.5vh, 48px);
  }

  body.page-home .form-cards-section {
    padding-bottom: clamp(16px, 3vh, 48px);
  }
}
