/* ============================================================
   xGreen Marketing Site — Design System
   Extends the admin token vocabulary with marketing patterns
   ============================================================ */

/* --- tokens --- */
:root {
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: var(--font-ui);
  --accent: #1f9d57;
  --accent-glow: color-mix(in oklab, #1f9d57 40%, transparent);
  --accent-subtle: color-mix(in oklab, #1f9d57 12%, transparent);
  --ok: #1f9d57;
  --warn: #d39424;
  --alert: #dd5a40;
  --bg: #f5f7f3;
  --bg-alt: #eef1ea;
  --bg-hero: #0d2218;
  --bg-hero-2: #0a1c12;
  /* xGreen brand logo (matches admin app) */
  --logo-stem: #1f9d57;
  --logo-leaf: color-mix(in oklab, #1f9d57 74%, #ffffff);
  --logo-leaf-2: color-mix(in oklab, #1f9d57 90%, #07371f);
  --logo-vein: color-mix(in oklab, #1f9d57 40%, #ffffff);
  --surface: #ffffff;
  --border: #e4e8e0;
  --border-strong: #d2d8cd;
  --text: #1b2620;
  --text-dim: #6a7770;
  --text-faint: #97a299;
  --text-hero: #e8ede9;
  --text-hero-dim: #93a39b;
  --r: 14px;
  --r-sm: 9px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(20,30,24,.04), 0 6px 18px -8px rgba(20,30,24,.10);
  --shadow-md: 0 2px 8px rgba(20,30,24,.06), 0 14px 36px -10px rgba(20,30,24,.14);
  --shadow-lg: 0 4px 16px rgba(20,30,24,.08), 0 24px 64px -12px rgba(20,30,24,.22);
  --nav-h: 68px;
  --section-pad: 96px;
  --content-w: 1200px;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);
}
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
/* Phosphor duotone icon placeholders (site/icons.js swaps in the SVG). Inherits colour from context. */
.xg-ico { display: inline-flex; line-height: 0; flex: none; }

/* --- layout containers --- */
.ws-container { max-width: var(--content-w); margin: 0 auto; padding: 0 28px; }
.ws-section { padding: var(--section-pad) 0; }
.ws-section-alt { background: var(--bg-alt); }
.ws-section-dark {
  background:
    radial-gradient(ellipse 80% 45% at 50% -12%, rgba(251,191,96,.07) 0%, transparent 45%),
    radial-gradient(ellipse 120% 65% at 50% -15%, rgba(134,239,172,.09) 0%, transparent 50%),
    radial-gradient(ellipse 70% 70% at -5% 60%, rgba(34,197,94,.11) 0%, transparent 50%),
    radial-gradient(ellipse 70% 70% at 105% 40%, rgba(13,148,136,.09) 0%, transparent 50%),
    var(--bg-hero);
  color: var(--text-hero);
}
.ws-section-dark .ws-eyebrow { color: var(--accent); }
.ws-section-dark p, .ws-section-dark .ws-section-sub { color: var(--text-hero-dim); }

.ws-section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.ws-section-head.left { margin-left: 0; text-align: left; }
.ws-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.ws-eyebrow::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--accent); border-radius: 1px;
}
.ws-section-title { font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.ws-section-sub { font-size: 18px; color: var(--text-dim); line-height: 1.6; }

/* --- navigation --- */
.ws-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.ws-nav-inner {
  max-width: var(--content-w); width: 100%; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 0;
}
.ws-nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex: none; margin-right: 40px; text-decoration: none;
}
.ws-nav-logo-mark {
  display: grid; place-items: center; flex: none;
}
.ws-nav-logo-mark svg, .ws-nav-logo-mark img { height: 26px; width: auto; display: block; overflow: visible; }
.ws-nav-logo-word {
  font-size: 20px; font-weight: 700; letter-spacing: -0.04em;
  color: var(--text);
}
.ws-nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1;
  list-style: none; margin: 0; padding: 0;
}
.ws-nav-links a {
  display: block; padding: 7px 13px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--text-dim);
  transition: .15s;
}
.ws-nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.ws-nav-links a.active { color: var(--accent); background: var(--accent-subtle); }
.ws-nav-right {
  display: flex; align-items: center; gap: 12px; flex: none;
}
/* "Log in" → cloud.xgreen.tech. A quiet text link, not a second button: the primary nav CTA is "Order now"
   (new customers), and giving an existing-customer link equal weight would compete with it. */
