/* ==========================================================================
   Calofit Design System
   Source of truth: CLAUDE.md + Color+Theme.swift
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Core */
  --color-primary: #000000;
  --color-secondary: #B87AAF;
  --color-mint: #BDDBC1;
  --color-sage: #ACD2B1;
  --color-teal: #1CD1B3;
  --color-background: #FFFFFF;
  --color-surface: #FFFFFF;

  /* Text */
  --text-primary: #000000;
  --text-secondary: #424242;
  --text-tertiary: #757575;

  /* Greyscale */
  --grey-900: #000000;
  --grey-800: #424242;
  --grey-700: #616161;
  --grey-500: #9E9E9E;
  --grey-400: #BDBDBD;
  --grey-300: #E0E0E0;
  --grey-200: #EEEEEE;
  --grey-100: #F5F5F5;
  --grey-50: #FAFAFA;

  /* Macros */
  --color-calories: #C03064;
  --color-protein: #2B85E8;
  --color-carbs: #EF5A30;
  --color-fat: #8B4FD8;

  /* Trackers */
  --color-water: #4FC3F7;
  --color-steps: #FFB74D;
  --color-weight: #F06292;
  --color-meditation: #A78BFA;
  --color-fasting: #B87AAF;

  /* Food Quality */
  --color-excellent: #10B981;
  --color-good: #3B82F6;
  --color-fair: #F59E0B;
  --color-poor: #EF4444;

  /* Alerts */
  --color-success: #12D18E;
  --color-warning: #FACC15;
  --color-danger: #F75555;

  /* Gradients */
  --gradient-calorie: linear-gradient(135deg, #F472B6, #FB7185);
  --gradient-wellness: linear-gradient(135deg, #34D399, #06B6D4);

  /* Spacing (4px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* Radii */
  --radius-sm: 8px;
  --radius-button: 12px;
  --radius-card: 16px;
  --radius-dashboard: 24px;

  /* Typography */
  --font-family: 'Urbanist', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text-primary);
  text-decoration-color: var(--grey-400);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--text-primary);
  color: var(--color-background);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

h1 { font-size: 48px; }
h2 { font-size: 40px; }
h3 { font-size: 32px; }
h4 { font-size: 28px; }
h5 { font-size: 24px; }

h6 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.text-large { font-size: 18px; }
.text-small { font-size: 14px; }
.text-xsmall { font-size: 12px; }

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xxl);
}

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

.section {
  padding: 80px 0;
}

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

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-xxl);
}

.section__header p {
  margin-top: var(--space-sm);
  color: var(--text-secondary);
  font-size: 18px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-bottom: none;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-xxl) 0 calc(var(--space-xxl) + var(--space-xl));
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s;
}

.nav__logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

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

.nav__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: var(--text-primary);
  color: var(--color-background) !important;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  transition: opacity 0.2s;
}

