:root {
  --bg: #020504;
  --bg-soft: #07100c;
  --panel: rgba(9, 20, 15, 0.78);
  --panel-solid: #09140f;
  --panel-light: rgba(14, 31, 22, 0.72);
  --line: rgba(72, 255, 137, 0.19);
  --line-strong: rgba(72, 255, 137, 0.42);
  --green: #39ff7f;
  --green-2: #00d96a;
  --green-soft: #86ffad;
  --white: #f1f8f3;
  --muted: #9eb0a5;
  --muted-2: #6f8076;
  --danger: #ff6577;
  --warning: #ffcf5c;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
  --max: 1180px;
  --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -10%, rgba(26, 255, 111, 0.12), transparent 34%),
    radial-gradient(circle at 10% 35%, rgba(0, 180, 90, 0.07), transparent 30%),
    linear-gradient(180deg, #020403 0%, #030706 52%, #020403 100%);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(70,255,137,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,255,137,.035) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 70%);
  z-index: -2;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: rgba(57,255,127,.3); color: white; }

.container { width: min(calc(100% - 36px), var(--max)); margin: 0 auto; }
.section { padding: 104px 0; position: relative; }
.section.compact { padding: 72px 0; }
.section-head { max-width: 760px; margin-bottom: 42px; }
.section-head.center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--green-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--green); box-shadow: 0 0 14px var(--green); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; }
h1 { font-size: clamp(2.7rem, 7vw, 6.5rem); margin-bottom: 22px; }
h2 { font-size: clamp(2rem, 4.8vw, 4rem); margin-bottom: 18px; }
h3 { font-size: clamp(1.18rem, 2vw, 1.55rem); margin-bottom: 12px; }
.lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: #c5d2ca; max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .89rem; }
.green { color: var(--green); }
.gradient-text {
  background: linear-gradient(96deg, #ffffff 10%, #a3ffc1 45%, #33ff7a 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  border-bottom: 1px solid rgba(89,255,149,.08);
  background: rgba(2, 6, 4, .72);
  backdrop-filter: blur(18px);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { background: rgba(2, 6, 4, .93); border-color: var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.28); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand img { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 0 20px rgba(57,255,127,.18); }
.brand-copy { display: grid; line-height: 1; }
.brand-name { font-weight: 900; letter-spacing: .16em; font-size: .93rem; }
.brand-tag { margin-top: 6px; color: var(--muted); font-size: .67rem; letter-spacing: .1em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: #bbc9c0; font-size: .88rem; font-weight: 700; transition: color .2s ease; }
.nav a:hover, .nav a.active { color: var(--green-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: rgba(12, 26, 18, .65);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch button { border: 0; background: transparent; padding: 7px 10px; border-radius: 999px; cursor: pointer; font-size: .73rem; font-weight: 900; color: var(--muted); }
.lang-switch button.active { background: rgba(57,255,127,.14); color: var(--green-soft); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(11,24,17,.8); cursor: pointer; }
.menu-toggle span { width: 20px; height: 2px; background: white; display: block; margin: 4px auto; transition: .2s ease; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 850;
  font-size: .93rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--green), #00bd58); color: #001b0a; box-shadow: 0 12px 34px rgba(37,255,116,.18); }
.btn-primary:hover { box-shadow: 0 18px 42px rgba(37,255,116,.28); }
.btn-secondary { border-color: var(--line-strong); background: rgba(6,15,10,.58); color: var(--white); }
.btn-secondary:hover { border-color: var(--green); background: rgba(57,255,127,.08); }
.btn-ghost { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: #d7e1da; }
.btn-small { min-height: 40px; padding: 9px 15px; font-size: .83rem; }
.btn[disabled], .btn.disabled { opacity: .48; cursor: not-allowed; transform: none; }
.icon { width: 19px; height: 19px; display: inline-block; }

/* Hero */
.hero { min-height: 100vh; padding: calc(var(--header-h) + 42px) 0 62px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(57,255,127,.08);
  border-radius: 50%;
  right: -220px;
  top: 60px;
  box-shadow: 0 0 120px rgba(20,255,105,.07) inset;
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(36px, 7vw, 88px); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { font-size: clamp(3rem, 7.4vw, 7rem); max-width: 800px; }
.hero-slogan { color: var(--green-soft); font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 780; letter-spacing: .03em; margin-bottom: 20px; }
.hero-copy .lead { max-width: 690px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: var(--muted); font-size: .82rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px var(--green); }
.hero-visual { position: relative; min-height: 590px; display: grid; place-items: center; }
.hero-logo-wrap {
  width: min(100%, 610px);
  position: relative;
  filter: drop-shadow(0 0 42px rgba(35,255,115,.12));
  animation: float 7s ease-in-out infinite;
}
.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 13% 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,255,127,.16), transparent 68%);
  filter: blur(24px);
  z-index: -1;
}
.hero-logo-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(57,255,127,.12);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.orbit.one { width: 480px; height: 480px; }
.orbit.two { width: 590px; height: 590px; animation-direction: reverse; animation-duration: 28s; }
.orbit::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--green); top: 12%; left: 18%; box-shadow: 0 0 18px var(--green); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(13,29,20,.82), rgba(4,9,7,.82));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: auto -80px -100px auto; width: 190px; height: 190px; border-radius: 50%; background: rgba(57,255,127,.06); filter: blur(24px); pointer-events: none; }
.card:hover { border-color: rgba(57,255,127,.34); }
.card-icon { width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(57,255,127,.07); color: var(--green-soft); }
.card-icon svg { width: 25px; height: 25px; }
.card p { color: var(--muted); margin-bottom: 0; }
.pillar-card { min-height: 255px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 22px 18px; border: 1px solid var(--line); background: rgba(7,16,11,.7); border-radius: 16px; text-align: center; }
.stat strong { display: block; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1; color: var(--green-soft); margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: .82rem; }

/* Product catalog */
.catalog-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: rgba(8,18,12,.7); color: var(--muted); font-weight: 800; font-size: .78rem; cursor: pointer; }
.filter-btn.active { color: #001b0a; background: var(--green); border-color: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card { padding: 0; display: flex; flex-direction: column; min-height: 395px; }
.product-visual { height: 170px; position: relative; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 45%, rgba(57,255,127,.16), transparent 46%), #040906; display: grid; place-items: center; overflow: hidden; }
.product-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, rgba(57,255,127,.08), transparent 65%); transform: translateX(-100%); animation: scan 5s linear infinite; }
@keyframes scan { to { transform: translateX(100%); } }
.product-mark { width: 82px; height: 82px; border-radius: 24px; border: 1px solid var(--line-strong); padding: 7px; background: rgba(0,0,0,.5); box-shadow: 0 0 34px rgba(57,255,127,.13); }
.product-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.product-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 6px 10px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 900; color: #d4e0d8; background: rgba(255,255,255,.04); }
.badge.green { color: var(--green-soft); border-color: var(--line-strong); background: rgba(57,255,127,.07); }
.badge.yellow { color: #ffe49a; border-color: rgba(255,207,92,.28); background: rgba(255,207,92,.06); }
.product-body p { color: var(--muted); flex: 1; }
.product-actions { display: flex; gap: 9px; margin-top: 20px; }
.product-card.hidden { display: none; }

/* Web studio */
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.demo-card { padding: 0; overflow: hidden; }
.demo-thumb { aspect-ratio: 16/10; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.demo-thumb iframe { width: 130%; height: 130%; border: 0; transform: scale(.77); transform-origin: 0 0; pointer-events: none; background: white; }
.demo-watermark { position: absolute; inset: auto 12px 12px auto; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.75); border: 1px solid var(--line); color: var(--green-soft); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.demo-body { padding: 22px; }
.demo-body p { color: var(--muted); }

/* Qweirys */
.qweirys-wrap { display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(34px, 7vw, 90px); }
.qweirys-image { position: relative; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: #000; box-shadow: var(--shadow), 0 0 80px rgba(39,255,116,.06); }
.qweirys-image img { width: 100%; }
.qweirys-image::after { content: none; display: none; }
.qweirys-features { display: grid; gap: 13px; margin: 28px 0; }
.qweirys-feature { display: flex; gap: 13px; align-items: flex-start; }
.qweirys-feature strong { display: block; margin-bottom: 2px; }
.qweirys-feature span { color: var(--muted); font-size: .92rem; }
.check { width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid var(--line-strong); border-radius: 8px; display: grid; place-items: center; color: var(--green); margin-top: 2px; }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.process-step { counter-increment: step; position: relative; padding: 28px 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6,14,10,.72); }
.process-step::before { content: "0" counter(step); display: block; color: var(--green); font-weight: 950; font-size: .8rem; letter-spacing: .12em; margin-bottom: 18px; }
.process-step:not(:last-child)::after { content: ""; position: absolute; width: 18px; height: 1px; background: var(--line-strong); right: -18px; top: 50%; }
.process-step p { color: var(--muted); margin-bottom: 0; }

/* Portfolio */
.portfolio-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; padding: 0; }
.portfolio-visual { background: linear-gradient(135deg, #080808, #171109); display: grid; place-items: center; padding: 45px; border-right: 1px solid var(--line); }
.ps-logo { width: min(100%, 390px); aspect-ratio: 1; border: 1px solid rgba(233,198,105,.25); border-radius: 24px; display: grid; place-items: center; background: radial-gradient(circle, rgba(211,169,59,.13), transparent 52%), #050505; color: #e7c56a; font-family: Georgia, serif; font-size: clamp(2.2rem, 7vw, 5rem); text-align: center; }
.portfolio-body { padding: clamp(30px, 5vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.portfolio-body p { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.tag { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); color: #c6d3cb; font-size: .72rem; }

/* CTA */
.cta-box { border: 1px solid var(--line-strong); border-radius: 28px; padding: clamp(36px, 6vw, 72px); background: radial-gradient(circle at 80% 20%, rgba(57,255,127,.13), transparent 32%), linear-gradient(145deg, rgba(14,31,21,.86), rgba(4,10,7,.92)); display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 30px; box-shadow: var(--shadow); }
.cta-box p { color: #b7c5bc; max-width: 680px; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: rgba(2,6,4,.86); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
.footer-brand img { width: 230px; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 420px; }
.footer-col h3 { font-size: .83rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-soft); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--muted); margin: 9px 0; font-size: .9rem; }
.footer-col a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; align-items: center; border-top: 1px solid rgba(255,255,255,.06); margin-top: 42px; padding-top: 22px; color: var(--muted-2); font-size: .78rem; }
.socials { display: flex; gap: 8px; }
.social-link { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.social-link:hover { color: var(--green-soft); border-color: var(--line-strong); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.modal.open { display: grid; }
.modal-card { width: min(100%, 620px); max-height: 90vh; overflow: auto; border: 1px solid var(--line-strong); border-radius: 22px; background: #07100c; box-shadow: 0 30px 100px rgba(0,0,0,.6); }
.modal-head { display: flex; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-close { border: 1px solid var(--line); background: transparent; border-radius: 10px; width: 38px; height: 38px; cursor: pointer; }
.modal-body { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .78rem; font-weight: 800; color: #c6d3cb; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: rgba(1,5,3,.7); color: white; border-radius: 10px; padding: 12px 13px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,255,127,.08); }
.field textarea { min-height: 120px; resize: vertical; }
.form-note { color: var(--muted); font-size: .76rem; margin-top: 12px; }

/* Qweirys assistant */
.ai-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 45; width: 58px; height: 58px; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(145deg, rgba(18,43,28,.96), rgba(4,12,8,.96)); box-shadow: 0 16px 46px rgba(0,0,0,.48), 0 0 30px rgba(57,255,127,.1); cursor: pointer; padding: 7px; }
.ai-launcher img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.ai-panel { position: fixed; right: 22px; bottom: 92px; z-index: 45; width: min(390px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: 20px; background: rgba(5,13,9,.97); box-shadow: 0 24px 80px rgba(0,0,0,.62); display: none; overflow: hidden; backdrop-filter: blur(18px); }
.ai-panel.open { display: block; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.ai-avatar { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; object-position: center top; }
.ai-head strong { display: block; }
.ai-status { color: var(--green); font-size: .72rem; }
.ai-close { margin-left: auto; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 1.2rem; }
.ai-body { padding: 16px; }
.ai-message { padding: 12px 13px; background: rgba(57,255,127,.07); border: 1px solid var(--line); border-radius: 12px; color: #d8e4dc; font-size: .88rem; margin-bottom: 13px; }
.ai-quick { display: grid; gap: 8px; }
.ai-quick button { text-align: left; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.025); padding: 10px 11px; color: #c5d2ca; cursor: pointer; }
.ai-quick button:hover { border-color: var(--line-strong); color: white; }

/* Cookie */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 80; width: min(470px, calc(100vw - 40px)); border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(5,13,9,.97); padding: 18px; box-shadow: 0 22px 70px rgba(0,0,0,.55); display: none; }
.cookie.show { display: block; }
.cookie p { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Legal pages */
.legal-hero { padding: calc(var(--header-h) + 70px) 0 48px; border-bottom: 1px solid var(--line); }
.legal-content { padding: 70px 0 110px; }
.legal-doc { max-width: 860px; }
.legal-doc h2 { font-size: 1.55rem; margin-top: 38px; }
.legal-doc p, .legal-doc li { color: #b8c6bd; }
.legal-note { border: 1px solid rgba(255,207,92,.28); background: rgba(255,207,92,.06); padding: 16px; border-radius: 12px; color: #f5df9f; margin-bottom: 30px; }

/* Demo pages */
.demo-page { background: #f5f5f5; color: #151515; min-height: 100vh; }
.demo-protect { position: fixed; z-index: 100; inset: 0 0 auto 0; min-height: 46px; background: #07110c; color: white; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid #27df70; }
.demo-protect strong { color: #52ff92; }
.demo-watermark-full { position: fixed; z-index: 90; inset: 46px 0 0 0; pointer-events: none; display: grid; place-items: center; color: rgba(0,0,0,.055); font-size: min(8vw, 100px); font-weight: 950; transform: rotate(-24deg); letter-spacing: .06em; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; display: none; flex-direction: column; align-items: stretch; padding: 22px; background: rgba(2,6,4,.98); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 5px; font-size: 1rem; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; }
  .hero-grid, .qweirys-wrap, .cta-box, .portfolio-card { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { min-height: 500px; }
  .grid-4, .process { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .product-grid, .demo-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2)::after { display: none; }
  .portfolio-visual { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 2 / -1; }
}

@media (max-width: 700px) {
  :root { --header-h: 70px; }
  .container { width: min(calc(100% - 24px), var(--max)); }
  .section { padding: 78px 0; }
  .brand-tag { display: none; }
  .brand img { width: 42px; height: 42px; }
  .lang-switch button { padding: 6px 8px; }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-copy h1 { font-size: clamp(2.65rem, 14vw, 4.4rem); }
  .hero-visual { min-height: 390px; }
  .orbit.one { width: 320px; height: 320px; }
  .orbit.two { width: 390px; height: 390px; }
  .stats, .grid-4, .grid-3, .product-grid, .demo-grid, .process, .footer-grid { grid-template-columns: 1fr; }
  .process-step::after { display: none; }
  .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .cta-box { padding: 32px 22px; }
  .qweirys-image::after { display: none; }
  .ai-launcher { right: 14px; bottom: 14px; }
  .ai-panel { right: 16px; bottom: 82px; }
  .cookie { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

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


/* QWARZYS 1.0 — final optimisation layer */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green);
  color: #001b0a;
  font-weight: 900;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
body.modal-open { overflow: hidden; }
main section[id] { scroll-margin-top: calc(var(--header-h) + 18px); }
.title-break { display: block; }
.section-head.center h2 { max-width: 980px; margin-inline: auto; text-wrap: balance; }

/* Header, menu and language */
.header-inner { gap: 18px; }
.brand-official { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.brand-official .brand-official-image {
  width: 284px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  box-shadow: none;
}
.nav { gap: clamp(14px, 1.8vw, 24px); }
.nav a {
  position: relative;
  padding: 9px 0;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57,255,127,.6);
  transition: right .22s ease;
}
.nav a:hover::after, .nav a.active::after { right: 0; }
.lang-switch { box-shadow: inset 0 0 0 1px rgba(255,255,255,.015); }
.lang-switch button { min-width: 36px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.lang-switch button:hover { color: white; }
.lang-switch button.active { background: linear-gradient(135deg, rgba(57,255,127,.24), rgba(57,255,127,.1)); color: var(--green-soft); }
.menu-toggle { position: relative; flex: 0 0 44px; }
.menu-toggle span { transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn {
  border-radius: 13px;
  letter-spacing: -.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  will-change: transform;
}
.btn:focus-visible, .filter-btn:focus-visible, .lang-switch button:focus-visible,
.menu-toggle:focus-visible, .modal-close:focus-visible, .ai-launcher:focus-visible,
.ai-close:focus-visible, .ai-quick button:focus-visible {
  outline: 3px solid rgba(134,255,173,.34);
  outline-offset: 3px;
}
.btn-primary { background: linear-gradient(135deg, #5aff91 0%, #1fe875 46%, #00bd58 100%); }
.btn-primary:hover { transform: translateY(-2px) scale(1.01); }
.btn-secondary:hover, .btn-ghost:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.email-btn { overflow-wrap: anywhere; text-align: center; }

/* Cards and media */
.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 25%, rgba(57,255,127,.18), transparent 48%), rgba(57,255,127,.08);
  box-shadow: inset 0 0 0 1px rgba(57,255,127,.08), 0 0 24px rgba(57,255,127,.08);
}
.card-icon svg { width: 30px; height: 30px; }
.pillar-card { min-height: 285px; }
.pillar-card h3 { max-width: 14ch; }
.demo-thumb { aspect-ratio: 4 / 3; }
.demo-thumb iframe { width: 148%; height: 148%; transform: scale(.675); transform-origin: 0 0; }
.demo-watermark { display: none; }
.demo-card .demo-body { min-height: 182px; display: flex; flex-direction: column; }
.demo-card .demo-body .btn { margin-top: auto; width: fit-content; }
.portfolio-stack { display: grid; gap: 26px; }
.portfolio-logo-image { width: min(100%, 360px); border-radius: 22px; box-shadow: 0 0 40px rgba(0,0,0,.35); }
.portfolio-logo-image-small { width: min(100%, 230px); border-radius: 22px; image-rendering: auto; }
.portfolio-visual-alt { background: radial-gradient(circle at 50% 40%, rgba(57,255,127,.12), transparent 40%), linear-gradient(135deg, #040906, #0b1510); }
.portfolio-body .btn { width: 100%; }

/* QWEIRYS official image: no overlay over the name */
.qweirys-image {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: #000;
}
.qweirys-image::after { content: none !important; display: none !important; }
.qweirys-image picture { width: 100%; height: 100%; display: block; }
.qweirys-image picture img,
.qweirys-image > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Contact and footer */
.cta-actions .btn { width: 100%; }
.company-identity {
  margin-top: 16px;
  color: #b9c8be;
  font-style: normal;
  font-size: .84rem;
  line-height: 1.65;
}
.footer-bottom { flex-wrap: wrap; }
.socials-note { color: var(--muted-2); font-size: .78rem; }
.legal-company {
  margin: 20px 0 0;
  color: var(--muted-2);
  font-size: .78rem;
  line-height: 1.6;
  text-align: center;
}

/* Legal pages */
.legal-doc { max-width: 920px; }
.legal-doc h2 { scroll-margin-top: calc(var(--header-h) + 20px); }
.legal-doc ul { padding-left: 22px; }
.legal-doc li + li { margin-top: 9px; }
.legal-updated { color: var(--green-soft); font-size: .9rem; margin-bottom: 34px; }
.legal-table { margin: 24px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.legal-row { display: grid; grid-template-columns: 1fr 2fr 1.5fr; }
.legal-row > span { padding: 13px 15px; color: #b8c6bd; border-bottom: 1px solid rgba(72,255,137,.1); }
.legal-row > span + span { border-left: 1px solid rgba(72,255,137,.1); }
.legal-row:last-child > span { border-bottom: 0; }
.legal-row-head { background: rgba(57,255,127,.08); font-weight: 900; }
.legal-row-head > span { color: var(--green-soft); }
.legal-footer { padding-top: 34px; }

/* Technical-preference information notice */
.cookie { max-width: 520px; }
.cookie strong { display: block; margin-bottom: 5px; }
.cookie-actions .btn { min-width: 110px; }

@media (max-width: 1120px) {
  .brand-official .brand-official-image { width: 250px; }
  .nav { gap: 15px; }
  .nav a { font-size: .82rem; }
}

@media (max-width: 1020px) {
  .brand-official .brand-official-image { width: 245px; max-height: 55px; }
  .nav {
    inset: var(--header-h) 12px auto 12px;
    border: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    padding: 14px 18px 20px;
    box-shadow: 0 25px 70px rgba(0,0,0,.55);
    max-height: calc(100vh - var(--header-h) - 18px);
    overflow-y: auto;
  }
  .nav a { padding: 12px 4px; font-size: .98rem; }
  .nav a::after { bottom: 6px; }
  .pillar-card h3 { max-width: none; }
  .qweirys-image { width: min(100%, 600px); margin-inline: auto; }
  .portfolio-visual { min-height: 360px; }
}

@media (max-width: 700px) {
  :root { --header-h: 68px; }
  .header-inner { gap: 8px; }
  .brand-official .brand-official-image { width: 184px; max-height: 46px; }
  .header-actions { gap: 7px; }
  .lang-switch { padding: 3px; }
  .lang-switch button { min-width: 31px; padding: 6px 7px; }
  .menu-toggle { width: 40px; height: 40px; flex-basis: 40px; }
  .hero { padding-top: calc(var(--header-h) + 38px); }
  .hero-grid { gap: 26px; }
  .hero-copy h1 { margin-bottom: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { gap: 11px 15px; }
  .hero-visual { min-height: 340px; }
  .hero-logo-wrap { width: min(92vw, 430px); }
  .section-head { margin-bottom: 30px; }
  .pillar-card { min-height: 0; }
  .portfolio-card { min-height: 0; }
  .portfolio-visual { min-height: 300px; padding: 28px; }
  .portfolio-body { padding: 28px 22px; }
  .qweirys-wrap { gap: 30px; }
  .qweirys-image { border-radius: 22px; }
  .cta-actions { width: 100%; }
  .footer-grid { gap: 28px; }
  .footer-brand img { width: 190px; }
  .footer-bottom { gap: 10px; }
  .legal-hero { padding-top: calc(var(--header-h) + 54px); }
  .legal-content { padding: 48px 0 82px; }
  .legal-row { grid-template-columns: 1fr; }
  .legal-row > span + span { border-left: 0; }
  .legal-row > span { border-bottom: 1px solid rgba(72,255,137,.1); }
  .legal-row-head { display: none; }
  .legal-row > span::before { display: block; color: var(--green-soft); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
  .legal-row > span:nth-child(1)::before { content: "Elemento"; }
  .legal-row > span:nth-child(2)::before { content: "Finalità"; }
  .legal-row > span:nth-child(3)::before { content: "Durata"; }
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

@media (max-width: 430px) {
  .container { width: min(calc(100% - 20px), var(--max)); }
  .brand-official .brand-official-image { width: 148px; max-height: 42px; }
  .lang-switch button { min-width: 28px; padding-inline: 5px; font-size: .68rem; }
  .menu-toggle { width: 38px; height: 38px; flex-basis: 38px; }
  .hero-copy h1 { font-size: clamp(2.55rem, 16vw, 3.8rem); }
  .hero-slogan { font-size: 1rem; }
  .hero-copy .lead { font-size: 1rem; }
  .btn { min-height: 46px; padding: 11px 16px; }
  .stat { padding: 18px 12px; }
  .card { padding: 22px; }
  .product-card, .demo-card, .portfolio-card { padding: 0; }
  .modal { padding: 10px; }
  .modal-head, .modal-body { padding: 18px; }
  .ai-panel { right: 10px; width: calc(100vw - 20px); }
}


/* QWARZYS v1.1 visual refinements */
.section-after-hero { padding-top: 92px; }

/* Preserve the official header artwork's natural 4:1 aspect ratio: never compress it vertically. */
.brand-official .brand-official-image {
  width: 284px;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

/* Section labels must remain clearly visible within the visual hierarchy. */
.eyebrow {
  margin-bottom: 18px;
  font-size: .92rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .14em;
}
.eyebrow::before { width: 32px; height: 2px; }

/* Web Studio previews: consistent QWARZYS framing and spacing. */
.demo-card {
  border-color: rgba(72,255,137,.30);
  background: linear-gradient(160deg, rgba(10,27,18,.94), rgba(3,9,6,.96));
}
.demo-thumb {
  background: #030806;
  border-bottom-color: rgba(72,255,137,.28);
}
.demo-body {
  background: linear-gradient(180deg, rgba(8,23,15,.98), rgba(3,10,7,.98));
}
.demo-body h3 { color: var(--white); }

/* Project badges need separation from their titles. */
.portfolio-body > .badge {
  margin-bottom: 18px;
}
.portfolio-body > h3 {
  margin-bottom: 16px;
}

@media (max-width: 1120px) {
  .brand-official .brand-official-image { width: 250px; max-height: none; }
}
@media (max-width: 1020px) {
  .brand-official .brand-official-image { width: 245px; max-height: none; }
}
@media (max-width: 700px) {
  .section-after-hero { padding-top: 72px; }
  .brand-official .brand-official-image { width: 184px; max-height: none; }
  .eyebrow { font-size: .82rem; letter-spacing: .12em; margin-bottom: 15px; }
}
@media (max-width: 430px) {
  .brand-official .brand-official-image { width: 148px; max-height: none; }
}


/* QWARZYS header crop fix: preserve artwork proportions and remove empty margins. */
.brand-official .brand-official-image {
  width: 250px;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 756 / 165;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 1120px) {
  .brand-official .brand-official-image { width: 230px; }
}
@media (max-width: 1020px) {
  .brand-official .brand-official-image { width: 220px; }
}
@media (max-width: 700px) {
  .brand-official .brand-official-image { width: 176px; }
}
@media (max-width: 430px) {
  .brand-official .brand-official-image { width: 142px; }
}
