/* ===== CSS Reset (modern) ===== */
html{ scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
input, select, textarea { background: var(--surface); border: var(--border); color: var(--fg); padding:12px 12px; border-radius:12px; outline: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus{ box-shadow: 0 0 0 6px var(--ring); }
input:invalid{ border-color: rgba(239,68,68,.6); }

/* ===== Theme ===== */
:root{
  --bg: #f7f7fb;
  --surface: #ffffff;
  --muted: #556076;
  --fg: #0c0d11;
  --accent: #ff7a00; /* строительный оранжевый */
  --accent-2: #9b4a16;
  --ok: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --ring: rgba(255, 106, 0, .30);
  --card: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.02));
  --glass: rgba(255,255,255,.9);
  --maxw: 1200px; /* пустые поля слева/справа для “эффекта окна” */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(16,24,40,.08);
  --border: 1px solid rgba(0,0,0,.06);
}


.container{ max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section{ padding: 72px 0; scroll-margin-top: 80px; }
.muted{ color: var(--muted); }
.chip{ display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background: var(--glass); border: var(--border); font-size:14px; }
.btn{ display:inline-flex; align-items:center; gap:10px; padding:14px 18px; border-radius:12px; border: var(--border); background: var(--accent); color:#111; font-weight:700; letter-spacing:.2px; box-shadow: 0 6px 20px rgba(255, 122, 0, .35); transition: transform .15s ease, box-shadow .2s ease; cursor: pointer; }
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255,122,0,.45); }
.btn.ghost{ background: transparent; color: var(--fg); box-shadow:none; border: var(--border); }
.btn.icon{ padding:12px; width:48px; height:48px; justify-content:center; }
.badge{ padding:6px 10px; border-radius:999px; background: var(--glass); border: var(--border); font-size:12px; }

/* Ensure native buttons also show pointer */
button{ cursor: pointer; }

/* ===== Header ===== */
header{ position: sticky; top:0; z-index: 50; backdrop-filter: blur(10px); background: rgba(255,255,255,.8); border-bottom: var(--border); }
header .wrap{ display:flex; align-items:center; justify-content:space-between; height:72px; }
.brand{ display:flex; align-items:center; gap:12px; font-weight:900; letter-spacing:.4px; }
.brand svg{ width:28px; height:28px; }
nav{ display:flex; align-items:center; gap:18px; }
nav a{ font-weight:600; font-size:14px; padding:10px 12px; border-radius:10px; color: var(--muted); border: 1px solid transparent; }
nav a.active, nav a:hover{ color: var(--fg); background: var(--glass); border: var(--border); }
.phone{ display:flex; gap:10px; align-items:center; font-weight:800; }
.phone a{ color: var(--fg); }
.menu-btn{ display:none; }
.phone-btn{ display:none; }

/* ===== Hero ===== */
.hero{ position: relative; padding: 64px 24px; overflow:hidden; background: var(--surface); border: var(--border); border-radius: 18px; box-shadow: var(--shadow); margin-top: 12px; }
.hero .hero-media{ aspect-ratio: 1 / 1; }
.hero .hero-media img{ width: 100%; height: 100%; object-fit: cover; border-radius: 18px; border: var(--border); box-shadow: var(--shadow); display:block; }
.hero::before{ content:""; position:absolute; inset:-20%; background: radial-gradient(800px 400px at 20% 10%, rgba(255,122,0,.28), transparent 60%), radial-gradient(600px 300px at 90% 20%, rgba(0,122,255,.18), transparent 60%); filter: blur(40px); z-index:-1; }
.hero h1{ font-size: clamp(28px, 5vw, 52px); line-height:1.06; margin: 0 0 14px; letter-spacing:.3px; }
.hero p{ font-size: clamp(16px, 2.2vw, 20px); margin: 0 0 24px; color: var(--muted); }
.hero .cta{ display:flex; gap:12px; flex-wrap: wrap; }
.hero-logos{ display:flex; gap:10px; flex-wrap:wrap; margin-top:24px; }
.hero-logos .chip svg{ width:16px; height:16px; }

/* ===== Cards / Grid ===== */
.grid{ display:grid; grid-template-columns: repeat(12, 1fr); gap:20px; }
.card{ grid-column: span 4; min-height: 220px; background: var(--card); border: var(--border); border-radius: var(--radius); padding:18px; display:flex; flex-direction:column; gap:12px; box-shadow: var(--shadow); }
.card .top{ display:flex; gap:12px; align-items:center; }
.card .top svg{ width:42px; height:42px; }
.equip-img{ width:100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius:12px; border: var(--border); background: var(--card); display:block; }
.equip-img.square{ aspect-ratio: 1 / 1; }
.equip-img.wide{ aspect-ratio: 1 / 1; }
.equip-thumb{ width:72px; aspect-ratio: 1 / 1; object-fit: cover; border-radius:10px; border: var(--border); background: var(--card); display:block; }
.equip-thumb.wide{ aspect-ratio: 1 / 1; }
.price{ font-weight: 900; font-size: 22px; }
.meta{ display:flex; gap:10px; flex-wrap:wrap; }
.meta .badge{ background: transparent; }
.grow{ flex:1; }

/* ===== Section titles ===== */
.h2{ font-size: clamp(22px, 3.2vw, 34px); margin: 0 0 16px; }
.sub{ margin-top: -6px; margin-bottom: 26px; color: var(--muted); }

