/* =========================================================================
   Progres — Marketing site
   Palette & tokens mirror the Progres ERP design system.
   ========================================================================= */

:root {
  /* Brand */
  --primary: #3b6df5;
  --primary-2: #6d4de8;
  --primary-hover: #2f5ee0;
  --primary-soft: #e8eefe;
  --navy: #0c1628;
  --navy-2: #111826;
  --navy-3: #1d2a46;

  /* Semantic */
  --success: #10a765;
  --success-soft: #dff5e8;
  --warning: #e79324;
  --warning-soft: #fdf0d8;
  --danger: #e14040;
  --teal: #0ea5a5;

  /* Surfaces & text */
  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e4e8ef;
  --border-strong: #d4d9e2;
  --text: #131a2b;
  --text-muted: #5c6577;
  --text-subtle: #8a93a7;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-md: 0 6px 22px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
  --shadow-xl: 0 40px 90px rgba(12, 22, 40, .22);
  --ring: 0 0 0 4px rgba(59, 109, 245, .15);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --grad-brand: linear-gradient(120deg, #1d2a46 0%, #2f4a8a 45%, #3b6df5 100%);
  --grad-text: linear-gradient(120deg, #3b6df5, #6d4de8);
  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: 'Sora', 'Inter', sans-serif; margin: 0; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  --bh: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--bh); padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s, border-color .18s, color .18s;
}
.btn .ic { width: 18px; height: 18px; }
.btn-lg { --bh: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -6px rgba(59, 109, 245, .6); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(59, 109, 245, .7); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }

/* ---- Scroll progress -------------------------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad-text); z-index: 200; transition: width .1s linear;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.site-header.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--navy); }
.brand-mark { transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.nav-links { display: flex; gap: 4px; margin-left: 14px; margin-right: auto; }
.nav-links a { position: relative; padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 15px; white-space: nowrap; color: var(--text-muted); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a.active { color: var(--primary); }
/* Menu-only items (sign-in / demo CTA) — shown inside the mobile menu at small widths */
.nav-m { display: none; }
.nav-links a.m-cta {
  justify-content: center; margin-top: 8px; background: var(--primary); color: #fff; font-weight: 600;
  border-radius: 999px; box-shadow: 0 8px 20px -6px rgba(59, 109, 245, .6);
}
.nav-links a.m-cta:hover { background: var(--primary-hover); color: #fff; }
a, button { -webkit-tap-highlight-color: transparent; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: 13px; color: var(--text-muted); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.lang-toggle .ic { width: 15px; height: 15px; }
.lang-toggle .chev { width: 13px; height: 13px; opacity: .7; transition: transform .2s var(--ease); }
.lang-switch.open .chev { transform: rotate(180deg); }
.lang-toggle:hover { color: var(--primary); border-color: var(--primary); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 120;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; background: transparent; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
}
.lang-menu button:hover { background: var(--bg-alt); color: var(--primary); }
.lang-menu button[aria-selected="true"] { color: var(--primary); font-weight: 700; }
.lang-menu button[aria-selected="true"]::after { content: "✓"; font-size: 12px; line-height: 1; }
.btn-login { height: 38px; padding: 0 14px; font-size: 14px; }

.menu-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.menu-btn .ic { width: 20px; height: 20px; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { position: relative; padding: 74px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 520px; height: 520px; top: -180px; right: -120px; background: radial-gradient(circle, rgba(59, 109, 245, .55), transparent 70%); }
.blob-2 { width: 460px; height: 460px; top: 120px; left: -160px; background: radial-gradient(circle, rgba(109, 77, 232, .4), transparent 70%); }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(59, 109, 245, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 109, 245, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 80%);
}

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-hover);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(59, 109, 245, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 109, 245, .5); } 70% { box-shadow: 0 0 0 8px rgba(59, 109, 245, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 109, 245, 0); } }

.hero-copy h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 20px; font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--text-muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 18px 22px; margin-top: 30px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.hero-badges .ic { width: 18px; height: 18px; color: var(--success); background: var(--success-soft); border-radius: 50%; padding: 3px; stroke-width: 3; }

