/* Rotec Telecom — фирменный стиль сайта rotec.ru
   Палитра взята с фирменного бланка ООО «РТКом»: teal #006080 + coral #ff6f59 */

:root {
  --teal: #006080;
  --teal-700: #004a63;
  --teal-900: #0b2d3c;
  --accent: #ff6f59;
  --accent-600: #e85a45;
  --ink: #10202f;
  --muted: #566776;
  --line: #e2e9f1;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 47, .04), 0 8px 24px -12px rgba(16, 32, 47, .18);
  --shadow-lg: 0 2px 4px rgba(16, 32, 47, .05), 0 24px 48px -20px rgba(16, 32, 47, .28);
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --ff: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef4;
    --muted: #9fb0be;
    --line: #22303c;
    --bg: #0d1720;
    --bg-soft: #111e29;
    --card: #14212c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 24px 48px -20px rgba(0, 0, 0, .7);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--accent-600); }
@media (prefers-color-scheme: dark) { a { color: #58b6d8; } }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(52px, 7vw, 96px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: clamp(34px, 4vw, 52px) 0; border-bottom: 1px solid var(--line); }

/* ---------- Лента новостей ---------- */
.feed__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.news__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.news__meta time { font-size: .84rem; color: var(--muted); }
.news h3 { font-size: 1.06rem; }
.section__head { max-width: 760px; margin-bottom: 44px; }
.section__head p { color: var(--muted); font-size: 1.06rem; margin-bottom: 0; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-600); color: #fff; }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }
.btn--outline { border-color: var(--teal); color: var(--teal); }
.btn--outline:hover { background: var(--teal); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn--outline { border-color: #58b6d8; color: #58b6d8; }
  .btn--outline:hover { background: #58b6d8; color: #0d1720; }
}

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
@media (prefers-color-scheme: dark) { .brand img { filter: brightness(1.35); } }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 14px; border-radius: 8px; color: var(--ink);
  font-size: .97rem; font-weight: 500; transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--bg-soft); color: var(--teal); }
.nav a.is-active { color: var(--teal); font-weight: 600; }
@media (prefers-color-scheme: dark) { .nav a.is-active, .nav a:hover { color: #58b6d8; } }

.header__cta { margin-left: 12px; }
.header__cta .btn { padding: 10px 20px; font-size: .94rem; }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .burger { display: block; }
  .header__inner { height: 66px; }
  .nav {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; margin: 0; padding: 12px 24px 24px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header__cta { margin: 16px 0 0; }
  .header__cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 55%, var(--teal) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; right: -140px; top: -160px; width: 620px; height: 620px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 111, 89, .3), transparent 62%);
}
.hero__inner { position: relative; z-index: 1; padding: clamp(64px, 9vw, 116px) 24px clamp(56px, 8vw, 104px); }
.hero__inner h1 { max-width: 880px; }
.hero .eyebrow { color: #ffb3a4; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero p { font-size: clamp(1.05rem, .98rem + .35vw, 1.28rem); color: rgba(255, 255, 255, .85); max-width: 660px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats {
  position: relative; z-index: 1; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: rgba(255, 255, 255, .16); border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero__stats div { background: transparent; padding: 26px 24px; backdrop-filter: blur(2px); }
.hero__stats b { display: block; font-size: 1.9rem; line-height: 1.1; color: #fff; }
.hero__stats span { font-size: .93rem; color: rgba(255, 255, 255, .72); }
.hero__stats--facts b { font-size: 1.02rem; line-height: 1.3; margin-bottom: 6px; }
.hero__stats--facts span { font-size: .88rem; line-height: 1.45; display: block; }
.hero__stats--facts div { padding: 22px 22px; }

/* ---------- Hero с фотографией ---------- */
.hero__photo { position: absolute; inset: 0; z-index: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(11, 45, 60, .96) 0%, rgba(11, 45, 60, .9) 38%,
    rgba(0, 74, 99, .74) 66%, rgba(0, 96, 128, .58) 100%);
}
.hero--photo::before { opacity: .28; }
.hero--photo::after { display: none; }

/* ---------- Отраслевые карточки с фотографией ---------- */
.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); background: var(--teal-900); color: #fff;
  min-height: 300px; isolation: isolate;
}
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2; transition: transform .5s ease;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 45, 60, .3) 0%, rgba(11, 45, 60, .72) 42%, rgba(11, 45, 60, .96) 100%);
}
.tile:hover img { transform: scale(1.04); }
.tile__body { position: relative; padding: 26px 26px 24px; margin-top: auto; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; }
.tile h3 { color: #fff; margin-bottom: .35em; font-size: 1.22rem; }
.tile p { color: rgba(255, 255, 255, .82); font-size: .95rem; margin: 0; }
.tile__more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .93rem; color: #ffb3a4; }
.tile:hover .tile__more { color: #fff; }

/* ---------- Фигура с фотографией в разделах ---------- */
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.shot img { width: 100%; display: block; }
.shot figcaption { padding: 12px 16px; font-size: .84rem; color: var(--muted); background: var(--card); }

/* ---------- Карточки ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .99rem; }
.card ul { color: var(--muted); font-size: .97rem; margin-top: .8em; margin-bottom: 0; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal);
}
@media (prefers-color-scheme: dark) { .card__icon { color: #58b6d8; background: rgba(88, 182, 216, .14); } }
.card__icon svg { width: 24px; height: 24px; stroke-width: 1.7; }
.card__more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: .95rem; }

/* ---------- Карточка оборудования ---------- */
.prod {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow);
}
.prod__img {
  padding: 20px 22px; display: grid; place-items: center;
  background: linear-gradient(180deg, #eef4f8, #dfe9f1); border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) { .prod__img { background: linear-gradient(180deg, #17242f, #101c25); } }
.prod__img img { max-height: 130px; width: auto; object-fit: contain; }
.prod__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.prod__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.prod__head h3 { margin: 0; font-size: 1.1rem; }
.badge {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-600);
}
.badge--teal { background: color-mix(in srgb, var(--teal) 13%, transparent); color: var(--teal); }
@media (prefers-color-scheme: dark) {
  .badge { color: #ff9683; }
  .badge--teal { color: #58b6d8; background: rgba(88, 182, 216, .14); }
}
.prod p { color: var(--muted); font-size: .96rem; margin: 0 0 10px; }
.specs { list-style: none; padding: 0; margin: auto 0 0; font-size: .9rem; color: var(--muted); }
.specs li { position: relative; padding-left: 15px; margin-bottom: .3em; }
.specs li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1.5px; background: var(--accent); }

/* ---------- Документы ---------- */
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs a {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  color: var(--ink); font-size: .97rem; transition: border-color .15s ease, transform .15s ease;
}
.docs a:hover { border-color: var(--teal); transform: translateX(2px); color: var(--ink); }
.docs svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.docs span { margin-left: auto; font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* ---------- Шаги ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; font-size: 1.05rem; font-weight: 700; color: var(--accent);
  letter-spacing: .04em;
}
.step::after { content: ""; position: absolute; top: 30px; left: 0; width: 34px; height: 2px; background: var(--accent); }
.step h3 { font-size: 1.05rem; margin-bottom: .3em; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Вендоры ---------- */
.vendors { display: flex; flex-wrap: wrap; gap: 12px; }
.vendor {
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 22px;
  font-weight: 600; font-size: .97rem; color: var(--ink); background: var(--card);
}
.vendor small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }

.vendor-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.vendor-table th, .vendor-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vendor-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.vendor-table td:first-child { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- CTA ---------- */
.cta {
  border-radius: var(--radius); padding: clamp(36px, 5vw, 60px);
  background: linear-gradient(120deg, var(--teal-900), var(--teal)); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { color: rgba(255, 255, 255, .8); margin: 0; max-width: 540px; }

/* ---------- Страничная шапка ---------- */
.pagehead { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(38px, 5vw, 64px) 0; }
.pagehead h1 { margin-bottom: .25em; }
.pagehead p { color: var(--muted); font-size: 1.1rem; max-width: 720px; margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal); }

/* ---------- Проза ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }

/* ---------- Реквизиты / контакты ---------- */
.dl { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 0; font-size: .97rem; }
.dl dt { padding: 11px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.dl dd { padding: 11px 0; margin: 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) {
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 0; border: 0; }
  .dl dd { padding-top: 2px; }
}

.contact-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact-cards .card p { font-size: 1.05rem; color: var(--ink); }
.contact-cards .card p a { font-weight: 600; }

/* ---------- Форма ---------- */
.form { display: grid; gap: 16px; }
.form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 13px 16px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}
.form textarea { min-height: 140px; resize: vertical; }
.form__row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form > .btn { justify-self: start; }
@media (max-width: 520px) { .form > .btn { justify-self: stretch; justify-content: center; } }
.form__note { font-size: .84rem; color: var(--muted); }
.form__hp { position: absolute; left: -9999px; }
.form-status { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .95rem; display: none; }
.form-status.is-ok { display: block; background: rgba(0, 128, 96, .1); color: #00806a; }
.form-status.is-err { display: block; background: rgba(255, 111, 89, .12); color: var(--accent-600); }

/* ---------- Подвал ---------- */
.footer { background: var(--teal-900); color: rgba(255, 255, 255, .72); padding: 60px 0 28px; font-size: .95rem; }
.footer a { color: rgba(255, 255, 255, .82); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer__logo img { height: 32px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 16px; }
.footer__bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .87rem;
  color: rgba(255, 255, 255, .55);
}

/* ---------- Мелочи ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