.ws-nav-login {
  padding: 7px 4px;
  font-size: 14.5px; font-weight: 500; color: var(--text-dim);
  white-space: nowrap;
  transition: .15s;
}
.ws-nav-login:hover { color: var(--accent); }
/* lang switcher (mirrors admin) */
.ws-lang {
  display: inline-flex; gap: 2px; background: var(--bg-alt);
  border-radius: 8px; padding: 3px;
}
.ws-lang-btn {
  border: none; background: transparent; color: var(--text-dim);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 6px; transition: .15s;
}
.ws-lang-btn:hover { color: var(--text); }
.ws-lang-btn.active {
  background: var(--surface); color: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.ws-nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 38px; height: 38px; background: none; border: none;
  padding: 0;
}
.ws-nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 1px; transition: .2s;
}
.ws-nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px; z-index: 99; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-md);
}
.ws-nav-mobile.open { display: flex; }
.ws-nav-mobile a {
  display: block; padding: 11px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 500; color: var(--text-dim); transition: .15s;
}
.ws-nav-mobile a:hover, .ws-nav-mobile a.active { background: var(--bg-alt); color: var(--text); }
.ws-nav-mobile a.active { color: var(--accent); }
.ws-nav-mobile-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

/* --- buttons --- */
.ws-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; border: none;
  transition: filter .15s, transform .12s;
  text-decoration: none; white-space: nowrap;
}
.ws-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ws-btn:active { transform: translateY(0); }
.ws-btn-lg { padding: 15px 28px; font-size: 16px; border-radius: var(--r); }
.ws-btn-sm { padding: 8px 14px; font-size: 13.5px; }
.ws-btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-strong);
}
.ws-btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.ws-btn-ghost-light {
  background: rgba(255,255,255,.1); color: var(--text-hero);
  border: 1px solid rgba(255,255,255,.18);
}
.ws-btn-ghost-light:hover { background: rgba(255,255,255,.18); filter: none; }

/* --- hero --- */
.ws-hero {
  background: var(--bg-hero);
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  padding: 64px 0 80px;
  position: relative; overflow: hidden;
}
.ws-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 30%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.ws-hero-inner {
  max-width: var(--content-w); width: 100%; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.ws-hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.ws-hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  padding: 6px 12px; border-radius: 999px; color: #c5d9cc;
}
.ws-hero-chip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ws-hero-headline {
  font-size: clamp(38px, 5.5vw, 68px);
  color: var(--text-hero); margin-bottom: 20px;
  font-weight: 700; letter-spacing: -0.03em;
}
.ws-hero-headline em { font-style: normal; color: var(--accent); }
.ws-hero-sub {
  font-size: 18px; color: var(--text-hero-dim); line-height: 1.65;
  max-width: 42ch; margin-bottom: 36px;
}
.ws-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ws-hero-diagram { display: flex; justify-content: center; align-items: center; }
.ws-hero-diagram svg { width: 100%; max-width: 600px; }