/* ===== Calculator ===== */
.calc{ display:grid; grid-template-columns: 1fr 1fr; gap:20px; padding:18px; border-radius: var(--radius); background: var(--card); border: var(--border); box-shadow: var(--shadow); }
.calc .field{ display:flex; flex-direction:column; gap:8px; }
.calc label{ font-weight:700; font-size:14px; color: var(--muted); }
.calc input, .calc select, .calc textarea{ background: var(--surface); border: var(--border); color: var(--fg); padding:12px 12px; border-radius:12px; outline: none; }
.calc input:focus, .calc select:focus, .calc textarea:focus{ box-shadow: 0 0 0 6px var(--ring); }
.calc input, .calc select, .calc textarea{ width:100%; min-width:0; }

/* Modal inputs full width */
.modal form input, .modal form select, .modal form textarea{ width:100%; min-width:0; }
.calc .result{ grid-column: span 2; background: var(--surface); border: var(--border); border-radius:12px; padding:14px; display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* Numeric stepper */
.stepper{ display:grid; grid-template-columns: 44px 1fr 44px; gap:8px; align-items:center; }
.stepper-btn{ display:inline-flex; align-items:center; justify-content:center; height:44px; border-radius:12px; border: var(--border); background: var(--surface); color: var(--fg); cursor:pointer; }
.stepper-btn:hover{ background: var(--glass); }
.stepper input[type=number]{ width:100%; min-width:0; }

/* ===== FAQ ===== */
.faq{ display:grid; gap:12px; }
.faq details{ background: var(--card); border: var(--border); border-radius: var(--radius); padding: 14px 16px; }
.faq summary{ cursor:pointer; font-weight:700; }
.faq p{ color: var(--muted); }

/* ===== Footer ===== */
footer{ padding: 48px 0 80px; border-top: var(--border); background: linear-gradient(0deg, rgba(255,122,0,.08), transparent); }
.foot{ display:grid; grid-template-columns: 2fr 1fr 1fr; gap:20px; }
.foot a{ color: var(--muted); }
.credit{ color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ===== Modal ===== */
dialog{ border: none; padding:0; background: transparent; }
.modal{ width:min(720px, 96vw); background: var(--surface); border: var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.modal .head{ display:flex; justify-content:space-between; align-items:center; padding: 10px 6px 6px; }
.modal form{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; padding: 10px 6px 16px; }
.modal form .full{ grid-column: span 2; }

/* ===== Floating Actions ===== */
.fab{ position: fixed; right: 18px; bottom: 18px; display:none; flex-direction: column; gap:10px; z-index: 60; }

/* ===== Micro Animations ===== */
@keyframes k-shake {
  10%, 90% { transform: translateX(-1px) rotate(-1deg); }
  20%, 80% { transform: translateX(2px) rotate(1deg); }
  30%, 50%, 70% { transform: translateX(-3px) rotate(-1deg); }
  40%, 60% { transform: translateX(3px) rotate(1deg); }
}
@keyframes k-tada {
  from { transform: scale3d(1,1,1); }
  10%, 20% { transform: scale3d(.95,.95,.95) rotate(-2deg); }
  30%, 50%, 70%, 90% { transform: scale3d(1.05,1.05,1.05) rotate(2deg); }
  40%, 60%, 80% { transform: scale3d(1.05,1.05,1.05) rotate(-2deg); }
  to { transform: scale3d(1,1,1); }
}
.anim-shake { animation: k-shake .8s ease both; }
.anim-tada { animation: k-tada 1s ease both; }

/* ===== Drawer ===== */
.drawer{ position: fixed; top:0; right:0; height:100dvh; width:min(360px, 92vw); background: var(--surface); border-left: var(--border); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .25s ease; z-index: 70; padding: 14px; display:flex; flex-direction: column; }
.drawer.open{ transform: translateX(0); }
.drawer-nav a{ display:block; padding:12px 10px; border-radius:12px; border: var(--border); background: var(--card); margin-bottom:10px; font-weight:700; }
.backdrop{ position: fixed; inset:0; background: rgba(0,0,0,.35); backdrop-filter: blur(1px); opacity:0; pointer-events:none; transition: opacity .2s ease; z-index:65; }
.backdrop.show{ opacity:1; pointer-events:auto; }
body.no-scroll{ overflow:hidden; }

/* ===== Responsive ===== */
@media (max-width: 1050px){
  .card{ grid-column: span 6 !important; }
  .foot{ grid-template-columns: 1fr 1fr; }
  .calc{ grid-template-columns: 1fr; }
  .calc .result{ grid-column: span 1; }
}
@media (max-width: 720px){
  nav{ display:none; }
  .phone-btn{ display:inline-flex; }
  .menu-btn{ display:inline-flex; }
  .card{ grid-column: span 12 !important; }
  .hero{ padding: 48px 14px; }
  .hero .grid{ display:flex; flex-direction: column-reverse; gap:20px; }
  .hero .col, .hero .hero-media{ grid-column: span 12 !important; }
  .foot{ grid-template-columns: 1fr; }
  .phone{ display:none; }
  .fab{ display:flex; }
  /* Modal layout fix */
  .modal{ width: 96vw; }
  .modal form{ grid-template-columns: 1fr; }
  /* Price chips: dynamic height on mobile */
  #prices .card{ min-height: auto; }
}
