/* ============================================
   JobLeads Aurora Design System - Big Five Test
   ============================================ */

@font-face {
  font-family: 'Right Grotesk';
  src: url('assets/fonts/right-grotesk-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Right Grotesk';
  src: url('assets/fonts/PPRightGrotesk-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Aurora Colors - PRIMARY (Coral/Pink brand) */
  --color-primary-50: #C52548;   /* Dark burgundy */
  --color-primary-60: #F14A62;   /* CORAL - main brand color! */
  --color-primary-70: #FDA5AF;   /* Light coral */
  --color-primary-80: #FFB4BE;   /* Very light pink */

  /* Aurora Colors - SECONDARY (Green/Olive) */
  --color-secondary-60: #A4AE29;  /* Olive green - logo */
  --color-secondary-90: #B4BC23;  /* Yellow-green */

  /* Aurora Colors - Neutral */
  --color-neutral-10: #100F0E;
  --color-neutral-30: #ECEDEF;
  --color-neutral-40: #D9D6D1;
  --color-neutral-70: #706D68;
  --color-neutral-80: #4A4845;
  --color-neutral-90: #272625;
  --color-neutral-95: #F7F6F4;
  --color-white: #FFFFFF;
  --color-black: #100F0E;

  /* Aurora Colors - Semantic */
  --color-success-40: #0E9638;
  --color-warning-50: #F6AA1C;
  --color-error-40: #C20216;
  --color-info-50: #0091F9;

  /* Aurora Typography */
  --font-heading: 'Right Grotesk', 'PP Right Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Typography sizes - Desktop */
  --h1-desktop: 64px;
  --h2-desktop: 56px;
  --h3-desktop: 40px;
  --body-lg: 20px;
  --body-md: 18px;
  --body-sm: 16px;
  --body-xs: 14px;

  /* Typography sizes - Mobile */
  --h1-mobile: 48px;
  --h2-mobile: 40px;
  --h3-mobile: 32px;

  /* Font weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Line heights */
  --lh-heading: 1.1;
  --lh-body: 1.5;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* Button sizes */
  --btn-large-height: 56px;
  --btn-medium-height: 44px;

  /* Border radius */
  --radius-medium: 8px;
  --radius-large: 12px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(16, 15, 14, 0.08);
  --shadow-md: 0 4px 12px rgba(16, 15, 14, 0.06);
  --shadow-lg: 0 8px 24px rgba(16, 15, 14, 0.08);
}

/* ============================================
   Base Styles
   ============================================ */

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--body-sm);
  line-height: var(--lh-body);
  color: var(--color-neutral-90);
  background: #F5F1EB;
}

/* ============================================
   Typography
   ============================================ */

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: var(--weight-bold);
  margin: 0;
  color: var(--color-black);
}

h1 {
  font-size: var(--h1-mobile);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: var(--h2-mobile);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--body-lg);
  font-weight: var(--weight-semibold);
}

@media (min-width: 1024px) {
  h1 {
    font-size: var(--h1-desktop);
  }

  h2 {
    font-size: var(--h2-desktop);
  }

  h3 {
    font-size: var(--h3-desktop);
  }
}

/* ============================================
   Layout
   ============================================ */

.site-header {
  background: transparent;
  width: 100%;
  height: 64px;
  position: relative;
  z-index: 100;
  box-shadow: none;
}

.header-container {
  max-width: 1040px;
  width: calc(100% - 2rem);
  margin: 0 auto;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
}

.header-nav {
  display: none;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--weight-medium);
  line-height: 27px;
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-primary-60);
}

.header-actions {
  display: none;
}

