/*
 * Feng Shui Guide - Main Stylesheet
 * Authentic Chinese Feng Shui for Your Space
 * Color Palette: Jade Green, Gold, Cream
 */

/* ===== CSS Variables ===== */
:root {
  /* Primary Colors - Jade & Gold */
  --jade-dark: #1a5f4a;
  --jade: #2d8b6f;
  --jade-light: #4aa88a;
  --jade-pale: #e8f4f0;

  --gold-dark: #b8860b;
  --gold: #d4a84b;
  --gold-light: #f0d78c;
  --gold-pale: #fdf8e8;

  /* Neutral Colors - Improved contrast for accessibility */
  --cream: #faf8f5;
  --cream-dark: #f0ebe3;
  --charcoal: #2c2c2c;
  --gray-dark: #4a4a4a;
  --gray: #555555; /* Darkened from #6b6b6b for WCAG AA contrast */
  --gray-light: #666666; /* Darkened from #9a9a9a for WCAG AA contrast */
  --white: #ffffff;

  /* Accent Colors */
  --red-auspicious: #c41e3a;
  --red-light: #f8e8eb;
  --water-blue: #4a90a4;
  --earth-brown: #8b7355;
  --wood-green: #5d8a66;
  --fire-orange: #d35400;
  --metal-silver: #8c8c8c;

  /* Typography */
  --font-primary: 'Cormorant Garamond', Georgia, serif;
  --font-secondary: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-chinese: 'Noto Serif SC', 'Songti SC', serif;

  /* 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;

  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
}

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

html {
  font-size: 18px; /* Increased base font for better readability */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  font-size: 1rem;
  line-height: 1.8; /* Increased line height for readability */
  color: var(--charcoal);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* Skip Navigation Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--gold);
  color: var(--charcoal);
  padding: 1rem 1.5rem;
  z-index: 10000;
  font-weight: 600;
  text-decoration: underline;
}

.skip-link:focus {
  top: 0;
}

/* High Contrast Focus States for Keyboard Navigation */
*:focus {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.3;
  color: var(--charcoal);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

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

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
}

.chinese-text {
  font-family: var(--font-chinese);
}

.tagline {
  font-family: var(--font-primary);
  font-style: italic;
  color: var(--gray);
  font-size: 1.125rem;
}

a {
  color: var(--jade);
  text-decoration: underline; /* Always underline links for clarity */
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--jade-dark);
  text-decoration-thickness: 2px;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--sm {
  max-width: var(--container-sm);
}

.container--md {
  max-width: var(--container-md);
}

.container--lg {
  max-width: var(--container-lg);
}

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

.section--cream {
  background-color: var(--cream);
}

.section--white {
  background-color: var(--white);
}

.section--jade {
  background-color: var(--jade);
  color: var(--white);
}

.section--jade h1,
.section--jade h2,
.section--jade h3 {
  color: var(--white);
}

.section--gold-pale {
  background-color: var(--gold-pale);
}

/* ===== Header & Navigation ===== */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--container-xl);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo__icon {
  width: 48px;
  height: 48px;
}

.logo__text {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--jade-dark);
}

.logo__tagline {
  font-size: 0.75rem;
  color: var(--gray);
  display: block;
  margin-top: -4px;
}

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

.nav__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-dark);
  transition: color var(--transition-fast);
  position: relative;
  text-decoration: none; /* Nav uses underline effect */
  padding: 0.5rem 0.25rem;
  min-height: 44px; /* Minimum touch target */
  display: inline-flex;
  align-items: center;
}

.nav__link:hover {
  color: var(--jade);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width var(--transition-normal);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  background-color: var(--jade);
  color: var(--white) !important;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none; /* Button style */
  min-height: 44px; /* Minimum touch target */
}

.nav__cta:hover {
  background-color: var(--jade-dark);
  color: var(--white) !important;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--charcoal);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--jade-dark) 0%, var(--jade) 50%, var(--jade-light) 100%);
  color: var(--white);
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%23ffffff' stroke-width='0.5' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--gold-light);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__title {
  color: var(--white);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero__chinese {
  font-family: var(--font-chinese);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.5em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none; /* Buttons should not be underlined */
  transition: all var(--transition-normal);
  min-height: 48px; /* Minimum touch target for accessibility */
}

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

