/* Soleria · Assistante de Gestion IA — Film 17s */
:root {
  --bg: #07080d;
  --ink: #eef2fb;
  --ink-dim: #98a1b6;
  --ai: #6ee7b7;
  --ai-2: #38bdf8;
  --warn: #fb7185;
  --post-y: #ffe066;
  --post-p: #ffb4b4;
  --post-b: #a3d8ff;
  --line: rgba(255,255,255,.08);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
.brand-mark {
  position: fixed; top: 18px; left: 22px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
}
.brand-mark-icn {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ai), var(--ai-2)); border-radius: 8px;
}
.brand-mark-icn svg { width: 13px; height: 13px; }
.skip {
  position: fixed; top: 18px; right: 22px; z-index: 1000;
  color: rgba(255,255,255,.65); text-decoration: none; font-size: 12px;
  padding: 6px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
}
.skip:hover { color:#fff; border-color: rgba(255,255,255,.45); }
html.embed .brand-mark, html.embed .skip, html.embed .replay { display: none; }
html.embed .scene { padding: 44px 18px 56px; }
html.embed .s1-title { font-size: clamp(25px, 5.4vw, 44px); max-width: 92%; }
html.embed .s1-posts span { font-size: clamp(16px, 3vw, 22px); padding: 11px 14px; }
html.embed .s2 { padding-top: 42px; }
html.embed .s2-head { margin-bottom: 12px; }
html.embed .chat { max-width: 92vw; gap: 10px; }
html.embed .bubble { font-size: clamp(14px, 2.3vw, 18px); padding: 12px 15px; line-height: 1.36; }
html.embed .s3-text { font-size: clamp(24px, 4.7vw, 42px); max-width: 92%; }
html.embed .s4-title { margin-bottom: 16px; }
html.embed .s4-grid { max-width: 92vw; gap: 10px; margin-bottom: 22px; }
html.embed .s4-card { padding: 18px 14px; }
html.embed .s4-num { font-size: clamp(25px, 4.3vw, 40px); }
html.embed .s4-lbl { font-size: 12px; }
html.embed .time-label { left: 14px; bottom: 10px; }
html.embed .progress { height: 2px; }

.cinema {
  position: fixed; inset: 0;
  background:
    radial-gradient(1100px 600px at 50% -120px, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(900px 500px at 50% 120%, rgba(110,231,183,.10), transparent 60%),
    var(--bg);
}
.scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 24px 90px;
  opacity: 0; pointer-events: none;
}
.scene.active { opacity: 1; pointer-events: auto; }

/* Scene 1 */
.s1 { background: radial-gradient(800px 500px at 50% 50%, rgba(251,113,133,.12), transparent 70%); }
.s1-clock {
  font-size: 13px; letter-spacing: .35em; color: var(--warn);
  text-transform: uppercase; margin-bottom: 14px;
  opacity: 0; animation: fadeUp .6s .1s forwards;
}
.s1-title {
  font-size: clamp(28px, 5.2vw, 56px); font-weight: 800; letter-spacing: -.02em;
  text-align: center; line-height: 1.15; max-width: 980px;
  opacity: 0; animation: fadeUp .8s .3s forwards;
}
.s1-title em { font-style: normal; color: var(--warn); }
.s1-posts { position: absolute; inset: 0; pointer-events: none; }
.s1-posts span {
  position: absolute; padding: 14px 18px; border-radius: 4px;
  font-family: "Caveat","Marker Felt","Comic Sans MS",cursive;
  font-size: 22px; color: #2a241a; font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,0,0,.4);
  opacity: 0; transform: rotate(var(--r,-4deg)) translateY(10px);
  animation: postIn .5s var(--d,.4s) forwards;
}
.s1-posts .p1 { top: 18%; left: 8%;  background: var(--post-y); --r:-8deg; --d:.5s; }
.s1-posts .p2 { top: 26%; right: 9%; background: var(--post-p); --r:6deg;  --d:.7s; }
.s1-posts .p3 { bottom: 22%; left: 12%; background: var(--post-b); --r:4deg; --d:.9s; }
.s1-posts .p4 { bottom: 18%; right: 11%; background: var(--post-y); --r:-5deg; --d:1.1s; }

/* Scene 2 */
.s2 { justify-content: flex-start; padding-top: 80px; }
.s2-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-size: 13px; color: var(--ink-dim); letter-spacing: .04em;
}
.s2-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ai); box-shadow: 0 0 12px var(--ai); }
.chat {
  width: 100%; max-width: 760px; flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.bubble {
  max-width: 86%; padding: 14px 18px; border-radius: 18px;
  font-size: clamp(15px, 1.7vw, 19px); line-height: 1.45;
  opacity: 0; transform: translateY(14px);
  animation: bubbleIn .45s forwards;
}
.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff; border-bottom-right-radius: 6px;
  box-shadow: 0 10px 28px rgba(56,189,248,.25);
}
.bubble.ai {
  align-self: flex-start;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.ai .check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ai); color: #062013; font-weight: 900;
  margin-right: 8px; vertical-align: -4px; font-size: 13px;
}
.bubble.typing { padding: 16px 20px; }
.bubble.typing i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-dim); margin: 0 2px;
  animation: blink 1.2s infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: .2s; }