.button-signup {
  background: #F56462;
  color: var(--color-white);
  border: none;
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  min-height: 36px;
  height: 36px;
  text-decoration: none;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.button-signup:hover,
.button-signup:focus {
  background: var(--color-primary-50);
}

.button-login {
  background: var(--color-white);
  color: var(--color-neutral-10);
  border: none;
  outline: 1px solid var(--color-neutral-10);
  outline-offset: 0;
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  min-height: 36px;
  height: 36px;
  text-decoration: none;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.button-login:hover,
.button-login:focus {
  background: var(--color-neutral-10);
  color: var(--color-white);
}

.app-shell {
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(209deg, rgba(245, 99, 97, 0) 79.17%, rgba(245, 100, 98, 0.9) 99.97%),
    linear-gradient(153deg, rgba(245, 99, 97, 0) 78.96%, rgba(245, 100, 98, 0.9) 100.03%),
    linear-gradient(181deg, #F5F1EB 4.39%, #FFBDBB 99.52%);
  padding: 24px 0 48px;
}

@media (min-width: 768px) {
  .app-shell {
    padding: 24px 0 72px;
  }
}

.screen {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  animation: fadeIn 300ms ease;
}

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

/* ============================================
   Cards
   ============================================ */

.hero-card,
.test-card,
.results-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(237, 231, 225, 0.9);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
}

@media (min-width: 768px) {
  .hero-card,
  .test-card,
  .results-card {
    padding: var(--space-xl);
  }
}

/* ============================================
   Landing Screen
   ============================================ */

.eyebrow {
  margin: 0 0 var(--space-sm);
  font-size: var(--body-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-neutral-70);
}

.hero-subtitle {
  margin: var(--space-md) 0 var(--space-xl);
  max-width: 60ch;
  font-size: var(--body-lg);
  line-height: 1.6;
  color: var(--color-neutral-80);
}

.benefits {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

.benefit-card {
  padding: var(--space-md);
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius-medium);
  background: var(--color-white);
}

.benefit-card strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--body-md);
  margin-bottom: var(--space-xs);
  color: var(--color-black);
}

.benefit-card p {
  margin: 0;
  font-size: var(--body-sm);
  color: var(--color-neutral-80);
}

.benefit-card a {
  color: var(--color-primary-60);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  transition: color 0.2s ease;
}

.benefit-card a:hover,
.benefit-card a:focus {
  color: var(--color-primary-50);
  text-decoration: underline;
}

.disclaimer {
  margin-top: var(--space-md);
  font-size: var(--body-sm);
  color: var(--color-neutral-70);
  font-style: italic;
}

/* ============================================
   Buttons (JobLeads Style)
   ============================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-medium-height);
  padding: 0 var(--space-md);
  border: none;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  cursor: pointer;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.button-primary {
  background: #F56462;
  color: var(--color-white);
}

.button-primary:hover:not(:disabled) {
  background: var(--color-primary-50);
}

.button-primary:active:not(:disabled) {
  background: var(--color-primary-50);
}

.button-primary:disabled {
  background: var(--color-neutral-40);
  color: var(--color-neutral-70);
  cursor: not-allowed;
  opacity: 0.6;
}

.button-secondary {
  background: var(--color-white);
  color: var(--color-neutral-90);
  border: 2px solid var(--color-neutral-40);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--color-neutral-90);
  transform: translateY(-1px);
}

.button-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button:focus-visible {
  outline: 3px solid var(--color-primary-60);
  outline-offset: 2px;
}

/* Large button size (landing CTA) */
#start-button {
  min-height: var(--btn-large-height);
  padding: 0 var(--space-2xl);
  font-size: 20px;
  font-weight: 500;
}

/* ============================================
   Test Screen
   ============================================ */

.progress-header {
  margin-bottom: var(--space-lg);
}

.progress-text {
  margin: 0 0 var(--space-xs);
  font-size: var(--body-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-neutral-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-neutral-30);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 2%;
  background: var(--color-primary-60);
  transition: width 300ms ease;
}

.question-fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.question-legend {
  font-family: var(--font-heading);
  font-size: var(--h3-mobile);
  font-weight: var(--weight-bold);
  line-height: var(--lh-heading);
  color: var(--color-black);
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .question-legend {
    font-size: var(--h3-desktop);
  }
}

/* ============================================
   Likert Scale Radio Buttons
   ============================================ */

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

.likert-option {
  position: relative;
}

.likert-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert-value {
  display: none;
}

.likert-option label {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-neutral-30);
  border-radius: var(--radius-medium);
  background: var(--color-white);
  cursor: pointer;
  font-size: var(--body-md);
  color: var(--color-neutral-90);
  transition: all 200ms ease;
}

