/* ───────────────────────────────────────────────────────────
   Marine Health · ContactMLM — бренд-фундамент
   Палитра выведена из айдентики Marine Health: морские суперфуды,
   японская эстетика «Суми-э» (монохром + капля цвета), глубокое море.
   ─────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800&family=Lora:ital,wght@0,500;0,600;1,500&display=swap');

:root {
  /* Нейтраль — iOS system grays (Apple Health chrome) */
  --mh-ink:        #1C1C1E;
  --mh-ink-2:      #48484A;
  --mh-muted:      #8E8E93;
  --mh-line:       #E5E5EA;
  --mh-line-2:     #D1D1D6;
  --mh-surface:    #FFFFFF;
  --mh-bg:         #F2F2F7;
  --mh-paper:      #F2F2F7;

  /* Primary — system blue (интерактив) */
  --mh-teal:       #007AFF;
  --mh-teal-700:   #0A6CDA;
  --mh-teal-deep:  #1C1C1E;   /* графитовая тёмная шапка */
  --mh-teal-soft:  #E6F0FF;

  /* Stand-кольцо — циан/голубой (вода в B, инфо-акценты) */
  --mh-aqua:        #00C7BE;
  --mh-aqua-bright: #5AC8FA;
  --mh-aqua-soft:   #E3F7F5;

  /* Move-кольцо — розово-красный (сердце, серия) */
  --mh-coral:      #FF375F;
  --mh-coral-soft: #FFE5EB;
  /* «Думает» — system orange */
  --mh-sand:       #FF9500;
  --mh-sand-soft:  #FFF2DF;

  /* Семантика (iOS) */
  --mh-success:      #34C759;
  --mh-success-soft: #E3F9E9;
  --mh-warn:         #C77A00;
  --mh-warn-soft:    #FFF2DF;
  --mh-danger:       #FF3B30;
  --mh-danger-soft:  #FFE5E3;

  /* Скругления (управляются Tweaks) */
  --mh-r-sm: 10px;
  --mh-r-md: 16px;
  --mh-r-lg: 24px;
  --mh-r-pill: 999px;

  /* Множитель размера шрифта (Tweaks · для 50+) */
  --mh-fs: 1;

  /* Тени — мягкие, нейтральные (iOS) */
  --mh-shadow-sm: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
  --mh-shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.05);
  --mh-shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);

  --mh-font: 'Golos Text', -apple-system, system-ui, sans-serif;
  --mh-serif: 'Lora', Georgia, serif;
  --mh-mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}

/* ── Базовая типографика для экранов ───────────────────────── */
.mh {
  font-family: var(--mh-font);
  color: var(--mh-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}
.mh * { box-sizing: border-box; }

/* Размерная шкала множится на --mh-fs (доступность для 50+) */
.mh .t-display { font-size: calc(40px * var(--mh-fs)); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.mh .t-h1      { font-size: calc(28px * var(--mh-fs)); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
.mh .t-h2      { font-size: calc(22px * var(--mh-fs)); font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; }
.mh .t-h3      { font-size: calc(18px * var(--mh-fs)); font-weight: 600; line-height: 1.25; }
.mh .t-body    { font-size: calc(16px * var(--mh-fs)); font-weight: 400; line-height: 1.45; }
.mh .t-bodysm  { font-size: calc(14px * var(--mh-fs)); font-weight: 400; line-height: 1.4; }
.mh .t-label   { font-size: calc(15px * var(--mh-fs)); font-weight: 600; line-height: 1.2; }
.mh .t-cap     { font-size: calc(13px * var(--mh-fs)); font-weight: 600; line-height: 1.3; letter-spacing: 0.02em; }
.mh .t-over    { font-size: calc(12px * var(--mh-fs)); font-weight: 700; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase; }
.mh .t-serif   { font-family: var(--mh-serif); letter-spacing: -0.01em; }
.mh .num       { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ── Утилиты ───────────────────────────────────────────────── */
.mh .card {
  background: var(--mh-surface);
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-r-md);
  box-shadow: var(--mh-shadow-sm);
}
.mh .row { display: flex; align-items: center; }
.mh .col { display: flex; flex-direction: column; }

/* Кнопки — крупный тач-таргет (≥56px) */
.mh .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: calc(56px * var(--mh-fs)); padding: 0 20px;
  border-radius: var(--mh-r-sm); border: 1px solid transparent;
  font-family: var(--mh-font); font-weight: 600; font-size: calc(16px * var(--mh-fs));
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  letter-spacing: -0.01em; white-space: nowrap;
}
.mh .btn:active { transform: scale(0.985); }
.mh .btn-primary { background: var(--mh-teal); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.mh .btn-primary:hover { background: var(--mh-teal-700); }
.mh .btn-aqua { background: var(--mh-success); color: #fff; }
.mh .btn-aqua:hover { background: #2DB14F; }
.mh .btn-ghost { background: var(--mh-surface); border-color: var(--mh-line-2); color: var(--mh-ink); }
.mh .btn-ghost:hover { background: #F7FAFA; }

/* Чипы / бейджи */
.mh .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--mh-r-pill);
  font-size: calc(13px * var(--mh-fs)); font-weight: 600; line-height: 1;
  white-space: nowrap; flex-shrink: 0;
}

/* Скрытие скроллбаров внутри устройства */
.mh ::-webkit-scrollbar { width: 0; height: 0; }

/* ── Анимация прилива (вариант B) ──────────────────────────── */
@keyframes mh-wave-a { from { transform: translateX(0); }  to { transform: translateX(-50%); } }
@keyframes mh-wave-b { from { transform: translateX(0); }  to { transform: translateX(-50%); } }
@keyframes mh-rise   { from { height: 0%; } }
@keyframes mh-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mh-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.mh .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; display: inline-block; animation: mh-spin .7s linear infinite; }
@keyframes mh-spin { to { transform: rotate(360deg); } }
.mh .sk { background: linear-gradient(90deg, #E4E9EA 25%, #F1F4F5 50%, #E4E9EA 75%); background-size: 200% 100%; animation: mh-sk 1.3s linear infinite; }
@keyframes mh-sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
