:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #17191c;
  --muted: #5e636b;
  --red: #ef3e35;
  --line: rgba(23, 25, 28, 0.12);
  --line-strong: rgba(23, 25, 28, 0.42);
  --nav: rgba(244, 241, 234, 0.92);
  --hover: rgba(23, 25, 28, 0.05);
  --field: #f7f5f0;
  --contact-bg: linear-gradient(180deg, #ffffff, #f7f5f0);
  --header: 68px;
  --font: "Manrope", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-alt: #121417;
  --surface: #17191c;
  --text: #f7f5f0;
  --muted: #c2c3c7;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.45);
  --nav: rgba(11, 13, 16, 0.9);
  --hover: rgba(255, 255, 255, 0.06);
  --field: #0e1013;
  --contact-bg:
    radial-gradient(120% 140% at 0% 100%, rgba(120, 24, 28, 0.45), transparent 55%),
    linear-gradient(180deg, #14161a, #101216);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }
.only-m { display: none; }
.only-m-flex { display: none; }

.wrap {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  background: transparent;
}
.nav.is-stuck {
  background: var(--nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.theme-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.theme-switch input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  box-shadow: inset 0 0 0 3.5px var(--bg), inset 0 0 0 7px var(--red);
}
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.nav-cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
}
.nav-toggle, .nav-backdrop { display: none; }
.nav-backdrop[hidden] { display: none !important; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header));
  display: flex;
  align-items: center;
  padding: 48px 0 72px;
  background: var(--bg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  background: url("/img/hero.jpg?v=6") right center / cover no-repeat;
  filter: brightness(1.28) contrast(1.06) saturate(1.08);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  pointer-events: none;
  z-index: -1;
}
.kicker {
  margin: 0 0 16px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1, .how h2, .contact h2, .about h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero h1 { font-size: clamp(2.4rem, 3.7vw, 3.75rem); max-width: 16em; }
.lead {
  max-width: 460px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  transition: background 220ms ease, border-color 220ms ease, transform 180ms ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 220ms ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #ff5248; }
.btn-line { border-color: var(--line-strong); color: var(--text); }
.btn-line:hover { background: var(--hover); }

.band { padding: 8px 0 28px; }
.markets { display: grid; grid-template-columns: repeat(3, 1fr); }
.market {
  position: relative;
  min-height: 248px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  text-decoration: none;
  border-right: 1px solid var(--line);
}
.market:first-child { border-left: 1px solid var(--line); }
.bg, .shade { pointer-events: none; }
.bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: brightness(1.18) contrast(1.05) saturate(1.12);
  transition: transform 600ms ease;
}
.market:hover .bg { transform: scale(1.08); }
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.02) 0%, rgba(11, 13, 16, 0.08) 42%, rgba(11, 13, 16, 0.72) 100%);
}
.market { color: #f7f5f0; }
.market-body { position: relative; display: grid; gap: 4px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65); }
.num { color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.market-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.market-title svg { width: 18px; height: 18px; color: var(--red); transition: transform 220ms ease; }
.market:hover .market-title svg { transform: translateX(4px); }
.market-note { color: #e7e4dc; font-size: 14px; }

.how { padding: 56px 0 24px; }
.how-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 40px;
  align-items: start;
}
.how h2 { font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.steps li {
  padding: 0 18px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.steps li:first-child { border-left: 0; padding-left: 0; }
.steps .n { color: var(--red); font-size: 13px; font-weight: 700; }
.steps .ic { width: 28px; height: 28px; color: var(--text); }
.steps .ic svg { width: 28px; height: 28px; }
.steps h3 { margin: 8px 0 4px; font-size: 18px; font-weight: 700; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

.contact-wrap { padding: 36px 0 20px; }
.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--contact-bg);
}
.contact h2 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  touch-action: manipulation;
}
a.contact-item:hover, button.contact-item:hover { background: var(--hover); }
.contact-item:active { background: var(--hover); }
.contact-item svg { width: 22px; height: 22px; flex: none; }
.contact-item small { display: block; color: var(--muted); font-size: 12px; }
.contact-item strong { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; }
.about-phone {
  margin-top: 18px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.phone-actions { display: grid; gap: 10px; }
.phone-actions .btn { width: 100%; min-height: 52px; }

.about { padding: 64px 0 88px; }
.about h2 { font-size: clamp(2rem, 3vw, 2.8rem); margin-bottom: 28px; }
.about-grid, .details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.details { grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.about article {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.about h3 { margin: 0 0 8px; font-size: 20px; }
.about p { margin: 0; color: var(--muted); }
.about-extra { margin: 22px 0 0; color: var(--muted); }
.about-extra a { color: var(--text); }

dialog {
  width: min(480px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  padding: 22px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.dialog-note { color: var(--muted); margin: 8px 0 16px; }
dialog label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
dialog input, dialog select, dialog textarea {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 16px; height: 16px; }
dialog .btn { width: 100%; margin-top: 6px; }

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { animation: rise 560ms ease forwards; }
.steps .reveal:nth-child(2) { animation-delay: 80ms; }
.steps .reveal:nth-child(3) { animation-delay: 140ms; }
.steps .reveal:nth-child(4) { animation-delay: 200ms; }
@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
  .wrap { width: min(1180px, calc(100% - 40px)); }
  .how-grid, .contact { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .steps li:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 767px) {
  .only-m { display: inline; }
  .only-m-flex { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
  .band-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
  .more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 8px 2px 8px 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
  }
  .more svg { width: 14px; height: 14px; color: var(--red); }
  .nav { border-bottom: 1px solid var(--line); background: var(--nav); backdrop-filter: blur(16px); }
  .theme-switch { margin-right: 4px; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .nav nav {
    position: fixed;
    inset: var(--header) 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .menu-open .nav nav { display: flex; }
  .nav nav a { padding: 14px 12px; border-radius: 10px; }
  .nav-cta { text-align: center; }
  .menu-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9;
  }
  .menu-open .nav { z-index: 11; }
  .hero::before { display: none; }
  :root:not([data-theme="dark"]) .hero::after {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 48%, #000 70%);
    mask-image: linear-gradient(180deg, transparent 0%, transparent 48%, #000 70%);
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/img/hero.jpg?v=6") 82% 74% / cover no-repeat;
    filter: brightness(1.32) contrast(1.05) saturate(1.08);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 30%, #000 52%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 30%, #000 52%);
    pointer-events: none;
    z-index: -1;
  }
  .hero {
    align-items: flex-start;
    min-height: 100svh;
    padding: 28px 0 48px;
    background: var(--bg);
  }
  .hero-copy { position: relative; z-index: 1; }
  .hero h1 { max-width: 12ch; font-size: clamp(2.35rem, 11vw, 3.1rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; min-height: 54px; }
  .markets {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
  }
  .market {
    flex: 0 0 78%;
    min-height: 230px;
    border: 0;
    border-radius: 16px;
    scroll-snap-align: start;
    touch-action: manipulation;
  }
  .market:first-child { border-left: 0; }
  .how { padding-top: 36px; }
  .steps { display: flex; flex-direction: column; gap: 0; }
  .steps li, .steps li:first-child, .steps li:nth-child(3) {
    border-left: 0;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    grid-template-columns: 40px 32px 1fr;
    align-items: center;
    column-gap: 12px;
  }
  .steps .n {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    position: relative;
  }
  .steps li:not(:last-child) .n::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 36px;
    width: 1px;
    height: 28px;
    background: var(--line);
  }
  .steps h3 { margin: 0; }
  .contact { padding: 22px 18px; }
  .about-grid, .details { grid-template-columns: 1fr; }
}

@media (min-width: 431px) and (max-width: 767px) {
  .market { flex-basis: 46%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .bg, .btn, .btn svg, .market-title svg { transition: none; }
}