/* page hero (subpages) */
.ws-page-hero {
  background:
    radial-gradient(ellipse 70% 45% at 55% -15%, rgba(251,191,96,.08) 0%, transparent 45%),
    radial-gradient(ellipse 150% 65% at 45% -20%, rgba(134,239,172,.11) 0%, transparent 52%),
    radial-gradient(ellipse 65% 75% at -6% 68%, rgba(34,197,94,.13) 0%, transparent 50%),
    radial-gradient(ellipse 65% 75% at 106% 32%, rgba(13,148,136,.11) 0%, transparent 50%),
    radial-gradient(ellipse 90% 45% at 50% 115%, rgba(6,16,10,.92) 0%, transparent 55%),
    var(--bg-hero);
  padding: 64px 0 72px;
  position: relative; overflow: hidden;
}
.ws-page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 65% at 98% 50%, rgba(31,157,87,.05) 0%, transparent 55%);
  pointer-events: none;
}
/* decorative concentric rings + dots (matches homepage hero) */
.ws-page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='700'%3E%3Cg fill='none' stroke='%234ade80'%3E%3Ccircle cx='760' cy='350' r='130' stroke-opacity='.08'/%3E%3Ccircle cx='760' cy='350' r='215' stroke-opacity='.05'/%3E%3Ccircle cx='760' cy='350' r='305' stroke-opacity='.032'/%3E%3Ccircle cx='760' cy='350' r='405' stroke-opacity='.02'/%3E%3C/g%3E%3Cg fill='%2386efac'%3E%3Ccircle cx='180' cy='330' r='3' opacity='.18'/%3E%3Ccircle cx='360' cy='400' r='3.5' opacity='.12'/%3E%3Ccircle cx='90' cy='370' r='2.5' opacity='.16'/%3E%3Ccircle cx='520' cy='300' r='2.5' opacity='.12'/%3E%3C/g%3E%3C/svg%3E") no-repeat right center;
  background-size: 1000px 700px;
  pointer-events: none;
}
/* xGreen logo, centred in the ring motif */
.ws-page-hero-logo {
  position: absolute; top: 50%; right: 148px;
  transform: translateY(-50%);
  z-index: 0; pointer-events: none; opacity: .92;
}
.ws-page-hero-logo svg, .ws-page-hero-logo img { height: 120px; width: auto; display: block; overflow: visible; }
@media (max-width: 820px) { .ws-page-hero-logo { display: none; } }
.ws-page-hero-inner {
  max-width: var(--content-w); margin: 0 auto; padding: 0 28px;
  position: relative; z-index: 1;
}
.ws-page-hero .ws-eyebrow { color: var(--accent); }
.ws-page-hero-title { font-size: clamp(32px, 4.5vw, 54px); color: var(--text-hero); margin-bottom: 16px; }
.ws-page-hero-sub { font-size: 18px; color: var(--text-hero-dim); max-width: 52ch; line-height: 1.65; }

/* --- stat strip --- */
.ws-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in oklab, var(--text-hero) 10%, transparent);
  margin-top: 64px;
}
.ws-stat {
  padding: 28px 24px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid color-mix(in oklab, var(--text-hero) 10%, transparent);
}
.ws-stat:last-child { border-right: none; }
.ws-stat-num {
  font-size: 32px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.03em; line-height: 1;
}
.ws-stat-label { font-size: 14px; color: var(--text-hero-dim); line-height: 1.4; }

/* --- features grid --- */
.ws-features-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.ws-feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px 28px 30px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ws-feature-card:hover {
  border-color: color-mix(in oklab, var(--accent) 38%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.ws-feature-ico {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.ws-feature-title { font-size: 18px; margin-bottom: 10px; }
.ws-feature-body { font-size: 15px; color: var(--text-dim); line-height: 1.6; }

/* --- how it works steps --- */
.ws-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ws-step { display: flex; flex-direction: column; gap: 14px; }
.ws-step-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
  flex: none;
}
.ws-step-title { font-size: 20px; }
.ws-step-body { font-size: 15px; color: var(--text-dim); line-height: 1.6; }
.ws-step-detail {
  margin-top: 4px; display: flex; flex-direction: column; gap: 7px;
}
.ws-step-item {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13.5px; color: var(--text-dim);
}
.ws-step-item::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none; margin-top: 6px;
}

/* dark variant of steps */
.ws-section-dark .ws-step-title { color: var(--text-hero); }
.ws-section-dark .ws-step-body { color: var(--text-hero-dim); }
.ws-section-dark .ws-step-item { color: var(--text-hero-dim); }

/* --- architecture boxes --- */
.ws-arch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px;
}
.ws-arch-card {
  background: color-mix(in oklab, var(--text-hero) 5%, var(--bg-hero));
  border: 1px solid color-mix(in oklab, var(--text-hero) 10%, transparent);
  border-radius: var(--r); padding: 24px;
}
.ws-arch-card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.ws-arch-card-ico {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.ws-arch-card-title { font-size: 16px; font-weight: 600; color: var(--text-hero); }
.ws-arch-card-sub { font-size: 12px; color: var(--text-hero-dim); margin-top: 1px; }
.ws-arch-card p { font-size: 14px; color: var(--text-hero-dim); line-height: 1.55; }
.ws-arch-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ws-arch-tag {
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  background: var(--accent-subtle); color: var(--accent);
}

/* --- spec table --- */
.ws-spec-table { width: 100%; border-collapse: collapse; }
.ws-spec-table th, .ws-spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14.5px; text-align: left; }
.ws-spec-table th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); background: var(--bg-alt); }
.ws-spec-table td:first-child { font-weight: 500; }
.ws-spec-table td:last-child { color: var(--text-dim); }

