/* ============================================================
   РПИК Дәуір — Centralized Responsive System
   Breakpoints (only these):
   1280 (header) · 1200 · 1000 · 900 · 800 · 700 · 600 · 480
   ============================================================ */

/* ---------- ≤ 1280px : header sidebar mode ---------- */
@media (max-width: 1280px) {
  :root {
    --header-height: 77px;
  }

  .header-burger {
    display: inline-flex;
  }

  .header-sidebar {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
  }

  .header-sidebar.is-open {
    pointer-events: auto;
  }

  .header-sidebar__panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 88vw);
    max-width: 100%;
    background: var(--paper);
    border-left: 1px solid var(--hairline);
    box-shadow: -24px 0 48px oklch(0.16 0.01 270 / 0.12);
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-sidebar.is-open .header-sidebar__panel {
    transform: translateX(0);
  }

  .header-sidebar__top,
  .header-sidebar .nav,
  .header-actions {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.28s ease, transform 0.28s ease;
  }

  .header-sidebar.is-open .header-sidebar__top {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.06s;
  }

  .header-sidebar.is-open .nav {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.12s;
  }

  .header-sidebar.is-open .header-actions {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.18s;
  }

  .header-sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--hairline);
    flex-shrink: 0;
  }

  .header-sidebar__label {
    color: var(--brand);
    letter-spacing: 0.2em;
    font-size: 13px;
  }

  .header-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hairline-strong);
    background: transparent;
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }

  .header-sidebar__close:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }

  .header-sidebar .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 28px 16px;
    flex: 1;
  }

  .header-sidebar .nav > a,
  .header-sidebar .nav__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--hairline);
  }

  .header-sidebar .nav__item {
    flex-direction: column;
    align-items: stretch;
  }

  .header-sidebar .nav__menu {
    position: static;
    left: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 8px 12px;
    border: 0;
    border-top: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .header-sidebar .nav__item:hover .nav__menu {
    display: none;
  }

  .header-sidebar .nav__item.is-nav-open .nav__menu {
    display: block;
  }

  .header-sidebar .nav__item.is-nav-open .nav__caret {
    transform: rotate(225deg) translateY(-1px);
  }

  .header-sidebar .nav__menu a {
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 15px;
  }

  .header-sidebar .nav__menu a:last-child {
    border-bottom: 0;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px 28px;
    margin-top: auto;
    border-top: 1px solid var(--hairline);
  }

  .header-actions .langs {
    width: 100%;
  }

  .header-actions .langs button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
  }

  .header-actions__cta {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }

  .header-sidebar__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: oklch(0.16 0.01 270 / 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
  }

  .header-sidebar__backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.is-sidebar-open,
  html.is-sidebar-open body {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.is-sidebar-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
  }

  body.is-sidebar-open .header-sidebar__panel {
    overscroll-behavior: contain;
  }

  .site-header__row,
  .site-header .container.site-header__row {
    padding: 16px 24px;
    gap: 12px;
  }

  .brand {
    flex-shrink: 0;
    min-width: 0;
  }

  .header-burger {
    margin-left: auto;
    margin-right: 0;
  }
}

/* ---------- ≤ 1200px : large tablet / small desktop ---------- */
@media (max-width: 1200px) {
  .container {
    padding: 0 28px;
  }

  /* .container padding resets vertical — keep header row padding */
  .site-header__row,
  .site-header .container.site-header__row {
    padding: 16px 24px;
  }

  .hero {
    padding: 96px 0 112px;
  }

  .hero .container {
    gap: 48px;
    grid-template-columns: 1fr minmax(0, 420px);
  }

  /* Home hero: 800–1200 ≈ image 40% width */
  .hero--home .container {
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    gap: 40px;
    align-items: center;
  }

  .hero--home .hero__visual {
    width: 100%;
    max-width: none;
    justify-content: flex-end;
  }

  .hero--home .hero__visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .hero h1 .accent {
    font-size: 72px;
  }

  .hero h1 .h1__sub {
    font-size: 38px;
  }

  .section {
    padding: 96px 0;
  }

  .section__title {
    font-size: 42px;
  }

  .section__title--xl {
    font-size: 56px;
  }

  .cta-banner h2 {
    font-size: 42px;
  }

  .footer__brand-name {
    font-size: 56px;
  }

  .services-grid--4,
  .feature-grid--4,
  .prodcards,
  .pillars,
  .spec-cards,
  .steps--4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .heart-panel {
    padding: 56px 48px;
    gap: 48px;
  }

  .heart-panel__title {
    font-size: 36px;
  }
}