.nav__cta:hover {
  opacity: 0.85;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle-checkbox {
  display: none;
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.lang-switch:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Nav dark mode — over dark sections */
.nav--dark .nav__logo { color: #fff; }
.nav--dark .nav__links a { color: rgba(255,255,255,0.7); }
.nav--dark .nav__links a:hover { color: #fff; }
.nav--dark .nav__toggle span { background: #fff; }
.nav--dark .lang-switch { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }
.nav--dark .lang-switch:hover { border-color: #fff; color: #fff; }

@media (max-width: 768px) {
  .nav--dark .nav__links a { color: var(--text-secondary); }
  .nav--dark .nav__links a:hover { color: var(--text-primary); }
  .nav--dark .lang-switch { border-color: var(--grey-300); color: var(--text-secondary); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn--primary:hover {
  opacity: 0.85;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--grey-100);
  color: var(--text-primary);
  border: 1px solid var(--grey-300);
}

.btn--secondary:hover {
  background: var(--grey-200);
}

.btn--large {
  padding: 16px 36px;
  font-size: 18px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  border: 1px solid var(--grey-200);
  transition: box-shadow 0.3s, transform 0.3s;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 24px;
}

.hero h1 {
  font-size: 48px;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 var(--space-lg);
  line-height: 1.6;
}

.hero__cta-group {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* Wide container */
.container--wide {
  max-width: 1200px;
}

/* Hero two-column layout */
.hero__inner {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
}

.hero__content {
  flex: 1;
  max-width: 560px;
  text-align: left;
}

.hero__phone {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.hero__mockup {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: transform 0.5s ease;
}

.hero__mockup:hover {
  transform: scale(1.02);
}

/* Goal selection cards */
.goal-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.goal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.goal-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-sm);
}

.goal-card--active {
  background: var(--text-primary);
  color: var(--color-background);
  border-color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  transform: scale(1.02);
}

.goal-card--active:hover {
  border-color: var(--text-primary);
  box-shadow: var(--shadow-xl);
}

.goal-card--active .goal-card__text h4,
.goal-card--active .goal-card__text p {
  color: var(--color-background);
}

.goal-card__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.goal-card--active .goal-card__icon {
  color: var(--color-background);
}

.goal-card__text h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 1px;
}

.goal-card__text p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.goal-card--active::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-background);
  border-radius: 50%;
}


/* ---------- Community Section ---------- */
.community {
  overflow: hidden;
  background: var(--color-background);
  border-top: 1px solid var(--grey-200);
  padding: 96px 0;
}

.community__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-xxl);
  padding: 0 var(--space-lg);
}

.community__header h2 {
  margin-bottom: var(--space-sm);
}

.community__header p {
  color: var(--text-secondary);
  font-size: 18px;
}

.community__scroll {
  overflow: hidden;
}

.community__track {
  display: flex;
  gap: var(--space-lg);
  width: max-content;
  animation: marquee 60s linear infinite;
}

.community__track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .community__track {
    animation: none;
    overflow-x: auto;
  }
}

.community__card {
  width: 280px;
  height: 480px;
  background: var(--text-primary);
  border-radius: var(--radius-dashboard);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.community__card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.community__card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.3);
  opacity: 0.6;
  transition: all 0.7s ease;
}

.community__card:hover .community__card-bg {
  transform: scale(1.1);
  filter: grayscale(0);
  opacity: 0.8;
}

.community__card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, transparent 100%);
}

.community__card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.community__card-play--default {
  opacity: 1;
}

.community__card:hover .community__card-play--default {
  opacity: 0;
}

.community__card-play--hover {
  opacity: 0;
}

.community__card:hover .community__card-play--hover {
  opacity: 1;
}

.community__card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  color: var(--color-background);
}

.community__card-handle {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: var(--space-xs);
}

.community__card-quote {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

/* ---------- Feature Grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-50);
  border-radius: var(--radius-button);
  color: var(--text-primary);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Feature Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xxl);
  justify-items: center;
}

.pillars__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pillars__icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-background);
  border: 1px solid var(--grey-300);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.pillars__item h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pillars__item p {
  font-size: 16px;
  color: var(--text-tertiary);
  max-width: 320px;
  line-height: 1.6;
}

/* ---------- Themes ---------- */
.themes__block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 48px 0;
  max-width: 860px;
  margin: 0 auto;
}

.themes__block--reverse {
  flex-direction: row-reverse;
}

.themes__block--reverse .themes__content {
  text-align: right;
}

.themes__block--reverse .themes__tags {
  justify-content: flex-end;
}

.themes__phone {
  flex-shrink: 0;
  width: 280px;
}

.themes__frame {
  border: 8px solid #000;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

.themes__frame img {
  display: block;
  width: 100%;
  height: auto;
}

.themes__content {
  flex: 1;
  max-width: 420px;
}

.themes__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.themes__name {
  font-size: 40px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.themes__desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.themes__tags {
  display: flex;
  gap: 12px;
}

.themes__tag {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--grey-300);
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  background: var(--grey-50);
}

/* Warm Sunset color overrides */
.themes__block--warm .themes__label,
.themes__block--warm .themes__desc {
  color: #4a4036;
}

.themes__block--warm .themes__name {
  color: #4a4036;
}

.themes__block--warm .themes__tag {
  background: rgba(255, 255, 255, 0.5);
  border-color: #d4c5b0;
  color: #4a4036;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--text-primary);
  border-radius: var(--radius-dashboard);
  padding: 64px 96px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cta-banner__glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: #fff;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.1;
  pointer-events: none;
}

.cta-banner__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 672px;
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: 64px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.8px;
  line-height: 1.1;
}

