/* ============================================
   256money — международные платежи
   Современная дизайн-система
   ============================================ */

:root {
  /* Цвета — фон */
  --bg-base: #0A0F1C;
  --bg-surface: #111827;
  --bg-elevated: #1A2236;
  --bg-overlay: rgba(10, 15, 28, 0.85);

  /* Цвета — акцент */
  --accent-primary: #4F7FFF;
  --accent-primary-hover: #6B93FF;
  --accent-gold: #FFB940;
  --accent-gold-hover: #FFC966;
  --accent-cyan: #00D4FF;

  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, #4F7FFF 0%, #00D4FF 100%);
  --gradient-gold: linear-gradient(135deg, #FFB940 0%, #FF8A3D 100%);
  --gradient-hero: radial-gradient(circle at 20% 30%, rgba(79, 127, 255, 0.15), transparent 40%),
                   radial-gradient(circle at 80% 70%, rgba(255, 185, 64, 0.1), transparent 50%);

  /* Текст */
  --text-primary: #F5F7FA;
  --text-secondary: #A7B0C2;
  --text-muted: #6B7489;

  /* Состояния */
  --color-success: #22C55E;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;

  /* Границы */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);

  /* Радиусы */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Тени */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(79, 127, 255, 0.25);

  /* Типографика */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Контейнер */
  --container-max: 1280px;
  --container-padding: clamp(16px, 4vw, 32px);

  /* Анимации */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.18s;
  --duration-base: 0.3s;
  --duration-slow: 0.6s;
}

/* ============================================ Reset ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg-base); color: var(--text-primary); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

/* ============================================ Типографика ============================================ */
.h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; }
.h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 600; }
.text-muted { color: var(--text-secondary); }
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-gold { color: var(--accent-gold); }

/* ============================================ Container ============================================ */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); width: 100%; }

/* ============================================ Header ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 28, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--duration-base) var(--ease-out);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 0; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.logo__mark { width: auto; height: 36px; flex-shrink: 0; display: block; }
.logo__text { display: none; }
@media (max-width: 480px) { .logo__mark { height: 30px; } }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; position: relative; }
.nav a:hover { color: var(--text-primary); }
.nav a.active { color: var(--accent-primary); }
.nav a.active::after { content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 2px; background: var(--gradient-primary); border-radius: 2px; }

.header__cta { display: flex; gap: 12px; align-items: center; }
.header__phone { color: var(--text-primary); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.header__phone:hover { color: var(--accent-gold); }

.nav--mobile { display: none; }
.burger { display: none; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--bg-elevated); align-items: center; justify-content: center; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text-primary); position: relative; transition: all var(--duration-fast); }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-primary); transition: all var(--duration-fast); }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger.active span { background: transparent; }
.burger.active span::before { transform: rotate(45deg); top: 0; }
.burger.active span::after { transform: rotate(-45deg); top: 0; }

/* ============================================ Buttons ============================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.95rem; transition: all var(--duration-base) var(--ease-out); white-space: nowrap; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(79, 127, 255, 0.4); }
.btn--gold { background: var(--gradient-gold); color: #1A1203; }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255, 185, 64, 0.35); }
.btn--ghost { background: transparent; border-color: var(--border-medium); color: var(--text-primary); }
.btn--ghost:hover { background: var(--bg-elevated); border-color: var(--accent-primary); }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--lg { padding: 18px 36px; font-size: 1.05rem; }

/* ============================================ Hero ============================================ */
.hero { position: relative; padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 6vw, 80px); overflow: hidden; background: var(--gradient-hero); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero__content { max-width: 620px; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(79, 127, 255, 0.1); border: 1px solid rgba(79, 127, 255, 0.25); border-radius: var(--radius-pill); font-size: 0.85rem; color: var(--accent-primary); font-weight: 500; margin-bottom: 24px; }
.hero__badge::before { content: ''; width: 6px; height: 6px; background: var(--color-success); border-radius: 50%; box-shadow: 0 0 10px var(--color-success); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero__title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 24px; }
.hero__title span { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__desc { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text-secondary); margin-bottom: 36px; max-width: 540px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 540px; }
.metric__value { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: -0.02em; background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric__label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ============================================ Currency Widget ============================================ */
.currency-widget { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: 28px; position: relative; overflow: hidden; }
.currency-widget::before { content: ''; position: absolute; top: -50%; right: -30%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(79, 127, 255, 0.15), transparent 70%); pointer-events: none; }
.currency-widget__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; position: relative; }
.currency-widget__title { font-size: 1rem; font-weight: 600; }
.currency-widget__source { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.currency-widget__source::before { content: ''; width: 8px; height: 8px; background: var(--color-success); border-radius: 50%; animation: pulse 2s infinite; box-shadow: 0 0 8px var(--color-success); }
.rate-list { display: flex; flex-direction: column; gap: 14px; position: relative; }
.rate-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 14px; background: var(--bg-elevated); border-radius: var(--radius-md); border: 1px solid var(--border-subtle); transition: all var(--duration-fast); }
.rate-item:hover { border-color: var(--accent-primary); transform: translateX(4px); }
.rate-flag { width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); }
.rate-name { font-weight: 600; font-size: 0.95rem; }
.rate-code { color: var(--text-muted); font-size: 0.8rem; }
.rate-value { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; }
.rate-change { font-size: 0.8rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); min-width: 56px; text-align: center; }
.rate-change--up { background: rgba(34, 197, 94, 0.12); color: var(--color-success); }
.rate-change--down { background: rgba(239, 68, 68, 0.12); color: var(--color-danger); }