.btn--primary:hover {
  background-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: var(--white);
  color: var(--jade);
  border: 2px solid var(--jade);
}

.btn--secondary:hover {
  background-color: var(--jade);
  color: var(--white);
}

.btn--ghost {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--ghost:hover {
  background-color: var(--white);
  color: var(--jade);
}

.btn--large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.125rem;
}

.btn--small {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

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

/* ===== Cards ===== */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__header {
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--jade-pale) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--cream-dark);
}

.card__body {
  padding: var(--space-xl);
}

.card__footer {
  padding: var(--space-lg);
  background-color: var(--cream);
  border-top: 1px solid var(--cream-dark);
}

/* ===== Pricing Cards ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.pricing-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pricing-card--featured {
  border: 3px solid var(--gold);
}

.pricing-card--featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--gold);
  color: var(--charcoal);
  padding: var(--space-xs) var(--space-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom-left-radius: var(--radius-md);
}

.pricing-card__header {
  padding: var(--space-xl);
  text-align: center;
  background: linear-gradient(135deg, var(--jade-pale) 0%, var(--white) 100%);
}

.pricing-card--featured .pricing-card__header {
  background: linear-gradient(135deg, var(--gold-pale) 0%, var(--white) 100%);
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--jade-dark);
  margin-bottom: var(--space-sm);
}

.pricing-card__price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}

.pricing-card__price-original {
  font-size: 1.25rem;
  color: var(--gray-light);
  text-decoration: line-through;
  margin-right: var(--space-sm);
}

.pricing-card__period {
  font-size: 0.875rem;
  color: var(--gray);
}

.pricing-card__body {
  padding: var(--space-xl);
}

.pricing-card__features {
  list-style: none;
}

.pricing-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--gray-dark);
}

.pricing-card__feature::before {
  content: '✓';
  color: var(--jade);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card__footer {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--charcoal);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-secondary);
  font-size: 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-md);
  background-color: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(45, 139, 111, 0.1);
}

.form-input::placeholder {
  color: var(--gray-light);
}

.form-hint {
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: var(--space-xs);
}

/* ===== Quiz Styles ===== */
.quiz-container {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl);
  max-width: 600px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.quiz-progress__step {
  flex: 1;
  height: 4px;
  background-color: var(--cream-dark);
  border-radius: 2px;
  transition: background-color var(--transition-normal);
}

.quiz-progress__step--active {
  background-color: var(--jade);
}

.quiz-progress__step--completed {
  background-color: var(--gold);
}

.quiz-step {
  display: none;
}

.quiz-step--active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.quiz-question {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--jade-dark);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.quiz-options {
  display: grid;
  gap: var(--space-md);
}

.quiz-option {
  display: block;
  padding: var(--space-lg);
  background-color: var(--cream);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.quiz-option:hover {
  background-color: var(--jade-pale);
  border-color: var(--jade-light);
}

.quiz-option--selected {
  background-color: var(--jade-pale);
  border-color: var(--jade);
}

.quiz-option input {
  display: none;
}

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

/* ===== Results Section ===== */
.results-container {
  max-width: 900px;
  margin: 0 auto;
}

.kua-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  margin: 0 auto var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.kua-badge__number {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.direction-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.direction-card--auspicious {
  border-left: 4px solid var(--jade);
}

.direction-card--inauspicious {
  border-left: 4px solid var(--red-auspicious);
}

.direction-card__name {
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: var(--space-xs);
}

.direction-card__type {
  font-size: 0.875rem;
  color: var(--gray);
}

/* ===== Element Icons ===== */
.element-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
}

.element-icon--water {
  background-color: rgba(74, 144, 164, 0.15);
  color: var(--water-blue);
}

.element-icon--wood {
  background-color: rgba(93, 138, 102, 0.15);
  color: var(--wood-green);
}

.element-icon--fire {
  background-color: rgba(211, 84, 0, 0.15);
  color: var(--fire-orange);
}

.element-icon--earth {
  background-color: rgba(139, 115, 85, 0.15);
  color: var(--earth-brown);
}

.element-icon--metal {
  background-color: rgba(140, 140, 140, 0.15);
  color: var(--metal-silver);
}

/* ===== Compass Visual ===== */
.compass {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
  border: 3px solid var(--gold);
  position: relative;
  margin: var(--space-xl) auto;
  box-shadow: var(--shadow-lg);
}

.compass__direction {
  position: absolute;
  font-weight: 600;
  font-size: 0.875rem;
  transform: translate(-50%, -50%);
}

.compass__direction--n { top: 8%; left: 50%; }
.compass__direction--ne { top: 20%; left: 80%; }
.compass__direction--e { top: 50%; left: 92%; }
.compass__direction--se { top: 80%; left: 80%; }
.compass__direction--s { top: 92%; left: 50%; }
.compass__direction--sw { top: 80%; left: 20%; }
.compass__direction--w { top: 50%; left: 8%; }
.compass__direction--nw { top: 20%; left: 20%; }

.compass__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--jade) 0%, var(--jade-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-chinese);
  font-size: 1.5rem;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

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

