/* © 2026 Apply Panacea - Panacea Consultancy Services. Shared intake form styles. */

:root {
  --navy: #1B2E4B;
  --navy-deep: #111f33;
  --navy-mid: #243d60;
  --gold: #E8951A;
  --gold-light: #f0a832;
  --cream: #F7F4EE;
  --cream-dark: #ede9e0;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --text-muted: #888;
  --rule: rgba(27,46,75,0.1);
  --rule-light: rgba(255,255,255,0.08);
  --green: #2e7d32;
  --green-bg: #e8f5e9;
  --red: #c62828;
  --red-bg: #fdecea;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text-dark); font-size: 16px; line-height: 1.6; overflow-x: hidden; min-height: 100vh; }

/* NAV */
nav.site-nav {
  background: var(--navy-deep); padding: 16px 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--rule-light);
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo { height: 32px; width: auto; display: block; }
.nav-divider { width: 1px; height: 22px; background: rgba(255,255,255,0.15); }
.nav-leap { font-family: 'Cormorant Garamond', serif; font-size: 17px; font-weight: 600; color: var(--cream); letter-spacing: 0.16em; }
.nav-back { font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(247,244,238,0.45); text-decoration: none; transition: color 0.2s; }
.nav-back:hover { color: var(--gold); }

/* PAGE HEADER */
.page-header {
  background: var(--navy); padding: 52px 60px 48px;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(232,149,26,0.07) 0%, transparent 60%);
  pointer-events: none;
}
.page-header-inner { position: relative; z-index: 1; max-width: 800px; }
.page-kicker { font-size: 10px; font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.page-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(28px, 4vw, 46px); font-weight: 300; color: var(--cream); line-height: 1.15; margin-bottom: 14px; }
.page-sub { font-size: 14px; font-weight: 300; color: rgba(247,244,238,0.6); line-height: 1.7; }

/* MAIN LAYOUT */
.main { max-width: 820px; margin: 0 auto; padding: 52px 24px 80px; }

/* FORM PROGRESS STRIP */
.progress-strip { background: var(--white); padding: 18px 24px; margin-bottom: 32px; display: flex; align-items: center; gap: 14px; border-left: 3px solid var(--gold); }
.progress-icon { font-size: 13px; color: var(--gold); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.progress-text { font-size: 13px; font-weight: 300; color: var(--text-mid); line-height: 1.5; }
.progress-text strong { color: var(--navy); font-weight: 500; }

/* SECTION BLOCKS */
.section-block { background: var(--white); margin-bottom: 2px; padding: 32px 36px; }
.section-block:last-of-type { margin-bottom: 28px; }
.section-label { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; color: var(--navy); margin-bottom: 6px; line-height: 1.25; }
.section-helper { font-size: 13px; font-weight: 300; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }

/* FIELD GROUPS */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 13px; font-weight: 500; color: var(--navy); margin-bottom: 6px; line-height: 1.5; }
.field-label .req { color: var(--gold); font-weight: 500; }
.field-helper { font-size: 12px; font-weight: 300; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }
.field-helper-inline { font-size: 11px; font-weight: 300; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; padding: 12px 14px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  background: var(--cream); border: 1px solid transparent; color: var(--text-dark);
  transition: border-color 0.2s, background 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); background: #fffbf5; }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%231B2E4B' stroke-width='1.5' fill='none'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* RADIO + CHECKBOX */
