/* Robotrack — Design tokens & base */
:root {
  --color-primary: #FF6B00;
  --color-primary-hover: #E55F00;
  --color-primary-soft: rgba(255, 107, 0, 0.12);
  --color-bg: #FFFFFF;
  --color-bg-alt: #FFFAF7;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-border: rgba(0, 0, 0, 0.08);

  --shadow-border:
    0px 0px 0px 1px rgba(0, 0, 0, 0.06),
    0px 1px 2px -1px rgba(0, 0, 0, 0.06),
    0px 2px 4px 0px rgba(0, 0, 0, 0.04);
  --shadow-border-hover:
    0px 0px 0px 1px rgba(0, 0, 0, 0.08),
    0px 1px 2px -1px rgba(0, 0, 0, 0.08),
    0px 2px 4px 0px rgba(0, 0, 0, 0.06);
  --shadow-elevated:
    0px 4px 16px rgba(255, 107, 0, 0.12),
    0px 8px 32px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --header-height: 72px;
  --container: 1120px;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

[data-theme="dark"] {
  --color-bg: #0F0F0F;
  --color-bg-alt: #161616;
  --color-surface: #1A1A1A;
  --color-text: #F5F5F5;
  --color-text-muted: #A0A0A0;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-primary-soft: rgba(255, 107, 0, 0.18);

  --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, 0.13);
  --shadow-elevated:
    0px 4px 16px rgba(255, 107, 0, 0.15),
    0px 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  transition-property: background-color, color;
  transition-duration: 200ms;
  transition-timing-function: ease-out;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

[data-theme="dark"] img {
  outline-color: rgba(255, 255, 255, 0.1);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Typography */
h1, h2, h3 {
  text-wrap: balance;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition-property: transform, background-color, color, box-shadow, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.35);
}

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

.btn--ghost:hover {
  box-shadow: var(--shadow-border-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary-soft);
}

.btn--block {
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 200ms;
}

.header--scrolled {
  box-shadow: var(--shadow-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.header__logo img {
  height: 52px;
  width: auto;
  outline: none;
  transition-property: opacity, transform;
  transition-duration: 150ms;
}

.header__logo:hover img {
  opacity: 0.85;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition-property: color, background-color;
  transition-duration: 150ms;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transform: translateX(-50%);
  transition-property: width;
  transition-duration: 200ms;
  transition-timing-function: var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 28px);
}

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

.header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  min-height: 40px;
  transition-property: color, background-color;
  transition-duration: 150ms;
}

.header__phone:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.header__phone-icon {
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition-property: background-color, color, transform;
  transition-duration: 150ms;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.theme-toggle:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle__icons {
  position: relative;
  width: 20px;
  height: 20px;
}

.theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-property: opacity, transform, filter;
  transition-duration: 300ms;
  transition-timing-function: var(--ease-out);
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.25);
  filter: blur(4px);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.25);
  filter: blur(4px);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition-property: background-color, transform;
  transition-duration: 150ms;
}

.burger:active {
  transform: scale(0.96);
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition-property: transform, opacity;
  transition-duration: 200ms;
}

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

.burger.active span:nth-child(2) {
  opacity: 0;
}

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

/* Hero */
.hero {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 80px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero__text {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.08;
  animation: float 6s ease-in-out infinite;
}

.hero__orb--1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 10%;
}

.hero__orb--2 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: 5%;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.hero__robot {
  position: relative;
  z-index: 1;
  animation: float 5s ease-in-out infinite;
  animation-delay: -1s;
}

.hero__robot-head {
  width: 100px;
  height: 80px;
  background: var(--color-primary);
  border-radius: 20px;
  margin: 0 auto 8px;
  position: relative;
  box-shadow: var(--shadow-elevated);
}

.hero__robot-head::before,
.hero__robot-head::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 28px;
}

.hero__robot-head::before { left: 22px; }
.hero__robot-head::after { right: 22px; }

.hero__robot-body {
  width: 120px;
  height: 100px;
  background: color-mix(in srgb, var(--color-primary) 80%, #000);
  border-radius: 16px;
  margin: 0 auto;
  box-shadow: var(--shadow-elevated);
}

.hero__robot-arm {
  position: absolute;
  width: 20px;
  height: 60px;
  background: var(--color-primary);
  border-radius: 10px;
  top: 100px;
}

.hero__robot-arm--left {
  left: -10px;
  transform: rotate(15deg);
}

.hero__robot-arm--right {
  right: -10px;
  transform: rotate(-15deg);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--gallery {
  padding-bottom: 96px;
}

.section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: 17px;
  color: var(--color-text-muted);
}

/* About */
.about__grid {
  display: grid;
  gap: 48px;
}

.about__text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 18px;
  color: var(--color-text-muted);
}

