/* ============================================================
   elcodo — sections
   ============================================================ */

/* ---------- HERO ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 130px 0 90px; }
.hero .wrap { width: 100%; }

.hero-grid { display: grid; gap: 56px; align-items: center; }
/* hero is always centered; the showpiece (CAD schematic / console) sits below */
.hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; max-width: 1140px; margin-inline: auto; }
body[data-hero="console"] .hero-grid { max-width: 920px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim);
  padding: 8px 14px 8px 12px; border-radius: 100px;
  border: 1px solid var(--glass-stroke); background: var(--glass-fill);
  backdrop-filter: blur(10px);
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--a1);
  box-shadow: 0 0 12px var(--a1); animation: pulse calc(2.4s / var(--m,1)) ease-in-out infinite; }
@keyframes pulse { 0%,100%{ opacity: 1; transform: scale(1);} 50%{ opacity:.4; transform: scale(.7);} }

/* vertical animated headline (console mode) */
.hero-txt-h1 {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 30px 0 0; line-height: 0.98; will-change: transform;
}
.hero-txt-h1 .hw {
  font-size: clamp(46px, 8.2vw, 118px); font-weight: 600; letter-spacing: -0.045em;
}
.hero-txt-h1 .hw-made { color: var(--ink); }
/* Uruchomione starts invisible and emerges already lit */
.hero-txt-h1 .hw-run {
  opacity: 0; filter: blur(14px);
  transition: opacity 1.1s var(--ease), filter 1.1s var(--ease);
}
.hero.is-live .hero-txt-h1 .hw-run { opacity: 1; filter: none; }
/* gradient lives on the inner span so the parallax transform on .hw-run
   doesn't break background-clip:text */
.hero-txt-h1 .hw-run-ink {
  background: linear-gradient(120deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 64px var(--glow);
}

/* (arrow removed — Uruchomione emerges on its own) */

/* ---------- finale FX (sparks / flowers) ---------- */
.fx-canvas {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
}
.fx-flowers {
  position: absolute; pointer-events: none; z-index: 3; height: 0;
}
.fx-flowers .flower {
  position: absolute; bottom: 0; overflow: visible;
  transform-origin: 50% 100%;
}
.fx-flowers.grow .flower { animation: flower-sway 5s ease-in-out infinite alternate; }
@keyframes flower-sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

.fx-flowers .stem {
  fill: none; stroke: var(--a1); stroke-width: 2; stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--glow));
  stroke-dasharray: 220; stroke-dashoffset: 220;
  transition: stroke-dashoffset 0.9s var(--ease);
}
.fx-flowers .leaf {
  fill: oklch(0.8 0.12 180 / 0.35); stroke: var(--a1); stroke-width: 1.2;
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.fx-flowers .petal {
  fill: oklch(0.75 0.14 300 / 0.30); stroke: var(--a2); stroke-width: 1.3;
  filter: drop-shadow(0 0 8px var(--glow));
  transform: scale(0); transform-origin: center; transform-box: fill-box;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fx-flowers .core {
  fill: var(--a1); filter: drop-shadow(0 0 10px var(--a1));
  transform: scale(0); transform-origin: center; transform-box: fill-box;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fx-flowers.grow .stem { stroke-dashoffset: 0; }
.fx-flowers.grow .leaf { opacity: 1; }
.fx-flowers.grow .petal, .fx-flowers.grow .core { transform: scale(1); }
.hero .lede {
  font-size: clamp(18px, 1.7vw, 23px); color: var(--ink-dim);
  max-width: 540px; margin-top: 26px; font-weight: 400;
}
.hero .lede { margin-inline: auto; }

.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }

/* ---- which headline / showpiece is visible ---- */
.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; }
.hero-cad-h1, .hero-txt-h1, .cad-status, .cad-wrap, .console { display: none; }
body[data-hero="cad"] .hero-cad-h1, body[data-hero="cad"] .cad-wrap { display: block; }
body[data-hero="cad"] .cad-status { display: inline-flex; }
body[data-hero="console"] .hero-txt-h1 { display: flex; }
body[data-hero="console"] .console { display: block; }

/* prompt console (the glass window) */
.console { width: 100%; max-width: 600px; padding: 0; border-radius: 24px; margin: 48px auto 0; }

.console-bar { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--hairline); }
.console-bar .dots { display: flex; gap: 7px; }
.console-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: oklch(1 0 0 / 0.18); }
.console-bar .label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.02em; }
.console-bar .label .blink { color: var(--a1); }

