/* ============================================================================
   Hivu — Design System partagé (Mosaic 2026)
   Tokens alignés sur constants/theme.ts de l'app
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  /* Miel — brand */
  --miel-50:  #FFFBEA;
  --miel-100: #FFF2C2;
  --miel-200: #FFE49A;
  --miel-300: #FFD363;
  --miel-400: #FFC12E;
  --miel-500: #FFB800;
  --miel-600: #E09A00;
  --miel-700: #B57C00;
  --miel-800: #805700;
  --miel-900: #533700;

  /* Coral — accent */
  --coral-50:  #FEF0EE;
  --coral-100: #FADBD6;
  --coral-200: #F6BCB4;
  --coral-400: #ED948A;
  --coral-500: #F28B82;
  --coral-600: #D96B5B;
  --coral-700: #B05648;

  /* Cream — neutrals chauds */
  --cream-50:  #FEFCF7;
  --cream-100: #F8F4EB;
  --cream-200: #EFE9DC;
  --cream-300: #D9D3C4;
  --cream-400: #B8B1A1;
  --cream-500: #8E887A;
  --cream-600: #6E695D;
  --cream-700: #524E44;
  --cream-800: #3C392F;
  --cream-900: #2B2720;

  /* Tokens sémantiques */
  --brand: var(--miel-500);
  --brand-hover: var(--miel-600);
  --brand-subtle: var(--miel-100);
  --brand-muted: var(--miel-50);
  --accent: var(--coral-500);
  --accent-subtle: var(--coral-100);

  --bg-app: #FEF1DD;
  --bg-elevated: #FFFFFF;
  --bg-subtle: var(--cream-100);
  --bg-inverse: var(--cream-900);

  --text-primary: var(--cream-900);
  --text-secondary: var(--cream-600);
  --text-tertiary: var(--cream-400);
  --text-brand: var(--miel-700);
  --text-inverse: #FFFFFF;

  --border-default: var(--cream-200);
  --border-strong: var(--cream-300);

  --success: #6CA780;
  --info: #7DB2D4;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-3xl: 32px;
  --r-full: 9999px;

  /* Shadows (doux, jamais durs) */
  --shadow-sm: 0 2px 8px rgba(43, 39, 32, 0.04);
  --shadow-md: 0 8px 24px rgba(43, 39, 32, 0.06);
  --shadow-lg: 0 20px 60px rgba(43, 39, 32, 0.08);
  --shadow-brand: 0 12px 32px rgba(255, 184, 0, 0.25);
  --shadow-phone: 0 40px 80px -20px rgba(43, 39, 32, 0.25), 0 20px 40px -10px rgba(43, 39, 32, 0.15);

  /* Layout */
  --max-w: 1140px;
  --section-py: 96px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 900; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 800; }
h4 { font-size: 1rem; font-weight: 700; }

h1 em, h2 em { font-style: normal; color: var(--brand); }
h1 .accent, h2 .accent { color: var(--accent); font-style: normal; }

p { color: var(--text-secondary); }

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: 14px;
}
.kicker.accent { color: var(--coral-600); }

.lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 620px;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-py) 0; position: relative; }
.section.bg-subtle { background: var(--bg-subtle); }
.section.bg-inverse { background: var(--bg-inverse); color: var(--text-inverse); }
.section.bg-inverse p { color: var(--cream-300); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============================================================================
   NAV
   ============================================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(254, 252, 247, 0.88);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border-default);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.logo-text em { font-style: normal; color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  border-radius: var(--r-full);
  padding: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}
.lang-switch a {
  padding: 6px 12px;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}
.lang-switch a.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: var(--cream-900);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-2px); }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--text-brand); }

.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* ============================================================================
   BADGES / PILLS
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-muted);
  border: 1px solid var(--miel-200);
  border-radius: var(--r-full);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-brand);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.9); } }

/* ============================================================================
   HEX DECORATIONS (motif ruche)
   ============================================================================ */