.cta-banner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.cta-banner__qr {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 32px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.cta-banner__qr-inner {
  border: 4px dashed var(--text-primary);
  border-radius: 24px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Light variant */
.cta-banner--light {
  background: var(--color-background);
  border: 1px solid var(--grey-200);
}

.cta-banner--light .cta-banner__glow {
  background: #000;
  opacity: 0.03;
}

.cta-banner--light h2 {
  color: var(--text-primary);
}

.cta-banner--light p {
  color: var(--text-secondary);
}

.cta-banner--light .cta-banner__qr {
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: auto;
  height: auto;
}

.cta-banner__qr-inner span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  line-height: 1.6;
  color: var(--text-primary);
}

/* ---------- Features Showcase ---------- */
/* ---------- Value Props (dark numbered section) ---------- */
.value-props {
  background: #000;
  padding: 80px 0;
}

.value-props__list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.value-props__item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.value-props__item--last {
  border-bottom: none;
  padding-bottom: 0;
}

.value-props__number {
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  opacity: 0.1;
  flex-shrink: 0;
  user-select: none;
}

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

.value-props__heading {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.value-props__desc {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  max-width: 672px;
}

/* ---------- Testimonials ---------- */
.testimonial-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-lg);
}

.review-card {
  background: var(--grey-100);
  border-radius: var(--radius-dashboard);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.review-card__stars {
  display: flex;
  gap: 2px;
}

.review-card__stars svg {
  display: block;
}

.review-card__quote {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary);
  flex: 1;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: var(--space-sm);
}

.review-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-card__avatar--initial {
  background: var(--text-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.review-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.review-card__role {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* ---------- Trust Grid ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.trust-item {
  display: flex;
  align-items: start;
  gap: var(--space-md);
  padding: var(--space-lg);
}

.trust-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--grey-50);
}

.trust-item h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.trust-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- FAQ Accordion ---------- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--grey-200);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding: 0 0 var(--space-lg);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Health Disclaimer ---------- */
.disclaimer {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.disclaimer p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.disclaimer a {
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--grey-50);
  border-top: 1px solid var(--grey-200);
  padding: var(--space-xxl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xxl);
  margin-bottom: var(--space-xxl);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-sm);
}

.footer__brand img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

.footer__tagline {
  color: var(--text-tertiary);
  font-size: 14px;
}

.footer h6 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--grey-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- Legal Pages ---------- */
.legal-page {
  padding: var(--space-xxl) 0 80px;
}

.legal-page h1 {
  font-size: 40px;
  margin-bottom: var(--space-sm);
}

.legal-page .legal-meta {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: var(--space-xxl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--grey-200);
}

.legal-page h2 {
  font-size: 28px;
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
}