.likert-option label:hover {
  border-color: var(--color-primary-60);
  background: rgba(241, 74, 98, 0.04);
}

.likert-option input[type="radio"]:checked + label {
  border-color: var(--color-primary-60);
  background: rgba(241, 74, 98, 0.08);
  color: var(--color-black);
  font-weight: var(--weight-semibold);
}

.likert-option input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--color-primary-60);
  outline-offset: 2px;
}

/* Desktop: horizontal layout */
@media (min-width: 768px) {
  .likert-options {
    flex-direction: row;
    gap: 12px;
    justify-content: space-between;
  }

  .likert-option {
    flex: 1;
    max-width: 180px;
  }

  .likert-option label {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 16px 12px;
    min-height: 90px;
    font-size: 15px;
    line-height: 1.4;
  }
}

/* ============================================
   Navigation
   ============================================ */

.nav-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* ============================================
   Results Screen
   ============================================ */

.results-subtitle {
  margin-top: var(--space-xs);
  font-size: var(--body-md);
  color: var(--color-neutral-80);
}

.results-layout {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .results-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Chart Panel */
.chart-panel {
  padding: var(--space-md);
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius-large);
  background: var(--color-white);
}

#results-chart {
  width: 100%;
  max-height: 400px;
}

/* Fallback Charts */
.chart-fallback {
  display: grid;
  gap: var(--space-md);
}

.fallback-row {
  display: grid;
  gap: var(--space-xs);
}

.fallback-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: var(--weight-semibold);
  font-size: var(--body-sm);
  color: var(--color-neutral-90);
}

.fallback-track {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-neutral-30);
  overflow: hidden;
}

.fallback-fill {
  height: 100%;
  background: var(--color-primary-60);
  border-radius: inherit;
}

/* Trait Cards */
.trait-cards {
  display: grid;
  gap: var(--space-md);
}

.trait-card {
  padding: var(--space-md);
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius-large);
  background: var(--color-white);
}

.trait-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.trait-header h3 {
  font-family: var(--font-heading);
  font-size: var(--body-lg);
  font-weight: var(--weight-bold);
  color: var(--color-black);
  margin: 0;
}

.score-pill {
  font-family: var(--font-body);
  font-size: var(--body-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-neutral-90);
  background: var(--color-neutral-30);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.trait-level {
  display: inline-block;
  font-size: var(--body-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xs);
}

.trait-level.level-high {
  color: var(--color-success-40);
}

.trait-level.level-medium {
  color: var(--color-warning-50);
}

.trait-level.level-low {
  color: var(--color-error-40);
}

.trait-context {
  margin: 0;
  font-size: var(--body-sm);
  line-height: var(--lh-body);
  color: var(--color-neutral-80);
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  width: min(960px, calc(100% - 2rem));
  margin: var(--space-xl) auto var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-neutral-30);
  text-align: center;
  font-size: var(--body-sm);
  color: var(--color-neutral-70);
}

.site-footer a {
  color: var(--color-primary-60);
  text-decoration: none;
  font-weight: var(--weight-semibold);
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   Modal
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(16, 15, 14, 0.6);
  backdrop-filter: blur(4px);
}

.modal-panel {
  width: min(480px, 100%);
  background: var(--color-white);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  position: relative;
}

.modal-panel h3 {
  font-family: var(--font-heading);
  font-size: var(--body-lg);
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-sm);
  color: var(--color-black);
}

.modal-panel p {
  margin: 0 0 var(--space-md);
  font-size: var(--body-sm);
  color: var(--color-neutral-80);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.icon-button {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  min-height: 32px;
  padding: var(--space-xs);
  border: none;
  background: transparent;
  color: var(--color-neutral-70);
  cursor: pointer;
  font-size: var(--body-xs);
  font-weight: var(--weight-medium);
}

.icon-button:hover {
  color: var(--color-neutral-90);
}

/* ============================================
   Accessibility
   ============================================ */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 2000;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary-60);
  color: var(--color-white);
  border-radius: var(--radius-medium);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus {
  top: var(--space-md);
  opacity: 1;
  pointer-events: auto;
}

:focus-visible {
  outline: 3px solid var(--color-primary-60);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
