/* ==========================================================================
   CodiveX: design system
   ========================================================================== */

:root {
  /* Brand */
  --primary: #3aaa52;
  --primary-hover: #2f9446;
  --primary-bright: #8be05a;
  --primary-soft: rgba(58, 170, 82, 0.12);
  --primary-glow: rgba(58, 170, 82, 0.35);

  /* Product accents */
  --codibox: #2f8f5b;
  --codibox-lime: #b8f230;
  --codinote: #16b364;
  --codinote-mint: #5ef0a6;

  /* Surfaces */
  --bg: #0a0b0a;
  --bg-elev: #111311;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #f2f5f2;
  --text-muted: #9aa39b;
  --text-dim: #6b736c;

  /* Type */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-hero: clamp(2.6rem, 6.2vw, 4.75rem);
  --fs-h2: clamp(2rem, 4vw, 3rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.05rem, 1.6vw, 1.25rem);

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --section-y: clamp(80px, 11vw, 140px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--primary-glow); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: #04140a; padding: 10px 16px; border-radius: 8px; font-weight: 700;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Background ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(58, 170, 82, 0.16), transparent 60%),
    radial-gradient(40rem 30rem at -10% 30%, rgba(22, 179, 100, 0.08), transparent 60%),
    var(--bg);
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head.center .eyebrow::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
h2.title { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.sub { margin-top: 18px; font-size: var(--fs-lead); color: var(--text-muted); max-width: 640px; }
.section-head.center .sub { margin-left: auto; margin-right: auto; }
.grad {
  background: linear-gradient(100deg, var(--primary-bright), var(--primary) 60%, #1f9d6a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s, color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary); color: #041208;
  box-shadow: 0 0 0 1px rgba(139, 224, 90, 0.25) inset, 0 10px 30px -10px var(--primary-glow);
}
.btn-primary:hover { background: #45bd5f; box-shadow: 0 0 0 1px rgba(139, 224, 90, 0.4) inset, 0 14px 40px -10px rgba(58,170,82,.6); }
.btn-ghost { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 0.875rem; border-radius: 10px; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 1rem; border-radius: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.92rem; color: var(--text);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 1.55rem; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.logo svg { width: 0.98em; height: 0.86em; margin-left: -0.04em; transform: translateY(0.02em); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 11, 10, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav-drop > button {
  padding: 8px 14px; border-radius: 10px; font-size: 0.92rem; font-weight: 600; color: var(--text-muted);
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s, background .2s;
}
.nav > a:hover, .nav-drop > button:hover, .nav-drop.open > button { color: var(--text); background: var(--surface-2); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.nav-drop.open > button svg { transform: rotate(180deg); }
.drop {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 380px;
  transform: translate(-50%, 6px); opacity: 0; visibility: hidden;
  background: rgba(17, 19, 17, 0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.nav-drop.open .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; transition: background .2s; }
.drop a:hover { background: var(--surface-2); }
.drop img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.drop strong { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.drop strong svg { width: 13px; height: 13px; color: var(--text-dim); }
.drop span { display: block; font-size: 0.83rem; color: var(--text-muted); line-height: 1.4; }
.header-cta { display: flex; align-items: center; gap: 10px; }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn span { position: relative; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: background .2s; }
.menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease);
}
.menu-btn span::before { transform: translateY(-6px); }
.menu-btn span::after { transform: translateY(6px); }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: rotate(45deg); }
.menu-open .menu-btn span::after { transform: rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 76px 0 0; z-index: 49; padding: 24px var(--gutter) 40px;
  background: rgba(10, 11, 10, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
}
.menu-open .mobile-menu { display: block; animation: fadeIn .25s var(--ease); }
.mobile-menu nav > a { display: block; padding: 16px 4px; font-size: 1.25rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.mobile-menu .m-label { margin: 28px 0 10px; font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.mobile-menu .m-product { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; }
.mobile-menu .m-product img { width: 40px; height: 40px; border-radius: 10px; }
.mobile-menu .m-product span { display: block; font-size: 0.85rem; color: var(--text-muted); }
.mobile-menu .btn { width: 100%; margin-top: 24px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 72px); align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 0.85rem; color: var(--text-muted); font-weight: 600;
  transition: border-color .2s, background .2s;
}
.pill:hover { border-color: rgba(139,224,90,.4); background: rgba(58,170,82,.08); }
.pill b { padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-bright); font-size: 0.75rem; letter-spacing: .02em; }
.pill svg { width: 14px; height: 14px; }
.hero h1 { margin-top: 26px; font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; }
.hero .lead { margin-top: 24px; font-size: var(--fs-lead); color: var(--text-muted); max-width: 540px; }
.hero .cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--primary); }

/* Hero visual: product stack */
.stack { position: relative; aspect-ratio: 1 / 0.92; }
.stack::before {
  content: ""; position: absolute; inset: 10% 5%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(58,170,82,.35), transparent);
  filter: blur(40px);
}
.win {
  position: absolute; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #161a17, #0f1210);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.4);
}
.win-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b302c; }
.win-bar .url {
  margin-left: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--text-dim);
  padding: 3px 10px; border-radius: 6px; background: rgba(255,255,255,.04); font-weight: 600;
}
.win-bar .url svg { width: 10px; height: 10px; }
.win-a { top: 0; left: 0; width: 82%; z-index: 1; }
.win-b { bottom: 0; right: 0; width: 64%; z-index: 2; }

/* Codibox mini calendar */
.cb { padding: 16px; }
.cb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cb-head .brandrow { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem; }
.cb-head img { width: 22px; height: 22px; }
.cb-head small { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.cb-grid { display: grid; grid-template-columns: 74px repeat(7, 1fr); gap: 4px; font-size: 0.66rem; }
.cb-grid .d { color: var(--text-dim); text-align: center; font-weight: 700; padding-bottom: 4px; }
.cb-grid .r { color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
.cb-grid .c { height: 22px; border-radius: 5px; background: rgba(255,255,255,.035); }
.cb-grid .bk { border-radius: 5px; height: 22px; display: flex; align-items: center; padding: 0 6px; font-weight: 700; color: #06150c; font-size: 0.62rem; white-space: nowrap; overflow: hidden; }
.bk.g1 { background: linear-gradient(90deg, #b8f230, #5bd65e); }
.bk.g2 { background: linear-gradient(90deg, #3aaa52, #2f8f5b); color: #eafff0; }
.bk.g3 { background: rgba(184, 242, 48, .18); color: #d6ff86; border: 1px dashed rgba(184,242,48,.5); }
.cb-foot { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.kpi small { display: block; font-size: 0.62rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { font-size: 0.95rem; }

/* CodiNote mini tiles */
.cn { display: grid; grid-template-columns: 64px 1fr; min-height: 100%; }
.cn-side { padding: 12px 8px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.cn-side b { font-size: 0.62rem; padding: 5px 7px; border-radius: 6px; color: var(--text-dim); font-weight: 700; }
.cn-side b.on { background: rgba(22,179,100,.16); color: var(--codinote-mint); }
.cn-tiles { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border-radius: 10px; padding: 10px; background: rgba(255,255,255,.035); border: 1px solid var(--border); min-height: 70px; }
.tile em { display: block; font-style: normal; font-size: 0.56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--codinote-mint); }
.tile strong { display: block; font-size: 0.78rem; margin-top: 2px; }
.tile span { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.tile .amt { font-size: 0.95rem; color: var(--text); font-weight: 800; }
.toast {
  position: absolute; z-index: 3; left: 6%; bottom: 8%;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(17,19,17,.92); border: 1px solid rgba(94,240,166,.3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 0.78rem; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 300px;
  animation: floatY 6s ease-in-out infinite;
}
.toast .rec { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--codinote-mint); box-shadow: 0 0 0 4px rgba(94,240,166,.18); }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Marquee / tech strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.015); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 28px var(--gutter); border-left: 1px solid var(--border); }
.strip-item:first-child { border-left: 0; }
.strip-item b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; font-weight: 800; line-height: 1.1; }
.strip-item span { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

/* ---------- Cards / services ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--border);
  transition: border-color .3s, transform .4s var(--ease), background .3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(58,170,82,.12), transparent 50%);
}
.card:hover { border-color: rgba(139,224,90,.25); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-bright); border: 1px solid rgba(139,224,90,.18);
  margin-bottom: 24px;
}
.ic svg { width: 24px; height: 24px; }
.card h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; font-weight: 800; }
.card p { margin-top: 10px; color: var(--text-muted); }
.ticks { margin-top: 22px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text); font-weight: 500; }
.ticks svg { width: 18px; height: 18px; flex: none; color: var(--primary); margin-top: 2px; }

/* ---------- Products ---------- */
.products { display: grid; gap: 24px; }
.product {
  --accent: var(--primary); --accent-2: var(--primary-bright);
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: 28px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
  transition: border-color .4s, transform .5s var(--ease), box-shadow .5s;
}
.product::after {
  content: ""; position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
  filter: blur(30px); opacity: .55; transition: opacity .5s;
}
.product.codibox { --accent: #6fd23a; --accent-2: var(--codibox-lime); }
.product.codibox::after { right: -15%; top: -30%; }
.product.codinote { --accent: var(--codinote); --accent-2: var(--codinote-mint); }
.product.codinote::after { left: -15%; bottom: -35%; }
.product:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 40px 100px -40px color-mix(in srgb, var(--accent) 50%, transparent); }
.product:hover::after { opacity: .85; }
.product.reverse .p-body { order: 2; }

.p-body { padding: clamp(28px, 4.5vw, 56px); display: flex; flex-direction: column; }
.p-brand { display: flex; align-items: center; gap: 14px; }
.p-brand img { width: 56px; height: 56px; border-radius: 14px; }
.p-brand .name { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.p-brand .tag {
  display: inline-block; margin-top: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2);
}
.p-body h3 { margin-top: 28px; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 800; }
.p-body > p { margin-top: 14px; color: var(--text-muted); font-size: 1.02rem; }
.p-feats { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.p-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; font-weight: 600; }
.p-feats svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent-2); }
.p-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
}
.chip.accent { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.p-cta { margin-top: auto; padding-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.product .btn-primary { background: var(--accent); color: #04120a; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.product .btn-primary:hover { background: var(--accent-2); }
.p-url { font-size: 0.82rem; color: var(--text-dim); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.p-url svg { width: 13px; height: 13px; }

.p-visual {
  position: relative; padding: clamp(24px, 4vw, 48px); display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 32px 32px;
  border-left: 1px solid var(--border);
}
.product.reverse .p-visual { border-left: 0; border-right: 1px solid var(--border); }
.p-visual .win { position: relative; width: 100%; max-width: 520px; transition: transform .6s var(--ease); }
.product:hover .p-visual .win { transform: translateY(-6px) rotate(-0.4deg); }

.coming {
  margin-top: 24px; padding: 28px clamp(24px, 4vw, 40px); border-radius: 24px; border: 1px dashed var(--border-strong);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(255,255,255,.015);
}
.coming h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.coming p { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* ---------- Portfolio ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.work { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elev); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
.work > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover > img { transform: scale(1.04); }
.work::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(5,6,5,.95)); }
.work-body { position: relative; z-index: 1; padding: 32px; }
.work-body h3 { margin-top: 12px; font-size: 1.5rem; letter-spacing: -0.02em; font-weight: 800; }
.work-body p { margin-top: 8px; color: var(--text-muted); max-width: 440px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.work .link-arrow { margin-top: 18px; }
a.work { transition: border-color .3s; }
a.work:hover { border-color: rgba(139,224,90,.35); }
/* Wyróżniona realizacja: opis + zrzut w ramce przeglądarki */
.work.featured {
  grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: 1fr 1.35fr; align-items: center;
  background:
    radial-gradient(40rem 24rem at 85% 50%, rgba(214, 170, 82, .12), transparent 70%),
    linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}
.work.featured::after { display: none; }
.work.featured .work-body { order: -1; padding: clamp(28px, 4.5vw, 56px); }
.work.featured.reverse { grid-template-columns: 1.35fr 1fr; }
.work.featured.reverse .work-body { order: 0; }
.work.featured.reverse .work-shot { padding-left: clamp(20px, 3.5vw, 44px); padding-right: 0; }
.work.featured h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.work-shot { padding: clamp(20px, 3.5vw, 44px) clamp(20px, 3.5vw, 44px) clamp(20px, 3.5vw, 44px) 0; }
.work-shot .win { position: relative; transition: transform .6s var(--ease); }
.work-shot .win img { display: block; position: static; inset: auto; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.work.featured:hover .work-shot .win { transform: translateY(-6px); }
.work.soon { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.015) 0 14px, transparent 14px 28px), var(--bg-elev); border-style: dashed; justify-content: center; text-align: center; align-items: center; }
.work.soon::after { display: none; }
.work.soon .ic { margin: 0 auto 20px; }
.work.soon .btn { margin-top: 24px; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 0.85rem; font-weight: 800; color: var(--primary-bright); letter-spacing: .08em; margin-bottom: 40px;
}
.step h3 { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.step p { margin-top: 8px; color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.why .ticks li { font-size: 1rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); }
.stat b { display: block; font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -0.04em; line-height: 1; font-weight: 800; }
.stat span { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.stat.hl { background: linear-gradient(160deg, rgba(58,170,82,.22), rgba(58,170,82,.04)); border-color: rgba(139,224,90,.25); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-info { display: grid; gap: 14px; margin-top: 36px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,.02); transition: border-color .2s; }
a.contact-item:hover { border-color: rgba(139,224,90,.3); }
.contact-item .ic { margin: 0; width: 44px; height: 44px; border-radius: 12px; }
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item small { display: block; color: var(--text-dim); font-size: 0.8rem; font-weight: 600; }
.contact-item strong { font-size: 1.02rem; }

.form { padding: clamp(24px, 4vw, 40px); border-radius: 28px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(0,0,0,.35);
  font-size: 0.98rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58,170,82,.15); background: rgba(0,0,0,.5); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics label { cursor: pointer; }
.topics label { position: relative; }
.topics input { position: absolute; inset: 0; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.topics span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 0.85rem; font-weight: 700; color: var(--text-muted);
  transition: all .2s;
}
.topics input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-bright); }
.topics input:focus-visible + span { outline: 2px solid var(--primary-bright); outline-offset: 2px; }
.consent { font-size: 0.8rem; color: var(--text-dim); margin: 4px 0 20px; }
.consent a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.form .btn { width: 100%; }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 0.92rem; font-weight: 600; display: none; }
.form-status.ok { display: block; background: rgba(58,170,82,.12); color: var(--primary-bright); border: 1px solid rgba(58,170,82,.35); }
.form-status.err { display: block; background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.35); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.25); border-top-color: #041208; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 64px 0 32px; background: rgba(0,0,0,.25); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer p.about { margin-top: 16px; color: var(--text-muted); font-size: 0.92rem; max-width: 320px; }
.footer h4 { font-size: 0.78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer li a { color: var(--text-muted); font-size: 0.92rem; font-weight: 600; transition: color .2s; display: inline-flex; align-items: center; gap: 8px; }
.footer li a:hover { color: var(--text); }
.footer li img { width: 18px; height: 18px; border-radius: 5px; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-dim); font-size: 0.85rem; font-weight: 600; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Legal page ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0 var(--section-y); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.04em; font-weight: 800; }
.legal .intro { margin-top: 20px; color: var(--text-muted); font-size: 1.08rem; }
.legal section { margin-top: 48px; }
.legal h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.legal p, .legal li { color: var(--text-muted); }
.legal p + p { margin-top: 10px; }
.legal ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.legal strong { color: var(--text); }
.legal a { color: var(--primary-bright); }
.legal a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
.legal th, .legal td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.legal th { color: var(--text); background: rgba(255,255,255,.04); font-weight: 700; }
.legal tr:last-child td { border-bottom: 0; }
.legal td { color: var(--text-muted); }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.nf b { font-size: clamp(5rem, 16vw, 9rem); line-height: 1; letter-spacing: -0.06em; font-weight: 800; }
.nf p { color: var(--text-muted); margin: 12px 0 28px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .nav, .header-cta .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-grid, .why, .contact { grid-template-columns: 1fr; }
  .stack { max-width: 560px; width: 100%; margin: 0 auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product.reverse .p-body { order: 0; }
  .p-visual, .product.reverse .p-visual { border: 0; border-top: 1px solid var(--border); }
  .work.featured, .work.featured.reverse { grid-template-columns: 1fr; }
  .work.featured .work-body { order: 0; padding-top: 0; }
  .work-shot, .work.featured.reverse .work-shot { padding: clamp(20px, 4vw, 32px); }
  .strip-inner { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(3) { border-left: 0; }
  .strip-item:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .grid-2, .steps, .form-row, .p-feats { grid-template-columns: 1fr; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .p-cta .btn { flex: 1 1 100%; }
  .work { min-height: 360px; }
  .work-body { padding: 24px; }
  .card { padding: 26px; }
  .stack { aspect-ratio: auto; }
  .stack .win-a { position: relative; width: 100%; }
  .stack .win-b { display: none; }
  .cb-grid { grid-template-columns: 56px repeat(7, 1fr); }
  .toast { position: relative; left: auto; bottom: auto; margin: -22px 12px 0; max-width: none; font-size: 0.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

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