/* =====================================================================
   Archway Automation · Free Automation Assessment (/test/)
   Design system carried from the site: navy/bronze/pearl, Playfair+Inter,
   Days One for the ARCHWAY wordmark. No icon fonts: all icons inline SVG.
===================================================================== */
:root {
  --navy: #1A2B4C;
  --navy-light: #243A63;
  --navy-dark: #111D33;
  --bronze: #D49A6A;
  --bronze-hover: #B8865D;
  --bronze-light: #E8C4A0;
  --umber: #8F6C52;
  --pearl: #FDFBF7;
  --pearl-alt: #F5F1EB;
  --surface: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --border: #E5E1DB;
  --green: #16A34A;
  --amber: #D97706;
  --red: #DC2626;
  --max-width: 1080px;
  --nav-height: 72px;
  --radius: 16px;
  --shadow-rest: 0 12px 30px rgba(26,43,76,0.06);
  --shadow-hover: 0 20px 44px rgba(26,43,76,0.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--pearl); color: var(--text-secondary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-top: var(--nav-height);
}
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--text-primary); line-height: 1.2; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
a { color: var(--navy); text-decoration: none; }
.eyebrow {
  font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze);
  display: block; margin-bottom: 12px;
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }
section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.alt-bg { background: var(--pearl-alt); }

/* ═══════════ BUTTONS ═══════════ */
.btn-primary {
  display: inline-block; background: var(--bronze); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700;
  padding: 18px 38px; border-radius: 8px; border: none; cursor: pointer;
  transition: all 0.2s ease; text-decoration: none;
}
.btn-primary:hover { background: var(--bronze-hover); transform: translateY(-1px); box-shadow: var(--shadow-rest); }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--navy);
  font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600;
  padding: 14px 32px; border-radius: 8px; border: 2px solid var(--navy);
  cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}
.btn-secondary:hover { background: var(--navy); color: #fff; }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; } }

/* ═══════════ HERO ═══════════ */
.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); text-align: center; }
.hero h1 { color: var(--navy); margin: 10px auto 14px; max-width: 720px; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--text-secondary); max-width: 540px; margin: 0 auto 30px; }
.hero-sub strong { color: var(--navy); }
.hero-trust { margin-top: 18px; font-size: 0.85rem; color: var(--text-muted); }
.hero-trust span + span { margin-left: 18px; }

.hero-result-demo {
  max-width: 560px; margin: 34px auto 0; background: var(--navy); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-rest);
}
.hrd-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze-light); margin-bottom: 10px; }
.hrd-numbers { display: flex; justify-content: center; gap: clamp(20px, 6vw, 56px); flex-wrap: wrap; }
.hrd-num { font-family: 'Playfair Display', serif; font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.6rem); color: #fff; line-height: 1.1; }
.hrd-num span { color: var(--bronze); }
.hrd-cap { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 4px; font-family: 'Inter', sans-serif; font-weight: 500; }
.hrd-note { font-size: 0.72rem; color: rgba(255,255,255,0.45); margin-top: 14px; }

/* ═══════════ CATEGORY CHIPS ═══════════ */
.chips-section { padding-top: 0; }
.chips-head { text-align: center; margin-bottom: 26px; }
.chips-head h2 { color: var(--navy); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 760px; margin: 0 auto; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 30px;
  padding: 11px 18px; font-size: 0.92rem; font-weight: 600; color: var(--navy);
  box-shadow: var(--shadow-rest);
}

/* ═══════════ FINAL CTA ═══════════ */
.final-cta { text-align: center; }
.final-cta h2 { color: var(--navy); }
.final-cta .fine-print { font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; }