/* ---------- ≤ 1000px : tablet landscape ---------- */
@media (max-width: 1000px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__visual {
    justify-content: flex-start;
    max-width: 520px;
  }

  /* Home: keep 60/40 until ≤800 */
  .hero--home .container {
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    gap: 32px;
  }

  .hero--home .hero__visual {
    max-width: none;
    width: 100%;
    justify-content: flex-end;
  }

  .hero h1 .accent {
    font-size: 64px;
  }

  .hero h1 .h1__sub {
    font-size: 34px;
  }

  .why-grid,
  .materials-grid,
  .heart-panel,
  .persona,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .materials__copy {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .persona {
    padding: 40px;
    gap: 32px;
    justify-items: start;
  }

  .persona__photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .services-grid--4,
  .feature-grid--4,
  .prodcards,
  .pillars,
  .spec-cards,
  .steps--4,
  .clients-wall {
    grid-template-columns: repeat(2, 1fr);
  }

  .callout {
    padding: 40px;
  }

  .order-form__block,
  .order-form__submit {
    padding: 36px;
  }
}

/* ---------- ≤ 900px : tablet ---------- */
@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }

  .site-header__row,
  .site-header .container.site-header__row {
    padding: 16px 24px;
  }

  .header-sidebar__top {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header-sidebar .nav {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header-actions {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section {
    padding: 80px 0;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 48px;
    gap: 16px;
  }

  .section__meta {
    text-align: left;
  }

  .section__title {
    font-size: 36px;
  }

  .section__title--xl {
    font-size: 48px;
  }

  .hero {
    padding: 72px 0 88px;
  }

  .hero h1 .accent {
    font-size: 56px;
  }

  .hero h1 .h1__sub {
    font-size: 30px;
  }

  .hero--home .container {
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    gap: 28px;
  }

  .stats__grid,
  .services-grid,
  .services-grid--4,
  .feature-grid,
  .feature-grid--4,
  .steps,
  .steps--4,
  .room-cards,
  .svc-cards,
  .prodcards,
  .pillars,
  .spec-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats__num {
    font-size: 44px;
  }

  .cta-banner__inner {
    padding: 72px 0;
  }

  .cta-banner h2 {
    font-size: 36px;
  }

  .feedback-strip__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .footer__brand-name {
    font-size: 48px;
  }

  .callout__title {
    font-size: 28px;
  }

  .manager__inner {
    gap: 32px;
  }

  .heart-panel {
    gap: 40px;
    padding: 48px 32px;
  }

  .team-grid {
    gap: 24px;
  }

  .registry {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .registry__gallery {
    gap: 4px;
  }

  .registry__thumb,
  .registry__thumb-more {
    width: 40px;
    height: 40px;
  }
}

/* ---------- ≤ 800px : home hero stack ---------- */
@media (max-width: 800px) {
  .hero--home {
    padding: 64px 0 72px;
  }

  .hero--home .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero--home .hero__content {
    order: 1;
  }

  .hero--home .hero__visual {
    order: 2;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .hero--home .hero__visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .hero--home h1 .accent {
    font-size: 48px;
  }

  .hero--home h1 .h1__sub {
    font-size: 26px;
  }

  .hero--home .hero__sub {
    margin-top: 24px;
    font-size: 17px;
  }

  .hero--home .hero__actions {
    margin-top: 24px;
    flex-wrap: wrap;
  }
}

/* ---------- ≤ 700px : mobile layout ---------- */
@media (max-width: 700px) {
  .container {
    padding: 0 20px;
  }

  :root {
    --header-height: 73px;
  }

  .site-header__row,
  .site-header .container.site-header__row {
    padding: 14px 20px;
    gap: 12px;
  }

  .header-sidebar__top {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-sidebar .nav {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav {
    gap: 12px 18px;
  }

  .nav a,
  .nav__trigger {
    font-size: 14px;
  }

  .nav__menu {
    min-width: 0;
    width: min(340px, calc(100vw - 40px));
    left: 0;
    right: auto;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .hero h1 .accent {
    font-size: 44px;
  }

  .hero h1 .h1__sub {
    font-size: 24px;
  }

  .hero .hero__sub {
    margin-top: 28px;
    font-size: 16px;
  }

  .hero .hero__actions {
    margin-top: 28px;
    flex-wrap: wrap;
  }

  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 30px;
  }

  .section__title--xl {
    font-size: 36px;
  }

  .section__head .section__intro {
    font-size: 16px;
  }

  .stats__grid,
  .services-grid,
  .services-grid--4,
  .feature-grid,
  .feature-grid--4,
  .steps,
  .steps--4,
  .room-cards,
  .svc-cards,
  .prodcards,
  .pillars,
  .spec-cards,
  .clients-wall,
  .footer__grid,
  .order-form__grid {
    grid-template-columns: 1fr;
  }

  .stats__cell {
    padding: 40px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .stats__cell:last-child {
    border-bottom: 0;
  }

  .stats__num {
    font-size: 40px;
  }

  .service,
  .feature,
  .step,
  .prodcard__body,
  .room-card__body,
  .spec-card {
    padding-left: 24px;
    padding-right: 24px;
  }

  .service__img {
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
  }

  .service__title {
    font-size: 22px;
  }

  .why-grid {
    gap: 40px;
  }

  .why__item {
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 24px 0;
  }

  .materials__copy,
  .materials__side {
    padding: 36px 28px;
  }

  .materials__side h3 {
    font-size: 28px;
  }

  .cta-banner__inner {
    padding: 56px 0;
  }

  .cta-banner h2 {
    font-size: 30px;
  }

  .cta-banner p {
    font-size: 16px;
  }

  .feedback-strip__title {
    font-size: 24px;
  }

  .site-footer {
    padding: 64px 0 28px;
  }

  .footer__grid {
    gap: 40px;
  }

  .footer__brand-name {
    font-size: 40px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .persona {
    padding: 28px;
  }

  .persona__quote {
    font-size: 22px;
  }

  .persona .persona__text {
    font-size: 16px;
  }

  .manager__person {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .manager__name {
    font-size: 24px;
  }

  .callout {
    padding: 28px;
    gap: 28px;
  }

  .callout__title {
    font-size: 24px;
  }

  .callout .callout__text {
    font-size: 16px;
  }

  .callout__badge {
    white-space: normal;
  }

  .modal__body {
    padding: 28px 20px;
  }

  .modal__title {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal--portfolio {
    padding: 24px 16px 16px;
    margin: 10px;
  }

  .modal__portfolio-img img {
    max-height: 65vh;
  }

  .heart-panel {
    padding: 36px 24px;
    gap: 32px;
  }

  .heart-panel__title {
    font-size: 28px;
  }

  .team-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
  }

  .team-card__meta {
    flex-direction: column;
    gap: 6px;
  }

  .order-form__block,
  .order-form__submit {
    padding: 28px 20px;
  }

  .order-form__submit {
    flex-direction: column;
    align-items: stretch;
  }

  .order-form__submit-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .order-form__upload {
    padding: 28px 16px;
  }
}

/* ---------- ≤ 600px : small mobile ---------- */
@media (max-width: 600px) {
  .brand__sub {
    display: none;
  }

  .langs button {
    padding: 6px 8px;
    font-size: 12px;
  }

  .hero h1 .accent {
    font-size: 38px;
  }

  .hero h1 .h1__sub {
    font-size: 22px;
  }

  .section__title {
    font-size: 28px;
  }

  .section__title--xl {
    font-size: 32px;
  }

  .cta-banner h2 {
    font-size: 26px;
  }

  .footer__brand-name {
    font-size: 36px;
  }

  .clients-wall .client {
    padding: 36px 16px;
    min-height: 110px;
  }

  .step__num,
  .pillar__num {
    font-size: 40px;
  }

  .step .step__title {
    font-size: 20px;
  }
}

/* ---------- ≤ 480px : full mobile optimization ---------- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  :root {
    --header-height: 61px;
  }

  .site-header__row,
  .site-header .container.site-header__row {
    padding: 12px 16px;
    gap: 12px;
  }

  .brand__name {
    font-size: 14px;
  }

  .brand__logo {
    width: 32px;
    height: 32px;
  }

  .header-burger {
    width: 40px;
    height: 40px;
  }

  .header-sidebar__panel {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    box-shadow: none;
  }

  .header-sidebar__top {
    padding: 16px;
  }

  .header-sidebar .nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-actions {
    padding: 24px 16px;
    gap: 20px;
  }

  .nav {
    gap: 10px 14px;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero h1 .accent {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .hero h1 .h1__sub {
    font-size: 20px;
  }

  .hero .hero__sub {
    font-size: 15px;
    margin-top: 20px;
  }

  .hero .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
  }

  .hero .hero__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .section {
    padding: 48px 0;
  }

  .section__title {
    font-size: 24px;
  }

  .section__title--xl {
    font-size: 28px;
  }

  .section__label {
    font-size: 12px;
  }

  .btn {
    min-height: 44px;
    padding: 12px 18px;
  }

  .stats__num {
    font-size: 34px;
  }

  .stats__title {
    font-size: 16px;
  }

  .service,
  .feature,
  .step,
  .prodcard__body,
  .room-card__body,
  .spec-card {
    padding: 28px 20px 32px;
  }

  .service__img {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  .service__title {
    font-size: 20px;
  }

  .why__item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .why__item h3 {
    font-size: 18px;
  }

  .materials__copy,
  .materials__side {
    padding: 28px 20px;
  }

  .materials__side h3 {
    font-size: 24px;
  }

  .cta-banner__inner {
    padding: 44px 0;
  }

  .cta-banner h2 {
    font-size: 24px;
  }

  .cta-banner p {
    font-size: 15px;
  }

  .cta-banner__text .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .feedback-strip__inner {
    padding: 40px 0;
  }

  .feedback-strip__title {
    font-size: 20px;
  }

  .site-footer {
    padding: 48px 0 24px;
  }

  .footer__brand-name {
    font-size: 32px;
  }

  .footer__logo img {
    width: 56px;
    height: 56px;
  }

  .persona__quote {
    font-size: 20px;
  }

  .manager__contact {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal__body {
    padding: 24px 16px;
  }

  .modal__title {
    font-size: 22px;
    padding-right: 28px;
  }

  .form-input,
  .form-select,
  .form-textarea,
  .order-form__input,
  .order-form__select,
  .order-form__textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .order-form__block,
  .order-form__submit {
    padding: 24px 16px;
  }

  .heart-panel {
    padding: 28px 16px;
  }

  .heart-panel__title {
    font-size: 24px;
  }

  .heart-stat {
    flex-direction: column;
    gap: 12px;
  }

  .team-card__name {
    font-size: 18px;
  }

  .callout__badge {
    padding: 14px 18px;
    font-size: 13px;
  }
}