/* ---- App window mockup ------------------------------------------------ */
.hero-visual { position: relative; perspective: 1600px; }
.app-window {
  position: relative; z-index: 2;
  border-radius: 16px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  transform: rotateY(-11deg) rotateX(5deg) rotateZ(.4deg);
  /* Pivot on the right edge so the tilt recedes leftward and never spills past the column. */
  transform-origin: right center;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
}
.hero-visual:hover .app-window { transform: rotateY(-4deg) rotateX(2deg); }
.win-bar { display: flex; align-items: center; gap: 14px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: #d7dce4; }
.win-dots i:nth-child(1) { background: #ff5f57; } .win-dots i:nth-child(2) { background: #febc2e; } .win-dots i:nth-child(3) { background: #28c840; }
.win-url { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-subtle); background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 4px 12px; }
.win-url .ic { width: 11px; height: 11px; color: var(--success); }

.app-body { display: grid; grid-template-columns: 172px 1fr; height: 420px; }
.app-side { background: var(--navy-2); padding: 14px 10px; color: #d6dbe5; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; }
.side-brand b { font-size: 13px; color: #fff; display: block; line-height: 1.1; font-family: 'Sora', sans-serif; }
.side-brand small { font-size: 9px; color: #8590a8; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav span { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; font-size: 12px; color: #aab2c5; }
.side-nav .ic { width: 15px; height: 15px; }
.side-nav .active { background: rgba(59, 109, 245, .2); color: #fff; font-weight: 600; }

.app-main { background: var(--bg-alt); padding: 15px 16px; overflow: hidden; }
.app-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.app-top h4 { font-size: 15px; }
.app-top small { font-size: 11px; color: var(--text-subtle); }
.app-top-r { display: flex; align-items: center; gap: 8px; }
.fake-search { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-subtle); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px; }
.fake-search .ic { width: 12px; height: 12px; }
.bell { position: relative; display: grid; place-items: center; width: 28px; height: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; color: var(--text-muted); }
.bell .ic { width: 14px; height: 14px; }
.bell i { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; border: 1.5px solid var(--surface); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 11px; }
.kpi { position: relative; min-width: 0; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.kpi > div { min-width: 0; }
.kpi small { font-size: 9.5px; color: var(--text-subtle); display: block; }
.kpi b { font-size: 15px; font-family: 'Sora', sans-serif; }
.kpi-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.kpi-ic .ic { width: 15px; height: 15px; }
.kpi-trend { position: absolute; top: 8px; right: 9px; display: inline-flex; align-items: center; gap: 2px; font-size: 9px; font-weight: 700; color: var(--success); }
.kpi-trend .ic { width: 10px; height: 10px; }
.ic-blue { background: var(--primary-soft); color: var(--primary); }
.ic-violet { background: #efeafe; color: var(--primary-2); }
.ic-amber { background: var(--warning-soft); color: var(--warning); }
.ic-green { background: var(--success-soft); color: var(--success); }

.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-h b { font-size: 11.5px; } .panel-h small { font-size: 9px; color: var(--text-subtle); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 66px; }
.bars span { flex: 1; height: var(--h); background: linear-gradient(180deg, var(--primary), #7aa0ff); border-radius: 3px 3px 0 0; opacity: .9; }
.bars span:last-child { background: linear-gradient(180deg, var(--primary-2), #9d84f5); }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list li { display: flex; align-items: center; gap: 7px; font-size: 10.5px; }
.mini-list .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text-subtle); }
.mini-list .nm { flex: 1; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge { font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.b-green { background: var(--success-soft); color: #0a8a52; }
.b-amber { background: var(--warning-soft); color: #b9721a; }
.b-blue { background: var(--primary-soft); color: var(--primary-hover); }
.b-teal { background: #d6f3f3; color: #0a8383; }

/* floating cards */
.float-card {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .95); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.float-card .ic { width: 30px; height: 30px; padding: 7px; border-radius: 8px; }
.float-card b { font-size: 12px; display: block; } .float-card small { font-size: 10px; color: var(--text-subtle); }
.fc-1 { top: 40px; left: -34px; animation: floaty 5s ease-in-out infinite; }
.fc-1 .ic { background: var(--success-soft); color: var(--success); }
.fc-2 { bottom: 44px; right: -26px; animation: floaty 5s ease-in-out infinite 1.4s; }
.fc-2 .ic { background: var(--primary-soft); color: var(--primary); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* =========================================================================
   STATS
   ========================================================================= */
.stats { padding: 8px 0 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 30px; padding-bottom: 30px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { text-align: center; }
.stat b { font-family: 'Sora', sans-serif; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; letter-spacing: -.03em; }
.stat span { font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* =========================================================================
   SECTIONS (shared)
   ========================================================================= */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.tag { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-hover); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 18px; }
.tag-light { background: rgba(255, 255, 255, .12); color: #bcd0ff; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.section-head p { margin-top: 16px; font-size: 1.06rem; color: var(--text-muted); }

/* ---- Modules ---------------------------------------------------------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  overflow: hidden;
}
.module-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-text); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.module-card:hover::before { transform: scaleX(1); }
.m-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px; }
.m-ic .ic { width: 24px; height: 24px; }
.module-card h3 { font-size: 1.22rem; margin-bottom: 9px; }
.module-card p { font-size: .96rem; color: var(--text-muted); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span { font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--bg-alt); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; }

/* ---- Features --------------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: transform .25s var(--ease), box-shadow .25s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.f-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--grad-brand); color: #fff; margin-bottom: 18px; box-shadow: 0 10px 20px -8px rgba(59, 109, 245, .7); }
.f-ic .ic { width: 24px; height: 24px; }
.feature h3 { font-size: 1.16rem; margin-bottom: 9px; }
.feature p { font-size: .97rem; color: var(--text-muted); }

/* ---- Flow ------------------------------------------------------------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.flow::before { content: ""; position: absolute; top: 27px; left: 8%; right: 8%; height: 2px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px); z-index: 0; }
.flow-step { position: relative; z-index: 1; text-align: center; padding-top: 4px; }
.fs-ic { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.fs-ic .ic { width: 24px; height: 24px; }
.fs-no { position: absolute; top: -2px; right: calc(50% - 40px); font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 800; color: #fff; background: var(--navy-2); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.flow-step h4 { font-size: 1.05rem; margin-bottom: 7px; }
.flow-step p { font-size: .9rem; color: var(--text-muted); padding: 0 6px; }

/* =========================================================================
   SHOWCASE (dark)
   ========================================================================= */
.section-dark { background: var(--navy); color: #e7ebf3; position: relative; overflow: hidden; }
.section-dark::before { content: ""; position: absolute; top: -140px; left: 50%; transform: translateX(-50%); width: 780px; height: 420px; background: radial-gradient(circle, rgba(59, 109, 245, .28), transparent 70%); filter: blur(30px); }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p { color: #a7b1c6; }

.showcase { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; }
.show-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.show-tab { height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #c4cde0; font-weight: 600; font-size: 14px; cursor: pointer; transition: all .18s; }
.show-tab:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.show-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 10px 24px -8px rgba(59, 109, 245, .8); }

.show-stage { background: #fff; border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-xl); color: var(--text); min-height: 340px; }
.show-panel { display: none; animation: fadeUp .4s var(--ease); }
.show-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.sp-grid.three { grid-template-columns: repeat(3, 1fr); }
.sp-kpi { min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sp-kpi small { font-size: 12px; color: var(--text-subtle); display: block; }
.sp-kpi b { font-family: 'Sora', sans-serif; font-size: 1.55rem; font-weight: 700; display: block; margin: 4px 0; }
.sp-kpi i { font-style: normal; font-size: 12px; font-weight: 700; }
.sp-kpi .up { color: var(--success); } .sp-kpi .dn { color: var(--danger); }

.sp-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.sp-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sp-h { margin-bottom: 14px; } .sp-h b { font-size: 14px; }
.bars.big { height: 120px; gap: 8px; }
.bars.big span { border-radius: 5px 5px 0 0; }
.feed { display: flex; flex-direction: column; gap: 13px; }
.feed li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.feed small { margin-left: auto; color: var(--text-subtle); font-size: 11px; }
.fdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fdot.g { background: var(--success); } .fdot.b { background: var(--primary); } .fdot.a { background: var(--warning); } .fdot.v { background: var(--primary-2); }

.sp-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-toolbar b { font-size: 16px; font-family: 'Sora', sans-serif; }
.sp-search { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-subtle); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; }
.sp-search .ic { width: 14px; height: 14px; }
.sp-btn { font-size: 13px; font-weight: 600; color: #fff; background: var(--primary); border-radius: 8px; padding: 8px 14px; }

.sp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sp-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtle); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.sp-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); }
.sp-table tbody tr { transition: background .15s; }
.sp-table tbody tr:hover { background: var(--surface-2); }
.sp-table .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text-muted); }
.sp-table .pos { color: var(--success); font-weight: 600; } .sp-table .neg { color: var(--danger); font-weight: 600; }

/* =========================================================================
   SECURITY
   ========================================================================= */
.sec-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sec-copy .tag { margin-bottom: 18px; }
.sec-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 800; }
.sec-copy > p { margin-top: 16px; font-size: 1.06rem; color: var(--text-muted); }
.sec-list { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.sec-list li { display: flex; gap: 14px; }
.sec-list .ic { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.sec-list b { display: block; font-size: 1rem; margin-bottom: 2px; }
.sec-list span { font-size: .95rem; color: var(--text-muted); }

.sec-visual { display: grid; place-items: center; }
.shield-card {
  width: 100%; max-width: 380px; background: var(--grad-brand); border-radius: var(--radius-xl);
  padding: 40px 32px; color: #fff; box-shadow: var(--shadow-xl); position: relative; overflow: hidden;
}
.shield-card::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 26px 26px; opacity: .5; }
.shield-ic { position: relative; width: 74px; height: 74px; border-radius: 20px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; margin-bottom: 26px; }
.shield-ic .ic { width: 38px; height: 38px; }
.shield-rows { position: relative; display: flex; flex-direction: column; gap: 14px; }
.shield-rows span { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.shield-rows .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .22); stroke-width: 3; }

/* =========================================================================
   CTA / DEMO
   ========================================================================= */
.cta { position: relative; padding: 90px 0; background: var(--navy); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; }
.blob-3 { position: absolute; width: 640px; height: 640px; top: -260px; right: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(109, 77, 232, .5), transparent 65%); filter: blur(50px); }
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.cta-copy h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
.cta-copy > p { margin-top: 16px; color: #aab4ca; font-size: 1.1rem; max-width: 460px; }
.cta-points { margin-top: 26px; display: flex; flex-direction: column; gap: 13px; }
.cta-points li { display: flex; align-items: center; gap: 11px; color: #dfe5f0; font-weight: 500; }
.cta-points .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(59, 109, 245, .25); color: #7ea3ff; stroke-width: 3; }

.demo-form { background: #fff; border-radius: var(--radius-xl); padding: 30px; box-shadow: var(--shadow-xl); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ff { display: flex; flex-direction: column; gap: 7px; }
.ff-full { grid-column: 1 / -1; }
.ff label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ff input, .ff textarea {
  font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface-2); color: var(--text); width: 100%; resize: vertical;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ff input:focus, .ff textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.demo-form .btn { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: center; background: var(--success-soft); color: #0a8a52; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--navy); color: #aeb7cb; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.footer-logo { margin-bottom: 16px; }
.footer-brand p { font-size: .95rem; max-width: 320px; margin-bottom: 16px; }
.made { display: inline-block; font-size: 12px; font-weight: 600; color: #7f8aa3; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }
.footer-col h5 { color: #fff; font-size: 14px; margin-bottom: 16px; font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: .02em; }
.footer-col a { display: block; font-size: 14px; color: #aeb7cb; padding: 6px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; font-size: 13px; color: #7f8aa3; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: #fff; }

/* =========================================================================
   REVEAL ANIMATION
   ========================================================================= */
/* Progressive enhancement: only hide/animate when JS is active (html.js).
   Without JS the content is fully visible — no blank sections. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .module-grid .reveal.in, .js .feature-grid .reveal.in, .js .flow .reveal.in, .js .stats-grid .reveal.in { transition-delay: var(--d, 0s); }

/* =========================================================================
   RESPONSIVE — desktop-first, ordered largest → smallest
   ========================================================================= */

/* ≤1240 — keep the right floating card inside the viewport */
@media (max-width: 1240px) {
  .fc-2 { right: -10px; }
}

/* ≤1180 — collapse the nav into the hamburger menu (sized for the longest language, RU) */
@media (max-width: 1180px) {
  .nav-links { display: none; }
  /* the hidden links were the flex spacer — push the actions to the right edge ourselves */
  .nav-actions { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 16px 16px; gap: 2px;
    box-shadow: var(--shadow-md); max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav-links.open a { padding: 13px 14px; font-size: 16px; white-space: normal; }
}

/* ≤1000 — tablets: single-column hero, two-column grids */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; max-width: 640px; margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-badges { justify-content: center; }
  .hero-visual { width: 100%; max-width: 680px; margin: 0 auto; }
  .app-window, .hero-visual:hover .app-window { transform: none; }
  .fc-1 { left: -10px; }
  .module-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  /* a lone last card is centred instead of hugging the left column */
  .module-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }
  .sec-wrap, .cta-inner { grid-template-columns: 1fr; gap: 40px; }
  .flow { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
  .flow::before { display: none; }
  .flow > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; max-width: 320px; }
}

/* ≤820 — large phones / small tablets */
@media (max-width: 820px) {
  .btn-login { display: none; }
  .nav-links.open .m-login { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .sp-grid, .sp-grid.three { grid-template-columns: repeat(2, 1fr); }
  .sp-grid.three > :last-child { grid-column: 1 / -1; }
  .sp-two { grid-template-columns: 1fr; }
  .demo-form { grid-template-columns: 1fr; }
  .ff input, .ff textarea { font-size: 16px; } /* ≥16px stops iOS zooming in on focus */
  .section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col a { padding: 8px 0; }
}

/* ≤560 — phones */
@media (max-width: 560px) {
  .container { padding: 0 18px; }

  /* header: brand + language + menu; the demo CTA moves into the menu */
  .nav { gap: 12px; }
  .nav-actions { gap: 8px; }
  .nav-actions > .btn-primary { display: none; }
  .nav-links.open .m-cta { display: flex; }
  .lang-toggle { padding: 0 10px; }
  .lang-toggle .chev { display: none; }

  .hero { padding: 44px 0 60px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-badges { gap: 10px 18px; }
  .float-card { display: none; }

  /* compact mockup: icon-only sidebar, no search/trend chips */
  .app-body { grid-template-columns: 46px 1fr; height: auto; }
  .app-side { padding: 12px 6px; }
  .side-brand { justify-content: center; padding: 2px 0 12px; }
  .side-brand > div { display: none; }
  .side-nav span { justify-content: center; padding: 9px 0; }
  .side-nav span > span { display: none; }
  .app-main { padding: 12px; }
  .app-top h4 { font-size: 13px; }
  .fake-search { display: none; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 7px; }
  .kpi { padding: 8px 9px; }
  .kpi-ic, .kpi-trend { display: none; }
  .panel-row { grid-template-columns: 1fr; }

  .module-grid, .feature-grid { grid-template-columns: 1fr; }
  .module-grid > :last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; width: auto; }
  .flow { grid-template-columns: 1fr; }
  .flow > :last-child:nth-child(odd) { grid-column: auto; max-width: none; }

  .section { padding: 60px 0; }
  .section-head { margin-bottom: 36px; }

  /* showcase */
  .show-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .show-tab { height: auto; min-height: 40px; padding: 8px 6px; font-size: 12.5px; line-height: 1.25; border-radius: 12px; }
  .show-stage { padding: 14px; }
  .sp-kpi { padding: 12px; }
  .sp-kpi b { font-size: 1.15rem; }
  .sp-toolbar { flex-wrap: wrap; gap: 10px; }
  .sp-search { display: none; }
  .sp-btn { margin-left: auto; }
  .sp-table { font-size: 12px; }
  .sp-table th, .sp-table td { padding: 10px 8px; }
  .sp-table th:nth-child(3), .sp-table td:nth-child(3) { display: none; }

  .cta { padding: 64px 0; }
  .demo-form { padding: 22px; }
  .site-footer { padding: 48px 0 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ≤380 — small phones (iPhone SE, older Androids) */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .brand { font-size: 18px; }
  .stats-grid { gap: 22px 10px; }
}

/* Touch screens: no "sticky" hover lifts after a tap; give press feedback instead */
@media (hover: none) {
  .module-card:hover, .feature:hover, .btn-primary:hover, .btn-outline:hover { transform: none; }
  .module-card:hover { box-shadow: none; border-color: var(--border); }
  .module-card:hover::before { transform: scaleX(0); }
  .feature:hover { box-shadow: none; }
  .btn:active { transform: scale(.98); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