.console-body { padding: 22px 24px 14px; text-align: left; }
.console-body .prompt-txt {
  font-family: var(--font-mono); font-size: 15px; line-height: 1.7; color: var(--ink-dim);
  margin-bottom: 6px;
}
.console .prompt-input {
  display: block; width: 100%; min-height: 88px; resize: vertical;
  background: transparent; border: none; outline: none;
  font-family: var(--font-mono); font-size: 15px; line-height: 1.7;
  color: var(--ink); caret-color: var(--a1);
}
.console .prompt-input::placeholder { color: var(--ink-faint); }
.console:focus-within { border-color: oklch(1 0 0 / 0.3); box-shadow:
  0 1px 0 0 var(--glass-hi) inset,
  0 -1px 0 0 oklch(0 0 0 / 0.25) inset,
  0 30px 80px -30px oklch(0 0 0 / 0.7),
  0 0 0 1px oklch(1 0 0 / 0.06),
  0 14px 60px -18px var(--glow); }
.console.nudge { animation: console-nudge 0.45s var(--ease); }
@keyframes console-nudge { 25% { transform: translateX(-6px); } 60% { transform: translateX(5px); } }
.console-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-top: 1px solid var(--hairline); }
.console-foot .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.console-foot .chip { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--hairline);
  background: none; cursor: pointer; transition: color .2s, border-color .2s; }
.console-foot .chip:hover { color: var(--ink); border-color: oklch(1 0 0 / 0.3); }

/* ---------- CAD WORDMARK HERO ---------- */
/* the headline itself is plotted like a blueprint, then powered on */
.hero-cad-h1 { margin: 22px 0 0; }
.cad-wrap { width: 100%; max-width: 1000px; margin: 0 auto; position: relative; }
.cad { width: 100%; }
.cad-svg { width: 100%; height: auto; display: block; overflow: visible; }
.cad-svg text { font-family: var(--font-display); }

/* construction guides (blueprint) */
.cad-svg .guides { opacity: 0; transition: opacity 0.7s var(--ease); }
.cad-svg.drawing .guides { opacity: 1; }
.cad-svg.live .guides { opacity: 0.35; }
.cad-svg .guide { stroke: oklch(1 0 0 / 0.14); stroke-width: 1; stroke-dasharray: 4 5; }
.cad-svg .reg { stroke: var(--a1); stroke-width: 1.4; fill: none; opacity: 0.6; }
.cad-svg .dim path { stroke: oklch(1 0 0 / 0.22); stroke-width: 1; fill: none; }
.cad-svg .dim text { fill: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; }

/* the words — drafted as outline, then filled on power-on */
.cad-svg .word {
  fill: transparent;
  stroke: oklch(0.96 0.02 250 / 0.85); stroke-width: 1.4;
  font-weight: 600; font-size: 150px; letter-spacing: -0.04em;
  paint-order: stroke;
  transition: stroke-dashoffset 1.4s var(--ease), fill 0.9s var(--ease),
              stroke 0.9s var(--ease), filter 0.9s var(--ease);
}
/* Stworzone — plots first, stays as a crisp wireframe "draft" */
.cad-svg.drawing .w-made { stroke-dashoffset: 0; }
.cad-svg.live .w-made { stroke: oklch(0.9 0.02 250 / 0.55); }
/* Uruchomione — outline plots after, then powers on: fills + glows */
.cad-svg .w-run { stroke: var(--a1); stroke-opacity: 0.7; }
.cad-svg.drawn .w-run { stroke-dashoffset: 0; }
.cad-svg.live .w-run {
  fill: url(#wordFill); stroke: transparent;
  filter: drop-shadow(0 0 26px var(--glow));
}
.cad-svg .gw1 { stop-color: var(--a1); }
.cad-svg .gw2 { stop-color: var(--a2); }

/* transition arrow between the two states */
.cad-svg .arrow path { stroke: var(--ink-faint); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transition: opacity 0.6s var(--ease), stroke 0.6s var(--ease), filter 0.6s var(--ease); }
.cad-svg.drawn .arrow path { opacity: 0.8; }
.cad-svg.live .arrow path { stroke: var(--a1); filter: drop-shadow(0 0 10px var(--a1)); }

/* plotter crosshair travels while drafting */
.cad-svg .plotter { opacity: 0; }
.cad-svg .plotter circle { fill: none; stroke: var(--a1); stroke-width: 1.2; }
.cad-svg .plotter path { stroke: var(--a1); stroke-width: 1; }
.cad-svg.drawing .plotter { opacity: 0.9; animation: plot calc(2.7s / var(--m,1)) var(--ease) forwards; }
.cad-svg.live .plotter { opacity: 0; }
@keyframes plot {
  0%   { transform: translate(150px, 120px); opacity: 0; }
  10%  { opacity: 0.9; }
  45%  { transform: translate(950px, 120px); }
  55%  { transform: translate(470px, 268px); }
  90%  { transform: translate(950px, 350px); opacity: 0.9; }
  100% { transform: translate(950px, 350px); opacity: 0; }
}

/* status readout under the headline */
.cad-status {
  margin-top: 18px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em;
  color: var(--ink-faint); transition: color 0.5s var(--ease);
  display: inline-flex; align-items: center; gap: 10px;
}
.cad-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint);
  transition: background 0.4s, box-shadow 0.4s;
}
.cad-status.on { color: var(--a1); }
.cad-status.on::before { background: var(--a1); box-shadow: 0 0 10px var(--a1);
  animation: pulse calc(2s / var(--m,1)) ease-in-out infinite; }