/* ============================================ Section ============================================ */
.section { padding: clamp(60px, 8vw, 100px) 0; position: relative; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section__eyebrow { display: inline-block; color: var(--accent-gold); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 16px; }
.section__title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.025em; }
.section__desc { font-size: 1.1rem; color: var(--text-secondary); }

/* ============================================ Services / Payment Systems ============================================ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px; transition: all var(--duration-base) var(--ease-out); position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--gradient-primary); opacity: 0; transition: opacity var(--duration-base); }
.service-card:hover { transform: translateY(-4px); border-color: var(--border-medium); box-shadow: var(--shadow-md); }
.service-card:hover::before { opacity: 1; }
.service-card__icon { width: 52px; height: 52px; background: var(--bg-elevated); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--accent-primary); }
.service-card__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.service-card__desc { color: var(--text-secondary); font-size: 0.95rem; }
.service-card__tag { display: inline-block; margin-top: 16px; padding: 4px 10px; background: rgba(79, 127, 255, 0.1); color: var(--accent-primary); font-size: 0.75rem; border-radius: var(--radius-sm); font-weight: 600; }

/* ============================================ Features / Benefits ============================================ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature { padding: 28px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); position: relative; transition: all var(--duration-base); }
.feature:hover { border-color: var(--accent-gold); }
.feature__num { font-size: 0.85rem; font-weight: 700; color: var(--accent-gold); margin-bottom: 12px; letter-spacing: 0.05em; }
.feature__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature__desc { color: var(--text-secondary); font-size: 0.95rem; }

/* ============================================ Stats bar ============================================ */
.stats { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; position: relative; overflow: hidden; }
.stats::before { content: ''; position: absolute; inset: 0; background: var(--gradient-hero); pointer-events: none; }
.stat { text-align: center; position: relative; }
.stat__value { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { color: var(--text-secondary); font-size: 0.95rem; margin-top: 8px; }

/* ============================================ Chart ============================================ */
.chart-wrap { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: 32px; }
.chart-wrap__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.chart-tabs { display: flex; gap: 6px; background: var(--bg-elevated); padding: 4px; border-radius: var(--radius-pill); }
.chart-tab { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; cursor: pointer; transition: all var(--duration-fast); }
.chart-tab.active { background: var(--accent-primary); color: #fff; }
.chart-tab:not(.active):hover { color: var(--text-primary); }
.chart-svg { width: 100%; height: 300px; }

/* ============================================ Banks strip ============================================ */
.banks { overflow: hidden; position: relative; padding: 20px 0; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }
.banks__track { display: flex; gap: 48px; animation: scroll 40s linear infinite; width: fit-content; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.bank-logo { padding: 16px 28px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 600; white-space: nowrap; font-size: 0.95rem; }

/* ============================================ Forms ============================================ */
.form { display: flex; flex-direction: column; gap: 16px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.input, .select, .textarea { padding: 14px 18px; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; transition: all var(--duration-fast); width: 100%; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(79, 127, 255, 0.15); }
.textarea { resize: vertical; min-height: 100px; font-family: inherit; }

/* ============================================ Calculator ============================================ */
.calculator { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 40px); }
.calc-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: end; }
.calc-field { display: flex; flex-direction: column; gap: 8px; }
.calc-field label { font-size: 0.85rem; color: var(--text-secondary); }
.calc-input-row { display: flex; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
.calc-input-row:focus-within { border-color: var(--accent-primary); }
.calc-input-row input { flex: 1; padding: 16px 18px; background: transparent; border: none; color: var(--text-primary); font-size: 1.15rem; font-weight: 600; font-family: var(--font-mono); }
.calc-input-row input:focus { outline: none; }
.calc-input-row select { padding: 16px; background: transparent; border: none; border-left: 1px solid var(--border-subtle); color: var(--text-primary); font-weight: 600; cursor: pointer; }
.calc-swap { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; align-self: center; margin-bottom: 8px; cursor: pointer; transition: transform var(--duration-fast); color: var(--accent-primary); }
.calc-swap:hover { transform: rotate(180deg); border-color: var(--accent-primary); }
.calc-result { margin-top: 24px; padding: 20px; background: var(--bg-elevated); border-radius: var(--radius-md); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.calc-result__item { display: flex; flex-direction: column; }
.calc-result__label { font-size: 0.8rem; color: var(--text-muted); }
.calc-result__value { font-weight: 700; font-family: var(--font-mono); font-size: 1.05rem; }
.calc-result__value--gold { color: var(--accent-gold); }

/* ============================================ Footer ============================================ */
.footer { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding: 60px 0 32px; margin-top: 80px; }
.footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.footer__brand { max-width: 320px; }
.footer__brand .logo { margin-bottom: 16px; }
.footer__brand p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.footer__socials { display: flex; gap: 12px; }
.footer__socials a { width: 40px; height: 40px; background: var(--bg-elevated); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--duration-fast); border: 1px solid var(--border-subtle); }
.footer__socials a:hover { color: var(--accent-primary); border-color: var(--accent-primary); background: rgba(79, 127, 255, 0.1); }
.footer__col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 20px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-primary); }
.footer__col ul { display: flex; flex-direction: column; gap: 12px; }
.footer__col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer__col a:hover { color: var(--text-primary); }
.footer__bottom { padding-top: 32px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: 0.85rem; }

/* ============================================ Floating contact widget ============================================ */
.contact-fab { position: fixed; bottom: 24px; right: 24px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab-trigger { width: 60px; height: 60px; border-radius: 50%; background: var(--gradient-primary); box-shadow: 0 8px 32px rgba(79, 127, 255, 0.4); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--duration-base) var(--ease-out); color: #fff; position: relative; }
.fab-trigger::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(79, 127, 255, 0.5); animation: ringPulse 2s infinite; }
@keyframes ringPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.fab-trigger:hover { transform: scale(1.05); }
.fab-panel { display: none; width: 340px; max-width: calc(100vw - 48px); background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); animation: slideUp 0.3s var(--ease-out); }
.fab-panel.open { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fab-panel h3 { font-size: 1.1rem; margin-bottom: 6px; }
.fab-panel p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; }
.fab-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); cursor: pointer; }
.fab-close:hover { color: var(--text-primary); }