.hex {
  display: inline-block;
  width: 48px; height: 48px;
  background: var(--brand);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  position: relative;
}
.hex-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-subtle);
  color: var(--text-brand);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  flex-shrink: 0;
}
.hex-icon.accent { background: var(--accent-subtle); color: var(--coral-700); }
.hex-icon.info { background: #EEF5FA; color: var(--info); }
.hex-icon.success { background: #EEF5F0; color: var(--success); }

/* Honeycomb watermark background (coin décoratif) */
.honeycomb-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}
.honeycomb-deco .hex {
  position: absolute;
  background: var(--miel-100);
  width: 40px; height: 40px;
}

/* ============================================================================
   CARDS
   ============================================================================ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-2xl);
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin: 18px 0 8px; font-size: 1.08rem; }
.card p { font-size: 0.9rem; line-height: 1.65; }

.card.accent {
  background: linear-gradient(160deg, #fff 0%, var(--brand-muted) 100%);
  border-color: var(--miel-200);
}

/* Pain card (problème) */
.pain-card {
  background: var(--bg-subtle);
  border-radius: var(--r-2xl);
  padding: 24px;
  border: 1px solid var(--border-default);
}
.pain-card .icon { font-size: 1.6rem; margin-bottom: 10px; }
.pain-card h3 { font-size: 1rem; margin-bottom: 6px; }
.pain-card p { font-size: 0.86rem; color: var(--text-secondary); }

/* ============================================================================
   HIVI COACH — duo de phones chatbot (section sombre)
   ============================================================================ */
.hivi-duo-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 780px;
  width: 130%;
  margin-left: -15%;
  margin-right: -15%;
}
.hivi-duo-phones .duo-phone {
  width: 56%;
  max-width: none;
  height: auto;
  display: block;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.45));
}
.hivi-duo-phones .duo-phone-left {
  margin-right: -12%;
  transform: translateY(14px);
  z-index: 1;
}
.hivi-duo-phones .duo-phone-right {
  margin-left: -12%;
  transform: translateY(-14px);
  z-index: 2;
}
@media (max-width: 960px) {
  .hivi-duo-phones { min-height: 560px; width: 100%; margin: 0; }
  .hivi-duo-phones .duo-phone { width: 58%; }
  .hivi-duo-phones .duo-phone-left { margin-right: -10%; transform: translateY(10px); }
  .hivi-duo-phones .duo-phone-right { margin-left: -10%; transform: translateY(-10px); }
}

/* ============================================================================
   HERO MOCKUP — image 3 iPhones complète avec fond fondu
   Stratégie : on ne détoure PAS l'image. On fade ses bords dans le fond du
   site via un mask radial doux. Le fond du site est un léger gradient qui
   reproduit la teinte moyenne de l'image, pour une transition invisible.
   ============================================================================ */
.hero-mockup-wrap {
  position: relative;
  width: 130%;
  margin-left: -15%;
  margin-right: -15%;
}
.hero-mockup-wrap img {
  display: block;
  width: 100%;
  height: auto;
  /* Fade doux sur les bords : 4% de transition radiale vers transparent */
  -webkit-mask-image: radial-gradient(ellipse 92% 94% at center, #000 78%, transparent 100%);
          mask-image: radial-gradient(ellipse 92% 94% at center, #000 78%, transparent 100%);
  /* Mask linéaire complémentaire sur les 4 côtés pour assurer le fondu */
  filter: drop-shadow(0 36px 48px rgba(43, 39, 32, 0.15));
}
@media (max-width: 960px) {
  .hero-mockup-wrap { width: 100%; margin: 0 auto; max-width: 620px; }
}

/* ============================================================================
   iPHONE 16 PRO MOCKUP — perspective 3D diagonale (legacy, section Hivi)
   ============================================================================ */
.phone {
  width: 280px;
  height: 580px;
  background: linear-gradient(145deg, #C9C7C3 0%, #8B8986 18%, #3A3936 50%, #8B8986 82%, #C9C7C3 100%);
  border-radius: 56px;
  padding: 5px;
  box-shadow: var(--shadow-phone);
  position: relative;
  flex-shrink: 0;
  transform-style: preserve-3d;
}
.phone::before {
  /* Cadre titane interne */
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 53px;
  background: #0A0A0F;
  z-index: 0;
}
.phone-screen {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: var(--bg-app);
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Screen plein — pour afficher un screenshot d'app en image */
.phone-screen-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  overflow: hidden;
  background: #000;
  display: block;
}
.phone-screen-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Dynamic Island iPhone 16 Pro */
.phone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  background: #000;
  border-radius: var(--r-full);
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #0A0A0F;
  border-radius: var(--r-full);
  z-index: 2;
}
.phone-status {
  padding: 16px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 18px;
}
.phone-status-right { display: flex; gap: 4px; align-items: center; font-size: 0.7rem; }
.phone-body { flex: 1; padding: 20px 18px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }

/* Phone stack — fan 3D : 3 iPhones visibles côte à côte en perspective */
.phone-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 640px;
  perspective: 1300px;
  perspective-origin: 50% 40%;
  transform-style: preserve-3d;
}
.phone-stack .phone {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 240px;
  height: 500px;
  border-radius: 48px;
  padding: 4px;
}
.phone-stack .phone::before { border-radius: 45px; }
.phone-stack .phone .phone-screen,
.phone-stack .phone .phone-screen-img { border-radius: 42px; }
.phone-stack .phone-1 { transform: rotateY(28deg) rotateX(2deg) translateZ(-30px) translateY(10px); z-index: 1; }
.phone-stack .phone-2 { transform: rotateY(-4deg) translateZ(40px) translateY(-20px); z-index: 3; }
.phone-stack .phone-3 { transform: rotateY(-28deg) rotateX(2deg) translateZ(-30px) translateY(10px); z-index: 2; }
.phone-stack .phone-island { top: 10px; width: 90px; height: 26px; }
.phone-stack .phone-body { padding: 16px 14px 12px; gap: 10px; }
.phone-stack .phone-status { padding: 14px 20px 6px; font-size: 0.65rem; }
.phone-stack .mk-tabbar .tab { font-size: 0.52rem; padding: 4px 2px; }
.phone-stack .mk-tabbar { padding: 8px 0 4px; margin: auto -14px 0; padding-inline: 14px; }

/* Floating pill (notifications autour du phone) */
.floating-pill {
  position: absolute;
  background: #fff;
  border-radius: var(--r-xl);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
  max-width: 220px;
}
.floating-pill .hex-icon { width: 36px; height: 36px; font-size: 1rem; }
.floating-pill small { font-size: 0.68rem; color: var(--text-secondary); font-weight: 500; display: block; }

/* ============================================================================
   COMPOSANTS DANS LES MOCKUPS (UI interne de l'app)
   ============================================================================ */
.mk-kicker {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: 4px;
}
.mk-title { font-size: 0.92rem; font-weight: 800; color: var(--text-primary); }
.mk-subtitle { font-size: 0.7rem; color: var(--text-secondary); margin-top: 2px; }

.mk-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}
.mk-card-brand {
  background: linear-gradient(140deg, var(--miel-50), #fff);
  border-color: var(--miel-200);
}
.mk-card-dark {
  background: linear-gradient(140deg, var(--cream-900), var(--cream-800));
  color: #fff;
  border: none;
}
.mk-card-dark .mk-title { color: #fff; }
.mk-card-dark .mk-subtitle { color: var(--cream-300); }

.mk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-default);
}
.mk-row:first-child { border-top: none; padding-top: 0; }
.mk-row .label { font-size: 0.72rem; color: var(--text-secondary); font-weight: 600; flex: 1; }
.mk-row .value { font-size: 0.8rem; font-weight: 800; color: var(--text-primary); }