/* ---------- KLIENCI (logo strip) ---------- */
.clients { padding: 8px 0 36px; }
.clients-kicker {
  text-align: center; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
}
.logo-row {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(36px, 6vw, 72px); flex-wrap: wrap;
  margin-top: 30px;
}
.logo-item {
  display: inline-flex; align-items: center; gap: 0;
  opacity: 0.55; filter: grayscale(1);
  transition: opacity .35s var(--ease), filter .35s var(--ease);
}
.logo-item:hover { opacity: 1; filter: grayscale(0); }
.logo-item img { height: 30px; width: auto; display: block; }
/* dark logos → white via invert */
.logo-invert img { filter: brightness(0) invert(1); height: 44px; }
/* text wordmarks for brands without files (or renamed) */
.logo-word {
  font-family: var(--font-display); font-weight: 600; font-size: 24px;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
  flex-direction: column; align-items: center; gap: 4px;
}
.logo-word small {
  font-family: var(--font-mono); font-weight: 400; font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- MANIFEST ---------- */
.manifest { padding: 110px 0 140px; }
.manifest .wrap { max-width: 1000px; }
.manifest h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 16ch; margin: 22px 0 0; }
.manifest .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 54px; }
.manifest p { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-dim); line-height: 1.7; }
.manifest p strong { color: var(--ink); font-weight: 600; }

/* ---------- ZAKRES ---------- */
.scope { padding: 120px 0 140px; }
.scope-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-bottom: 56px; }
.scope-head h2 { font-size: clamp(34px, 4.4vw, 60px); max-width: 14ch; }
.scope-head p { color: var(--ink-dim); max-width: 360px; font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { padding: 34px 32px 32px; min-height: 280px; display: flex; flex-direction: column;
  border-radius: 24px; transition: transform .5s var(--ease); }
.card:hover { transform: translateY(-6px); }
.card .num { font-family: var(--font-mono); font-size: 13px; color: var(--a1); letter-spacing: 0.1em; }
.card h3 { font-size: clamp(22px, 2vw, 28px); margin: 18px 0 14px; }
.card p { color: var(--ink-dim); font-size: 15.5px; line-height: 1.65; }
.card .glyph {
  margin-top: auto; align-self: flex-end; width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(140deg, var(--a1), var(--a2)); opacity: .9;
  box-shadow: 0 0 26px var(--glow), 0 1px 0 oklch(1 0 0 /.4) inset; position: relative;
}
.card .glyph::after { content: ""; position: absolute; inset: 9px; border-radius: 6px;
  background: oklch(0.14 0.02 275 / .6); box-shadow: 0 0 0 1px oklch(1 0 0 /.12) inset; }
/* hover edge bloom */
.card { --bloom: 0; }
.card:hover { --bloom: 1; }
.card .bloom { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 320px at var(--mx,50%) var(--my,0%), var(--glow), transparent 60%);
  opacity: calc(var(--bloom) * 0.7); transition: opacity .4s; }

