/* Buldogs · Showcase "Toto un zelta bumbiņa": one pinned screen, scenes cross-fade, the 3D ball never leaves the window */
:root { --bg: #0a0a0b; --ink: #f3efe6; --muted: #bdb6a8; --dim: #8b8579; --line: rgba(243,239,230,.1); --gold: #d8b46a;
  --orb: linear-gradient(135deg, #f6e7b8 0%, #d8b46a 45%, #a17a34 100%); --serif: "Playfair Display", Georgia, serif; }
* { box-sizing: border-box; }
html { font-variant-numeric: lining-nums; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 18px; letter-spacing: -.01em; }
h1 { font-size: clamp(42px, 6.4vw, 92px); }
h2 { font-size: clamp(34px, 4.4vw, 62px); }
em { font-style: italic; background: var(--orb); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }

.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 16px clamp(18px, 4vw, 48px);
  background: linear-gradient(rgba(10,10,11,.85), rgba(10,10,11,0)); }
.bar__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 20px/1 var(--serif); }
.bar__tag { font: 500 11px/1 Inter; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.bar__cta { margin-left: auto; text-decoration: none; font: 600 14px/1 Inter; color: #15120c; background: var(--orb); padding: 11px 18px; border-radius: 99px; }
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 31; background: var(--orb); transform-origin: left; transform: scaleX(var(--p, 0)); }

.story { height: 1100vh; position: relative; }
.pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.glow { position: absolute; inset: -20%; background: radial-gradient(40% 40% at var(--gx, 50%) var(--gy, 50%), rgba(216,180,106,.14), transparent 70%); pointer-events: none; }
.stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.ball2d { position: absolute; left: 0; top: 0; z-index: 5; border-radius: 50%; pointer-events: none; display: none;
  background: radial-gradient(circle at 34% 30%, #fffbe9 0 6%, #f6e7b8 14%, #d8b46a 45%, #8a6326 100%); box-shadow: 0 0 40px rgba(216,180,106,.45); }
.no-webgl .ball2d { display: block; }
.flash { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: var(--flash, 0);
  background: radial-gradient(circle at 50% 50%, #fff6d8, #e9c97f 40%, #b8893d 100%); }

.scene { position: absolute; inset: 0; padding: 110px clamp(20px, 6vw, 96px) 60px; display: grid; align-items: center;
  opacity: var(--o, 0); visibility: var(--v, hidden); transform: translateY(calc((1 - var(--o, 0)) * var(--dir, 1) * 30px)); }
.spot { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.txt { position: relative; z-index: 6; max-width: 520px; }
.txt.right { justify-self: end; }
.txt.center { justify-self: center; text-align: center; max-width: min(640px, 100%); }
.txt p { color: var(--muted); }
.num { font: 600 12px/1 Inter; letter-spacing: .18em; text-transform: uppercase; color: var(--gold) !important; margin: 0 0 18px; }

/* hero */
.hero { align-content: center; justify-items: center; text-align: center; }
.lockup { position: relative; width: min(560px, 86vw); margin: 0 auto 40px; }
.lockup svg { display: block; width: 100%; height: auto; overflow: visible; }
.lead { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font: 500 12px/1 Inter; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hint i { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: hint 2s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* 01 idea: a floor line */
.s1 { grid-template-columns: 1fr 1fr; gap: 40px; }
.floor { position: relative; height: 70vh; }
.floor .line { position: absolute; left: -10%; right: -20%; bottom: 14%; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,180,106,.65), transparent); }
.floor .spot { left: 50%; bottom: 14%; top: auto; width: 150px; transform: translate(-50%, 0); }

/* 02 speed */
.speed { position: absolute; inset: 0; pointer-events: none; }
.speed i { position: absolute; left: -40%; height: 1px; width: 32%; background: linear-gradient(90deg, transparent, rgba(216,180,106,.75), transparent); animation: zip 1.8s linear infinite; }
.speed i:nth-child(1) { top: 24%; } .speed i:nth-child(2) { top: 37%; animation-delay: .4s; width: 48%; } .speed i:nth-child(3) { top: 52%; animation-delay: .9s; }
.speed i:nth-child(4) { top: 66%; animation-delay: 1.2s; width: 22%; } .speed i:nth-child(5) { top: 79%; animation-delay: 1.5s; } .speed i:nth-child(6) { top: 88%; animation-delay: .2s; width: 40%; }
@keyframes zip { to { left: 140%; } }
.big { font: 400 clamp(64px, 9vw, 128px)/1 var(--serif); color: var(--ink) !important; margin: 26px 0 0; }
.big b { font-weight: 400; background: var(--orb); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 03 devices */
.s3 { align-content: center; gap: 70px; }
.devices { display: flex; justify-content: center; align-items: flex-end; gap: clamp(24px, 6vw, 90px); }
.dev { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dev small { font: 500 12px/1 Inter; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color .4s; }
.dev .scr { position: relative; border: 2px solid rgba(243,239,230,.22); border-radius: 18px; background: #111113; padding: 12% 10%; display: flex; flex-direction: column; gap: 9%; transition: border-color .4s, box-shadow .5s, background .5s; }
.phone .scr { width: 92px; height: 176px; }
.tablet .scr { width: 156px; height: 210px; }
.laptop .scr { width: 270px; height: 168px; border-radius: 10px 10px 4px 4px; }
.laptop::after { content: ""; position: absolute; bottom: 26px; width: 330px; height: 9px; border-radius: 0 0 10px 10px; background: rgba(243,239,230,.18); }
.dev .scr i { height: 8px; border-radius: 4px; background: rgba(243,239,230,.1); }
.dev .scr i:first-child { width: 60%; background: rgba(216,180,106,.25); }
.dev .scr b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 36px/1 Inter; color: #15120c; opacity: 0; transform: scale(.4); transition: opacity .35s, transform .6s cubic-bezier(.2,1.7,.4,1); }
.dev .spot { left: 50%; top: 0; width: 46px; transform: translate(-50%, -100%); }
.tablet .spot { width: 52px; } .laptop .spot { width: 58px; }
.dev.is-on .scr, .dev.was-on .scr { border-color: var(--gold); box-shadow: 0 0 60px -10px rgba(216,180,106,.65); background: linear-gradient(160deg, #f6e7b8, #d8b46a 50%, #a17a34); }
.dev.is-on .scr i, .dev.was-on .scr i { background: rgba(21,18,12,.18); }
.dev.is-on .scr b, .dev.was-on .scr b { opacity: 1; transform: none; }
.dev.is-on small, .dev.was-on small { color: var(--gold); }

/* 04 chat */
.s4 { grid-template-columns: 1fr 1fr; gap: 40px; }
.chat { position: relative; z-index: 4; justify-self: end; width: min(400px, 100%); background: #131315; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.chat__head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font: 600 14px/1.3 Inter; }
.chat__head small { display: block; font-weight: 400; font-size: 12px; color: #7fd49b; }
.msg { margin: 0 0 10px; padding: 11px 14px; border-radius: 16px; font-size: 15px; max-width: 85%; width: fit-content; }
.msg.me { margin-left: auto; background: var(--orb); color: #15120c; border-bottom-right-radius: 4px; }
.msg.typing { position: relative; display: flex; gap: 6px; align-items: center; background: #1d1d20; border-bottom-left-radius: 4px; height: 40px; padding: 0 16px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); animation: dot 1.2s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing .spot { position: relative; transform: none; display: inline-block; width: 12px; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .5; } }
.msg.answer { background: #1d1d20; border-bottom-left-radius: 4px; opacity: 0; transform: translateY(8px); transition: opacity .4s .15s, transform .4s .15s; }
.chat.is-on .msg.answer, .chat.was-on .msg.answer { opacity: 1; transform: none; }

/* 05 Toto */
.s5 { align-content: center; justify-items: center; gap: 20px; }
.toto { position: relative; width: min(300px, 46vh); aspect-ratio: 1; }
.toto svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 30px rgba(216,180,106,.3)); }
.toto .draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
.toto .feat { opacity: var(--feat, 0); transform-origin: 50% 58%; transform: scale(calc(.6 + .4 * var(--feat, 0))); }

/* final */
.final { align-content: center; justify-items: center; text-align: center; }
.final .lockup { margin-bottom: 26px; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 10px 0 34px; }
.btn { text-decoration: none; font: 600 15px/1 Inter; padding: 15px 24px; border-radius: 99px; background: var(--orb); color: #15120c; box-shadow: 0 10px 30px -10px rgba(216,180,106,.6); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(243,239,230,.25); box-shadow: none; }
.note { color: var(--dim); font-size: 13.5px; max-width: 52ch; }

@media (max-width: 760px) {
  .bar__tag { display: none; }
  .scene { padding: 90px 22px 40px; align-content: center; }
  .s1, .s4 { grid-template-columns: 1fr; gap: 0; }
  .floor { height: 34vh; }
  .txt.right { justify-self: start; }
  .devices { transform: scale(.6); transform-origin: center bottom; margin: -70px -90px 0; }
  .chat { justify-self: center; }
  .s4 .txt p:last-child { display: none; }
  #k-fast-a { left: 18% !important; top: 88% !important; }
  #k-fast-b { left: 78% !important; top: 22% !important; }
}
@media (prefers-reduced-motion: reduce) { .speed i, .hint i, .msg.typing i { animation: none; } }
