@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --ink: #111827;
  --muted: #66657b;
  --line: #e5e2f0;
  --surface: #ffffff;
  --canvas: #f7f6fb;
  --accent: #594aa7;
  --accent-dark: #30255f;
  --accent-soft: #ebe8f8;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-sm: 0 10px 28px rgba(28, 35, 63, 0.07);
  --shadow-lg: 0 26px 60px rgba(28, 35, 63, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 96px 0; }
.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; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 16px; padding: 10px 16px; color: #fff; background: var(--ink); border-radius: 10px; transform: translateY(-140%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 246, 251, .92); border-bottom: 1px solid rgba(229, 226, 240, .82); backdrop-filter: blur(18px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: -.04em; }
.brand-word { font-size: 21px; }
.brand-word span { color: var(--accent); }
.brand-mark { display: inline-grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--ink); border-radius: 12px; box-shadow: 0 8px 16px rgba(17, 24, 39, .18); }
.brand-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.brand-mark svg path:nth-of-type(1) { fill: currentColor; opacity: .16; stroke: none; }
.brand-mark-small { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
.brand-mark-small svg { width: 22px; height: 22px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.nav-link { position: relative; color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s ease; }
.nav-link::after { position: absolute; right: 0; bottom: -7px; left: 0; height: 2px; background: var(--accent); border-radius: 2px; content: ""; transform: scaleX(0); transition: transform .2s ease; }
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; color: #fff; background: var(--ink); border-radius: 12px; font-size: 14px; font-weight: 700; transition: background .2s ease, transform .2s ease; }
.nav-cta:hover, .nav-cta:focus-visible { background: var(--accent); transform: translateY(-1px); }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.menu-toggle-lines { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle-lines i { display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px; }

.hero { position: relative; padding: 74px 0 84px; background: radial-gradient(circle at 88% 8%, rgba(89, 74, 167, .15), transparent 36%), #f7f6fb; }
.hero::before { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(17, 24, 39, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 24, 39, .035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 80%); content: ""; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); align-items: center; gap: clamp(48px, 7vw, 104px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: -.045em; }
h1 { max-width: 650px; margin-bottom: 22px; font-size: clamp(42px, 5.3vw, 72px); line-height: 1.04; }
h1 em { color: var(--accent); font-style: normal; }
.hero-text { max-width: 585px; margin-bottom: 30px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 14px 20px; border: 0; border-radius: 13px; cursor: pointer; font-size: 15px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 14px 26px rgba(89, 74, 167, .25); }
.button-primary:hover, .button-primary:focus-visible { background: var(--accent-dark); box-shadow: 0 18px 32px rgba(89, 74, 167, .3); transform: translateY(-2px); }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.text-link span { color: var(--accent); font-size: 20px; transition: transform .2s ease; }
.text-link:hover span, .text-link:focus-visible span { transform: translateX(4px); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 46px; }
.hero-trust div { display: grid; gap: 2px; }
.hero-trust strong { font-family: "Manrope", sans-serif; font-size: 21px; }
.hero-trust span { color: var(--muted); font-size: 12px; }
.hero-visual { position: relative; padding: 0; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; transform: perspective(1200px) rotateX(var(--hero-rotate-x, 0deg)) rotateY(var(--hero-rotate-y, 0deg)); transform-style: preserve-3d; transition: transform .25s ease; will-change: transform; }
.hero-image-wrap { position: relative; z-index: 1; display: grid; min-height: 390px; place-items: center; padding: 0; overflow: visible; }
.hero-image { display: block; width: min(100%, 660px); height: auto; max-height: 410px; object-fit: contain; filter: drop-shadow(0 22px 24px rgba(17, 24, 39, .22)); transform: translate3d(var(--hero-shift-x, 0px), var(--hero-shift-y, 0px), 0) scale(1.05); transition: transform .35s ease; will-change: transform; }
.hero-visual:hover .hero-image { transform: translate3d(var(--hero-shift-x, 0px), var(--hero-shift-y, 0px), 0) scale(1.1); }
.hero-image-wrap.is-broken { min-height: 210px; }
.hero-image-wrap.is-broken::after { display: grid; width: min(100%, 310px); min-height: 150px; place-items: center; padding: 24px; color: var(--muted); background: #f4f5ff; border: 1px dashed #c5c8e9; border-radius: 16px; content: "Изображение ноутбука временно недоступно"; text-align: center; font-size: 14px; font-weight: 700; }
.hero-image-wrap.is-broken .hero-image { display: none; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading .eyebrow { margin-bottom: 10px; }
h2 { margin-bottom: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.product-card:hover { border-color: rgba(89, 74, 167, .34); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.product-media { position: relative; aspect-ratio: 1.25 / 1; overflow: hidden; background: #fff; }
.product-media::after { display: none; }
.product-badge { position: absolute; z-index: 4; top: 16px; left: 16px; padding: 6px 9px; color: var(--accent-dark); background: #fff; border-radius: 7px; font-size: 11px; font-weight: 800; box-shadow: 0 7px 16px rgba(17, 24, 39, .08); }
.badge-accent, .badge-warm { color: var(--accent-dark); background: var(--accent-soft); }
.image-switch { position: absolute; inset: 0; display: flex; }
.image-switch-item { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 26px 34px 32px; border: 0; background: transparent; opacity: 0; visibility: hidden; cursor: pointer; transition: opacity .25s ease; }
.image-switch-item.is-active { z-index: 2; opacity: 1; visibility: visible; }
.image-switch-item img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(1); transition: opacity .24s ease, transform .3s ease; }
.image-switch-item img.is-loaded { opacity: 1; }
.image-switch-item.is-active:hover img { transform: scale(1.07); }
.image-switch-item.is-broken { display: grid; place-items: center; }
.image-switch-item.is-broken::after { display: block; max-width: 150px; padding: 12px; color: var(--muted); background: rgba(255, 255, 255, .75); border: 1px dashed #c5c8e9; border-radius: 10px; content: "Фото временно недоступно"; text-align: center; font-size: 11px; font-weight: 700; }
.image-switch-item.is-broken img { display: none; }
.slider-dots { position: absolute; z-index: 5; right: 0; bottom: 13px; left: 0; display: flex; justify-content: center; gap: 6px; }
.slider-dot { width: 6px; height: 6px; padding: 0; background: #c7cbda; border: 0; border-radius: 50%; cursor: pointer; transition: width .2s ease, background .2s ease; }
.slider-dot.is-active { width: 19px; background: var(--accent); border-radius: 5px; }
.product-body { display: flex; flex-direction: column; min-height: 300px; padding: 22px; }
.product-meta, .product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-meta { flex-wrap: wrap; }
.product-meta { margin-bottom: 13px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stock { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; white-space: nowrap; }
.stock-available { color: #2f8b67; }
.stock-low { color: #9b7a20; }
.stock-limited { color: #bd4d5a; }
.product-body h3 { margin-bottom: 7px; font-size: 24px; line-height: 1.15; }
.product-description { min-height: 48px; margin-bottom: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.spec-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.spec-list li { padding: 5px 8px; color: var(--muted); background: #f4f5f9; border-radius: 6px; font-size: 11px; font-weight: 700; }
.product-bottom { margin-top: auto; margin-bottom: 18px; }
.product-price { font-family: "Manrope", sans-serif; font-size: 25px; letter-spacing: -.04em; }
.product-bottom del { display: block; margin-top: 1px; color: #9ba2b2; font-size: 11px; }
.rating { color: var(--accent-dark); font-size: 13px; font-weight: 800; white-space: nowrap; }
.rating small { color: var(--muted); font-size: 11px; font-weight: 500; }
.product-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; color: var(--ink); background: #f0f1ff; border: 0; border-radius: 11px; cursor: pointer; font-size: 14px; font-weight: 800; transition: color .2s ease, background .2s ease, transform .2s ease; }
.product-button:hover, .product-button:focus-visible { color: #fff; background: var(--accent); transform: translateY(-1px); }

body.is-lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .78); backdrop-filter: blur(8px); }
.lightbox-dialog { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(8px, 3vw, 26px); width: min(100%, 980px); padding: clamp(14px, 3vw, 30px); background: #fff; border-radius: 24px; box-shadow: 0 32px 80px rgba(8, 15, 35, .35); }
.lightbox-figure { min-width: 0; margin: 0; }
.lightbox-figure img { display: block; width: 100%; max-height: min(72vh, 680px); object-fit: contain; border-radius: 14px; background: #fff; }
.lightbox-figure figcaption { display: grid; gap: 2px; margin-top: 12px; }
#lightbox-title { font-family: "Manrope", sans-serif; font-size: 17px; }
#lightbox-caption { color: var(--muted); font-size: 13px; }
.lightbox-close { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 25px; line-height: 1; box-shadow: var(--shadow-sm); }
.lightbox-nav { display: grid; width: 42px; height: 42px; place-items: center; padding: 0; color: #fff; background: var(--ink); border: 0; border-radius: 50%; cursor: pointer; font-size: 29px; line-height: 1; transition: background .2s ease, transform .2s ease; }
.lightbox-close:hover, .lightbox-close:focus-visible, .lightbox-nav:hover, .lightbox-nav:focus-visible { color: #fff; background: var(--accent); transform: translateY(-1px); }

.order { padding-top: 30px; }
.order-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); align-items: center; gap: clamp(40px, 8vw, 115px); padding: clamp(34px, 6vw, 72px); color: #fff; background: var(--ink); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.order-card .eyebrow { color: #a9a8ff; }
.order-card h2 { max-width: 470px; margin-bottom: 18px; color: #fff; }
.order-copy > p:not(.eyebrow) { max-width: 470px; margin-bottom: 28px; color: #b9c0ce; font-size: 16px; }
.order-promise { display: flex; align-items: center; gap: 10px; }
.order-promise strong, .order-promise small { display: block; }
.order-promise strong { font-size: 13px; }
.order-promise small { color: #9fa8ba; font-size: 11px; }
.price-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field-wide, .form-submit, .form-status { grid-column: 1 / -1; }
.form-field label { color: #d8dce5; font-size: 12px; font-weight: 700; }
.price-input { width: 100%; min-height: 50px; padding: 12px 14px; color: var(--ink); background: #fff; border: 2px solid transparent; border-radius: 10px; outline: none; font-size: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.price-input::placeholder { color: #9aa2b3; }
.price-input:focus { border-color: #a9a8ff; box-shadow: 0 0 0 4px rgba(169, 168, 255, .18); }
.price-input[aria-invalid="true"] { border-color: #ff9688; }
select.price-input { cursor: pointer; }
.field-error { min-height: 15px; color: #ffb5ab; font-size: 11px; }
.form-submit { width: 100%; margin-top: 3px; color: var(--ink); background: #fff; box-shadow: none; }
.form-submit:hover, .form-submit:focus-visible { color: #fff; background: var(--accent); }
.form-status { min-height: 24px; margin: 0; color: #c7c2f4; font-size: 13px; font-weight: 700; }
.form-status.is-error { color: #ffb5ab; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.footer-inner > p { margin: 0; color: var(--muted); font-size: 13px; }
.copyright { font-size: 12px !important; }

:focus-visible { outline: 3px solid rgba(89, 74, 167, .48); outline-offset: 3px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero-copy { max-width: 720px; }
  .hero-visual { width: min(680px, 100%); margin-inline: auto; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-card { grid-template-columns: 1fr; gap: 38px; }
}

@media (max-width: 700px) {
  .container { width: min(100% - 32px, 560px); }
  .section { padding: 68px 0; }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .main-nav { position: absolute; top: calc(100% + 8px); right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
  .main-nav.is-open { display: flex; }
  .nav-link { padding: 11px 12px; border-radius: 8px; }
  .nav-link::after { display: none; }
  .nav-link:hover, .nav-link:focus-visible, .nav-link.is-active { background: var(--accent-soft); }
  .nav-cta { justify-content: center; margin-top: 5px; }
  .hero { padding: 52px 0 68px; }
  h1 { font-size: clamp(38px, 12vw, 58px); }
  .hero-text { font-size: 16px; }
  .hero-trust { gap: 18px; margin-top: 35px; }
  .hero-image-wrap { min-height: 210px; }
  .section-heading { display: block; margin-bottom: 26px; }
  .products-grid { grid-template-columns: 1fr; gap: 18px; }
  .product-body { min-height: 0; }
  .order-card { padding: 30px 22px; border-radius: 22px; }
  .price-form { grid-template-columns: 1fr; gap: 10px; }
  .form-field-wide, .form-submit, .form-status { grid-column: auto; }
  .footer-inner { flex-wrap: wrap; }
  .copyright { width: 100%; }
  .lightbox { padding: 12px; }
  .lightbox-dialog { grid-template-columns: 1fr; width: 100%; padding: 16px; border-radius: 18px; }
  .lightbox-nav { position: absolute; z-index: 2; top: 42%; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

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