/* ==========================================================================
   gateway/assets/style.css — PTE Studio 3D Bramka (v3 — production layout)
   3-Akt rotating demo + static login (email / password / OTP code) + Google placeholder.
   ========================================================================== */

:root {
  --bg-deep: #050508;
  --bg-panel: #0a0a10;
  --accent: #E53935;
  --accent-2: #C12B27;
  --accent-glow: rgba(229,57,53,0.42);
  --text: #fff;
  --text-72: rgba(255,255,255,0.72);
  --text-55: rgba(255,255,255,0.55);
  --text-40: rgba(255,255,255,0.4);
  --text-25: rgba(255,255,255,0.25);
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  --error: #ff7a76;
  --success: #22C55E;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { overflow: hidden; }
button { font-family: inherit; }
a { color: inherit; }

/* ─────────────── LAYOUT ─────────────── */
.gate {
  position: relative;
  width: 100vw; height: 100vh;
  display: grid;
  /* Login skaluje sie z viewportem: 420px na laptopie, 600px na 4K */
  grid-template-columns: 1fr clamp(420px, 26vw, 600px);
}

/* ─────────────── LEFT — DEMO COLUMN ─────────────── */
.demo {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

/* Top-left wczesny dostęp tag */
.early-access {
  position: absolute;
  top: 28px; left: 28px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  background: rgba(8,8,14,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(229,57,53,0.35);
  border-radius: 8px;
}
.early-access .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.early-access .text-block { line-height: 1.2; }
.early-access .top-line {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.early-access .bot-line {
  font-size: 10px;
  color: var(--text-55);
  font-weight: 400;
  letter-spacing: 0.02em;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Vertical 01/02/03 rail */
.demo-rail {
  position: absolute;
  left: 32px; top: 50%; transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.demo-rail button {
  background: none; border: none;
  color: rgba(255,255,255,0.35);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.2em;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.3s, transform 0.3s;
  position: relative;
}
.demo-rail button:hover { color: rgba(255,255,255,0.7); }
.demo-rail button.active {
  color: var(--accent);
  transform: translateX(4px);
}
.demo-rail button.active::before {
  content: '';
  position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(229,57,53,0.8);
}

/* Scene base */
.scene {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}
.scene.active {
  opacity: 1;
  pointer-events: auto;
}
.scene .bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 9s ease-out;
}
.scene.active .bg { transform: scale(1.0); }
.scene .bg-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(5,5,8,0.05) 0%,
    rgba(5,5,8,0.0) 30%,
    rgba(5,5,8,0.4) 78%,
    rgba(5,5,8,0.85) 100%);
}

/* ─── AKT 2 — clean dark canvas (no photo) ─── */
.scene-akt2 {
  background:
    radial-gradient(ellipse at 22% 28%, rgba(229,57,53,0.10), transparent 55%),
    radial-gradient(ellipse at 78% 72%, rgba(229,57,53,0.06), transparent 55%),
    linear-gradient(180deg, #060610 0%, #0a0a14 100%);
}
.scene-akt2 .akt2-bgnoise {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, black 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 45%, black 25%, transparent 75%);
}

/* AKT 2 CANVAS — capped na duzych ekranach + centered */
.akt2-canvas {
  position: absolute;
  left: 50%;
  top: 8%;
  width: min(88%, 1500px);
  height: 65%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.akt2-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.akt2-svg path {
  fill: none;
  stroke: rgba(229,57,53,0.55);
  stroke-width: 1.2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  filter: drop-shadow(0 0 6px rgba(229,57,53,0.45));
  animation: draw-line 1.6s 0.5s ease-out forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }

.node {
  position: absolute;
  background: rgba(14,12,18,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(229,57,53,0.30);
  border-radius: 12px;
  box-shadow:
    0 16px 50px rgba(0,0,0,0.6),
    0 0 30px rgba(229,57,53,0.10),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.node .node-label {
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  padding: 7px 10px 3px;
  display: flex; align-items: center; gap: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.node .node-label::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 5px var(--accent);
}
.node .node-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  padding: 0 10px 6px;
}

/* Input cards */
.node.input-card { width: 130px; height: 134px; }
.node.input-card .node-thumb {
  width: 100%; height: 90px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
}
.node.input-car .node-thumb {
  background-image: url("akt1-bg.jpg");
  background-position: center 40%;
  background-size: 220% auto;
}
.node.input-lamp .node-thumb { background-image: url("akt2-input-lamp.jpg"); }
.node.input-ig .node-thumb {
  background:
    linear-gradient(135deg,
      #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  color: #fff;
  gap: 4px;
}
.node.input-ig .node-thumb svg { width: 30px; height: 30px; }
.node.input-ig .node-thumb .ig-handle {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
}

/* Prompt */
.node.prompt-card { width: 240px; min-height: 144px; }
.node.prompt-card .prompt-text {
  padding: 8px 12px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(255,255,255,0.78);
  line-height: 1.55;
}
.node.prompt-card .prompt-text .accent { color: var(--accent); }

/* Output image */
.node.output-card { width: 200px; height: 200px; }
.node.output-card .node-thumb {
  width: 100%; height: 162px;
  background-image: url("akt2-output-carlamp.jpg");
  background-size: cover;
  background-position: center;
}

/* 3D model preview (uses same image with wireframe overlay) */
.node.model3d-card { width: 200px; height: 158px; }
.node.model3d-card .node-thumb {
  width: 100%; height: 120px;
  position: relative;
  background: var(--bg-deep);
  background-image: url("akt2-output-carlamp.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(0.7);
}
.node.model3d-card .node-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(229,57,53,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229,57,53,0.4) 1px, transparent 1px);
  background-size: 12px 12px;
  mix-blend-mode: screen;
}
.node.model3d-card .node-thumb::before {
  content: 'WIRE 1.0';
  position: absolute; right: 6px; top: 6px;
  z-index: 2;
  background: rgba(0,0,0,0.6);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.1em;
}

/* AI Chat */
.node.chat-card {
  width: 240px;
  background: rgba(10,10,16,0.93);
}
.node.chat-card .chat-msg {
  display: flex;
  gap: 10px;
  padding: 10px 12px 12px;
}
.node.chat-card .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6b21a8);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.node.chat-card .msg-body { flex: 1; padding-top: 2px; }
.node.chat-card .msg-name {
  font-size: 9px;
  color: var(--text-55);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.node.chat-card .msg-text {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  margin-bottom: 8px;
}
.node.chat-card .price-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.node.chat-card .price-pill {
  background: rgba(229,57,53,0.14);
  color: #ff7a76;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(229,57,53,0.25);
}
.node.chat-card .price-pill.alt {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.08);
}

/* Node enter animation when scene activates */
.scene.active .node {
  animation: node-pop 0.55s ease-out both;
}
.scene.active .node:nth-child(2) { animation-delay: 0.10s; }
.scene.active .node:nth-child(3) { animation-delay: 0.18s; }
.scene.active .node:nth-child(4) { animation-delay: 0.26s; }
.scene.active .node:nth-child(5) { animation-delay: 0.42s; }
.scene.active .node:nth-child(6) { animation-delay: 0.62s; }
.scene.active .node:nth-child(7) { animation-delay: 0.82s; }
.scene.active .node:nth-child(8) { animation-delay: 1.05s; }
@keyframes node-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scene meta (akt tag + title + sub at bottom-left) */
.scene .meta {
  position: absolute;
  left: 96px; bottom: 80px;
  z-index: 4;
  max-width: 64%;
  color: #fff;
}
.scene .akt-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(229,57,53,0.4);
  border-radius: 4px;
  background: rgba(229,57,53,0.08);
  color: var(--accent);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s 0.3s, transform 0.5s 0.3s;
}
.scene .akt-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
.scene .title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(38px, 5vw, 110px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  text-shadow: 0 6px 30px rgba(0,0,0,0.95);
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s 0.45s, transform 0.6s 0.45s;
}
.scene .title.title-sm {
  font-size: clamp(34px, 4.2vw, 88px);
}
.scene .title span { color: var(--accent); }
.scene .sub {
  font-size: clamp(15px, 1.1vw, 22px);
  color: var(--text-72);
  line-height: 1.55;
  max-width: clamp(420px, 38vw, 720px);
  text-shadow: 0 4px 16px rgba(0,0,0,0.95);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s 0.6s, transform 0.6s 0.6s;
}
.scene.active .akt-tag,
.scene.active .title,
.scene.active .sub {
  opacity: 1; transform: translateY(0);
}

/* Mini progress bar */
.progress-rail {
  position: absolute;
  left: 96px; bottom: 38px;
  z-index: 4;
  display: flex; gap: 6px;
}
.progress-rail .bar {
  width: 60px; height: 2px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress-rail .bar.active::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(229,57,53,0.7);
  animation: fill 9s linear forwards;
}
.progress-rail .bar.done::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent); opacity: 0.5;
}
@keyframes fill { from { width: 0%; } to { width: 100%; } }

/* ─────────────── RIGHT — STATIC LOGIN COLUMN ─────────────── */
.login {
  background: var(--bg-panel);
  padding: clamp(36px, 3vh, 60px) clamp(32px, 2.8vw, 56px) clamp(26px, 2.2vh, 44px);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

/* Brand top */
.brand-block {
  display: flex; align-items: center; gap: clamp(12px, 0.9vw, 18px);
  margin-bottom: clamp(28px, 2.6vh, 56px);
  flex-shrink: 0;
}
.brand-logo {
  width: clamp(44px, 3vw, 64px);
  height: clamp(44px, 3vw, 64px);
  filter: drop-shadow(0 0 18px rgba(229,57,53,0.45));
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
  object-fit: contain;
}
.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(26px, 1.7vw, 40px);
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand-name span { color: var(--accent); }
.brand-tagline {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-40);
  margin-top: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Login content area */
.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Step show/hide system (preserved from auth flow) */
.step { display: none; }
.step.active { display: block; animation: step-fade 0.4s ease-out; }
@keyframes step-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Headlines */
.login-headline { margin-bottom: 14px; }
.login-headline h1 {
  font-size: clamp(32px, 2.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.login-sub {
  font-size: clamp(14px, 1vw, 17px);
  color: var(--text-55);
  line-height: 1.6;
  margin-bottom: clamp(24px, 2.4vh, 40px);
  max-width: 480px;
}
.login-sub strong { color: var(--text-72); }

/* Input field */
.field { margin-bottom: 14px; }
.field-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 9px;
  text-transform: uppercase;
  font-weight: 600;
}
.field input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border 0.2s, background 0.2s;
}
.field input:focus {
  border-color: rgba(229,57,53,0.5);
  background: rgba(255,255,255,0.06);
}
.field input::placeholder { color: rgba(255,255,255,0.32); }

/* Code input — centered monospace */
.input-code {
  text-align: center;
  font-size: 28px !important;
  letter-spacing: 0.32em;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
}

/* CTA primary (red) */
.cta-primary {
  width: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow:
    0 16px 36px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.18);
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 6px;
}
.cta-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 22px 50px rgba(229,57,53,0.55),
    inset 0 1px 0 rgba(255,255,255,0.18);
}
.cta-primary:active:not(:disabled) { transform: translateY(0); }
.cta-primary:disabled {
  opacity: 0.6; cursor: default;
  transform: none; filter: none;
}
.cta-primary svg { transition: transform 0.25s; }
.cta-primary:hover:not(:disabled) svg { transform: translateX(4px); }

