/* ═══════════════════════════════════════════
   HEX PROFILE — Design System v1
   Biomorphic Minimalism × Spectral Gradients
   ═══════════════════════════════════════════ */

/* --- CSS Variables --- */
:root {
  /* Depth layers */
  --bg-deep: #06060b;
  --bg-base: #0c0c14;
  --bg-raised: #12121e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  /* Text */
  --text-primary: #f0ebe4;
  --text-secondary: #a09a93;
  --text-muted: #5c5752;
  --text-accent: #c4b5fd;

  /* Axis gradients (pole 0 → pole 100) */
  --axis-aura-0: #7c5ce7;
  --axis-aura-100: #f4a460;
  --axis-prism-0: #00d4aa;
  --axis-prism-100: #e8e8e8;
  --axis-core-0: #4a9eff;
  --axis-core-100: #e8958a;
  --axis-tide-0: #64748b;
  --axis-tide-100: #38bdf8;
  --axis-depth-0: #fbbf24;
  --axis-depth-100: #8b5cf6;
  --axis-signal-0: #3b82f6;
  --axis-signal-100: #fb9287;

  /* Accent */
  --accent: #a78bfa;
  --accent-glow: rgba(167, 139, 250, 0.3);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 700ms;
  --duration-reveal: 1200ms;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Background grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow orbs */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 92, 231, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

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

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 720px;
}

.section {
  padding: var(--space-4xl) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-lg) 0;
  transition: background var(--duration-base) var(--ease-out-expo),
              backdrop-filter var(--duration-base) var(--ease-out-expo);
}

.nav.scrolled {
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 101;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--duration-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-fast) var(--ease-out-expo);
  transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--duration-base) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--axis-aura-0), var(--axis-depth-100));
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-large {
  padding: 1.1rem 2.5rem;
  font-size: 1.1rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--duration-base) var(--ease-out-expo);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
}

.card-glass {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

/* --- Hex Ring Visualization --- */
.hex-ring-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.hex-ring-svg {
  width: 100%;
  height: 100%;
}

.hex-ring-axis-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  fill: var(--text-muted);
  text-anchor: middle;
  letter-spacing: 0.05em;
}

.hex-ring-pole-label {
  font-size: 0.6rem;
}

.hex-ring-polygon {
  fill: rgba(167, 139, 250, 0.15);
  stroke: rgba(167, 139, 250, 0.6);
  stroke-width: 2;
  transition: all 1.5s var(--ease-out-expo);
}

.hex-ring-polygon.animating {
  animation: hexReveal 1.5s var(--ease-out-expo) forwards;
}

@keyframes hexReveal {
  from {
    opacity: 0;
    transform-origin: center;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hex-ring-spoke {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.hex-ring-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.hex-ring-dot {
  fill: white;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6));
}

/* --- Quiz Styles --- */
.quiz-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-4xl) 0;
}

.quiz-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 101;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--axis-aura-0), var(--axis-depth-100));
  transition: width var(--duration-slow) var(--ease-out-expo);
  border-radius: 0 2px 2px 0;
}

.quiz-progress-text {
  position: fixed;
  top: 12px;
  right: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 101;
}

.quiz-question-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  opacity: 1;
  transition: opacity var(--duration-base) var(--ease-out-expo),
              transform var(--duration-base) var(--ease-out-expo);
}

.quiz-question-wrapper.transitioning {
  opacity: 0;
  transform: translateY(12px);
}

.quiz-question-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
}

.quiz-question-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.3;
  margin-bottom: var(--space-2xl);
  color: var(--text-primary);
}

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

.quiz-option {
  position: relative;
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.quiz-option:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateX(4px);
}

.quiz-option.selected {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--text-primary);
}

.quiz-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.quiz-option.selected .quiz-option-radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-xl);
}

.quiz-btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  transition: color var(--duration-fast);
}

.quiz-btn-back:hover {
  color: var(--text-primary);
}

/* Likert scale */
.quiz-likert {
  display: flex;
  gap: var(--space-sm);
  justify-content: space-between;
  margin-top: var(--space-sm);
}

.quiz-likert-btn {
  flex: 1;
  padding: 1rem 0.5rem;
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  text-align: center;
}

.quiz-likert-btn:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.quiz-likert-btn.selected {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
  color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.15);
}

.quiz-likert-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Results --- */
.results-hero {
  text-align: center;
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.results-archetype-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--axis-aura-0), var(--axis-depth-100), var(--axis-signal-0));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-hex-code {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-lg);
}

.results-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

