*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable-Italic.woff2') format('woff2');
}

:root {
  --blue: #4274D9;
  --blue-dark: #3459b0;
  --blue-light: rgba(255, 255, 255, 0.16);
  --bg: #4274D9;
  --header-bg: #293681;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.88);
  --surface-text: #111827;
  --surface-text-muted: #4b5563;
  --white: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  --radius-pill: 50px;
  --container: 1200px;
  --page-gutter: 1cm;
  --header-h: clamp(5rem, 14vh, 7.5rem);
  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 6px var(--white);
  color-scheme: light;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100%;
  text-size-adjust: 100%;
}

.page {
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* One screen per page */
.page {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + (2 * var(--page-gutter)));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: var(--page-gutter);
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  border-radius: 8px;
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.btn:focus-visible,
.nav__link:focus-visible,
.menu-toggle:focus-visible,
.play-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.eyebrow {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.75rem, 1.2vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: clamp(0.35rem, 1vh, 0.75rem);
}

.text-accent {
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: clamp(0.7rem, 1.1vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--white);
  color: var(--blue);
}

.btn--primary:hover {
  background: #eef2ff;
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  min-height: 44px;
}

/* Header */
.header {
  flex-shrink: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__img {
  height: clamp(4rem, 11vh, 6rem);
  width: auto;
  max-width: min(22rem, 84vw);
  object-fit: contain;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav__link {
  font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.nav__item--dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 190px;
  background: #1f2937;
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #1f2937;
}

.dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.dropdown a:hover,
.dropdown a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.nav__item--dropdown:hover .dropdown,
.nav__item--dropdown.is-open .dropdown,
.nav__item--dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Main areas — fill remaining viewport */
.hero,
.page-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.page .hero,
.page .page-main {
  background: url('../Fundal1.webp') center center / cover no-repeat;
}

.page .hero::before,
.page .page-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 60, 0.35);
  pointer-events: none;
  z-index: 0;
}

.page[data-page="home"] .hero__inner {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  align-items: center;
}

.page[data-page="home"] {
  --glass-area: calc(100dvh - var(--header-h) - 0.75rem);
  --glass-panel-h: calc(var(--glass-area) * 0.9);
}

.page[data-page="home"] .hero__panel {
  width: 100%;
  background: rgba(15, 22, 55, 0.28);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: clamp(0.78rem, 1.68vh, 1.2rem) clamp(0.75rem, 1.8vw, 1.1rem);
  min-height: calc(var(--glass-panel-h) * 0.72);
  max-height: var(--glass-panel-h);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vh, 0.65rem);
  overflow: hidden;
}

.page[data-page="home"] .hero-quote {
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  font-size: clamp(0.68rem, 0.75vh + 0.32vw, 0.85rem);
}