/* ═══════════ QUIZ ENGINE ═══════════ */
.quiz-container { max-width: 680px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2rem); }
.progress-track { height: 6px; background: var(--pearl-alt); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--bronze); border-radius: 3px; transition: width 0.4s ease; }
.progress-count { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-align: right; margin-bottom: 16px; }
.q-dimension {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--umber); display: block; margin-bottom: 6px;
}
#question-text { margin-bottom: 6px; color: var(--navy); font-size: clamp(1.05rem, 1.9vw, 1.3rem); }
.q-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.option-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 10px;
  padding: 11px 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s ease;
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.45;
}
.option-card:hover { border-color: var(--bronze-light); }
.option-card.selected { border-color: var(--bronze); background: rgba(212,154,106,0.07); color: var(--text-primary); }
.option-letter {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: var(--pearl-alt); color: var(--navy); font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.option-card.selected .option-letter { background: var(--bronze); color: #fff; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.quiz-nav .btn-primary { padding: 13px 28px; font-size: 0.98rem; }
.quiz-nav .btn-secondary { padding: 11px 22px; font-size: 0.92rem; }
.quiz-nav button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tally {
  margin-top: 18px; text-align: center; font-size: 0.82rem; color: var(--text-muted);
  border-top: 1px dashed var(--border); padding-top: 12px;
}
.tally strong { color: var(--navy); font-weight: 700; }

/* ═══════════ CONTACT GATE ═══════════ */
#contact-gate { display: none; }
.gate-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow-rest); text-align: center;
}
.gate-card h2 { color: var(--navy); margin-bottom: 8px; }
.gate-sub { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 24px; }
.gate-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; }
.gate-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.gate-dot.filled { background: var(--bronze); }
.gate-step { display: none; text-align: left; }
.gate-step.active { display: block; }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gate-step-full { margin-top: 16px; }
.gate-card label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.gate-card input, .gate-card select {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(26,43,76,0.16); border-radius: 8px;
  font-size: 1rem; font-family: inherit; color: var(--navy); background: #fff;
}
.gate-card input:focus, .gate-card select:focus {
  outline: none; border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(212,154,106,0.15);
}
.gate-error { display: none; color: var(--red); font-size: 0.82rem; margin-top: 12px; }
.gate-error.show { display: block; }
.gate-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.gate-privacy { font-size: 0.78rem; color: var(--text-muted); margin-top: 22px; }
@media (max-width: 560px) { .gate-row { grid-template-columns: 1fr; } }

/* ═══════════ RESULTS ═══════════ */
#quiz-results { display: none; }
.results-header { text-align: center; margin-bottom: 28px; }
.results-header h2 { color: var(--navy); margin: 14px 0 8px; }
.archetype-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.badge-tap { background: rgba(220,38,38,0.08); color: var(--red); }
.badge-leak { background: rgba(217,119,6,0.10); color: var(--amber); }
.badge-ship { background: rgba(22,163,74,0.10); color: var(--green); }

.result-hero {
  background: var(--navy); border-radius: var(--radius); padding: 34px 28px;
  text-align: center; margin-bottom: 22px;
}
.result-hero .rh-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze-light); margin-bottom: 16px; }
.rh-numbers { display: flex; justify-content: center; gap: clamp(24px, 7vw, 64px); flex-wrap: wrap; }
.rh-num { font-family: 'Playfair Display', serif; font-weight: 700; font-size: clamp(2.1rem, 6vw, 3rem); color: #fff; line-height: 1.05; }
.rh-cap { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 6px; font-weight: 500; }
.rh-note { font-size: 0.74rem; color: rgba(255,255,255,0.45); margin-top: 18px; }
.rh-half {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.95rem; color: rgba(255,255,255,0.85);
}
.rh-half strong { color: var(--bronze); }

.result-dims {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-rest); margin-bottom: 22px;
}
.dims-caption { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px; text-align: center; }
.dim-row { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.dim-row-name { flex: 0 0 215px; font-size: 0.86rem; font-weight: 600; color: var(--text-primary); }
.dim-row-bar { flex: 1; height: 12px; background: var(--pearl-alt); border-radius: 6px; overflow: hidden; }
.dim-row-fill { height: 100%; border-radius: 6px; }
.dim-row-score { flex: 0 0 86px; text-align: right; font-size: 0.8rem; font-weight: 700; }
@media (max-width: 560px) { .dim-row-name { flex-basis: 128px; font-size: 0.78rem; } .dim-row-score { flex-basis: 70px; } }

.result-summary {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-rest); margin-bottom: 22px; font-size: 0.97rem;
}
.result-cta {
  border-radius: var(--radius); padding: 30px; text-align: center; margin-bottom: 22px;
  background: rgba(212,154,106,0.07); border: 1px solid rgba(212,154,106,0.35);
}
.result-cta h3 { color: var(--navy); margin: 8px 0 10px; }
.result-cta p { font-size: 0.95rem; max-width: 520px; margin: 0 auto 20px; }
.result-cta .capacity { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
.share-box { text-align: center; border-top: 1px solid var(--border); padding-top: 30px; margin-top: 6px; }
.share-link-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; color: var(--navy); cursor: pointer; margin-top: 12px;
}
.share-link-btn:hover { border-color: var(--bronze); }

/* ═══════════ INLINE ICONS ═══════════ */
.ic { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.16em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }

/* ═══════════ FADE-UP ═══════════ */
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-up.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .progress-fill { transition: none; }
}