/* --- admin preview --- */
.ws-preview-frame {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.ws-preview-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: #f0f2ee; border-bottom: 1px solid var(--border);
}
.ws-preview-dot { width: 11px; height: 11px; border-radius: 50%; }
.ws-preview-url {
  flex: 1; margin: 0 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 12px; font-size: 12px; color: var(--text-faint);
}
.ws-preview-screen {
  background: #f5f7f3; aspect-ratio: 16/9;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.ws-preview-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-faint);
}
.ws-preview-placeholder svg { opacity: .3; }
.ws-preview-placeholder p { font-size: 13px; }

/* --- screenshot placeholder --- */
.ws-screenshot-ph {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--surface) 100%);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r); display: grid; place-items: center;
  color: var(--text-faint); font-size: 13.5px; font-weight: 500;
  text-align: center; padding: 24px; gap: 10px;
}
.ws-screenshot-ph svg { color: var(--text-faint); opacity: .4; }

/* video placeholder */
.ws-video-ph {
  background: var(--bg-hero); border-radius: var(--r); overflow: hidden;
  position: relative; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ws-video-ph-overlay {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: var(--text-hero-dim); text-align: center; padding: 32px;
}
.ws-video-play {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 12px var(--accent-glow);
  transition: .2s;
}
.ws-video-ph:hover .ws-video-play { transform: scale(1.08); filter: brightness(1.1); }

/* --- gallery grid --- */
.ws-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.ws-gallery-item {
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  background: var(--surface); cursor: pointer; transition: .2s;
  position: relative;
}
.ws-gallery-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ws-gallery-item-inner {
  background: var(--bg-alt); aspect-ratio: 16/10;
  display: grid; place-items: center;
}
.ws-gallery-item-cap {
  padding: 12px 14px;
  font-size: 13px; color: var(--text-dim);
}
.ws-gallery-item-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
  padding: 3px 8px; background: var(--accent-subtle);
  border-radius: 5px; display: inline-block; margin-bottom: 6px;
}

/* gallery large item */
.ws-gallery-item-large { grid-column: span 2; }
.ws-gallery-item-large .ws-gallery-item-inner { aspect-ratio: 16/7; }

