/* Цифровой двойник водного объекта — стили сайта */
:root {
  --ink: #0d2a3f;
  --ink-2: #33495a;
  --muted: #6b7f8e;
  --line: #e1e9ef;
  --bg: #ffffff;
  --bg-tint: #f3f7fa;
  --navy: #071a28;
  --navy-2: #0d2a3f;
  --brand: #0b8fb3;
  --accent: #1bb39a;
  --accent-2: #3ee0c8;
  --danger: #d9534f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(13, 42, 63, .06), 0 8px 24px rgba(13, 42, 63, .06);
  --shadow-lg: 0 20px 50px rgba(7, 26, 40, .18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.accent { background: linear-gradient(90deg, var(--accent-2), #4fb5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hp { position: absolute; left: -9999px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent; font: 700 .98rem var(--font); cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; box-shadow: 0 8px 20px rgba(11, 143, 179, .3); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 28px rgba(11, 143, 179, .4); }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .88rem; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; color: var(--ink); }
.logo:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { background: var(--bg-tint); color: var(--ink); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; background: var(--ink) !important; color: #fff !important; margin-left: 8px; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-2); color: var(--ink); font-size: .78rem; font-weight: 800; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 600px at 80% -10%, #0f5a7a 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #0c4a52 0%, transparent 60%), var(--navy); padding: 96px 0 150px; }
.hero-bg { position: absolute; inset: auto 0 -1px 0; height: 220px; pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; display: block; }
.wave { animation: drift 12s ease-in-out infinite alternate; }
.w1 { fill: rgba(62, 224, 200, .08); }
.w2 { fill: #fff; animation-duration: 16s; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .lead { color: #b8cad6; }
.hero .eyebrow { color: var(--accent-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 44px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 20px 32px; list-style: none; padding: 0; margin: 0; }
.hero-stats b { display: block; font-size: 2rem; font-weight: 800; color: #fff; }
.hero-stats span { font-size: .88rem; color: #8ea6b6; }

.glass-card { background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .14); border-radius: 24px; padding: 24px; backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); }
.live-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #cfe0ea; margin-bottom: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(62, 224, 200, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(62, 224, 200, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 200, 0); } }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-grid > div { background: rgba(7, 26, 40, .45); border-radius: 14px; padding: 14px 16px; }
.live-grid small { display: block; color: #8ea6b6; font-weight: 600; }
.live-grid b { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; transition: color .3s; }
.live-grid em { font-style: normal; color: #8ea6b6; font-size: .85rem; margin-left: 4px; }
.live-chart { width: 100%; height: 70px; margin: 16px 0 8px; }
.live-foot { display: flex; justify-content: space-between; font-size: .82rem; color: #8ea6b6; }
.live-foot .ok { color: var(--accent-2); }

/* ---------- секции ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 40px 0 88px; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark p { color: #9fb3c1; }
.section-head { max-width: 720px; margin-bottom: 44px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* карточка товара */
.product-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.product-card:hover .link-arrow { color: var(--accent); }
.card-media, .feature-media, .product-media, .cart-thumb { position: relative; display: grid; place-items: center; background: linear-gradient(160deg, #eaf3f8, #d9e9f1); }
.media-controller { background: linear-gradient(160deg, #e6eef3, #cfdde6); }
.media-station { background: linear-gradient(160deg, #e7f6f4, #d3ecf1); }
.card-media { aspect-ratio: 4 / 3; padding: 24px; }
.illus { width: 100%; height: 100%; max-height: 260px; }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card-body p { font-size: .93rem; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.price { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.price-quote { color: var(--brand); font-weight: 700; font-size: 1rem; }
.price-lg { font-size: 2rem; }
.price-lg.price-quote { font-size: 1.5rem; }
.link-arrow { font-weight: 600; font-size: .9rem; color: var(--muted); transition: color .2s; }

/* большие блоки на главной */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 72px; }
.feature:last-child { margin-bottom: 0; }
.feature-reverse .feature-media { order: 2; }
.feature-media { border-radius: 28px; aspect-ratio: 6 / 5; padding: 48px; }
.feature-media .illus { max-height: 360px; }
.feature-sub { font-size: 1.1rem; color: var(--ink-2); }
.feature-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 10px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(27, 179, 154, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%231bb39a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* шаги */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--bg-tint); }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; font-weight: 800; }

.uses > div { padding: 28px 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); transition: background .2s; }
.uses > div:hover { background: rgba(255, 255, 255, .09); }
.uses p { margin: 0; font-size: .95rem; }

/* CTA / формы */
.cta { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.form-card { padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field b { color: var(--danger); }
.field input, .field textarea, .field select, .orders select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fbfdfe; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 143, 179, .12); background: #fff; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: .82rem; }
.field.checkbox { display: flex; align-items: center; gap: 10px; padding-top: 30px; }
.field.checkbox input { width: auto; }
.field.checkbox span { margin: 0; }

/* внутренние страницы */
.page-head { padding: 48px 0 32px; background: linear-gradient(180deg, var(--bg-tint), #fff); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.chip { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

.product-top { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.product-media { border-radius: 28px; aspect-ratio: 1; padding: 56px; }
.product-media .illus { max-height: 420px; }
.buy-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 24px; margin: 28px 0; }
.buy-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--bg-tint); }
.qty input { width: 48px; border: 0; text-align: center; font: 700 1rem var(--font); color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.product-details { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; }
.product-details > div > p { color: var(--ink-2); font-size: 1.05rem; }
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { font-weight: 500; color: var(--muted); width: 45%; padding-right: 16px; }
.specs td { font-weight: 600; }

/* корзина */
.checkout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.cart-list { padding: 8px 24px; }
.cart-row { display: grid; grid-template-columns: 72px 1fr auto 130px 36px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 72px; height: 72px; border-radius: 14px; padding: 6px; }
.cart-title a { display: block; font-weight: 700; color: var(--ink); }
.cart-sum { text-align: right; font-weight: 700; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: #fdecec; color: var(--danger); }
.cart-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; padding: 20px 0 14px; font-size: 1.1rem; }
.cart-total b { font-size: 1.4rem; }

.success-icon, .error-code { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; margin-bottom: 24px; background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; font-size: 2.6rem; font-weight: 800; }
.error-code { width: auto; height: auto; background: none; color: var(--line); font-size: 7rem; }
.contact-list { display: grid; gap: 16px; }
.contact-list .card { padding: 24px; }
.contact-list .big { display: block; font-size: 1.35rem; font-weight: 700; color: var(--ink); }

/* уведомления */
.toasts { position: fixed; top: 88px; right: 24px; z-index: 100; display: grid; gap: 8px; }
.toast { padding: 14px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); animation: toast 4s forwards; }
.toast-error { background: var(--danger); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* подвал */
.site-footer { background: var(--navy); color: #cfdde6; padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { color: #fff; }
.footer-grid a { display: block; color: #cfdde6; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-grid span { display: block; margin-bottom: 8px; }
.site-footer .logo { margin-bottom: 18px; }
.muted-light { color: #7f97a7; max-width: 360px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 20px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); color: #7f97a7; font-size: .88rem; }

/* админка */
.admin-bar, .admin-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-bar { margin-bottom: 24px; }
.admin-bar .chips { margin: 0; }
.orders { display: grid; gap: 16px; }
.order { padding: 20px 24px; border-left: 4px solid var(--brand); }
.order.status-done { border-left-color: var(--accent); opacity: .75; }
.order.status-cancel { border-left-color: var(--muted); opacity: .55; }
.order.status-work { border-left-color: #f0a830; }
.order header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.order header select { width: auto; padding: 6px 10px; }
.order-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.order-comment { margin-top: 8px; padding: 12px; background: var(--bg-tint); border-radius: 10px; white-space: pre-wrap; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.admin-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.row-off { opacity: .5; }
.form-actions { display: flex; gap: 12px; }
.login-card { max-width: 420px; margin: 0 auto; }

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .wave, .dot { animation: none; } }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 24px 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .25s; z-index: -1; }
  .nav a { padding: 12px 16px; }
  .cart-link { margin: 8px 0 0; justify-content: center; }
  .nav-open .nav { transform: none; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav { max-height: calc(100vh - 72px); overflow-y: auto; }
}
@media (max-width: 1024px) {
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .feature, .cta, .product-top, .product-details, .checkout { grid-template-columns: 1fr; gap: 40px; }
  .feature-reverse .feature-media { order: 0; }
  .feature-media, .product-media { aspect-ratio: auto; height: 340px; }
  .hero { padding: 64px 0 130px; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .order-body { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .section { padding: 60px 0; }
  .grid-3, .grid-4, .steps, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .hero-stats b { font-size: 1.6rem; }
  .hero-stats span { display: block; font-size: .78rem; line-height: 1.3; }
  .form-card { padding: 22px; }
  .feature-media, .product-media { padding: 28px; }
  .cart-row { grid-template-columns: 56px 1fr 36px; }
  .cart-thumb { width: 56px; height: 56px; }
  .cart-row .qty { grid-column: 2; justify-self: start; }
  .cart-row .cart-sum { grid-column: 2; text-align: left; }
  .cart-row .icon-btn { grid-row: 1; grid-column: 3; }
  .buy-box { flex-direction: column; align-items: stretch; }
  .toasts { left: 16px; right: 16px; }
}