/* ============================================ Accordion (FAQ) ============================================ */
.accordion { display: flex; flex-direction: column; gap: 12px; max-width: 840px; margin: 0 auto; }
.accord-item { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--duration-fast); }
.accord-item.open { border-color: var(--accent-primary); }
.accord-q { width: 100%; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; text-align: left; font-weight: 600; font-size: 1rem; gap: 16px; }
.accord-q::after { content: '+'; font-size: 1.5rem; color: var(--accent-primary); transition: transform var(--duration-base); font-weight: 300; line-height: 1; }
.accord-item.open .accord-q::after { transform: rotate(45deg); }
.accord-a { max-height: 0; overflow: hidden; transition: max-height var(--duration-base) var(--ease-out); }
.accord-a > div { padding: 0 24px 20px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }
.accord-item.open .accord-a { max-height: 500px; }

/* ============================================ Legal pages ============================================ */
.legal-content { max-width: 840px; margin: 0 auto; padding: 40px 0; }
.legal-content h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 24px; }
.legal-content h2 { font-size: 1.4rem; margin: 32px 0 16px; color: var(--text-primary); }
.legal-content h3 { font-size: 1.1rem; margin: 24px 0 12px; }
.legal-content p, .legal-content li { color: var(--text-secondary); line-height: 1.75; font-size: 0.95rem; }
.legal-content ul, .legal-content ol { padding-left: 24px; margin-bottom: 16px; }
.legal-content li { margin-bottom: 8px; list-style: disc; }
.legal-content strong { color: var(--text-primary); }
.legal-meta { color: var(--text-muted); font-size: 0.85rem; padding: 16px; background: var(--bg-surface); border-radius: var(--radius-md); margin-bottom: 32px; }