.opt-group { display: flex; flex-direction: column; gap: 8px; }
.opt-group.horiz { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; background: var(--cream);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent; font-size: 14px; line-height: 1.5; color: var(--text-mid);
}
.opt:hover { background: #fffbf5; border-color: rgba(232,149,26,0.3); }
.opt input { margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.opt input:checked ~ .opt-label { color: var(--navy); font-weight: 500; }
.opt:has(input:checked) { background: #fffbf5; border-color: var(--gold); }
.opt-label { flex: 1; }

/* RATING MATRIX */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.matrix th { font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 10px 8px; text-align: center; background: var(--cream); }
.matrix th:first-child { text-align: left; padding-left: 16px; }
.matrix td { padding: 10px 8px; text-align: center; border-top: 1px solid var(--rule); }
.matrix td:first-child { text-align: left; padding-left: 16px; color: var(--text-dark); font-weight: 400; }
.matrix input[type="radio"] { accent-color: var(--gold); cursor: pointer; }

/* DECLARATION BLOCK */
.declaration { background: var(--cream); padding: 22px 26px; border-left: 3px solid var(--navy); }
.declaration .opt { background: transparent; padding: 8px 0; }
.declaration .opt:hover { background: transparent; border-color: transparent; }
.declaration .opt:has(input:checked) { background: transparent; border-color: transparent; }

/* SUBMIT BAR */
.submit-bar { background: var(--white); padding: 28px 36px; margin-top: 2px; text-align: center; }
.submit-helper { font-size: 12px; font-weight: 300; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.btn-submit {
  display: inline-block; background: var(--navy); color: var(--cream);
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  padding: 18px 48px; border: none; cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover:not(:disabled) { background: var(--navy-mid); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* STATUS MESSAGES */
.status-msg { padding: 14px 18px; font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.status-msg.error { background: var(--red-bg); border-left: 3px solid var(--red); color: var(--red); }
.status-msg.success { background: var(--green-bg); border-left: 3px solid var(--green); color: var(--green); }
.status-msg.info { background: rgba(232,149,26,0.08); border-left: 3px solid var(--gold); color: var(--text-mid); }
.status-msg.hidden { display: none; }

/* PROFILE ROUTER (intake-router.html) */
.router-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.router-card {
  background: var(--white); padding: 32px 32px 28px;
  text-decoration: none; color: inherit; display: block;
  border: 2px solid transparent; transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.router-card:hover { border-color: rgba(232,149,26,0.4); background: #fffbf5; }
.router-card-age { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.router-card-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; color: var(--navy); margin-bottom: 10px; line-height: 1.25; }
.router-card-meta { font-size: 12px; font-weight: 300; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.router-card-cta { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy); }
.router-card:hover .router-card-cta { color: var(--gold); }

/* FOOTER */
footer.site-footer { background: var(--navy-deep); padding: 28px 60px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--rule-light); }
.footer-legal { font-size: 11px; font-weight: 300; color: rgba(247,244,238,0.25); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 11px; font-weight: 300; color: rgba(247,244,238,0.35); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* CONDITIONAL FIELDS
   Branch fields (intake-c1112 exam track, intake-ug / intake-pro track) are hidden
   until the per-form inline script adds .show based on the chosen answer. Without this
   rule the branches stayed visible permanently and their required fields validated even
   when irrelevant. The wizard's per-step validation skips them while hidden (offsetParent
   is null), so the two stay consistent. */
.conditional { display: none; }
.conditional.show { display: block; }

/* ============================================================
   WIZARD (sectioned, one-step-at-a-time intake)
   Progressive enhancement: only active when intake-wizard.js adds
   .wizard-on to the form. Palette: navy / gold / cream only.
   ============================================================ */

/* Show one section at a time once the wizard is on. */
.wizard-on .section-block { display: none; }
.wizard-on .section-block.is-active { display: block; }

@keyframes wizardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section-block.wizard-animate { animation: wizardIn 0.38s cubic-bezier(0.22, 0.61, 0.36, 1); }

/* Progress header: step meta + bar + dots */
.wizard-progress { background: var(--white); padding: 24px 36px 22px; margin-bottom: 2px; border-top: 3px solid var(--gold); }
.wizard-meta { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.wizard-meta-step { font-size: 10px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.wizard-meta-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; color: var(--navy); line-height: 1.2; }

.wizard-track { height: 5px; background: var(--cream-dark); border-radius: 5px; overflow: hidden; }
.wizard-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 45%, var(--gold) 100%); border-radius: 5px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

.wizard-dots { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.wizard-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--cream);
  color: var(--text-muted); font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; padding: 0;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.wizard-dot:hover { border-color: var(--gold); color: var(--navy); transform: translateY(-1px); }
.wizard-dot.is-current { background: var(--navy); border-color: var(--navy); color: var(--cream); box-shadow: 0 0 0 4px rgba(232, 149, 26, 0.18); }
.wizard-dot.is-done { background: var(--gold); border-color: var(--gold); color: var(--white); font-size: 0; }
.wizard-dot.is-done::after { content: '✓'; font-size: 14px; line-height: 1; }

/* Step navigation (Back / Continue) */
.wizard-nav { display: flex; align-items: center; gap: 14px; background: var(--white); padding: 24px 36px; margin-top: 2px; }
.btn-wiz {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; padding: 15px 40px;
  border: 1px solid transparent; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-wiz-back { background: transparent; color: var(--text-muted); border-color: var(--rule); }
.btn-wiz-back:hover { color: var(--navy); border-color: var(--navy); }
.btn-wiz-next { background: var(--gold); color: var(--white); margin-left: auto; }
.btn-wiz-next:hover { background: var(--gold-light); }
.btn-wiz-next:active { transform: translateY(1px); }

/* When the wizard is on, the final submit bar sits right after the nav. */
.wizard-on .submit-bar { margin-top: 2px; }

/* Slightly livelier selection feedback on choice cards (palette unchanged). */
.opt { transition: background 0.15s, border-color 0.15s, transform 0.12s; }
.opt:active { transform: scale(0.995); }
.opt:has(input:checked) { box-shadow: inset 3px 0 0 var(--gold); }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav.site-nav { padding: 14px 20px; }
  .page-header { padding: 36px 20px 32px; }
  .main { padding: 36px 16px 60px; }
  .section-block { padding: 24px 20px; }
  .submit-bar { padding: 22px 20px; }
  .router-grid { grid-template-columns: 1fr; }
  footer.site-footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
  .wizard-progress { padding: 18px 20px; }
  .wizard-meta-title { font-size: 17px; }
  .wizard-nav { padding: 18px 20px; }
  .btn-wiz { padding: 14px 26px; }
  .wizard-dot { width: 27px; height: 27px; font-size: 11px; }
}
