/* ============================================================
   The Helicopter Manager Detector™ — Styles
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --font-display: 'Cabinet Grotesk', 'Inter', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

  --content-narrow: 640px;
  --content-default: 960px;

  /* Archetype colors */
  --color-liberator: #437a22;
  --color-hoverer: #da7101;
  --color-rescuer: #a12c7b;
  --color-tower: #a13544;
}

:root, [data-theme="light"] {
  --color-bg: #f7f6f2;
  --color-surface: #f9f8f5;
  --color-surface-2: #fbfbf9;
  --color-surface-offset: #f3f0ec;
  --color-border: #d4d1ca;
  --color-divider: #dcd9d5;
  --color-text: #28251d;
  --color-text-muted: #7a7974;
  --color-text-faint: #bab9b4;
  --color-text-inverse: #f9f8f4;
  --color-primary: #01696f;
  --color-primary-hover: #0c4e54;
  --color-primary-active: #0f3638;
  --color-primary-highlight: #cedcd8;
  --color-success: #437a22;
  --color-warning: #964219;
  --color-error: #a12c7b;
}

[data-theme="dark"] {
  --color-bg: #171614;
  --color-surface: #1c1b19;
  --color-surface-2: #201f1d;
  --color-surface-offset: #1d1c1a;
  --color-border: #393836;
  --color-divider: #262523;
  --color-text: #cdccca;
  --color-text-muted: #797876;
  --color-text-faint: #5a5957;
  --color-text-inverse: #2b2a28;
  --color-primary: #4f98a3;
  --color-primary-hover: #227f8b;
  --color-primary-active: #1a626b;
  --color-primary-highlight: #313b3b;
  --color-success: #6daa45;
  --color-warning: #bb653b;
  --color-error: #d163a7;

  --color-liberator: #6daa45;
  --color-hoverer: #fdab43;
  --color-rescuer: #d163a7;
  --color-tower: #dd6974;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #171614;
    --color-surface: #1c1b19;
    --color-surface-2: #201f1d;
    --color-surface-offset: #1d1c1a;
    --color-border: #393836;
    --color-divider: #262523;
    --color-text: #cdccca;
    --color-text-muted: #797876;
    --color-text-faint: #5a5957;
    --color-text-inverse: #2b2a28;
    --color-primary: #4f98a3;
    --color-primary-hover: #227f8b;
    --color-primary-active: #1a626b;
    --color-primary-highlight: #313b3b;
    --color-success: #6daa45;
    --color-warning: #bb653b;
    --color-error: #d163a7;
    --color-liberator: #6daa45;
    --color-hoverer: #fdab43;
    --color-rescuer: #d163a7;
    --color-tower: #dd6974;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* --- Global Layout --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.header-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-inner a {
  color: var(--color-text-faint);
  text-decoration: none;
}
.footer-inner a:hover {
  color: var(--color-primary);
}

/* --- Sections --- */
.section {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
}

.section--landing {
  min-height: calc(100dvh - 60px);
}

.section--quiz,
.section--email {
  min-height: calc(100dvh - 60px);
}

.section--results {
  min-height: auto;
  align-items: flex-start;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

/* --- Landing --- */
.landing-content {
  max-width: var(--content-narrow);
  text-align: center;
}

.landing-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-8);
  letter-spacing: 0.02em;
}

.landing-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-3xl);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.text-accent {
  color: var(--color-primary);
}

.landing-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin: 0 auto var(--space-8);
  line-height: 1.5;
}

.landing-sub strong {
  color: var(--color-text);
  font-weight: 600;
}

.landing-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-6);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn--full {
  width: 100%;
}

/* --- Archetype Preview --- */
.archetype-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.archetype-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
}

.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
}

.preview-icon svg {
  width: 32px;
  height: 32px;
}

.preview-icon--liberator {
  background: color-mix(in srgb, var(--color-liberator) 12%, transparent);
  color: var(--color-liberator);
}
.preview-icon--hoverer {
  background: color-mix(in srgb, var(--color-hoverer) 12%, transparent);
  color: var(--color-hoverer);
}
.preview-icon--rescuer {
  background: color-mix(in srgb, var(--color-rescuer) 12%, transparent);
  color: var(--color-rescuer);
}
.preview-icon--tower {
  background: color-mix(in srgb, var(--color-tower) 12%, transparent);
  color: var(--color-tower);
}