/* --- pricing / configurator --- */
.ws-config-wrap {
  display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start;
}
.ws-config-items { display: flex; flex-direction: column; gap: 12px; }
.ws-config-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); transition: border-color .2s;
}
.ws-config-item.selected { border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.ws-config-item-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.ws-config-item-body { flex: 1; min-width: 0; }
.ws-config-item-name { font-size: 15px; font-weight: 500; }
.ws-config-item-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.ws-config-item-price { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.ws-config-item-price small { font-size: 11px; color: var(--text-faint); font-weight: 400; }
.ws-qty {
  display: flex; align-items: center; gap: 0; border: 1px solid var(--border-strong);
  border-radius: 8px; overflow: hidden; flex: none;
}
.ws-qty-btn {
  width: 34px; height: 34px; border: none; background: var(--surface);
  color: var(--text-dim); font-size: 18px; line-height: 1;
  display: grid; place-items: center; transition: .12s;
}
.ws-qty-btn:hover:not(:disabled) { background: var(--bg-alt); color: var(--text); }
.ws-qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.ws-qty-val {
  width: 38px; text-align: center; font-size: 14px; font-weight: 600;
  background: var(--bg-alt); border: none; color: var(--text);
}
.ws-config-checkbox { display: flex; align-items: center; gap: 12px; flex: none; }
.ws-config-checkbox input { display: none; }
.ws-config-chkbox {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; color: transparent;
  transition: .15s; flex: none;
}
.ws-config-checkbox input:checked ~ .ws-config-chkbox {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
/* trailing control column — keeps price + qty/Add aligned to the same
   right edge on every row, regardless of price text width */
.ws-config-control {
  flex: none; display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px; min-width: 132px;
}
.ws-config-control .ws-config-item-price { text-align: right; }

/* gallery images (rendered when an owner uploads a photo) */
.ws-gallery-item-inner img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ws-gallery-item-photo .ws-gallery-item-inner { background: linear-gradient(135deg,#1a2c1e 0%,#0c130f 100%); }

/* Summary card */
.ws-config-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px; box-shadow: var(--shadow);
  position: sticky; top: calc(var(--nav-h) + 20px);
}
.ws-config-summary-title { font-size: 17px; font-weight: 600; margin-bottom: 18px; }
.ws-config-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border);
  gap: 10px;
}
.ws-config-line:last-of-type { border-bottom: none; }
.ws-config-line-name { color: var(--text-dim); flex: 1; min-width: 0; }
.ws-config-line-val { font-weight: 500; white-space: nowrap; }
.ws-config-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 6px; margin-top: 6px; border-top: 2px solid var(--border-strong);
}
.ws-config-total-label { font-size: 14px; font-weight: 600; }
.ws-config-total-val { font-size: 24px; font-weight: 700; color: var(--accent); }
.ws-config-note { font-size: 12px; color: var(--text-faint); margin-top: 8px; text-align: center; }

/* --- forms --- */
.ws-form { display: flex; flex-direction: column; gap: 18px; }
.ws-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ws-form-group { display: flex; flex-direction: column; gap: 7px; }
.ws-form-group.full { grid-column: 1 / -1; }
.ws-form-label {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  letter-spacing: .01em;
}
.ws-form-input, .ws-form-textarea, .ws-form-select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-family: var(--font-ui); font-size: 15px; transition: .15s;
  -webkit-appearance: none;
}
.ws-form-input:focus, .ws-form-textarea:focus, .ws-form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.ws-form-input::placeholder, .ws-form-textarea::placeholder { color: var(--text-faint); }
.ws-form-textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.ws-form-hint { font-size: 12.5px; color: var(--text-faint); }

/* --- inline info list (specs / tech details) --- */
.ws-info-list { display: flex; flex-direction: column; gap: 10px; }
.ws-info-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14.5px;
}
.ws-info-item-ico {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; flex: none; margin-top: 2px;
}
.ws-info-item-body { flex: 1; }
.ws-info-item-label { font-weight: 600; }
.ws-info-item-sub { color: var(--text-dim); font-size: 13px; margin-top: 1px; }
.ws-section-dark .ws-info-item-label { color: var(--text-hero); }
.ws-section-dark .ws-info-item-sub { color: var(--text-hero-dim); }

/* --- two-col content block --- */
.ws-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; align-items: center;
}
.ws-two-col.flip { direction: rtl; }
.ws-two-col.flip > * { direction: ltr; }
.ws-two-col-text { display: flex; flex-direction: column; gap: 18px; }
.ws-two-col-text h2 { font-size: clamp(24px, 3vw, 36px); }
.ws-two-col-text p { font-size: 16px; color: var(--text-dim); line-height: 1.65; }

/* --- badge list (tech tag cloud) --- */
.ws-badge-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-badge {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px;
  border-radius: 999px; background: var(--accent-subtle); color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent);
}
.ws-section-dark .ws-badge {
  background: rgba(31,157,87,.18); border-color: rgba(31,157,87,.3);
}