/* ============================================ Responsive ============================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav, .header__phone { display: none; }
  .burger { display: flex; }
  .header__cta .btn--ghost, .header__cta .btn--primary { display: none; }
  .header__inner { height: 64px; gap: 12px; }
  form[data-lead-form] { grid-template-columns: 1fr !important; }
  .nav--mobile { display: none; position: fixed; top: 64px; left: 0; right: 0; height: calc(100vh - 64px); background: var(--bg-base); flex-direction: column; padding: 24px 20px; gap: 8px; z-index: 99; overflow-y: auto; align-items: stretch; box-sizing: border-box; }
  .nav--mobile.open { display: flex; }
  .nav--mobile a { padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg-surface); width: 100%; font-size: 1rem; }
  .nav--mobile a.active { background: rgba(79, 127, 255, 0.1); color: var(--accent-primary); }
  .hero__metrics { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-swap { transform: rotate(90deg); margin: 0 auto; }
  .calc-swap:hover { transform: rotate(270deg); }
  .contact-fab { bottom: 16px; right: 16px; }
  .fab-trigger { width: 54px; height: 54px; }
}
@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .currency-widget { padding: 20px; }
  .service-card { padding: 24px; }
}

/* Reduced motion */
@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; }
}

/* ============================================
   Блог и статьи
   ============================================ */
.article { max-width: 760px; margin: 0 auto; }
.article__meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.article__lead { font-size: 1.15rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border-subtle); }
.article__body { font-size: 1.05rem; line-height: 1.8; color: var(--text-secondary); }
.article__body h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--text-primary); margin: 48px 0 16px; }
.article__body h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--text-primary); margin: 32px 0 12px; }
.article__body p { margin: 0 0 18px; }
.article__body ul, .article__body ol { margin: 0 0 20px; padding-left: 24px; }
.article__body li { margin-bottom: 10px; }
.article__body strong { color: var(--text-primary); }
.article__body a { color: var(--accent-primary); }
.article__body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
.article__body th, .article__body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.article__body th { color: var(--text-primary); font-weight: 600; background: var(--bg-surface); }
.article__note { background: rgba(245,158,11,0.08); border-left: 3px solid var(--color-warning); border-radius: var(--radius-sm); padding: 16px 20px; margin: 24px 0; }
.article__note strong { color: var(--color-warning); }
.article__cta { background: var(--gradient-primary); border-radius: var(--radius-xl); padding: clamp(28px,5vw,44px); text-align: center; color: #fff; margin: 48px 0 0; }
.article__cta h3 { color: #fff; margin-bottom: 12px; }
.article__cta p { color: rgba(255,255,255,0.85); margin-bottom: 24px; }

.post-list { display: grid; gap: 20px; }
.post-card { display: block; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 28px; text-decoration: none; transition: border-color var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out); }
.post-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.post-card__tag { display: inline-block; font-size: 0.8rem; color: var(--accent-primary); margin-bottom: 10px; }
.post-card__title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.post-card__desc { color: var(--text-secondary); font-size: 0.98rem; line-height: 1.6; }
.breadcrumbs { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-primary); }

/* ============================================
   Типографика статей — воздух и ритм
   ============================================ */