.mk-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--miel-50);
  color: var(--text-brand);
  border-radius: var(--r-full);
  padding: 3px 10px;
  font-size: 0.64rem;
  font-weight: 800;
}

.mk-bar {
  width: 100%;
  height: 6px;
  background: var(--cream-100);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: 6px;
}
.mk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--miel-300), var(--miel-500));
  border-radius: var(--r-full);
}
.mk-bar-fill.coral { background: linear-gradient(90deg, var(--coral-200), var(--coral-500)); }

.mk-kpi {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.mk-kpi small { font-size: 0.7rem; font-weight: 600; color: var(--text-secondary); margin-left: 4px; }

.mk-macro-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mk-macro { text-align: center; padding: 8px 4px; background: var(--bg-subtle); border-radius: 12px; }
.mk-macro .mk-kpi { font-size: 0.95rem; }
.mk-macro small { display: block; font-size: 0.58rem; color: var(--text-secondary); margin-top: 2px; font-weight: 600; }

.mk-hex-badge {
  width: 32px; height: 32px;
  background: var(--miel-100);
  color: var(--text-brand);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}

.mk-chat-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  line-height: 1.5;
  max-width: 85%;
}
.mk-bubble-user {
  background: var(--cream-100);
  color: var(--text-primary);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.mk-bubble-hivi {
  background: var(--brand);
  color: var(--cream-900);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.mk-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 6px;
  background: #fff;
  border-top: 1px solid var(--border-default);
  margin: auto -18px 0;
  padding-inline: 18px;
}
.mk-tabbar .tab {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
  padding: 6px 4px;
  border-radius: 12px;
}
.mk-tabbar .tab.active { background: var(--miel-100); color: var(--text-brand); }

/* ============================================================================
   HIVI ILLUSTRATION
   ============================================================================ */
.hivi-img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(255, 184, 0, 0.25));
}

/* ============================================================================
   ICÔNES SVG inline (remplacent tous les emojis)
   ============================================================================ */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.ico-lg { width: 1.6rem; height: 1.6rem; }
.ico-xl { width: 2rem; height: 2rem; }