/* ---------- SKALA ---------- */
.scale { padding: 120px 0 130px; }
.scale .wrap { max-width: 1100px; }
.scale h2 { font-size: clamp(34px, 4.6vw, 62px); text-align: center; max-width: 18ch; margin: 22px auto 0; }
.scale .head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 70px; }
.stat { padding: 40px 32px; border-radius: 24px; text-align: left; }
.stat .big {
  font-size: clamp(56px, 7vw, 92px); font-weight: 600; letter-spacing: -0.05em; line-height: 1;
  background: linear-gradient(135deg, var(--ink), var(--a1) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .big sup { font-size: 0.4em; vertical-align: super; color: var(--a1); -webkit-text-fill-color: var(--a1); }
.stat .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--a1); margin: 18px 0 12px; }
.stat p { color: var(--ink-dim); font-size: 15.5px; line-height: 1.6; }

/* ---------- CTA ---------- */
.cta { padding: 60px 0 120px; }
.cta-card { padding: clamp(40px, 5.5vw, 72px) 32px; text-align: center; border-radius: 34px;
  display: flex; flex-direction: column; align-items: center; }
.cta-card h2 { font-size: clamp(30px, 6.6vw, 96px); }
.cta-card p { color: var(--ink-dim); max-width: 560px; margin: 26px auto 0; font-size: clamp(16px,1.4vw,19px); line-height: 1.65; }
.cta-card .btn-primary { margin-top: 42px; padding: 18px 30px; font-size: 14px; }
.cta-card .contact { margin-top: 30px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.cta-card .contact a { color: var(--a1); }
.cta-glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 0%, var(--glow), transparent 70%); opacity: .6; }

/* ---------- FOOTER ---------- */
.foot { border-top: 1px solid var(--hairline); padding: 40px 0; }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot .brand { font-size: 17px; }
.foot .meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.02em; }

/* ============================================================
   control dock (variant switcher)
   ============================================================ */
.dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: 20px; width: 244px;
  transform: translateY(calc(100% + 28px)); transition: transform .5s var(--ease);
}
.dock.open { transform: none; }
.dock-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 81;
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  border: 1px solid var(--glass-stroke); background: oklch(0.16 0.02 278 / .7);
  backdrop-filter: blur(14px); box-shadow: 0 10px 40px -12px var(--glow);
  transition: transform .5s var(--ease), opacity .3s;
}
.dock-toggle:hover { transform: rotate(45deg); }
.dock.open ~ .dock-toggle { opacity: 0; pointer-events: none; }
.dock .d-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); display: flex; justify-content: space-between; align-items: center; }
.dock .d-title button { background: none; border: none; color: var(--ink-dim); font-size: 16px; line-height: 1; }
.dock .d-group { display: flex; flex-direction: column; gap: 7px; }
.dock .d-group > span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); }
.seg { display: flex; gap: 5px; }
.seg button {
  flex: 1; font-family: var(--font-mono); font-size: 11px; padding: 8px 4px; border-radius: 9px;
  border: 1px solid var(--hairline); background: oklch(1 0 0 / 0.03); color: var(--ink-dim);
  transition: all .2s;
}
.seg button:hover { color: var(--ink); border-color: oklch(1 0 0 / .2); }
.seg button.on { background: linear-gradient(135deg, var(--a1), var(--a2)); color: oklch(0.14 0.02 275);
  border-color: transparent; font-weight: 600; }
.swatch { width: 100%; height: 26px; border-radius: 8px; border: 1px solid var(--hairline); }
.dock .d-replay {
  margin-top: 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  padding: 10px; border-radius: 10px; color: var(--ink);
  border: 1px solid var(--glass-stroke); background: oklch(1 0 0 / 0.04);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.dock .d-replay:hover { border-color: oklch(1 0 0 / .28); box-shadow: 0 8px 24px -10px var(--glow); transform: translateY(-1px); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 940px) {
  body[data-hero="b"] .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  body[data-hero="b"] .slab { display: none; }
  body[data-hero="b"] .console { margin: 40px auto 0; }
  body[data-hero="b"] .hero-actions { justify-content: center; }
  body[data-hero="b"] .hero .lede { margin-inline: auto; }
  .manifest .cols { grid-template-columns: 1fr; gap: 24px; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  .dock { left: 20px; right: 20px; width: auto; }
}
