/* ============================================================
   Vitalisync — "Kinetic Calm" design tokens + component atoms
   Ported verbatim from the design-system source of truth
   (colors_and_type.css) so the launch site stays pixel-faithful.
   ============================================================ */

@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito-Variable.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ───── color · surfaces ───── */
  --bg-app: #F7F8FA;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F0F4F6;
  --bg-watch: #090B0F;
  --bg-watch-surface: #171B22;

  /* ───── color · text ───── */
  --text-primary: #101418;
  --text-secondary: #5F6975;
  --text-tertiary: #8B95A1;
  --text-on-dark: #FFFFFF;
  --text-on-dark-secondary: #B6BFCA;

  /* ───── color · border ───── */
  --border-subtle: #D8DEE6;
  --border-strong: #B7C0CB;
  --border-on-dark: #232A33;

  /* ───── color · action ───── */
  --action-primary: #0B5CAD;
  --action-primary-pressed: #084985;
  --action-primary-tint: #E8F2FF;

  /* ───── color · state ───── */
  --live-teal: #008D84;
  --live-teal-tint: #E4F7F5;
  --success: #18864B;
  --success-tint: #E8F7ED;
  --warning: #B5810F;
  --warning-fill: #E2A316;
  --warning-tint: #FFF5D8;
  --danger: #C8323A;
  --danger-tint: #FFE9EA;
  --hr-heat: #E44735;
  --hr-heat-deep: #B82E1F;

  /* zone colors (1-5) */
  --zone-1: #6DA9D6;
  --zone-2: #18864B;
  --zone-3: #E2A316;
  --zone-4: #E0651F;
  --zone-5: #C8323A;

  /* ───── type ───── */
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* ───── radius ───── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* ───── shadow ───── */
  --shadow-card: 0 1px 2px rgba(16,20,24,0.04), 0 1px 0 rgba(16,20,24,0.02);
  --shadow-sheet: 0 16px 40px rgba(16, 20, 24, 0.14);

  /* ───── motion ───── */
  --m-fast: 120ms;
  --m-normal: 220ms;
  --m-slow: 420ms;
  --ease: cubic-bezier(.2,.7,.3,1);

  /* ───── control heights ───── */
  --h-control-sm: 32px;
  --h-control-md: 40px;
  --h-control-lg: 50px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-app); }
::selection { background: #E8F2FF; }
a { text-decoration: none; color: inherit; }

.vs-root {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on;
}

/* Reset bare buttons but not branded .vs-btn variants. */
.vs-root button:not([class*="vs-btn"]) {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}
.vs-root button { font-family: inherit; cursor: pointer; }

.vs-tabnum { font-variant-numeric: tabular-nums; }
.vs-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ───────── Buttons ───────── */
.vs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: var(--h-control-lg);
  padding: 0 20px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  transition: background var(--m-fast) var(--ease), box-shadow var(--m-fast) var(--ease), color var(--m-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.vs-btn:focus-visible { outline: 2px solid var(--action-primary); outline-offset: 2px; }
.vs-btn-md { height: var(--h-control-md); padding: 0 16px; font-size: 14px; }
.vs-btn-sm { height: var(--h-control-sm); padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }

.vs-btn-primary { background: var(--action-primary); color: #fff; }
.vs-btn-primary:hover { background: var(--action-primary-pressed); }
.vs-btn-secondary { background: var(--bg-surface); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.vs-btn-secondary:hover { background: var(--bg-surface-alt); }

/* ───────── Chips ───────── */
.vs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: 0.01em;
}
.vs-chip-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.vs-chip-neutral { background: var(--bg-surface-alt); color: var(--text-secondary); }
.vs-chip-connected { background: var(--success-tint); color: var(--success); }
.vs-chip-live { background: var(--live-teal-tint); color: var(--live-teal); }
.vs-chip-reconnect { background: var(--warning-tint); color: var(--warning); }

/* ───────── Cards ───────── */
.vs-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

/* ───────── Animations ───────── */
@keyframes vs-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.vs-pulse { animation: vs-pulse 1.6s ease-in-out infinite; }

@keyframes vs-beat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.05); }
  35% { transform: scale(1); }
  50% { transform: scale(1.025); }
  65% { transform: scale(1); }
}
.vs-beat { animation: vs-beat 1.05s ease-in-out infinite; }