/* Logos plateformes (badges dans intégrations) */
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.is-apple { background: #000; color: #fff; }
.brand-logo.is-google { background: #E8F5E9; color: #0F9D58; }
.brand-logo.is-strava { background: #FC4C02; color: #fff; }
.brand-logo.is-garmin { background: #000; color: #fff; }
.brand-logo svg { width: 26px; height: 26px; }

/* Mockup section Sport + Nutrition indissociable */
.duo-hivi {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  min-height: 380px;
}
.duo-hivi img {
  max-width: 52%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(255, 184, 0, 0.2));
}
.duo-hivi img:first-child { transform: translateX(20px) rotate(-4deg); z-index: 1; }
.duo-hivi img:last-child { transform: translateX(-20px) rotate(4deg); z-index: 2; }
.duo-link {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 72px; height: 72px;
  background: var(--brand);
  color: var(--cream-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand);
  font-weight: 900;
}

/* ============================================================================
   PAGES LÉGALES — style dédié
   ============================================================================ */
.legal-hero {
  padding: calc(var(--nav-h) + 80px) 0 60px;
  background: linear-gradient(160deg, var(--bg-app) 50%, var(--brand-muted) 100%);
}
.legal-hero .container { max-width: 860px; }
.legal-meta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.legal-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.legal-meta .pill em { font-style: normal; color: var(--text-brand); }

.legal-body { padding: 40px 0 100px; background: var(--bg-subtle); }
.legal-body .container { max-width: 860px; }

.legal-toc {
  background: #fff;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border-default);
  padding: 24px 28px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}
.legal-toc .kicker { margin-bottom: 12px; }
.legal-toc ol { padding-left: 0; list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 8px; }
.legal-toc ol li { counter-increment: toc; font-size: 0.92rem; }
.legal-toc ol li a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.legal-toc ol li a::before {
  content: counter(toc);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--brand);
  color: var(--cream-900);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.legal-toc ol li a:hover { color: var(--text-brand); }

.legal-block {
  background: #fff;
  border-radius: var(--r-2xl);
  padding: 36px 40px;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.legal-block h2 { font-size: 1.5rem; margin-bottom: 18px; }
.legal-block h2::before {
  content: counter(legal);
  counter-increment: legal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--brand);
  color: var(--cream-900);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  margin-right: 12px;
  vertical-align: middle;
}
.legal-body { counter-reset: legal; }
.legal-block h3 { font-size: 1.02rem; font-weight: 700; margin: 22px 0 10px; color: var(--text-primary); }
.legal-block p { font-size: 0.94rem; line-height: 1.75; margin-bottom: 12px; color: var(--cream-700); }
.legal-block ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.legal-block ul li {
  font-size: 0.92rem;
  line-height: 1.65;
  padding-left: 22px;
  position: relative;
  color: var(--cream-700);
}
.legal-block ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 10px;
  width: 10px; height: 10px;
  background: var(--brand);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
}
.legal-block a { color: var(--text-brand); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.legal-block a:hover { color: var(--miel-600); }

.legal-block strong { color: var(--text-primary); font-weight: 700; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.86rem;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border-default);
}
.legal-table th {
  background: var(--brand);
  color: var(--cream-900);
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  font-size: 0.8rem;
}
.legal-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border-default);
  color: var(--cream-700);
  vertical-align: top;
}
.legal-table tr:nth-child(even) td { background: var(--bg-subtle); }

.legal-highlight {
  background: linear-gradient(135deg, var(--brand-muted), #fff);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-highlight p { margin-bottom: 0; font-size: 0.88rem; color: var(--text-primary); }

.legal-warning {
  background: var(--coral-50);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-warning p { margin-bottom: 0; font-size: 0.88rem; color: var(--coral-700); }
.legal-warning strong { color: var(--coral-700); }

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer {
  background: var(--cream-900);
  color: var(--cream-300);
  padding: 56px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p { color: var(--cream-400); font-size: 0.88rem; margin-top: 12px; line-height: 1.7; max-width: 340px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: var(--cream-300);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer ul a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--cream-400);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 980px) {
  :root { --section-py: 64px; }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .phone-stack { min-height: 480px; gap: 0; }
  .phone-stack .phone { width: 200px; height: 420px; }
  .phone-stack .phone-1 { transform: rotateY(24deg) rotateX(2deg) translateZ(-20px) scale(0.86); }
  .phone-stack .phone-3 { transform: rotateY(-24deg) rotateX(2deg) translateZ(-20px) scale(0.86); }
  .phone-stack .phone-2 { transform: rotateY(-4deg) translateY(-14px) scale(0.95); }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .legal-block { padding: 24px; }
}
@media (max-width: 640px) {
  .nav-links a:not(.lang-switch a) { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .phone { width: 240px; height: 500px; }
  .phone-stack .phone-1, .phone-stack .phone-3 { display: none; }
  .phone-stack .phone-2 { transform: none; position: relative; }
  .phone-stack { min-height: 520px; }
  .floating-pill { display: none; }
  .legal-block { padding: 20px; }
  .legal-block h2 { font-size: 1.25rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