.results-essence {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-accent);
  margin: var(--space-lg) 0;
}

/* --- Validity Warnings (results) --- */
.validity-warning-banner {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.validity-warning-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--warning);
  text-align: center;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.validity-warning-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  border-top: 1px solid rgba(251, 191, 36, 0.1);
}

.validity-warning-item:first-of-type {
  border-top: none;
}

.validity-warning-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.validity-warning-item strong {
  display: block;
  color: var(--warning);
  margin-bottom: 2px;
}

/* Axis bars */
.axis-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 560px;
  margin: 0 auto;
}

.axis-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 48px;
  align-items: center;
  gap: var(--space-md);
}

.axis-bar-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
}

.axis-bar-poles {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.axis-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.axis-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s var(--ease-out-expo);
}

.axis-bar-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
}

/* Share card */
.share-card {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.share-card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.share-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* Growth Edge */
.growth-edge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}

.growth-edge-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.growth-edge-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.growth-edge-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(10px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  max-width: 800px;
  margin-bottom: var(--space-lg);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--axis-aura-0), var(--axis-depth-100), var(--axis-signal-0));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-2xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Hex animation in hero */
.hero-hex-preview {
  width: 200px;
  height: 200px;
  margin: var(--space-2xl) auto;
  opacity: 0.5;
}

.hero-hex-preview svg {
  animation: floatHex 6s ease-in-out infinite;
}

@keyframes floatHex {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(2deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Axis Showcase --- */
.axis-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.axis-card {
  padding: var(--space-xl);
  border-left: 3px solid transparent;
  transition: all var(--duration-base) var(--ease-out-expo);
}

.axis-card:hover {
  border-left-color: var(--accent);
  background: rgba(167, 139, 250, 0.04);
}

.axis-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.axis-card-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.axis-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.axis-card-poles {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
}

.axis-card-pole {
  color: var(--text-muted);
}

.axis-card-pole.active {
  color: var(--text-primary);
}

.axis-card-connector {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--text-muted), var(--accent), var(--text-muted));
  margin: 0 var(--space-sm);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Email Capture --- */
.email-capture {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.email-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.email-input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--duration-fast);
}

.email-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.4);
}

.email-input::placeholder {
  color: var(--text-muted);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  z-index: 200;
  backdrop-filter: blur(20px);
  transition: transform var(--duration-base) var(--ease-out-back);
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.3);
}

