/* ===== Design Tokens ===== */
:root,
[data-theme='light'] {
  /* Surfaces — deep wellness dark with blue undertones */
  --color-bg: #0a1220;
  --color-surface: #0f1a2e;
  --color-surface-2: #132036;
  --color-surface-offset: #0d1628;
  --color-surface-offset-2: #101d33;
  --color-divider: #1a2840;
  --color-border: #243352;

  /* Text */
  --color-text: #e8edf5;
  --color-text-muted: #9aabc4;
  --color-text-faint: #5a6a82;
  --color-text-inverse: #0f1a2e;

  /* Primary — Bioluminescent Teal */
  --color-primary: #2dd4bf;
  --color-primary-hover: #14b8a6;
  --color-primary-active: #0d9488;
  --color-primary-highlight: #134e4a;

  /* Accent — Soft Cyan Glow */
  --color-accent: #38bdf8;
  --color-accent-hover: #0ea5e9;

  /* Star — Gold */
  --color-star: #fbbf24;
  --color-star-inactive: #2a3a55;

  /* Background image */
  --bg-image: url('background.jpeg');
  --bg-overlay: oklch(0.08 0.04 240 / 0.72);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0.2 0.02 120 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 120 / 0.08);
  --shadow-lg: 0 12px 40px oklch(0.2 0.02 120 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Zodiak', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6vw, 6rem);

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

[data-theme='dark'] {
  --color-bg: #060d18;
  --color-surface: #0a1424;
  --color-surface-2: #0d1828;
  --color-surface-offset: #081120;
  --color-surface-offset-2: #0b1626;
  --color-divider: #16223a;
  --color-border: #1e2d48;

  --color-text: #e8edf5;
  --color-text-muted: #8898b0;
  --color-text-faint: #4a5a72;
  --color-text-inverse: #0a1424;

  --color-primary: #2dd4bf;
  --color-primary-hover: #14b8a6;
  --color-primary-active: #0d9488;
  --color-primary-highlight: #134e4a;

  --color-accent: #38bdf8;
  --color-accent-hover: #0ea5e9;

  --color-star: #fbbf24;
  --color-star-inactive: #1e2d48;

  --bg-overlay: oklch(0.04 0.04 240 / 0.80);

  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
}

/* System dark fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #060d18;
    --color-surface: #0a1424;
    --color-surface-2: #0d1828;
    --color-surface-offset: #081120;
    --color-surface-offset-2: #0b1626;
    --color-divider: #16223a;
    --color-border: #1e2d48;
    --color-text: #e8edf5;
    --color-text-muted: #8898b0;
    --color-text-faint: #4a5a72;
    --color-text-inverse: #0a1424;
    --color-primary: #2dd4bf;
    --color-primary-hover: #14b8a6;
    --color-primary-active: #0d9488;
    --color-primary-highlight: #134e4a;
    --color-accent: #38bdf8;
    --color-accent-hover: #0ea5e9;
    --color-star: #fbbf24;
    --color-star-inactive: #1e2d48;
    --bg-overlay: oklch(0.04 0.04 240 / 0.80);
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: -1;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: oklch(from var(--color-primary) l c h / 0.25);
  color: var(--color-text);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  text-decoration: none;
  transition: color var(--transition-interactive);
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section-alt {
  background: oklch(0.06 0.04 240 / 0.5);
}

.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.section-intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 60ch;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.05 0.04 240 / 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
}

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

.logo-text {
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: var(--space-6);
  margin-left: auto;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}

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

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
  flex-shrink: 0;
}

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

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: var(--space-12);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-16), 10vw, var(--space-24)) var(--space-6);
  min-height: 70vh;
}

.hero-content {
  max-width: 560px;
}

.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: var(--text-xl);
  color: var(--color-text);
  font-weight: 400;
  margin-bottom: var(--space-5);
  line-height: 1.3;
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art {
  width: 100%;
  max-width: 400px;
  animation: gentle-float 6s ease-in-out infinite;
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition-interactive);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

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

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

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.about-text p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  line-height: 1.8;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4);
  background: oklch(0.1 0.04 240 / 0.6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ===== Focus Areas ===== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

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

.focus-card {
  padding: var(--space-8) var(--space-6);
  background: oklch(0.1 0.04 240 / 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
  backdrop-filter: blur(8px);
}

.focus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.focus-icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.focus-card h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

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

/* ===== Testimonials ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.testimonial-card {
  padding: var(--space-8) var(--space-6);
  background: oklch(0.1 0.04 240 / 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: fade-in-up 0.5s ease-out;
  backdrop-filter: blur(8px);
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.testimonial-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.testimonial-type {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  color: var(--color-star);
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
}

.testimonial-message {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: auto;
}

.empty-state {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-muted);
}

/* ===== Review Form ===== */
.review-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-10) var(--space-8);
  background: oklch(0.08 0.04 240 / 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

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

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  background: oklch(0.06 0.04 240 / 0.8);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}

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

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-body);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aabc4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-accent-hover);
  display: none;
}

.form-error.show {
  display: block;
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: var(--space-1);
}

.star-btn {
  padding: var(--space-1);
  color: var(--color-star-inactive);
  transition: color var(--transition-interactive), transform var(--transition-interactive);
  border-radius: var(--radius-sm);
}

.star-btn svg {
  width: 28px;
  height: 28px;
  transition: fill var(--transition-interactive);
}

.star-btn:hover {
  transform: scale(1.1);
}

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

.star-btn.active svg {
  fill: var(--color-star);
}

/* Checkbox */
.form-check-group {
  flex-direction: row;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.form-check input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  background: oklch(0.04 0.04 240 / 0.8);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12) var(--space-8);
  backdrop-filter: blur(12px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.footer-brand .logo {
  margin-bottom: var(--space-3);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 40ch;
}

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

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
    min-height: auto;
    padding-top: var(--space-12);
    padding-bottom: var(--space-16);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-art {
    max-width: 280px;
  }

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

  .about-stats {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .stat {
    flex: 1 1 140px;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .header-inner {
    gap: var(--space-3);
  }

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

  .review-form {
    padding: var(--space-6) var(--space-5);
  }

  .footer-inner {
    flex-direction: column;
  }

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

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

@media (max-width: 400px) {
  .about-stats {
    flex-direction: column;
  }
}