/* --- CTA banner --- */
.ws-cta-banner {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 92%, #0a2016) 0%,
    color-mix(in oklab, var(--accent) 72%, #0a2016) 100%);
  border-radius: var(--r-lg); padding: 52px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.ws-cta-banner-text { flex: 1; }
.ws-cta-banner-text h2 { font-size: clamp(24px, 3vw, 36px); color: #fff; margin-bottom: 10px; }
.ws-cta-banner-text p { font-size: 16px; color: rgba(255,255,255,.75); max-width: 44ch; }
.ws-cta-banner .ws-btn { background: #fff; color: var(--accent); flex: none; }
.ws-cta-banner .ws-btn:hover { filter: none; background: #f0fbf5; }

/* --- accordion / FAQ --- */
.ws-faq { display: flex; flex-direction: column; gap: 2px; }
.ws-faq-item { border-radius: var(--r-sm); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.ws-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  gap: 14px; border: none; width: 100%; text-align: left;
  background: transparent; color: var(--text); transition: .15s;
}
.ws-faq-q:hover { background: var(--bg-alt); }
.ws-faq-q svg { flex: none; color: var(--text-dim); transition: transform .2s; }
.ws-faq-item.open .ws-faq-q svg { transform: rotate(45deg); color: var(--accent); }
.ws-faq-item.open .ws-faq-q { color: var(--accent); }
.ws-faq-a {
  display: none; padding: 0 20px 18px;
  font-size: 14.5px; color: var(--text-dim); line-height: 1.65;
}
.ws-faq-item.open .ws-faq-a { display: block; }

/* --- contact details --- */
.ws-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ws-contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px;
  display: flex; align-items: flex-start; gap: 14px;
}
.ws-contact-ico {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center; flex: none;
}
.ws-contact-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.ws-contact-val { font-size: 15px; font-weight: 500; }
.ws-contact-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* --- footer --- */
.ws-footer {
  background: var(--bg-hero); color: var(--text-hero-dim);
  padding: 56px 0 32px;
}
.ws-footer-inner {
  max-width: var(--content-w); margin: 0 auto; padding: 0 28px;
}
.ws-footer-top {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px 48px; margin-bottom: 48px;
}
.ws-footer-brand {}
.ws-footer-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.ws-footer-logo-mark {
  display: grid; place-items: center;
}
.ws-footer-logo-mark svg, .ws-footer-logo-mark img { height: 26px; width: auto; display: block; overflow: visible; }
.ws-footer-logo-word { font-size: 18px; font-weight: 700; letter-spacing: -0.04em; color: var(--text-hero); }
.ws-footer-tagline { font-size: 14px; line-height: 1.6; max-width: 26ch; }
.ws-footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in oklab, var(--text-hero) 55%, transparent); margin-bottom: 14px; }
.ws-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ws-footer-col ul a { font-size: 14px; color: var(--text-hero-dim); transition: color .15s; }
.ws-footer-col ul a:hover { color: var(--text-hero); }
.ws-footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid color-mix(in oklab, var(--text-hero) 10%, transparent);
  gap: 16px; flex-wrap: wrap;
}
.ws-footer-rights { font-size: 13px; }
.ws-footer-bottom-links { display: flex; gap: 20px; }
.ws-footer-bottom-links a { font-size: 13px; color: var(--text-hero-dim); transition: .15s; }
.ws-footer-bottom-links a:hover { color: var(--text-hero); }

/* --- about / values --- */
.ws-values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ws-value-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px;
}
.ws-value-ico {
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
  background: var(--accent-subtle); color: var(--accent);
  display: grid; place-items: center;
}
.ws-value-title { font-size: 17px; margin-bottom: 8px; }
.ws-value-body { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* --- order steps indicator --- */
.ws-order-steps { display: flex; align-items: center; gap: 0; margin-bottom: 40px; }
.ws-order-step {
  display: flex; align-items: center; gap: 10px;
  flex: 1; font-size: 14px; color: var(--text-dim);
}
.ws-order-step-num {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  flex: none; transition: .2s;
}
.ws-order-step.done .ws-order-step-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.ws-order-step.active .ws-order-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.ws-order-step.active { color: var(--text); font-weight: 500; }
.ws-order-step-connector { flex: 1; height: 1px; background: var(--border-strong); margin: 0 4px; }
.ws-order-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px;
  box-shadow: var(--shadow);
}