/* --- Domain Toggle (results) --- */
.domain-toggle {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.domain-toggle-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.domain-toggle-btn.active {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* --- Touch & Mobile-Friendly Base Improvements --- */
button, .btn, .quiz-option, .quiz-likert-btn, .nav-link, a[href] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.quiz-option, .quiz-likert-btn, .btn, .nav-link, .nav-logo {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.btn { display: inline-flex; align-items: center; justify-content: center; }
input, select, textarea {
  font-size: max(16px, 0.95rem); /* Prevent iOS zoom on focus */
}

/* ---- Safe Area Handling (iPhone notch / Dynamic Island) ---- */
@supports (padding: max(0px)) {
  .nav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .nav-inner { padding-left: max(var(--space-xl), env(safe-area-inset-left)); padding-right: max(var(--space-xl), env(safe-area-inset-right)); }
  .container { padding-left: max(var(--space-xl), env(safe-area-inset-left)); padding-right: max(var(--space-xl), env(safe-area-inset-right)); }
  .quiz-progress-text { right: max(var(--space-xl), env(safe-area-inset-right)); }
  @media (max-width: 768px) {
    .nav-inner { padding-left: max(var(--space-lg), env(safe-area-inset-left)); padding-right: max(var(--space-lg), env(safe-area-inset-right)); }
    .container { padding-left: max(var(--space-lg), env(safe-area-inset-left)); padding-right: max(var(--space-lg), env(safe-area-inset-right)); }
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-4xl: 3rem;
    --space-3xl: 2.5rem;
    --space-2xl: 2rem;
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .nav-inner {
    padding: 0 var(--space-lg);
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-xl);
    padding: var(--space-4xl) var(--space-xl);
    background: rgba(12, 12, 20, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out-expo);
    z-index: 100;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.15rem;
    padding: var(--space-sm) 0;
  }

  .nav-links .btn {
    margin-top: var(--space-sm);
    width: 100%;
    justify-content: center;
  }

  /* Overlay behind mobile menu */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--duration-base);
  }

  .nav-overlay.open {
    display: block;
    opacity: 1;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .hero {
    padding-top: var(--space-4xl);
    min-height: auto;
    padding-bottom: var(--space-2xl);
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-hex-preview {
    width: 160px;
    height: 160px;
    margin-top: var(--space-lg);
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .axis-showcase {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .quiz-question-text {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    margin-bottom: var(--space-xl);
  }

  .quiz-question-wrapper {
    padding: 0 var(--space-md);
  }

  .quiz-likert {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .quiz-likert-btn {
    flex: 0 0 calc(33.33% - var(--space-xs));
    padding: 0.85rem 0.3rem;
    font-size: 0.82rem;
  }

  .quiz-likert-labels {
    font-size: 0.7rem;
  }

  .quiz-progress-text {
    right: 3.5rem;
    top: 19px;
  }

  .quiz-nav {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: 0 var(--space-md);
  }

  .quiz-nav span {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: var(--space-sm);
  }

  .axis-bar-row {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .axis-bar-row .axis-bar-label {
    text-align: left;
    font-size: 0.8rem;
  }

  .axis-bar-row .axis-bar-poles {
    font-size: 0.7rem;
  }

  .axis-bar-row .axis-bar-value {
    text-align: left;
    font-size: 0.75rem;
  }

  .email-form {
    flex-direction: column;
  }

  .share-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Domain toggle: horizontal scroll instead of cramming */
  .domain-toggle {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .domain-toggle::-webkit-scrollbar {
    display: none;
  }

  .domain-toggle-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }

  /* Hex ring container constrains to viewport */
  .hex-ring-container {
    max-width: 100%;
    aspect-ratio: 1;
  }

  /* Axis breakdown header stacks */
  .axis-breakdown-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  /* Cards on mobile — reduce padding */
  .card {
    padding: var(--space-lg);
  }

  .results-hero {
    padding-top: 5rem;
    padding-bottom: var(--space-lg);
  }

  /* Results action buttons: stack on mobile */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Compatibility map — stack inline flex items */
  .compat-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .compat-row span:last-child {
    text-align: left;
  }

  /* Career list — allow natural wrap */
  .career-text {
    word-break: break-word;
  }

  /* Quiz container — ensure full height */
  .quiz-container {
    padding-top: 4rem;
    padding-bottom: var(--space-xl);
  }

  /* Blog / article pages */
  .article-header {
    padding: 6rem 0 2rem !important;
  }

  .article-header h1 {
    font-size: clamp(1.5rem, 5vw, 2.25rem) !important;
  }

  .article-body p,
  .article-body li {
    font-size: 1rem !important;
  }

  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg);
  }
}

/* ---- 600px (large phones / small tablets) ---- */
@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .axis-showcase {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .quiz-likert-btn {
    flex: 0 0 calc(33.33% - var(--space-xs));
    font-size: 0.78rem;
  }

  .results-archetype-name {
    font-size: clamp(1.6rem, 7vw, 2.25rem);
  }

  .results-tagline {
    font-size: 1rem;
  }

  .card {
    padding: var(--space-md);
  }

  .btn-large {
    padding: 0.9rem 1.75rem;
    font-size: 0.95rem;
  }
}

/* ---- 480px (iPhone 14/15/Pro, Galaxy S2x) ---- */
@media (max-width: 480px) {
  :root {
    --space-4xl: 2.5rem;
    --space-3xl: 2rem;
    --space-2xl: 1.5rem;
    --space-xl: 1.25rem;
    --space-lg: 1rem;
  }

  .nav-links {
    width: 100vw;
    width: 100dvw;
  }

  .hero {
    padding-top: 5rem;
    padding-bottom: var(--space-xl);
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .hero-subtitle {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
  }

  .hero-hex-preview {
    width: 130px;
    height: 130px;
  }

  .btn-large {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }

  .quiz-container {
    padding-top: 3.5rem;
  }

  .quiz-question-text {
    font-size: clamp(1.05rem, 5vw, 1.2rem);
    margin-bottom: var(--space-lg);
  }

  .quiz-question-wrapper {
    padding: 0 var(--space-sm);
  }

  .quiz-option {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    gap: var(--space-sm);
  }

  .quiz-option-radio {
    width: 18px;
    height: 18px;
  }

  .quiz-likert {
    gap: 4px;
  }

  .quiz-likert-btn {
    flex: 0 0 calc(33.33% - 4px);
    padding: 0.7rem 0.2rem;
    font-size: 0.74rem;
    border-radius: var(--radius-sm);
  }

  .quiz-likert-labels {
    font-size: 0.65rem;
  }

  .quiz-nav {
    padding: 0 var(--space-sm);
    flex-wrap: nowrap;
  }

  .quiz-btn-back {
    font-size: 0.8rem;
  }

  .quiz-progress-text {
    right: 1rem;
    top: 1rem;
    font-size: 0.72rem;
  }

  .results-hero {
    padding-top: 4.5rem;
  }

  .results-archetype-name {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .results-hex-code {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .results-essence {
    font-size: 1.1rem;
  }

  .results-tagline {
    font-size: 0.9rem;
  }

  .axis-bars {
    gap: var(--space-md);
  }

  .share-card {
    padding: var(--space-lg);
  }

  .share-card-title {
    font-size: 1.2rem;
  }

  .growth-edge {
    padding: var(--space-lg);
  }

  .growth-edge-title {
    font-size: 1.1rem;
  }

  .domain-toggle-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.65rem;
  }

  .card {
    padding: var(--space-md);
  }

  .hex-ring-container {
    max-width: 300px;
    margin: 0 auto;
  }

  .hex-ring-axis-label {
    font-size: 0.55rem;
  }

  .hex-ring-pole-label {
    font-size: 0.48rem;
  }
}

/* ---- 380px (iPhone SE, Galaxy S, small Androids) ---- */
@media (max-width: 380px) {
  :root {
    --space-4xl: 2rem;
    --space-3xl: 1.75rem;
    --space-2xl: 1.25rem;
    --space-xl: 1rem;
    --space-lg: 0.75rem;
  }

  .nav .btn {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .hero-title {
    font-size: clamp(1.5rem, 8vw, 1.8rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .hero-hex-preview {
    width: 110px;
    height: 110px;
  }

  .btn-large {
    padding: 0.8rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .quiz-question-text {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .quiz-option {
    padding: 0.8rem 0.9rem;
    font-size: 0.85rem;
  }

  .quiz-option-radio {
    width: 16px;
    height: 16px;
  }

  .quiz-likert-btn {
    flex: 0 0 calc(33.33% - 3px);
    padding: 0.65rem 0.15rem;
    font-size: 0.7rem;
  }

  .results-archetype-name {
    font-size: clamp(1.35rem, 8vw, 1.6rem);
  }

  .results-hex-code {
    font-size: 0.9rem;
  }

  .results-essence {
    font-size: 1rem;
  }

  .share-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
  }

  .share-card-title {
    font-size: 1.1rem;
  }

  .growth-edge {
    padding: var(--space-md);
  }

  .domain-toggle-btn {
    font-size: 0.68rem;
    padding: 0.35rem 0.6rem;
  }

  .feature-card {
    padding: var(--space-lg) var(--space-md);
  }

  .feature-icon {
    font-size: 1.5rem;
  }

  .feature-title {
    font-size: 1.05rem;
  }

  .hex-ring-container {
    max-width: 240px;
  }

  .hex-ring-axis-label {
    font-size: 0.48rem;
  }

  .hex-ring-pole-label {
    font-size: 0.42rem;
  }

  .quiz-nav button {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }
}

/* --- Instagram Share Modal --- */
.ig-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
}

.ig-share-card {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 480px;
  width: 100%;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.ig-preview-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-deep);
  max-height: 60vh;
}

.ig-preview-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.ig-preview-loading {
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ig-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  animation: igSpin 0.8s linear infinite;
}

@keyframes igSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .ig-share-card {
    padding: var(--space-lg);
  }
  .ig-share-card .share-buttons {
    flex-direction: column;
  }
  .ig-share-card .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .ig-share-overlay {
    padding: var(--space-sm);
  }
  .ig-share-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--text-accent); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.hidden { display: none !important; }
.fade-in {
  animation: fadeIn var(--duration-slow) var(--ease-out-expo) forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======= UI FIXES — Aug 2026 ======= */

/* Prevent aggressive word-breaking on body */
body {
  word-break: normal;
  overflow-wrap: normal;
}

/* Only break words inside specific text containers */
.quiz-option span:last-child,
.card p,
.hero-subtitle,
.results-tagline,
.career-text {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Button spacing fixes */
.share-buttons { gap: 0.75rem; }
.share-buttons .btn { margin: 0; }
#saveCard .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }
#savedButtons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
#savedButtons p { width: 100%; margin-bottom: 0.25rem; }

/* Quiz nav spacing */
.quiz-nav { gap: 0.75rem; }

/* Results hero padding */
.results-hero { padding-bottom: 3rem; }

/* Card text spacing */
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0.75rem; }

/* Mobile nav button spacing */
@media (max-width: 768px) {
  .nav-links .btn { margin-left: 0; margin-top: 0.5rem; }
}