/* "lub" separator */
.or-sep {
  display: flex; align-items: center; gap: 16px;
  margin: 22px 0;
}
.or-sep::before, .or-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.or-sep .or-text {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  font-weight: 500;
}

/* Google button (placeholder/coming soon) */
.cta-google {
  width: 100%;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a20;
  cursor: pointer;
  transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.cta-google:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255,255,255,0.08);
}
.cta-google svg { width: 18px; height: 18px; }
.cta-google[data-coming-soon="true"]::after {
  content: 'Wkrótce';
  background: rgba(229,57,53,0.12);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(229,57,53,0.25);
  margin-left: 4px;
}

/* Link buttons (back / forgot) */
.btn-link {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 14px;
  background: none; border: none;
  padding: 6px 0;
  color: var(--text-40);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-link:hover { color: var(--text-72); }

/* Status messages */
.msg {
  text-align: center;
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
}
.msg.error { color: var(--error); }
.msg.success { color: var(--success); }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Trust badges row (only shown in step-email — handled by JS adding/removing class) */
.trust-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 28px;
  transition: opacity 0.3s, max-height 0.3s;
}
.trust-row.hidden {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  pointer-events: none;
  overflow: hidden;
}
.trust-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}
.trust-card .icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: rgba(229,57,53,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  color: var(--accent);
}
.trust-card .ttl {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
}

