/* ─── Спидтест «Провайдеры.рус» — стили страницы ───
   Дизайн-токены и вёрстка перенесены из макета (test-skorosti, дизайн-система
   Провайдеры.рус). Шрифты самохостятся из assets/fonts. */

/* Шрифты: Inter (цифры, заголовки — --font-secondary), Montserrat (основной). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Montserrat: woff2-субсет (кириллица+латиница) из исходных ttf макета —
   ~33 КБ на начертание вместо ~330 КБ (pyftsubset, см. память проекта). */
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Дизайн-токены Провайдеры.рус (используемое подмножество) */
:root {
  --font-primary:   "Montserrat", "Helvetica", "Arial", sans-serif;
  --font-secondary: "Inter", "Montserrat", "Arial", sans-serif;

  --color-primary:          #2BBE48;
  --color-primary-hover:    #1fa038;
  --color-primary-subtle:   #EBF5D7;
  --color-accent-lime:      #CDFF63;
  --color-accent-lime-mid:  #BCE529;

  --color-bg-page:          #F0F1F4;
  --color-neutral-200:      #F0F1F4;
  --color-neutral-300:      #E8EDF4;
  --color-neutral-400:      #D8D9DA;
  --color-neutral-800:      #646668;

  --color-text-primary:     #0C0D0D;
  --color-text-secondary:   #A4A5A8;

  --gradient-primary: linear-gradient(135deg, #b1e541 -100%, #0fb661 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* атрибут hidden должен побеждать display:flex у скрываемых блоков */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg-page); font-family: var(--font-primary); color: var(--color-text-primary); font-size: 14px; font-weight: 500; }
img, svg { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header (compact) */
.hdr { position: sticky; top: 0; z-index: 80; background: #fff; border-bottom: 1px solid var(--color-neutral-200); }
.hdr__in { display: flex; align-items: center; gap: 22px; height: 68px; }
.hdr__nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.hdr__nav a:hover { color: var(--color-primary); }
.hdr__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.hcta { display: inline-flex; align-items: center; padding: 11px 22px; background: var(--color-accent-lime); border: none; border-radius: 20px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--color-text-primary); cursor: pointer; }
.hcta:hover { background: var(--color-accent-lime-mid); }
@media (max-width: 760px) { .hdr__nav, .hphone small { display: none; } }

/* Hero */
.st-hero { text-align: center; padding: 44px 0 8px; }
.st-hero h1 { font-family: var(--font-secondary); font-size: 38px; line-height: 1.08; letter-spacing: -.02em; font-weight: 700; margin: 0 0 10px; }
.st-hero p { font-size: 16px; font-weight: 500; color: var(--color-text-secondary); max-width: 560px; margin: 0 auto; }

/* Gauge stage */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 30px 0 8px; }
.gauge { position: relative; width: 360px; height: 360px; max-width: 82vw; max-height: 82vw; }
.gauge canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.gauge__phase { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary-hover, #1fa038); min-height: 18px; }
.gauge__num { font-family: var(--font-secondary); font-size: 76px; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--color-text-primary); }
.gauge__unit { font-size: 15px; font-weight: 700; color: var(--color-text-secondary); margin-top: 2px; }
.gauge__hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.gauge__hint b { font-family: var(--font-secondary); font-size: 34px; font-weight: 700; }
.gauge__hint span { font-size: 13px; color: var(--color-text-secondary); font-weight: 600; }

.st-run { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; padding: 16px 44px; background: var(--color-accent-lime); border: none; border-radius: 30px; font-family: inherit; font-size: 17px; font-weight: 800; color: var(--color-text-primary); cursor: pointer; transition: transform .12s, background .2s, box-shadow .2s; box-shadow: 0 10px 30px rgba(43,190,72,.28); }
.st-run:hover { background: var(--color-accent-lime-mid); box-shadow: 0 14px 38px rgba(43,190,72,.36); }
.st-run:active { transform: scale(.97); }
.st-run.is-running { background: var(--color-neutral-200); color: var(--color-text-secondary); box-shadow: none; cursor: default; }
.st-run.is-running:hover { background: var(--color-neutral-200); }

/* Result tiles */
.res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.res__tile { background: #fff; border: 1px solid var(--color-neutral-200); border-radius: 16px; padding: 20px 18px; text-align: center; transition: border-color .2s, box-shadow .2s, transform .3s; }
.res__tile.is-active { border-color: var(--color-primary); box-shadow: 0 10px 26px rgba(43,190,72,.14); transform: translateY(-3px); }
.res__ic { width: 40px; height: 40px; border-radius: 12px; background: var(--color-primary-subtle, #EBF5D7); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--color-primary-hover, #1fa038); }
.res__ic svg { max-width: none; }
.res__label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 6px; }
.res__val { font-family: var(--font-secondary); font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.res__val small { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); }
@media (max-width: 760px) { .res { grid-template-columns: repeat(2, 1fr); } .gauge__num { font-size: 60px; } }

/* Meta row */
.meta { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 22px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); }
.meta span { display: inline-flex; align-items: center; gap: 7px; }
.meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); }

/* Saved notice */
.saved { display: none; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--color-primary-hover); }
.saved.is-visible { display: block; }