.page[data-page="home"] .hero-quote__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.page[data-page="home"] .hero-quote__title {
  font-size: clamp(1rem, 1.6vh + 0.6vw, 1.35rem);
  line-height: 1.22;
  margin-bottom: 0.55em;
  color: #ffffff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.page[data-page="home"] .hero-quote p {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1em;
  line-height: 1.36;
  margin-bottom: 0.5em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.page[data-page="home"] .hero-quote p:last-child {
  margin-bottom: 0;
}

.page[data-page="home"] .hero__actions {
  margin-top: 0;
  flex-shrink: 0;
  justify-content: space-between;
}

.page[data-page="home"] .hero__actions .btn {
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  font-size: clamp(0.65rem, 0.9vw, 0.75rem);
}

.hero__content {
  max-height: calc(100dvh - var(--header-h) - 1rem);
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
}

.hero-quote {
  margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
}

.hero-quote__title {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.45rem;
  text-transform: none;
  letter-spacing: 0;
}

.hero-quote p {
  color: var(--text-muted);
  font-size: clamp(0.72rem, 1.1vw, 0.875rem);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

.hero-quote p:last-child {
  margin-bottom: 0;
}

.hero__title {
  font-size: clamp(1.5rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: clamp(0.5rem, 1.5vh, 1.25rem);
}

.hero__desc {
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: clamp(0.75rem, 2vh, 1.5rem);
  font-size: clamp(0.8125rem, 1.4vw, 0.975rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.play-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: clamp(48px, 8vw, 64px);
  height: clamp(48px, 8vw, 64px);
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  border: 4px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.play-btn:hover {
  transform: translateY(-50%) scale(1.05);
  background: #eef2ff;
}

.hero__robot {
  max-width: min(42vw, 420px);
  max-height: calc(100dvh - var(--header-h) - 2rem);
}

.hero__robot img {
  width: 100%;
  max-height: calc(100dvh - var(--header-h) - 2rem);
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
}

/* Inner pages */
.page-main__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.page-main__inner--split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}

.page-main__title {
  font-size: clamp(1.35rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: clamp(0.35rem, 1vh, 0.75rem);
}

.page-main__desc {
  color: var(--text-muted);
  font-size: clamp(0.8125rem, 1.4vw, 0.975rem);
  max-width: 36rem;
  margin-bottom: clamp(0.75rem, 2vh, 1.5rem);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.stat {
  background: var(--white);
  border-radius: 12px;
  padding: clamp(0.75rem, 2vh, 1.25rem);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--surface-text);
}

.stat__num {
  display: block;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
}

.stat__label {
  font-size: clamp(0.7rem, 1.1vw, 0.8125rem);
  color: var(--surface-text-muted);
}

/* Services cards */
.page[data-page="services"] {
  overflow: visible;
}

.page[data-page="services"] .page-main {
  overflow: visible;
  align-items: stretch;
}

.page[data-page="services"] .page-main__inner {
  overflow: visible;
}

.page[data-page="services"] .page-main__inner--services {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.page[data-page="services"].has-expanded-service-card {
  overflow: visible;
}

.page[data-page="services"].has-expanded-service-card .page-main,
.page[data-page="services"].has-expanded-service-card .page-main__inner,
.page[data-page="services"].has-expanded-service-card .page-main__inner--services,
.page[data-page="services"].has-expanded-service-card .services__grid {
  overflow: visible;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(0.65rem, 1.4vw, 1rem);
  width: 100%;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  overflow: visible;
}

.service-card {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: clamp(0.85rem, 1.8vh, 1.25rem) clamp(0.85rem, 1.5vw, 1.15rem);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--surface-text);
  transition:
    box-shadow 0.35s ease,
    max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.service-card.is-expanded {
  z-index: 30;
  height: auto;
  align-self: start;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
}

.service-card.is-expanded .service-card__text {
  flex: 0 1 auto;
}

.service-card.is-expanded.is-expanded-up {
  align-self: end;
}

.service-card.is-expanded.is-expanded-center {
  align-self: start;
}

@media (max-width: 768px) {
  .page[data-page="services"].has-expanded-service-card {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page[data-page="services"].has-expanded-service-card .page-main {
    align-items: flex-start;
    overflow: visible;
  }

  .page[data-page="services"].has-expanded-service-card .page-main__inner--services {
    justify-content: flex-start;
    max-height: none;
  }
}

.service-card.is-expanded.is-scrollable .service-card__text {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.service-card.is-expanded:not(.is-scrollable) .service-card__text {
  overflow: visible;
}

.service-card__title {
  font-size: clamp(0.875rem, 1.25vw, 1.05rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.service-card__text {
  color: var(--surface-text-muted);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  padding-right: 2rem;
  max-height: 8em;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  min-height: 0;
}

.service-card__text p {
  margin-bottom: 0.5em;
}

.service-card__text p:last-child {
  margin-bottom: 0;
}

.service-card__subtitle {
  font-weight: 700;
  color: var(--surface-text);
  margin-top: 0.65em;
}

.service-card__list {
  margin: 0.45em 0 0;
  padding-left: 1.15em;
}

.service-card__list--ordered {
  list-style: decimal;
}

.service-card__list > li {
  margin-bottom: 0.5em;
}

.service-card__list > li:last-child {
  margin-bottom: 0;
}

.service-card__note {
  margin-top: 0.35em;
  font-size: 0.92em;
  font-style: italic;
}

.service-card__more {
  margin-top: auto;
  padding-top: 0.45rem;
  padding-left: 0;
  padding-right: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
  font-weight: 700;
  cursor: pointer;
  text-transform: lowercase;
  flex-shrink: 0;
}

.service-card__more:hover,
.service-card__more:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
}

.service-card__more:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.service-card__num {
  position: absolute;
  right: 0.85rem;
  bottom: 0.65rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue-light);
  line-height: 1;
}

/* Contact form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vh, 0.85rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-field__hint {
  font-weight: 400;
}

.form-field__counter {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-field__counter.is-limit {
  color: #fecaca;
  font-weight: 600;
}

.form-field--hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field__status {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-field__status.is-success {
  color: #bbf7d0;
  font-weight: 600;
}

.form-field__status.is-error {
  color: #fecaca;
  font-weight: 600;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
  color: var(--surface-text);
  background: var(--white);
  min-height: 44px;
}

.contact__form textarea {
  resize: none;
  min-height: 72px;
  max-height: 20vh;
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.blog-card {
  background: var(--white);
  border-radius: 12px;
  padding: clamp(0.75rem, 2vh, 1.25rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--surface-text);
}

.blog-card__title {
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.blog-card__meta {
  font-size: 0.8125rem;
  color: var(--surface-text-muted);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.portfolio-card {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  border: 1px solid rgba(66, 116, 217, 0.2);
  color: var(--surface-text);
}

.portfolio-card h2 {
  font-size: clamp(0.75rem, 1.3vw, 0.95rem);
  font-weight: 700;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.pricing-card {
  background: var(--white);
  border-radius: 12px;
  padding: clamp(0.75rem, 2vh, 1.25rem);
  box-shadow: var(--shadow);
  border: 2px solid rgba(0, 0, 0, 0.04);
  text-align: center;
  color: var(--surface-text);
}

.pricing-card--featured {
  border-color: var(--blue);
  background: #eef2ff;
}

.pricing-card__name {
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pricing-card__price {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.pricing-card__desc {
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  color: var(--surface-text-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--white);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--surface-text);
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: clamp(0.8125rem, 1.3vw, 0.9375rem);
}

.faq-item p {
  margin-top: 0.5rem;
  color: var(--surface-text-muted);
  font-size: clamp(0.8125rem, 1.2vw, 0.875rem);
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.team-card {
  text-align: center;
  background: var(--white);
  border-radius: 12px;
  padding: clamp(0.75rem, 2vh, 1rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--surface-text);
}

.team-card__avatar {
  width: clamp(48px, 8vw, 64px);
  height: clamp(48px, 8vw, 64px);
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
}

.team-card__name {
  font-size: clamp(0.8125rem, 1.3vw, 0.95rem);
  font-weight: 700;
}

.team-card__role {
  font-size: clamp(0.7rem, 1.1vw, 0.8125rem);
  color: var(--surface-text-muted);
}

@media (max-height: 820px) {
  .page[data-page="home"] .hero__panel {
    padding: 0.6rem 0.65rem;
    gap: 0.48rem;
    min-height: calc(var(--glass-panel-h) * 0.68);
  }
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .page[data-page="home"] .hero__panel {
    max-height: calc((100dvh - var(--header-h) - 0.5rem) * 0.9);
  }

  .hero__content {
    text-align: left;
  }

  .hero__desc {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }

  .hero__visual {
    max-height: min(38vh, 280px);
  }

  .hero__robot {
    max-width: min(55vw, 260px);
    margin-inline: auto;
  }

  .play-btn {
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
  }

  .play-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
  }

  .page-main__inner--split {
    grid-template-columns: 1fr;
  }

  .portfolio-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services__grid,
  .blog-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .portfolio-grid,
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--blue-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav__item--dropdown .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 0 0.5rem;
    display: none;
    border-radius: 8px;
  }

  .nav__item--dropdown.is-open .dropdown {
    display: block;
  }

  .dropdown::before {
    display: none;
  }

  .dropdown a {
    color: rgba(255, 255, 255, 0.92);
    text-transform: none;
    font-weight: 500;
  }

  .header__inner > .btn {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 480px) {
  .hero__robot {
    max-width: 70vw;
  }

  .portfolio-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility preferences */
@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;
  }

  .btn:hover,
  .play-btn:hover {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #374151;
    --blue: #0039a6;
  }

  .btn--outline,
  .service-card,
  .stat,
  .contact__form input,
  .contact__form textarea {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .btn--primary {
    border: 2px solid ButtonText;
  }
}