.article__body > h2:first-child { margin-top: 0; }
.article__body h2 { padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.article__body p + h3 { margin-top: 28px; }
.article__body ul li::marker, .article__body ol li::marker { color: var(--accent-primary); }
.article__body ol { counter-reset: none; }
.article__body table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.article__body table th, .article__body table td { white-space: normal; min-width: 120px; }
.article__lead { font-size: 1.2rem; }

/* ============================================
   Мобильная адаптация (инлайн-сетки + статьи)
   ============================================ */
@media (max-width: 860px) {
  /* инлайн-гриды на посадочных и в контактах — в одну колонку */
  .service-detail > div[style*="grid"],
  .container > div[style*="grid-template-columns:1fr 1fr"],
  .container > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .service-detail { padding: 28px !important; }
}
@media (max-width: 760px) {
  .article { max-width: 100%; }
  .article__body { font-size: 1rem; line-height: 1.75; }
  .article__body h2 { margin: 36px 0 14px; }
  .article__body h3 { margin: 26px 0 10px; }
  .article__lead { font-size: 1.08rem; }
  .article__meta { gap: 8px; font-size: 0.85rem; }
  .article__cta { padding: 28px 20px; }
  .post-card { padding: 22px; }
  .post-card__title { font-size: 1.15rem; }
  .breadcrumbs { font-size: 0.82rem; }
  /* горизонтальный скролл только внутри таблицы, страница не едет */
  .article__body table { font-size: 0.9rem; }
}
@media (max-width: 480px) {
  .article__body ul, .article__body ol { padding-left: 20px; }
  .article__cta .btn { width: 100%; }
}

/* ============================================
   Дисклеймер в подвале
   ============================================ */
.footer__disclaimer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 20px;
  padding-top: 16px;
  color: #4A5568;
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: left;
  opacity: 0.85;
}
.footer__disclaimer a { color: #5C6B85; text-decoration: underline; }
.footer__disclaimer a:hover { color: var(--accent-primary); }
@media (max-width: 760px) {
  .footer__disclaimer { text-align: left; font-size: 0.66rem; }
}

/* ============================================
   Кроссбраузерность и адаптив
   ============================================ */

/* Safari < 16 / старые движки: overflow-x:clip не поддерживается */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* Safari < 14.1: inset не поддерживается */
@supports not (inset: 0) {
  .hero::before, .stats::before { top: 0; right: 0; bottom: 0; left: 0; }
}

/* Safari < 14.1 / старый Firefox: нет gap во flex — держим отступы через margin */
@supports not (gap: 1px) {
  .nav > a { margin-right: 28px; }
  .hero__cta > .btn { margin-right: 12px; margin-bottom: 12px; }
  .footer__socials > a { margin-right: 12px; }
  .post-list > .post-card { margin-bottom: 20px; }
}

/* Firefox: тонкий скроллбар в тон интерфейсу */
@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: #2A3140 var(--bg-base); }
}

/* iOS Safari: safe-area (челка/вырез) и корректная высота */
@supports (padding: max(0px)) {
  .header .container,
  .footer .container { padding-left: max(var(--container-padding), env(safe-area-inset-left));
                       padding-right: max(var(--container-padding), env(safe-area-inset-right)); }
  .contact-fab { bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* iOS: не зумить форму при фокусе — минимум 16px */
@media (max-width: 760px) {
  .input, .textarea, select { font-size: 16px; }
}

/* пункты меню не переносятся по словам */
.nav a, .nav--mobile a { white-space: nowrap; }

/* ---------- ПЛАНШЕТЫ: 761–900 — бургер, как на телефоне ---------- */
@media (min-width: 761px) and (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header__phone { display: none; }
  .header__cta .btn--primary, .header__cta .btn--ghost { display: none; }
  .nav--mobile { display: none; position: fixed; top: 64px; left: 0; right: 0; height: calc(100vh - 64px); background: var(--bg-base); flex-direction: column; padding: 24px 20px; gap: 8px; z-index: 99; overflow-y: auto; align-items: stretch; box-sizing: border-box; }
  .nav--mobile.open { display: flex; }
  .nav--mobile a { padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg-surface); width: 100%; font-size: 1rem; }
}

/* ---------- ПЛАНШЕТЫ: 901–1024 ---------- */
@media (min-width: 901px) and (max-width: 1024px) {
  .nav { gap: 16px; }
  .nav a { font-size: 0.85rem; }
  .header__phone { display: none; }
  .header__cta .btn--ghost { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__metrics { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .article { max-width: 92%; }
  .post-list { grid-template-columns: 1fr 1fr; }
}

/* общие правила для всей планшетной зоны */
@media (min-width: 761px) and (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .service-detail > div[style*="grid"] { grid-template-columns: 1fr !important; gap: 28px !important; }
  .container > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .article { max-width: 92%; }
  .post-list { grid-template-columns: 1fr 1fr; }
}

/* ---------- ПЛАНШЕТ В АЛЬБОМЕ / небольшой ноутбук ---------- */
@media (min-width: 1025px) and (max-width: 1200px) {
  .nav { gap: 20px; }
  .nav a { font-size: 0.9rem; }
}

/* ---------- ДЕСКТОП: широкие экраны ---------- */
@media (min-width: 1600px) {
  .container { max-width: 1320px; }
  .article { max-width: 820px; }
}

/* Печать: чистая версия без интерфейса */
@media print {
  .header, .footer__socials, .contact-fab, .ticker, .article__cta, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .article__body, .article__lead { color: #000; }
  a { color: #000; text-decoration: underline; }
}
