:root {
  --tm-bg: #07080c;
  --tm-bg-elevated: #11131a;
  --tm-bg-card: rgba(255, 255, 255, 0.04);
  --tm-text: #f4f6fb;
  --tm-text-muted: #9aa3b5;
  --tm-accent: #ff6b2c;
  --tm-accent-2: #ff9f1c;
  --tm-accent-glow: rgba(255, 107, 44, 0.35);
  --tm-border: rgba(255, 255, 255, 0.08);
  --tm-radius: 20px;
  --tm-radius-sm: 12px;
  --tm-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --tm-font: "Manrope", system-ui, sans-serif;
  --tm-font-display: "Unbounded", "Manrope", sans-serif;
  --tm-container: 1180px;
  --tm-header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body.tm-body {
  margin: 0;
  font-family: var(--tm-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tm-text);
  background: var(--tm-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.tm-container {
  width: min(100% - 32px, var(--tm-container));
  margin-inline: auto;
}

/* Header */
.tm-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--tm-header-h);
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tm-border);
  transition: background 0.3s, box-shadow 0.3s;
}

.tm-header.is-scrolled {
  background: rgba(7, 8, 12, 0.92);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tm-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.tm-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tm-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.tm-logo__text {
  font-family: var(--tm-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tm-logo__text span {
  color: var(--tm-accent);
}

.tm-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tm-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--tm-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}

.tm-nav a:hover {
  color: var(--tm-text);
  background: var(--tm-bg-card);
}

.tm-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-header__phone {
  font-weight: 700;
  white-space: nowrap;
  color: var(--tm-text);
}

.tm-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tm-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tm-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.tm-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tm-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.tm-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.tm-btn:hover {
  transform: translateY(-2px);
}

.tm-btn--sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.tm-btn--lg {
  padding: 16px 28px;
  font-size: 1rem;
}

.tm-btn--primary {
  background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2));
  color: #111;
  box-shadow: 0 12px 40px var(--tm-accent-glow);
}

.tm-btn--ghost {
  background: transparent;
  border-color: var(--tm-border);
  color: var(--tm-text);
}

.tm-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--tm-bg-card);
}

.tm-btn--dark {
  background: #111;
  color: #fff;
}

.tm-btn--white {
  background: #fff;
  color: #111;
}

/* Hero */
.tm-main {
  padding-top: var(--tm-header-h);
}

.tm-hero {
  position: relative;
  min-height: calc(100vh - var(--tm-header-h));
  min-height: calc(100dvh - var(--tm-header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.tm-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: tm-hero-zoom 20s ease-in-out infinite alternate;
}

@keyframes tm-hero-zoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.tm-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 8, 12, 0.94) 0%, rgba(7, 8, 12, 0.72) 45%, rgba(7, 8, 12, 0.35) 100%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 44, 0.18), transparent 40%);
}

.tm-hero__content {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
  max-width: 760px;
}

.tm-badge {
  display: inline-block;
  padding: 8px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 107, 44, 0.15);
  border: 1px solid rgba(255, 107, 44, 0.35);
  color: #ffb089;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-hero__title {
  margin: 0 0 20px;
  font-family: var(--tm-font-display);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.tm-hero__title span {
  background: linear-gradient(135deg, var(--tm-accent), var(--tm-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tm-hero__lead {
  margin: 0 0 32px;
  font-size: 1.12rem;
  color: var(--tm-text-muted);
  max-width: 560px;
}

.tm-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.tm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 560px;
}

.tm-stat {
  padding: 16px;
  border-radius: var(--tm-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tm-border);
  backdrop-filter: blur(8px);
}

.tm-stat strong {
  display: block;
  font-family: var(--tm-font-display);
  font-size: 1.4rem;
  color: var(--tm-accent-2);
}

.tm-stat span {
  font-size: 0.78rem;
  color: var(--tm-text-muted);
}

/* Sections */
.tm-section {
  padding: 88px 0;
}

.tm-section--dark {
  background: var(--tm-bg-elevated);
}

.tm-section--accent {
  background: linear-gradient(135deg, #ff6b2c, #ff9f1c);
  color: #111;
}

.tm-section--compact {
  padding: 64px 0;
}

.tm-section__head {
  max-width: 640px;
  margin-bottom: 48px;
}

.tm-section__head h2 {
  margin: 8px 0 12px;
  font-family: var(--tm-font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.tm-section__head p {
  margin: 0;
  color: var(--tm-text-muted);
}

.tm-section--accent .tm-section__head p,
.tm-section--accent h2 {
  color: inherit;
}

.tm-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tm-accent);
}

.tm-section__cta {
  margin-top: 40px;
  text-align: center;
}

/* Services grid */
.tm-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.tm-service-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--tm-radius);
  background: var(--tm-bg-card);
  border: 1px solid var(--tm-border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.tm-service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 44, 0.35);
  box-shadow: var(--tm-shadow);
}

.tm-service-card__icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.tm-service-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.tm-service-card p {
  margin: 0 0 16px;
  flex: 1;
  color: var(--tm-text-muted);
  font-size: 0.92rem;
}

.tm-service-card__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tm-accent-2);
}