@media (max-width: 480px) {
  .archetype-preview {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* --- Quiz --- */
.quiz-container {
  max-width: var(--content-narrow);
  width: 100%;
}

.quiz-progress {
  margin-bottom: var(--space-10);
}

.quiz-progress-bar {
  height: 6px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-progress-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  text-align: center;
}

.quiz-question-area {
  animation: fadeSlideIn 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.quiz-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.2;
  margin-bottom: var(--space-8);
  letter-spacing: -0.02em;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 500;
  text-align: left;
  min-height: 52px;
  cursor: pointer;
}

.quiz-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.quiz-option:active {
  transform: scale(0.98);
}

.quiz-option-marker {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.quiz-option:hover .quiz-option-marker {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* --- Email Capture --- */
.email-container {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.email-icon-wrap {
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: center;
}

.email-icon-wrap svg {
  display: inline-block;
}

.email-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.email-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  color: var(--color-text);
}

.form-input::placeholder {
  color: var(--color-text-faint);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}

.skip-link {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.skip-link:hover {
  color: var(--color-text-muted);
}

/* --- Results --- */
.results-container {
  max-width: var(--content-narrow);
  width: 100%;
  margin: 0 auto;
}

.result-card {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
  animation: fadeSlideIn 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.result-archetype-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-archetype-icon svg {
  width: 56px;
  height: 56px;
}

.result-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.result-archetype-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.result-score-badge {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}

/* --- Spectrum Bar --- */
.spectrum-section {
  margin-bottom: var(--space-8);
  animation: fadeSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.spectrum-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.spectrum-bar {
  position: relative;
  display: flex;
  height: 48px;
  border-radius: var(--radius-lg);
  overflow: visible;
  margin-bottom: var(--space-2);
}

.spectrum-segment {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}

.spectrum-segment:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.spectrum-segment:last-of-type {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.spectrum-segment--liberator {
  flex: 19;
  background: var(--color-liberator);
}

.spectrum-segment--hoverer {
  flex: 15;
  background: var(--color-hoverer);
}

.spectrum-segment--rescuer {
  flex: 14;
  background: var(--color-rescuer);
}

.spectrum-segment--tower {
  flex: 13;
  background: var(--color-tower);
}

.spectrum-segment-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.spectrum-marker {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 4px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.spectrum-marker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-text);
  border: 3px solid var(--color-bg);
  box-shadow: var(--shadow-md);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.spectrum-marker-label {
  position: absolute;
  bottom: -28px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.spectrum-range {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
}

/* --- Description --- */
.result-description {
  margin-bottom: var(--space-8);
  animation: fadeSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

.result-description h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.result-description p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.result-description p:last-child {
  margin-bottom: 0;
}

/* --- Behaviors --- */
.result-behaviors {
  margin-bottom: var(--space-8);
  animation: fadeSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both;
}

.behaviors-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.behavior-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.behavior-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
}

.behavior-text {
  font-size: var(--text-base);
  line-height: 1.5;
}

.behavior-text strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}

.behavior-text span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* --- Share & CTAs --- */
.result-actions {
  margin-bottom: var(--space-8);
  animation: fadeSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.cta-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
}

.cta-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.cta-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.cta-card-icon svg {
  width: 20px;
  height: 20px;
}

.cta-card-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cta-card-text strong {
  font-size: var(--text-sm);
  font-weight: 600;
}

.cta-card-text span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 480px) {
  .cta-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Foundations --- */
.result-foundations {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: fadeSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 500ms both;
}

.foundations-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.foundations-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.foundations-text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Mobile Responsive --- */
@media (max-width: 640px) {
  .section {
    padding: var(--space-8) var(--space-4);
  }

  .landing-headline {
    font-size: var(--text-2xl);
  }

  .landing-sub {
    font-size: var(--text-base);
  }

  .quiz-question {
    font-size: var(--text-lg);
  }

  .result-archetype-name {
    font-size: var(--text-xl);
  }

  .spectrum-segment-label {
    font-size: 10px;
  }

  .result-card {
    padding: var(--space-8) var(--space-4);
  }
}

/* --- Animation utility --- */
.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.fade-in {
  animation: fadeSlideIn 400ms cubic-bezier(0.16, 1, 0.3, 1);
}


/* ===== Paterson Consulting Brand ===== */
.brand-mark {
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.brand-name {
  font-family: 'Cabinet Grotesk', var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text, #28251d);
}
.brand-sub {
  font-family: 'Satoshi', var(--font-body, sans-serif);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b08a2e;
}
[data-theme="dark"] .brand-sub {
  color: #d4a94e;
}
