:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-soft: #eef2ff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-light: #38bdf8;
  --border: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 24px 50px rgba(15, 23, 42, 0.25);
  --radius-card: 26px;
  --radius-input: 14px;
  --transition: 0.18s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: radial-gradient(120% 120% at 50% 0%, #1d4ed8 0%, #0f172a 45%, #0b1120 100%);
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-strong);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-nav {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  color: #e2e8f0;
  display: flex;
  justify-content: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.page-nav-inner {
  width: min(1120px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.page-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.page-links a {
  color: #e2e8f0;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.page-links a:hover {
  background: rgba(226, 232, 240, 0.18);
}

.page-links a.active {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #0f172a;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.35);
}

.page-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(32px, 6vw, 80px) 16px 90px;
}

.form-card {
  width: min(960px, 100%);
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(28px, 6vw, 48px);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at -10% -20%, rgba(56, 189, 248, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 120% 20%, rgba(37, 99, 235, 0.14) 0%, transparent 55%);
  pointer-events: none;
}

.form-card__header {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(24px, 5vw, 36px);
}

.form-card__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.form-card__header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
}

.form-card__header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 640px;
}

.form-section {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3vw, 24px) 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.form-section__title {
  margin: 0 0 18px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

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

.form-group--wide {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.form-instruction {
  margin: -4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.required {
  color: #ef4444;
  margin-left: 4px;
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row > * {
  flex: 1 1 200px;
}

input[type='text'],
input[type='email'],
input[type='date'],
input[type='time'],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.75);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23343a40' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 6px;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.checkbox-grid label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-muted);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition), transform var(--transition);
}

.checkbox-grid label:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.checkbox-grid input[type='checkbox'] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  margin-top: clamp(24px, 5vw, 32px);
  position: relative;
  z-index: 1;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px rgba(37, 99, 235, 0.42);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#formFeedback {
  color: #b91c1c;
  font-weight: 600;
}

#formLoader {
  display: none;
  font-weight: 600;
  color: var(--accent-strong);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.thank-card {
  text-align: center;
}

.thank-card p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.thank-card a {
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 720px) {
  .page-nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-card {
    padding: 28px 22px 32px;
  }

  .page-links {
    width: 100%;
    justify-content: space-between;
  }
}