/* Gallery */
.tm-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tm-gallery__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--tm-radius-sm);
  overflow: hidden;
  border: 1px solid var(--tm-border);
}

.tm-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.tm-gallery__item span {
  position: absolute;
  inset: auto 0 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.tm-gallery__item:hover img {
  transform: scale(1.08);
}

.tm-gallery__item:hover span {
  opacity: 1;
  transform: translateY(0);
}

/* Features */
.tm-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tm-feature {
  padding: 32px;
  border-radius: var(--tm-radius);
  background: var(--tm-bg-card);
  border: 1px solid var(--tm-border);
}

.tm-feature__num {
  font-family: var(--tm-font-display);
  font-size: 0.85rem;
  color: var(--tm-accent);
  margin-bottom: 12px;
}

.tm-feature h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.tm-feature p {
  margin: 0;
  color: var(--tm-text-muted);
}

/* CTA banner */
.tm-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.tm-cta-banner h2 {
  margin: 0 0 8px;
  font-family: var(--tm-font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.tm-cta-banner p {
  margin: 0;
  opacity: 0.85;
}

.tm-cta-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* News */
.tm-news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tm-news-card {
  padding: 24px;
  border-radius: var(--tm-radius-sm);
  background: var(--tm-bg-card);
  border: 1px solid var(--tm-border);
  transition: border-color 0.2s;
}

.tm-news-card:hover {
  border-color: rgba(255, 107, 44, 0.3);
}

.tm-news-card time {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--tm-text-muted);
}

.tm-news-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

/* Inner pages */
.tm-page-hero {
  padding: 48px 0 32px;
  background: linear-gradient(180deg, rgba(255, 107, 44, 0.08), transparent);
  border-bottom: 1px solid var(--tm-border);
}

.tm-page-hero h1 {
  margin: 0;
  font-family: var(--tm-font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.tm-page-hero p,
.tm-page-hero time {
  margin-top: 12px;
  color: var(--tm-text-muted);
}

.tm-page-hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.tm-back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--tm-accent-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.tm-prose {
  color: var(--tm-text-muted);
  line-height: 1.75;
}

.tm-prose h2,
.tm-prose h3 {
  color: var(--tm-text);
}

.tm-prose img {
  border-radius: var(--tm-radius-sm);
  margin: 16px 0;
}

.tm-prose table {
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* Footer */
.tm-footer {
  background: #050508;
  border-top: 1px solid var(--tm-border);
  padding-top: 64px;
}

.tm-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.tm-footer h4 {
  margin: 0 0 16px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tm-text-muted);
}

.tm-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tm-footer li {
  margin-bottom: 10px;
}

.tm-footer a:hover {
  color: var(--tm-accent-2);
}

.tm-footer__brand p {
  margin: 16px 0 0;
  color: var(--tm-text-muted);
  max-width: 320px;
}

.tm-footer__contacts li:last-child {
  color: var(--tm-text-muted);
  font-size: 0.9rem;
}

.tm-footer__bottom {
  border-top: 1px solid var(--tm-border);
  padding: 20px 0;
}

.tm-footer__bottom .tm-container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--tm-text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .tm-nav {
    position: fixed;
    inset: var(--tm-header-h) 0 auto;
    flex-direction: column;
    padding: 16px;
    background: rgba(7, 8, 12, 0.98);
    border-bottom: 1px solid var(--tm-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .tm-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .tm-nav a {
    padding: 12px 16px;
  }

  .tm-burger {
    display: flex;
  }

  .tm-header__phone {
    display: none;
  }

  .tm-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .tm-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tm-features {
    grid-template-columns: 1fr;
  }

  .tm-news {
    grid-template-columns: 1fr;
  }

  .tm-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tm-section {
    padding: 64px 0;
  }

  .tm-hero__cta {
    flex-direction: column;
  }

  .tm-hero__cta .tm-btn {
    width: 100%;
  }

  .tm-services {
    grid-template-columns: 1fr;
  }

  .tm-cta-banner__actions {
    width: 100%;
  }

  .tm-cta-banner__actions .tm-btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