@keyframes vs-draw { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
@keyframes vs-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes vs-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .vs-pulse, .vs-beat { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Page-level styles + hover states.
   The prototype encoded hovers as a custom `style-hover`
   attribute; here they are real CSS so they actually fire.
   ============================================================ */

/* nav + footer text links */
.vs-navlink { transition: color var(--m-fast); }
.vs-navlink:hover { color: var(--text-primary); }
.vs-footlink { transition: color var(--m-fast); }
.vs-footlink:hover { color: #fff; }

/* store badges / cta hovers */
.vs-store-dark { transition: background var(--m-fast); }
.vs-store-dark:hover { background: #000; }
.vs-store-light { transition: background var(--m-fast); }
.vs-store-light:hover { background: var(--bg-surface-alt); }
.vs-cta-light { transition: background var(--m-fast); }
.vs-cta-light:hover { background: var(--bg-surface-alt); }
.vs-cta-glass { transition: background var(--m-fast); }
.vs-cta-glass:hover { background: rgba(255,255,255,0.2); }

/* zone-bar segments — JS recolours these as HR drifts */
.vs-seg { background: #E3E8EC; border-radius: 2px; transition: background var(--m-normal) var(--ease); }
.vs-seg-dark { background: #232A33; border-radius: 2px; transition: background var(--m-normal) var(--ease); }

/* EN / FR language pills */
.vs-langpill { border: 0; border-radius: var(--r-full); padding: 3px 12px; font-size: 11.5px; cursor: pointer; transition: background var(--m-fast), color var(--m-fast); }
.vs-langpill[aria-pressed="true"] { background: #fff; color: var(--text-primary); font-weight: 800; }
.vs-langpill[aria-pressed="false"] { background: transparent; color: var(--text-tertiary); font-weight: 700; }

/* FAQ accordion */
.vs-faq-item { background: #fff; border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; }
.vs-faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; text-align: left; }
.vs-faq-q > span:first-child { font-size: 16.5px; font-weight: 700; color: var(--text-primary); }
.vs-faq-chevron { display: inline-flex; flex: 0 0 auto; transition: transform var(--m-normal) var(--ease); }
.vs-faq-item[data-open="true"] .vs-faq-chevron { transform: rotate(180deg); }
.vs-faq-a { padding: 0 20px 20px; font-size: 15px; color: var(--text-secondary); font-weight: 500; line-height: 1.55; }
.vs-faq-item[data-open="false"] .vs-faq-a { display: none; }

/* ============================================================
   Responsive — the prototype was desktop-only (fixed grids).
   A launch site must hold up on phones, so the multi-column
   grids collapse to a single column below 920px / 600px.
   ============================================================ */
@media (max-width: 920px) {
  .vs-hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .vs-hero-art { order: -1; }
  .vs-two-col { grid-template-columns: 1fr !important; gap: 40px !important; }
  .vs-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 28px 16px !important; }
  .vs-three-grid { grid-template-columns: 1fr !important; }
  .vs-nav-links { display: none !important; }
  .vs-h1 { font-size: 44px !important; }
  .vs-h2 { font-size: 32px !important; }
}
@media (max-width: 600px) {
  .vs-zones-grid { grid-template-columns: 1fr 1fr !important; gap: 24px 14px !important; }
  .vs-price-grid { grid-template-columns: 1fr !important; }
  .vs-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .vs-pair-grid { grid-template-columns: 1fr !important; }
  .vs-h1 { font-size: 38px !important; }
  .vs-final-pad { padding: 48px 24px !important; }
}