.advantages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.advantage-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-border);
  transition-property: box-shadow, transform;
  transition-duration: 200ms;
  transition-timing-function: ease-out;
}

.advantage-card:hover {
  box-shadow: var(--shadow-border-hover);
  transform: translateY(-2px);
}

.advantage-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-radius: var(--radius-md);
}

.advantage-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.advantage-card__text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Carousel */
.carousel {
  position: relative;
  border-radius: calc(var(--radius-xl) + 8px);
  padding: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-border);
}

.carousel__track {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.carousel__slide {
  flex: 0 0 100%;
  transition-property: opacity, transform;
  transition-duration: 400ms;
  transition-timing-function: var(--ease-out);
}

.carousel__slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  color: var(--color-text);
  box-shadow: var(--shadow-border);
  cursor: pointer;
  transition-property: transform, box-shadow, background-color;
  transition-duration: 150ms;
  backdrop-filter: blur(8px);
}

.carousel__btn:hover {
  box-shadow: var(--shadow-border-hover);
  background: var(--color-bg);
}

.carousel__btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel__btn--prev { left: 20px; }
.carousel__btn--next { right: 20px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel__dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition-property: background-color, transform, width;
  transition-duration: 200ms;
}

.carousel__dot::after {
  content: '';
  position: absolute;
  inset: -16px;
}

.carousel__dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}

.carousel__dot:active {
  transform: scale(0.96);
}

/* Pricing */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  position: relative;
  padding: 32px 28px;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-border);
  transition-property: box-shadow, transform;
  transition-duration: 200ms;
}

.pricing-card:hover {
  box-shadow: var(--shadow-border-hover);
  transform: translateY(-4px);
}

.pricing-card--featured {
  box-shadow: var(--shadow-elevated);
  border: 2px solid var(--color-primary);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.pricing-card__price {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.pricing-card__currency {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.pricing-card__features {
  margin-bottom: 28px;
}

.pricing-card__features li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.pricing-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.6;
}

/* Schedule */
.schedule {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-border);
  overflow: hidden;
}

.schedule__row {
  display: grid;
  grid-template-columns: 140px 120px 1fr;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-border);
  transition-property: background-color;
  transition-duration: 150ms;
}

.schedule__row:last-child {
  border-bottom: none;
}

.schedule__row:hover {
  background: var(--color-primary-soft);
}

.schedule__day {
  font-weight: 600;
  font-size: 15px;
}

.schedule__time {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 14px;
}

.schedule__group {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Contacts */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contacts__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-radius: var(--radius-md);
}

.contact-item__label {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.contact-item__value {
  font-size: 16px;
  font-weight: 500;
  transition-property: color;
  transition-duration: 150ms;
}

a.contact-item__value:hover {
  color: var(--color-primary);
}

.contact-form {
  padding: 32px;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition-property: border-color, box-shadow;
  transition-duration: 150ms;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__logo {
  outline: none;
}

.footer__copy {
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer__domain {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  transition-property: opacity;
  transition-duration: 150ms;
}

.footer__domain:hover {
  opacity: 0.8;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  max-width: 360px;
}

.toast__content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--color-border);
}

.toast__text {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.toast__close {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast__close:hover {
  color: var(--color-primary);
}

/* Reveal — content always visible, subtle motion on scroll */
.reveal {
  opacity: 1;
  transform: translateY(12px);
  transition-property: transform;
  transition-duration: 500ms;
  transition-timing-function: var(--ease-out);
}

.reveal.visible {
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }

/* Responsive */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__text {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    height: 280px;
  }

  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .advantages {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header__logo img {
    height: 44px;
  }

  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px 24px 24px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition-property: transform, opacity;
    transition-duration: 250ms;
    transition-timing-function: var(--ease-out);
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
  }

  .burger {
    display: flex;
  }

  .header__phone span {
    display: none;
  }

  .schedule__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .carousel__btn--prev { left: 12px; }
  .carousel__btn--next { right: 12px; }

  .section {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 60px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .contact-form {
    padding: 24px 20px;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