.bubble.typing i:nth-child(3) { animation-delay: .4s; }

/* Scene 3 */
.s3 { background: radial-gradient(900px 500px at 50% 50%, rgba(56,189,248,.10), transparent 70%); }
.s3-text {
  font-size: clamp(26px, 4.4vw, 46px); font-weight: 800;
  text-align: center; line-height: 1.2; max-width: 1000px; letter-spacing: -.02em;
}
.s3-text .verbs span {
  display: inline-block; opacity: 0; transform: translateY(8px);
  animation: fadeUp .35s forwards;
}
.s3-text .verbs span:nth-child(1){ animation-delay:.1s; }
.s3-text .verbs span:nth-child(2){ animation-delay:.25s; }
.s3-text .verbs span:nth-child(3){ animation-delay:.4s; }
.s3-text .verbs span:nth-child(4){ animation-delay:.55s; }
.s3-text .verbs span:nth-child(5){ animation-delay:.7s; color: var(--warn); }
.s3-text .rest { opacity:0; animation: fadeUp .5s .95s forwards; display:block; margin-top: 14px; font-size: .75em; color: var(--ink-dim); font-weight: 600; }
.s3-text .rest b { color: var(--ai); }

/* Scene 4 */
.s4-title {
  font-size: 13px; letter-spacing: .3em; color: var(--ai);
  text-transform: uppercase; margin-bottom: 28px;
  opacity:0; animation: fadeUp .5s forwards;
}
.s4-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  width: 100%; max-width: 1000px; margin-bottom: 36px;
}
.s4-card {
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 22px; text-align: center;
  opacity: 0; transform: translateY(16px);
  animation: fadeUp .5s forwards;
}
.s4-card:nth-child(1){ animation-delay:.2s; }
.s4-card:nth-child(2){ animation-delay:.45s; }
.s4-card:nth-child(3){ animation-delay:.7s; }
.s4-num {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  background: linear-gradient(135deg, var(--ai), var(--ai-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -.02em;
}
.s4-lbl { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }
.s4-end {
  font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; text-align: center;
  opacity: 0; animation: fadeUp .6s 1s forwards;
}
.s4-end small { display:block; color: var(--ink-dim); font-weight:500; font-size: 14px; margin-top:6px; }

.progress {
  position: fixed; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.06); z-index: 999;
}
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ai), var(--ai-2));
  animation: progress 35.6s linear infinite;
}
.time-label {
  position: fixed; bottom: 14px; left: 22px; z-index: 999;
  font-size: 12px; color: var(--ink-dim); letter-spacing: .15em;
  font-variant-numeric: tabular-nums;
}
.replay {
  position: fixed; bottom: 14px; right: 22px; z-index: 999;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: #fff; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; cursor: pointer;
}
.replay:hover { background: rgba(255,255,255,.12); }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes postIn { to { opacity: 1; transform: rotate(var(--r,-4deg)) translateY(0); } }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,80%,100% { opacity:.3; } 40% { opacity: 1; } }
@keyframes progress { to { width: 100%; } }

body.paused *, html.paused * { animation-play-state: paused !important; }

.playpause {
  position: fixed; right: 22px; bottom: 16px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.18);
  padding: 8px 14px; border-radius: 999px; font: 600 13px/1 inherit; cursor: pointer;
  backdrop-filter: blur(6px);
}
.playpause:hover { background: rgba(255,255,255,.16); }
html.embed .playpause { right: 14px; bottom: 10px; padding: 6px 10px; font-size: 12px; }

@media (max-width: 720px) {
  .scene { padding: 80px 16px 80px; }
  .s2-head { font-size: 12px; }
  .bubble { max-width: 92%; padding: 12px 14px; font-size: 15px; }
  .s4-grid { grid-template-columns: 1fr; gap: 12px; }
  .s4-card { padding: 20px 16px; }
  .s1-posts span { font-size: 16px; padding: 10px 12px; }
}