/* divider */
.ws-divider { height: 1px; background: var(--border); margin: 28px 0; }

/* success state */
.ws-success {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px; gap: 16px;
}
.ws-success-ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: color-mix(in oklab, var(--ok) 14%, transparent); color: var(--ok);
  display: grid; place-items: center;
}
.ws-success h3 { font-size: 22px; }
.ws-success p { color: var(--text-dim); max-width: 36ch; }

/* --- responsive --- */
@media (max-width: 1024px) {
  .ws-features-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-arch-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .ws-hero-inner { grid-template-columns: 1fr; }
  .ws-hero-diagram { display: none; }
  .ws-two-col, .ws-two-col.flip { grid-template-columns: 1fr; direction: ltr; }
  /* minmax(0,1fr), not 1fr: a bare 1fr track will not shrink below its content's min-width, and the summary card
     contains wide "item × qty … 1490 PLN" rows — that is what pushed the offer page 26–41px past the viewport. */
  .ws-config-wrap { grid-template-columns: minmax(0, 1fr); }
  .ws-config-summary { position: static; }
  /* The summary rows are label + price on one line; let them wrap rather than force the card wider. */
  .ws-config-summary-row { flex-wrap: wrap; }

  /* Offer cards are icon + text + (price & stepper) in one flex row. At 375px that leaves the text roughly 80px
     wide, which broke product names mid-word ("Sterowni / k xGreen"). Stack instead: icon and name on the first
     row, price and quantity on their own full-width row underneath. */
  .ws-config-item { flex-wrap: wrap; align-items: flex-start; padding: 16px 16px; gap: 12px; }
  .ws-config-item-body { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .ws-config-control {
    flex: 1 0 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px solid var(--border);
  }
  .ws-steps { grid-template-columns: 1fr; }
  .ws-stats { grid-template-columns: 1fr; }
  .ws-stat { border-right: none; border-bottom: 1px solid color-mix(in oklab, var(--text-hero) 10%, transparent); }
  .ws-stat:last-child { border-bottom: none; }
  .ws-gallery-grid { grid-template-columns: 1fr 1fr; }
  .ws-gallery-item-large { grid-column: span 2; }
  .ws-cta-banner { flex-direction: column; padding: 36px 28px; }
  .ws-contact-grid { grid-template-columns: 1fr; }
  .ws-values-grid { grid-template-columns: 1fr; }
  .ws-arch-grid { grid-template-columns: 1fr; }
  .ws-form-row { grid-template-columns: 1fr; }
}
/* ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
   Responsive grid utilities.
   The page markup used inline `style="display:grid;grid-template-columns:…"`, which a media query CANNOT override
   — that is why nine of the ten pages never collapsed on a phone (up to +186px of horizontal overflow). These
   classes exist so those layouts are reachable from CSS at all.
   `minmax(0,1fr)` rather than `1fr`: a bare 1fr track refuses to shrink below its content's min-width, so a long
   word or a wide child pushes the whole grid past the viewport instead of wrapping.
   ───────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.xg-g2, .xg-g3, .xg-g4, .xg-g3-tight { display: grid; }
.xg-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xg-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xg-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Compact numeric strips inside a card (three small centred stats). These read fine three-up on a phone, so they
   keep their columns and only gain the ability to shrink. */
.xg-g3-tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xg-gap-6 { gap: 6px; } .xg-gap-8 { gap: 8px; } .xg-gap-10 { gap: 10px; }
.xg-gap-16 { gap: 16px; } .xg-gap-20 { gap: 20px; } .xg-gap-24 { gap: 24px; }
/* A full-width child of a 2-column grid. This MUST be a class, not `style="grid-column:span 2"`: an inline span
   survives the parent collapsing to one column and forces the browser to create an IMPLICIT second track, so the
   grid silently stays two-wide (with unequal columns) no matter what the media query says. */
.xg-span2 { grid-column: span 2; }

@media (max-width: 900px) {
  .xg-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --section-pad: 60px; }
  .ws-nav-links { display: none; }
  .ws-nav-hamburger { display: flex; }
  /* ★ THE mobile nav bug: the links were hidden and the hamburger shown, but this cluster (EN/PL + Log in +
     Order now, ~290px) was left visible. On a 375px screen it overflowed the bar, pushed the hamburger off-screen
     and clipped the CTA — so the menu could not be opened at all. Everything in it is already duplicated inside
     .ws-nav-mobile-foot, so hiding it loses nothing. */
  .ws-nav-right { display: none; }

  .xg-g2, .xg-g3, .xg-g4 { grid-template-columns: 1fr; }
  .xg-span2 { grid-column: auto; }   /* one column now — a span would re-create a second, implicit track */
  .ws-features-grid { grid-template-columns: 1fr; }
  .ws-gallery-grid { grid-template-columns: 1fr; }
  .ws-gallery-item-large { grid-column: span 1; }
  .ws-footer-top { grid-template-columns: 1fr; }
  .ws-footer-bottom { flex-direction: column; align-items: flex-start; }

  /* The mobile drawer's foot holds lang + Log in + Order now in one flex row. At 360px that is too tight, so let
     it wrap and give the CTA its own full-width row. */
  .ws-nav-mobile-foot { flex-wrap: wrap; gap: 10px; }
  .ws-nav-mobile-foot .ws-btn { flex: 1 0 100%; justify-content: center; }
  /* ★ `.ws-nav-mobile a { display:block }` (0,1,1) outranks `.ws-btn { display:inline-flex }` (0,1,0), so the CTA
     inside the drawer lost its flex centring and, once min-height was added, its label sat clipped against the
     drawer edge. Restore centring for both the links and the button. */
  .ws-nav-mobile a { display: flex; align-items: center; }
  /* Same specificity trap for colour, and this one was PRE-EXISTING: `.ws-nav-mobile a { color: var(--text-dim) }`
     also outranks `.ws-btn { color: #fff }`, so the drawer's CTA has always rendered grey-on-green — unreadable. */
  .ws-nav-mobile .ws-btn { display: inline-flex; align-items: center; color: #fff; }

  /* Touch targets. Scoped to actual CONTROLS — a blanket `a { min-height:44px }` would stretch every inline link
     inside a paragraph and wreck the body copy. */
  .ws-btn, .ws-lang-btn, .ws-nav-mobile a, .ws-nav-login,
  button, input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    min-height: 44px;
  }
  .ws-lang-btn { min-width: 44px; }
  .ws-nav-hamburger { min-width: 44px; }
  .ws-nav-logo { min-height: 44px; }
  /* Footer navigation was the largest group of undersized targets — 12 links at roughly 19px tall. inline-flex so
     the taller hit area does not also stretch the visible text. */
  .ws-footer-col a, .ws-footer-bottom-links a { min-height: 44px; display: inline-flex; align-items: center; }
  /* Quantity steppers on the offer configurator: 34px wide, and they are the page's primary interaction. */
  .ws-qty-btn { min-width: 44px; }
  /* Checkboxes cannot simply grow (the visual box is styled), so give the label the hit area instead. */
  .ws-config-checkbox, label { min-height: 44px; display: flex; align-items: center; }

  /* Legibility floors — applied to REAL CONTENT only.
     Deliberately NOT applied to two groups: the micro-labels (.ws-eyebrow, .ws-arch-tag, .ws-badge — 11–12.5px
     uppercase, tracking-wide, a normal design idiom), and the text inside the mock-up illustrations (9–12px
     inside .ws-two-col / .xg-g2 / .xg-g3 dashboard fakes), where enlarging the type would break the drawing it
     belongs to. Those are decoration, not copy anyone reads. */
  body { font-size: 16px; }
  p, li, .ws-section-sub, .ws-card-body, .ws-footer-tagline { font-size: 15px; line-height: 1.6; }
  .ws-info-item-sub, .ws-config-item-desc, .ws-arch-card-sub { font-size: 14.5px; line-height: 1.55; }
  .ws-config-note, .ws-footer-rights { font-size: 13.5px; }
  .ws-eyebrow { font-size: 11px; }

  /* Long unbroken strings (URLs, model numbers) are a classic phone-overflow source. */
  body { overflow-wrap: break-word; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