.feature-card__icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.feature-card__title {
  font-size: 1.25rem;
  color: var(--jade-dark);
  margin-bottom: var(--space-md);
}

.feature-card__description {
  color: var(--gray);
}

/* ===== Testimonials ===== */
.testimonial-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-primary);
  font-size: 4rem;
  color: var(--jade-pale);
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  line-height: 1;
}

.testimonial-card__text {
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--jade-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--jade);
}

.testimonial-card__name {
  font-weight: 600;
  color: var(--charcoal);
}

.testimonial-card__location {
  font-size: 0.875rem;
  color: var(--gray);
}

/* ===== Footer ===== */
.footer {
  background-color: var(--charcoal);
  color: var(--white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.footer__tagline {
  color: var(--gray-light);
  font-size: 0.875rem;
}

.footer__heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__links {
  list-style: none;
}

.footer__link {
  color: #cccccc; /* Lighter for better contrast on dark background */
  display: block;
  padding: var(--space-sm) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copyright {
  color: var(--gray-light);
  font-size: 0.875rem;
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  color: var(--gray-light);
  font-size: 0.875rem;
}

/* ===== Bagua Diagram ===== */
.bagua-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 400px;
  margin: var(--space-xl) auto;
  aspect-ratio: 1;
}

.bagua-cell {
  background-color: var(--white);
  border: 1px solid var(--cream-dark);
  padding: var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.bagua-cell:hover {
  background-color: var(--jade-pale);
  transform: scale(1.02);
}

.bagua-cell--center {
  background-color: var(--gold-pale);
}

.bagua-cell__direction {
  font-weight: 700;
  color: var(--jade-dark);
  font-size: 0.75rem;
}

.bagua-cell__name {
  font-size: 0.875rem;
  color: var(--charcoal);
}

.bagua-cell__chinese {
  font-family: var(--font-chinese);
  color: var(--gray);
  font-size: 0.875rem;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-jade { color: var(--jade); }
.text-gold { color: var(--gold); }
.text-gray { color: var(--gray); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mt-4 { margin-top: var(--space-3xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.mb-4 { margin-bottom: var(--space-3xl); }

.py-1 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-2 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-3 { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-4 { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

.hidden { display: none; }
.visible { display: block; }

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

/* ===== Decorative Elements ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  margin: var(--space-2xl) 0;
}

.chinese-corner {
  position: relative;
}

.chinese-corner::before,
.chinese-corner::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--gold);
}

.chinese-corner::before {
  top: -8px;
  left: -8px;
  border-right: none;
  border-bottom: none;
}

.chinese-corner::after {
  bottom: -8px;
  right: -8px;
  border-left: none;
  border-top: none;
}

/* ===== Loading & Animations ===== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--jade);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: var(--space-xl) auto;
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

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

/* ===== Locked Content ===== */
.locked-content {
  position: relative;
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
}

.locked-overlay__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
  }

  .nav--open {
    display: flex;
  }

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

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

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

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

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .compass {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

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

  .btn--large {
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
  }

  .direction-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Print Styles ===== */
@media print {
  .header,
  .footer,
  .btn,
  .quiz-nav {
    display: none !important;
  }

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

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
}

/* ===== Keyboard Navigation - Focus States ===== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus,
.quiz__option:focus-within,
.nav__link:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Remove outline for mouse users, keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== Large Screen Support (1920px+) ===== */
@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }

  .container {
    max-width: 1400px;
  }

  .hero__title,
  h1 {
    font-size: 4.5rem;
  }

  .hero__subtitle {
    font-size: 1.35rem;
  }

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