/* Verdict / CTA */
.verdict { display: none; margin-top: 40px; border-radius: 20px; padding: 30px 34px; background: var(--gradient-primary); color: #fff; align-items: center; gap: 26px; flex-wrap: wrap; }
.verdict.is-visible { display: flex; }
.verdict__txt { flex: 1; min-width: 260px; }
.verdict__txt h3 { font-family: var(--font-secondary); font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.verdict__txt p { margin: 0; font-size: 14.5px; font-weight: 500; opacity: .95; line-height: 1.5; }
.verdict .btn-w { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; background: #fff; border: none; cursor: pointer; font-family: inherit; border-radius: 24px; font-size: 15px; font-weight: 700; color: var(--color-text-primary); white-space: nowrap; }
.verdict .btn-w:hover { color: var(--color-primary-hover, #1fa038); }

/* Info strip */
.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 44px 0 60px; }
.info__card { background: #fff; border: 1px solid var(--color-neutral-200); border-radius: 16px; padding: 22px; }
.info__card h4 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.info__card p { font-size: 13.5px; font-weight: 500; color: var(--color-text-secondary); line-height: 1.55; margin: 0; }
@media (max-width: 760px) { .info { grid-template-columns: 1fr; } }

/* Countdown launch banner */
.cd { margin-top: 22px; border-radius: 20px; padding: 22px 28px; background: var(--gradient-primary); color: #fff; display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; }
.cd__head { text-align: left; }
.cd__kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.cd__title { font-family: var(--font-secondary); font-size: 22px; font-weight: 700; margin-top: 2px; }
.cd__clock { display: flex; align-items: flex-start; gap: 12px; }
.cd__cell { min-width: 74px; text-align: center; }
.cd__num { font-family: var(--font-secondary); font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; background: rgba(0,0,0,.16); border-radius: 12px; padding: 14px 8px; display: block; }
.cd__label { font-size: 12px; font-weight: 700; color: #fff; margin-top: 8px; text-transform: uppercase; letter-spacing: .04em; }
.cd__sep { font-family: var(--font-secondary); font-size: 40px; font-weight: 700; line-height: 1; padding-top: 12px; color: #fff; opacity: .7; }
@media (max-width: 760px) { .cd { gap: 16px; padding: 18px; } .cd__cell { min-width: 58px; } .cd__num { font-size: 34px; } .cd__sep { display: none; } .cd__head { text-align: center; flex-basis: 100%; } }

/* Modal + consent */
.ov { position: fixed; inset: 0; z-index: 200; background: rgba(12,13,13,.5); display: none; align-items: center; justify-content: center; padding: 20px; animation: ovIn .2s ease; }
.ov.is-open { display: flex; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 20px; padding: 30px 30px 26px; max-width: 420px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.34); animation: modalIn .26s cubic-bezier(.2,.8,.3,1); position: relative; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__x { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 26px; line-height: 1; color: var(--color-text-secondary); cursor: pointer; }
.modal h3 { font-family: var(--font-secondary); font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.modal p { font-size: 14px; font-weight: 500; color: var(--color-text-secondary); margin: 0 0 18px; line-height: 1.5; }
.modal input[type="tel"] { width: 100%; box-sizing: border-box; border: 1px solid var(--color-neutral-300); border-radius: 12px; padding: 14px 16px; font-family: inherit; font-size: 16px; font-weight: 500; outline: none; }
.modal input[type="tel"]:focus { box-shadow: inset 0 0 0 1.5px var(--color-primary); border-color: var(--color-primary); }
.modal__btn { width: 100%; margin-top: 14px; padding: 15px; background: var(--color-accent-lime); border: none; border-radius: 24px; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--color-text-primary); cursor: pointer; transition: background .2s; }
.modal__btn:hover { background: var(--color-accent-lime-mid); }
.modal__consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 11px; line-height: 1.45; color: var(--color-text-secondary); font-weight: 500; }
.modal__consent input { width: auto; margin-top: 1px; accent-color: var(--color-primary); }
.modal__consent a { color: var(--color-primary); }
.modal__ok { text-align: center; padding: 12px 0; display: none; }
.modal__ok-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--color-primary-subtle, #EBF5D7); color: var(--color-primary-hover, #1fa038); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.modal.is-sent .modal__ok { display: block; }
.modal.is-sent .modal__form { display: none; }

.consent-bar { position: fixed; left: 20px; bottom: 20px; z-index: 190; max-width: 440px; background: #fff; border-radius: 16px; box-shadow: 0 16px 44px rgba(0,0,0,.18); padding: 18px 20px; display: none; align-items: center; gap: 18px; animation: cbIn .35s cubic-bezier(.2,.8,.3,1); }
.consent-bar.is-open { display: flex; }
@keyframes cbIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.consent-bar p { margin: 0; font-size: 13px; font-weight: 500; color: var(--color-text-secondary); line-height: 1.5; }
.consent-bar p a { color: var(--color-primary); font-weight: 700; }
.consent-bar__btn { flex-shrink: 0; padding: 12px 24px; background: var(--color-accent-lime); border: none; border-radius: 20px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--color-text-primary); cursor: pointer; transition: background .2s; }
.consent-bar__btn:hover { background: var(--color-accent-lime-mid); }
@media (max-width: 620px) { .consent-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

/* Footer */
.foot { text-align: center; padding: 10px 0 40px; font-size: 13px; font-weight: 500; color: var(--color-text-secondary); }
.foot a { color: var(--color-primary); }