/* Footer */
.footer {
  margin-top: 24px;
  padding-top: 22px;
  text-align: center;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.footer .privacy {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer .privacy a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer .privacy a:hover { color: var(--text-72); }
.footer .copyright {
  font-size: 9px;
  color: var(--text-25);
  letter-spacing: 0.1em;
}

/* Toast (Google placeholder + error notifications) */
.toast-root {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(10,10,16,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(229,57,53,0.4);
  border-radius: 10px;
  padding: 14px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 16px 50px rgba(0,0,0,0.6);
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
  animation: toast-in 0.3s ease-out, toast-out 0.3s ease-in 3.5s forwards;
}
.toast::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(20px); }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — 4 breakpointy
   • Ultra-wide  ≥1600px  → wieksze nody, login do 600px, wieksze Tytuly
   • Desktop     1100-1599 → bazowe ustawienia powyzej
   • Tablet      768-1099 → kompaktowe nody, login 380-420
   • Mobile      <768     → kolumny stack, Akt 2 jako CSS grid
   ══════════════════════════════════════════════════════════════════ */

/* ULTRA-WIDE (>1600px) — wieksze nody zeby flow nie wygladal mizernie */
@media (min-width: 1600px) {
  .akt2-canvas { height: 68%; }
  .node.input-card { width: 152px; height: 158px; }
  .node.input-card .node-thumb { height: 108px; }
  .node.prompt-card { width: 280px; min-height: 168px; }
  .node.prompt-card .prompt-text { font-size: 12px; }
  .node.output-card { width: 232px; height: 232px; }
  .node.output-card .node-thumb { height: 188px; }
  .node.model3d-card { width: 232px; height: 184px; }
  .node.model3d-card .node-thumb { height: 140px; }
  .node.chat-card { width: 280px; }
  .node.chat-card .msg-text { font-size: 12px; }
  .node.chat-card .price-pill { font-size: 11px; }
  .scene .meta { left: 8%; bottom: 96px; }
  .progress-rail { left: 8%; bottom: 50px; }
  .demo-rail { left: clamp(32px, 2vw, 56px); }
  .early-access { top: clamp(28px, 2.4vh, 44px); left: clamp(28px, 2vw, 44px); }
}

/* TABLET (max 1099) — login zweza, nody mniejsze */
@media (max-width: 1099px) {
  .gate { grid-template-columns: 1fr clamp(360px, 38vw, 420px); }
  .scene .meta { left: 64px; bottom: 70px; max-width: 70%; }
  .progress-rail { left: 64px; bottom: 32px; }
  .demo-rail { left: 18px; gap: 22px; }
  /* Akt 2 canvas zostaje wycentrowany przez base, nie nadpisujemy left */
  .node.input-card { width: 108px; height: 114px; }
  .node.input-card .node-thumb { height: 74px; }
  .node.prompt-card { width: 188px; min-height: 124px; }
  .node.prompt-card .prompt-text { font-size: 9.5px; line-height: 1.45; }
  .node.output-card { width: 158px; height: 158px; }
  .node.output-card .node-thumb { height: 122px; }
  .node.model3d-card { width: 158px; height: 130px; }
  .node.model3d-card .node-thumb { height: 92px; }
  .node.chat-card { width: 196px; }
  .node.chat-card .msg-text { font-size: 10px; }
  .trust-row { gap: 6px; }
  .trust-card { padding: 12px 6px; }
  .trust-card .ttl { font-size: 9.5px; }
}

/* SMALL TABLET (768-1023) — Akt 2 przebudowany na 3-row layout */
@media (max-width: 1023px) and (min-width: 768px) {
  .akt2-canvas {
    top: 7%; height: 76%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    grid-auto-flow: row;
    gap: 10px;
    padding: 0;
    pointer-events: none;
  }
  .akt2-canvas > .node {
    position: relative !important;
    left: auto !important; top: auto !important;
    width: auto !important; height: auto !important;
    margin: 0 !important;
  }
  .akt2-svg { display: none; }
  .akt2-canvas .input-car { grid-column: 1; grid-row: 1; }
  .akt2-canvas .input-lamp { grid-column: 2; grid-row: 1; }
  .akt2-canvas .input-ig { grid-column: 3; grid-row: 1; }
  .akt2-canvas .input-card { height: 100px !important; }
  .akt2-canvas .input-card .node-thumb { height: 60px !important; }
  .akt2-canvas .prompt-card { grid-column: 1 / 4; grid-row: 2; min-height: 80px !important; }
  .akt2-canvas .output-card { grid-column: 1 / 2; grid-row: 3; height: 200px !important; }
  .akt2-canvas .output-card .node-thumb { height: 162px !important; }
  .akt2-canvas .model3d-card { grid-column: 2 / 3; grid-row: 3; height: 200px !important; }
  .akt2-canvas .model3d-card .node-thumb { height: 162px !important; }
  .akt2-canvas .chat-card { grid-column: 3 / 4; grid-row: 3; }
}

/* MOBILE (<768px) — TYLKO ekran logowania, demo ukryte */
@media (max-width: 767px) {
  body { overflow: hidden; }
  .gate {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
  }
  .demo { display: none; }
  .login {
    border-left: none;
    border-top: none;
    padding: 28px 22px 22px;
    height: 100vh;
    width: 100vw;
    overflow-y: auto;
  }
  .login-content {
    flex: 1;
    justify-content: center;
  }
  .brand-block { margin-bottom: 24px; }
  .login-headline h1 { font-size: 30px !important; }
  .login-sub { font-size: 14px; margin-bottom: 22px; max-width: 100%; }
  /* font-size 16px na input zapobiega zoom-in na iOS przy focus */
  .field input { padding: 15px 17px; font-size: 16px; }
  .cta-primary { padding: 16px 20px; font-size: 12px; }
  .cta-google { padding: 14px 18px; font-size: 13px; }
  .or-sep { margin: 22px 0; }
  .trust-row { margin-top: 22px; gap: 6px; }
  .trust-card { padding: 11px 6px; }
  .trust-card .icon { width: 24px; height: 24px; margin-bottom: 6px; }
  .trust-card .ttl { font-size: 9px; }
  .footer { margin-top: 22px; padding-top: 16px; }
  .footer .privacy { font-size: 10px; }
  .footer .copyright { font-size: 8.5px; }
}

/* Bardzo małe ekrany — narrow phones (<380px) */
@media (max-width: 379px) {
  .login { padding: 22px 18px 18px; }
  .login-headline h1 { font-size: 26px !important; }
  .login-sub { font-size: 13px; }
  .brand-name { font-size: 22px; }
  .brand-tagline { font-size: 8px; }
}

/* Reduced motion — szanuj prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scene { transition: opacity 0.2s linear; }
  .scene .bg { transform: scale(1) !important; }
}