.legal-page h3 {
  font-size: 22px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.legal-page h4 {
  font-size: 18px;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-page p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-page ul,
.legal-page ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.legal-page ul {
  list-style: disc;
}

.legal-page ol {
  list-style: decimal;
}

.legal-page li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-page blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--grey-50);
  border-left: 3px solid var(--grey-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-page a {
  color: var(--text-primary);
  font-weight: 500;
}

/* Table of Contents */
.toc {
  background: var(--grey-50);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  margin-bottom: var(--space-xxl);
}

.toc h2 {
  font-size: 18px;
  margin: 0 0 var(--space-md);
  padding: 0;
}

.toc ol {
  padding-left: var(--space-lg);
  margin-bottom: 0;
}

.toc li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.toc a {
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
}

.toc a:hover {
  text-decoration: underline;
}

/* Legal tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-md) 0 var(--space-lg);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
}

.table-wrapper table {
  min-width: 500px;
}

.table-wrapper th,
.table-wrapper td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--grey-200);
  line-height: 1.5;
  color: var(--text-secondary);
  vertical-align: top;
}

.table-wrapper th {
  background: var(--grey-50);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.table-wrapper tr:last-child td {
  border-bottom: none;
}

/* Compliance callout — distinct from blockquote (which is for quoted text) */
.legal-callout {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--grey-50);
  border-left: 3px solid var(--grey-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-callout__label {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Nested lists in legal pages */
.legal-page ul ul {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

/* Placeholder markers */
.placeholder {
  background: #FFF3CD;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- App Store Badge ---------- */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.appstore-badge:hover {
  opacity: 0.75;
}

.appstore-badge img {
  height: 54px;
  width: auto;
  display: block;
}

.appstore-badge--footer {
  margin-top: var(--space-md);
}

.appstore-badge--footer img {
  height: 40px;
}

.appstore-badge--nav img {
  height: 36px;
}

/* ---------- Partner Form ---------- */
.partner-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: var(--space-xxl);
}

.form-section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 14px;
  background: var(--grey-100);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group > label:not([class]) {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.form-group > label:not([class]) .optional {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 13px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--color-background);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-button);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--grey-400);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* --- Form validation error states --- */
.form-group--error .form-input,
.form-group--error .form-textarea,
.form-group--error .form-select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(247, 85, 85, 0.1);
}

.form-group--error .form-checkbox__box {
  border-color: var(--danger);
}

.form-group--error .form-radio-group {
  border-radius: var(--radius-sm);
  outline: 2px solid var(--danger);
  outline-offset: 4px;
}

.form-error-msg {
  display: block;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

@keyframes form-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.form-shake {
  animation: form-shake 0.4s ease;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-select {
  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='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: end;
}

.form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.form-chip {
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.form-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}

.form-chip span {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--grey-300);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.form-chip span:hover {
  border-color: var(--grey-500);
  background: var(--grey-50);
}

.form-chip input:checked + span {
  background: var(--text-primary);
  color: var(--color-background);
  border-color: var(--text-primary);
}

.form-chip input:focus-visible + span {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

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

.form-radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.form-radio:hover {
  border-color: var(--grey-500);
  background: var(--grey-50);
}

.form-radio:has(input:checked) {
  border-color: var(--text-primary);
  background: var(--grey-100);
}

.form-radio input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}

.form-radio__dot {
  width: 20px;
  height: 20px;
  border: 2px solid var(--grey-400);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}

.form-radio input:checked ~ .form-radio__dot {
  border-color: var(--text-primary);
}

.form-radio input:checked ~ .form-radio__dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: var(--text-primary);
  border-radius: 50%;
}

.form-radio input:checked ~ .form-radio__text {
  font-weight: 600;
}

.form-radio input:focus-visible ~ .form-radio__dot {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.form-radio__text {
  font-size: 15px;
  color: var(--text-primary);
}

/* Checkbox */
.form-checkbox {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.form-checkbox:hover {
  border-color: var(--grey-500);
  background: var(--grey-50);
}

.form-checkbox:has(input:checked) {
  border-color: var(--text-primary);
  background: var(--grey-100);
}

.form-checkbox input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  cursor: pointer;
}

.form-checkbox__box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--grey-400);
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
  margin-top: 1px;
}

.form-checkbox input:checked ~ .form-checkbox__box {
  border-color: var(--text-primary);
  background: var(--text-primary);
}

.form-checkbox input:checked ~ .form-checkbox__box::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-checkbox input:checked ~ .form-checkbox__text {
  font-weight: 500;
}

.form-checkbox input:focus-visible ~ .form-checkbox__box {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.form-checkbox__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.form-submit {
  text-align: center;
  padding-top: var(--space-lg);
}

.form-submit .btn {
  min-width: 240px;
}

.form-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
  line-height: 1.5;
}

.form-divider {
  height: 1px;
  background: var(--grey-200);
  margin: var(--space-xxl) 0;
}

/* Partner hero */
.partner-hero {
  text-align: center;
  padding: 80px 0 var(--space-xxl);
}

.partner-hero h1 {
  font-size: 48px;
  letter-spacing: -1.5px;
  margin-bottom: var(--space-md);
}

.partner-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Form success state */
.form-success {
  display: none;
  text-align: center;
  padding: 80px var(--space-lg);
}

.form-success.visible {
  display: block;
}

.form-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: rgba(189, 219, 193, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success h2 {
  margin-bottom: var(--space-sm);
}

.form-success p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .partner-hero {
    padding: 56px 0 var(--space-xl);
  }

  .partner-hero h1 {
    font-size: 32px;
  }
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }

  .hero h1 { font-size: 44px; }

  .hero__inner {
    gap: var(--space-xxl);
  }

  .hero__inner {
    gap: var(--space-xxl);
  }

  .feature-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .themes__block {
    gap: 40px;
  }

  .themes__phone {
    width: 240px;
  }

  .themes__name {
    font-size: 34px;
    letter-spacing: -1.5px;
  }

  .themes__desc {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }

  .nav__inner {
    padding: 0 var(--space-xxl);
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: 40px;
    letter-spacing: -1.2px;
  }

  .hero__subtitle {
    font-size: 17px;
    margin: 0 auto var(--space-xl);
  }

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

  .hero__content {
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding-left: 0;
  }

  .hero__cta-group {
    justify-content: center;
  }

  .appstore-badge img {
    height: 48px;
  }

  .hero__phone {
    justify-content: center;
  }

  .hero__mockup {
    border-radius: 0;
    box-shadow: none;
    clip-path: inset(0 0 6px 0);
    margin-bottom: -6px;
  }

  .goal-card--active::after {
    display: none;
  }

  .community {
    padding: 64px 0;
  }

  .community__card {
    width: 260px;
    height: 420px;
  }

  .value-props {
    padding: 56px 0;
  }

  .value-props__list {
    gap: 40px;
  }

  .value-props__number {
    font-size: 56px;
  }

  .value-props__heading {
    font-size: 30px;
    letter-spacing: -1px;
  }

  .value-props__desc {
    font-size: 16px;
  }

  .pillars {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .cta-banner {
    padding: 48px 32px;
  }

  .cta-banner h2 {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .cta-banner__qr {
    display: none;
  }

  .feature-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-masonry {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    gap: var(--space-md);
  }

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

  .review-card__quote {
    font-size: 15px;
    line-height: 1.5;
  }

  .review-card__stars svg {
    width: 16px;
    height: 16px;
  }

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

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

  /* Mobile nav */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(40px);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav__toggle-checkbox:checked ~ .nav__links {
    display: flex;
  }

  .nav__toggle-checkbox:checked ~ .nav__toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle-checkbox:checked ~ .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle-checkbox:checked ~ .nav__toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Themes */
  .themes__block {
    flex-direction: column;
    gap: 24px;
    padding: 32px 0;
    text-align: center;
  }

  .themes__block--reverse {
    flex-direction: column;
  }

  .themes__block--reverse .themes__content {
    text-align: center;
  }

  .themes__block--reverse .themes__tags {
    justify-content: center;
  }

  .themes__phone {
    width: 220px;
    margin: 0 auto;
  }

  .themes__content {
    max-width: 100%;
  }

  .themes__name {
    font-size: 28px;
    letter-spacing: -1px;
  }

  .themes__desc {
    font-size: 15px;
  }

  .themes__tags {
    justify-content: center;
  }

  /* Legal page */
  .legal-page h1 {
    font-size: 28px;
  }

  .legal-page h2 {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-lg);
  }

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

  .hero h1 {
    font-size: 36px;
    letter-spacing: -1px;
  }

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

  .appstore-badge img {
    height: 44px;
  }

  .community__card {
    width: 240px;
    height: 380px;
  }

  .value-props {
    padding: 40px 0;
  }

  .value-props__list {
    gap: 32px;
  }

  .value-props__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 28px;
  }

  .value-props__number {
    font-size: 40px;
    margin-bottom: var(--space-xs);
  }

  .value-props__heading {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .value-props__desc {
    font-size: 16px;
  }

  .themes__phone {
    width: 200px;
  }

  .themes__frame {
    border-width: 6px;
    border-radius: 32px;
  }

  .themes__name {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .themes__desc {
    font-size: 14px;
  }

  .themes__label {
    font-size: 11px;
    letter-spacing: 2.5px;
  }

  .disclaimer h2 {
    font-size: 18px !important;
    margin-bottom: var(--space-md) !important;
  }

  .disclaimer p {
    font-size: 12px;
    line-height: 1.6;
  }
}

/* ---------- Print ---------- */
@media print {
  .nav,
  .skip-link {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }

  .section {
    padding: 24pt 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}
