/* FEMINENCE Posture Quiz - Editorial/Luxury Wellness Design */
/* Based on Style Guide v2.3 - Peach/Coral Palette with TWKLausanne Font */

/* ============================================
   Font Face Definitions (TWKLausanne)
   ============================================ */
@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Light'),
       url('assets/TWKLausanne-200.woff2') format('woff2'),
       url('assets/TWKLausanne-200.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Regular'),
       url('assets/TWKLausanne-400.woff2') format('woff2'),
       url('assets/TWKLausanne-400.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Bold'),
       url('assets/TWKLausanne-700.woff2') format('woff2'),
       url('assets/TWKLausanne-700.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Primary Accent - Peach/Coral */
  --color-accent: #F5A68C;
  --color-accent-hover: #E8927A;
  --color-accent-light: #F7B8A2;

  /* Backgrounds */
  --color-bg-dark: #1A1A1A;
  --color-bg-warm: #F8F5F0;
  --color-bg-cream: #FCFBF8;
  --color-bg-white: #FFFFFF;

  /* Text */
  --color-text-dark: #1A1A1A;
  --color-text-light: #FFFFFF;
  --color-text-muted: #6B6B6B;

  /* Gradients */
  --gradient-card: linear-gradient(135deg, #F5A68C 0%, #E8927A 50%, #7DD3C0 100%);
  --gradient-accent: linear-gradient(135deg, #F5A68C 0%, #E8927A 100%);

  /* Result Colors */
  --color-result-1: #7DD3C0;
  --color-result-2: #F5A68C;
  --color-result-3: #E8927A;
  --color-result-4: #D97B6B;

  /* Layout */
  --page-width: 800px;
  --border-radius-pill: 50px;
  --border-radius-card: 0;
}

/* ============================================
   Base Styles
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'TWKLausanne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-text-light);
  background-color: var(--color-bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */
h1, .h1 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: 'TWKLausanne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-lg {
  padding: 20px 40px;
  font-size: 16px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-dark);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-text-light);
}

.btn-ghost:hover {
  background-color: var(--color-text-light);
  color: var(--color-bg-dark);
}

.btn-arrow {
  font-size: 18px;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
  color: var(--color-accent);
}

@media (max-width: 767px) {
  .nav-link {
    display: none;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-banner {
  height: 32px;
  width: auto;
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: inline-flex;
  }
}

/* ============================================
   Quiz Main
   ============================================ */
.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 0 60px;
  min-height: calc(100vh - 120px);
}

/* ============================================
   Quiz Screens
   ============================================ */
.quiz-screen {
  display: none;
  width: 100%;
}

.quiz-screen.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Start Screen
   ============================================ */
.quiz-intro {
  text-align: center;
}

.quiz-badge {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--color-accent);
  color: var(--color-text-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  border-radius: var(--border-radius-pill);
}

.quiz-intro .h1 {
  margin-bottom: 24px;
}

.quiz-description {
  font-size: 18px;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.quiz-meta {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  opacity: 0.7;
}

.meta-icon {
  color: var(--color-accent);
}

/* ============================================
   Progress Bar
   ============================================ */
.quiz-progress {
  margin-bottom: 48px;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-text {
  font-size: 14px;
  opacity: 0.6;
  text-align: center;
  display: block;
}

/* ============================================
   Question Card
   ============================================ */
.question-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.question-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.question-number {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(245, 166, 140, 0.2);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  border-radius: var(--border-radius-pill);
}

.question-text {
  margin-bottom: 40px;
  text-align: center;
}

/* ============================================
   Answer Buttons
   ============================================ */
.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-card);
  color: var(--color-text-light);
  font-family: 'TWKLausanne', sans-serif;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.answer-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
  transform: translateX(8px);
}

.answer-btn.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-dark);
}

.answer-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.answer-btn:hover .answer-number {
  background: var(--color-accent);
  color: var(--color-text-dark);
}

.answer-btn.selected .answer-number {
  background: var(--color-text-dark);
  color: var(--color-accent);
}

.answer-text {
  flex: 1;
}

/* ============================================
   Posture Insight
   ============================================ */
.posture-insight {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
  background: rgba(245, 166, 140, 0.1);
  border-left: 3px solid var(--color-accent);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.insight-icon {
  color: var(--color-accent);
  font-size: 20px;
  flex-shrink: 0;
}

.insight-text {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.6;
}

.insight-text strong {
  color: var(--color-accent);
}

/* ============================================
   Results Screen
   ============================================ */
.results-card {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.results-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.results-header {
  margin-bottom: 40px;
}

.results-badge {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--color-accent);
  color: var(--color-text-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  border-radius: var(--border-radius-pill);
}

.results-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-number {
  font-size: 72px;
  font-weight: 200;
  line-height: 1;
  color: var(--color-accent);
}

.score-label {
  font-size: 14px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   Results Meter
   ============================================ */
.results-meter {
  max-width: 400px;
  margin: 0 auto 40px;
}

.meter-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.meter-fill {
  height: 100%;
  background: var(--gradient-card);
  border-radius: 4px;
  transition: width 1s ease;
}

.meter-marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--color-text-light);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: left 1s ease;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Results Content
   ============================================ */
.results-title {
  margin-bottom: 24px;
}

.results-title.result-level-1 {
  color: var(--color-result-1);
}

.results-title.result-level-2 {
  color: var(--color-result-2);
}

.results-title.result-level-3 {
  color: var(--color-result-3);
}

.results-title.result-level-4 {
  color: var(--color-result-4);
}

.results-description {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.results-advice {
  font-size: 16px;
  opacity: 0.7;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ============================================
   Results CTA
   ============================================ */
.results-cta {
  margin-bottom: 24px;
}

.results-cta .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.retake-btn {
  opacity: 0.7;
}

.retake-btn:hover {
  opacity: 1;
}

/* ============================================
   Community CTA
   ============================================ */
.community-cta {
  margin-top: 40px;
  padding-top: 40px;
  text-align: center;
}

.community-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.community-divider::before,
.community-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.community-divider span {
  font-size: 14px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.community-cta h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.community-cta p {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 20px;
}

.community-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  background-color: var(--color-bg-white);
  color: var(--color-text-dark);
}

.btn-secondary:hover {
  background-color: var(--color-bg-cream);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--color-bg-dark);
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  text-align: center;
}

.copy {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.footer-company {
  font-size: 12px;
  opacity: 0.4;
  margin-bottom: 16px;
}

.footer-links {
  font-size: 12px;
  opacity: 0.5;
}

.footer-links a {
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.footer-links .separator {
  margin: 0 12px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .quiz-meta {
    flex-direction: column;
    gap: 16px;
  }

  .answer-btn {
    padding: 16px 20px;
  }

  .answer-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .score-number {
    font-size: 56px;
  }

  .results-cta .btn {
    padding: 16px 24px;
    font-size: 14px;
  }
}
