/* =========================================================
   v2 additions: 3D particles, logo, showcase, case studies
   ========================================================= */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

#particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
html.has-3d .core, html.has-3d .holo-ring { display: none; }
html.has-3d .bg-orbs span { opacity: .18; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; background: var(--grad); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Logo: draws itself, nodes pop, a pulse travels the M */
.logo { width: 36px; height: 36px; overflow: visible; }
.logo-tile { fill: #0d2428; stroke: url(#lg); stroke-width: 1.6; }
.logo-line { fill: none; stroke: url(#lg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawM 1.4s .2s cubic-bezier(.65,0,.35,1) forwards; }
.logo-nodes circle { fill: #ecfdf9; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: popNode .45s cubic-bezier(.34,1.56,.64,1) forwards; }
.logo-nodes circle:nth-child(1) { animation-delay: .25s; }
.logo-nodes circle:nth-child(2) { animation-delay: .5s; }
.logo-nodes circle:nth-child(3) { animation-delay: .8s; }
.logo-nodes circle:nth-child(4) { animation-delay: 1.1s; }
.logo-nodes circle:nth-child(5) { animation-delay: 1.35s; }
.logo-pulse { fill: #2dd4bf; filter: drop-shadow(0 0 3px #2dd4bf); opacity: 0; animation: fadeIn .4s 1.7s forwards; }
.brand:hover .logo-tile { filter: drop-shadow(0 0 8px rgba(45, 212, 191,.6)); }
@keyframes drawM { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes popNode { to { transform: scale(1); } }
@keyframes fadeIn { to { opacity: 1; } }
.brand-text { font-size: 18px; }

/* Split headings: words rise in one after another */
.split .w { display: inline-block; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 45ms); }
.split.pre { opacity: 1; transform: none; }
.split.pre .w { opacity: 0; transform: translateY(.55em) rotate(2deg); }

/* ---------- Scroll showcase ---------- */
.builds-section { padding-bottom: 60px; }
.showcase { position: relative; height: calc(var(--n) * 85vh + 15vh); margin-top: 20px; }
.sc-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.sc-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.sc-copy { min-width: 0; }
.sc-count { font-family: 'Outfit', sans-serif; font-weight: 800; line-height: 1; margin-bottom: 18px; }
.sc-count b { font-size: 64px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-count span { color: var(--muted); font-size: 22px; }
.sc-items { display: grid; }
.sc-item { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sc-item.active { opacity: 1; transform: none; pointer-events: auto; }
.sc-item h3 { font-size: clamp(28px, 3vw, 40px); }
.sc-item p { color: var(--muted); font-size: 16.5px; }
.sc-links { display: flex; gap: 22px; flex-wrap: wrap; }
.link.quiet { color: var(--muted); }
.link.quiet:hover { color: var(--text); }
.sc-mshot { display: none; }
.sc-dots { display: flex; gap: 8px; margin-top: 30px; }
.sc-dots button { width: 26px; height: 6px; border-radius: 6px; border: 0; background: rgba(255,255,255,.14); transition: width .3s, background .3s; padding: 0; }
.sc-dots button.on { width: 48px; background: var(--grad); }

.sc-stage { position: relative; perspective: 1600px; padding: 20px 6% 40px 0; min-width: 0; }
.laptop { position: relative; transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -14deg)); transform-style: preserve-3d; transition: transform .25s ease-out; }
.lid { position: relative; padding: 2.4%; border-radius: 18px; background: linear-gradient(160deg, #1d3a3f, #0f2226); border: 1px solid rgba(94, 234, 212,.25); box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 80px rgba(45, 212, 191,.12); }
.cam { position: absolute; top: .9%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #2c4a50; }
.screen { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #0f2a2f; }
.scr { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform .9s ease; }
.scr.active { opacity: 1; transform: none; }
.scr video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.scr.mock { padding: 0; display: grid; place-items: center; aspect-ratio: auto; min-height: 0; }
.base { position: relative; height: 16px; margin: 0 -7%; border-radius: 0 0 22px 22px; background: linear-gradient(180deg, #2c4a50, #142c31); box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.base span { position: absolute; top: 0; left: 50%; width: 16%; height: 6px; margin-left: -8%; border-radius: 0 0 8px 8px; background: #0f2226; }
.phone { position: absolute; right: 0; bottom: 0; width: 23%; aspect-ratio: 9 / 19.5; border-radius: 26px; padding: 6px; background: #0f2226; border: 1px solid rgba(94, 234, 212,.3); box-shadow: 0 30px 70px rgba(0,0,0,.7), 0 0 40px rgba(13, 148, 136,.2); animation: float 6s ease-in-out infinite; }
.notch { position: absolute; top: 8px; left: 50%; width: 34%; height: 12px; margin-left: -17%; border-radius: 10px; background: #000; z-index: 2; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #0f2a2f; }
.pscr { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .6s ease; }
.pscr.active { opacity: 1; }
.pscr-energy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px; background: radial-gradient(circle at 50% 35%, rgba(45, 212, 191,.25), transparent 60%), #0f2a2f; }
.pscr-energy b { font-family: 'Outfit', sans-serif; font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pscr-energy span { color: var(--muted); font-size: 11px; }
.pscr-energy i { width: 70%; height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.pscr-energy i::after { content: ''; position: absolute; inset: 0; width: 86%; background: var(--grad); border-radius: 6px; }
.pscr-energy em { font-style: normal; font-size: 10.5px; color: var(--text); line-height: 1.4; }

.more-title { font-size: 24px; margin: 30px 0 22px; }
.build-body h3 { font-size: 20px; }
.build-cta { justify-content: center; background: linear-gradient(135deg, rgba(45, 212, 191,.10), rgba(13, 148, 136,.16)); }
.build-cta .build-body { justify-content: center; gap: 16px; }
.build-cta .btn { align-self: flex-start; }

/* Contact honeypot + status */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note.ok { color: var(--cyan); }
.form-note.err { color: #fca5a5; }
.form button[disabled] { opacity: .6; cursor: progress; }

/* Footer */
.foot-inner { align-items: center; justify-content: space-between; gap: 20px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand b { display: block; font-family: 'Outfit', sans-serif; letter-spacing: .12em; color: var(--text); }
.foot-brand span { font-size: 13px; margin-right: 0; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-copy { font-size: 13px; }
.foot-inner span.foot-copy { margin-right: 0; }

/* ---------- Case study pages ---------- */
.case-hero { padding: 140px 0 40px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); }
.case-hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
.case-hero .lead { margin-top: 16px; max-width: 720px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.case-meta span { padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.case-visual { margin: 30px 0 10px; }
.case-visual .shot { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.case-visual video, .case-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 40px; }
.case-block { padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.case-block.wide { grid-column: 1 / -1; }
.case-block h2 { font-size: 24px; margin-bottom: 12px; }
.case-block p { color: var(--muted); }
.case-block ul { list-style: none; display: grid; gap: 10px; margin-top: 6px; }
.case-block.wide ul { grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.case-block li { color: var(--text); padding-left: 22px; position: relative; font-size: 15px; }
.case-block li::before { content: ''; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); }
.case-nav { display: flex; justify-content: space-between; gap: 16px; padding: 30px 0 90px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.case-nav a { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 220px; transition: border-color .2s, transform .2s; }
.case-nav a:hover { border-color: rgba(45, 212, 191,.5); transform: translateY(-2px); }
.case-nav small { color: var(--muted); font-size: 12.5px; }
.case-nav b { font-family: 'Outfit', sans-serif; font-size: 18px; }
.case-nav .next { text-align: right; margin-left: auto; }

@media (max-width: 900px) {
  .showcase { height: auto; }
  .sc-sticky { position: static; height: auto; display: block; }
  .sc-grid { grid-template-columns: 1fr; }
  .sc-stage, .sc-count, .sc-dots { display: none; }
  .sc-items { display: flex; flex-direction: column; gap: 40px; }
  .sc-item { opacity: 1; transform: none; pointer-events: auto; }
  .sc-mshot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line); background: #0f2a2f; }
  .sc-mshot-mock { display: grid; place-items: center; padding: 10px; }
  .sc-mshot-mock svg { width: 100%; height: 100%; }
  .case-body { grid-template-columns: 1fr; }
  .case-block.wide ul { grid-template-columns: 1fr; }
  .case-hero { padding-top: 110px; }
}
@media (max-width: 600px) {
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .case-nav a { min-width: 0; width: 100%; }
  .case-nav .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-line { stroke-dashoffset: 0; }
  .logo-nodes circle { transform: none; }
  .logo-pulse { opacity: 1; }
  .split.pre .w { opacity: 1; transform: none; }
}

/* Fixes: gradient painted on the rotating words themselves (Chromium drops parent text-clip on animated children) */
.rotator { background: none; color: var(--text); -webkit-background-clip: border-box; background-clip: border-box; }
.rot-word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
/* Energy dashboard fits inside the laptop screen */
.scr.mock-energy svg, .case-visual .mock-energy svg { position: absolute; inset: 4%; width: 92%; height: 92%; }
.case-visual .mock-energy { position: relative; }

.case-visual .shot.mock { min-height: 0; max-width: 100%; }

/* New logo: cyan tile with lowercase m, lowercase wordmark, cyan full stop */
.brand { gap: 11px; letter-spacing: 0; }
.logo-img { width: 36px; height: 36px; border-radius: 10px; animation: tilePop .6s cubic-bezier(.34,1.56,.64,1) both; transition: transform .25s, box-shadow .25s; }
.brand:hover .logo-img { transform: rotate(-6deg) scale(1.05); box-shadow: 0 0 22px rgba(45, 212, 191,.45); }
.brand-text { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 23px; letter-spacing: -.01em; text-transform: none; color: var(--text); line-height: 1; }
.brand-dot { display: inline-block; width: .27em; height: .27em; margin-left: .07em; border-radius: 50%; background: var(--cyan); vertical-align: baseline; animation: dotPulse 2.8s ease-in-out 1s infinite; }
.foot-brand .brand-text { font-size: 19px; letter-spacing: -.01em; }
@keyframes tilePop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191,.6); } 50% { box-shadow: 0 0 0 5px rgba(45, 212, 191,0); } }

.scr-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero labels v2: glass cards with icon tile and a fact line */
.chip { display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 11px; border-radius: 18px; font-size: 15px; font-weight: 600;
  background: linear-gradient(rgba(13, 38, 43, .78), rgba(13, 38, 43, .78)) padding-box, linear-gradient(135deg, rgba(45, 212, 191,.75), rgba(13, 148, 136,.35) 55%, rgba(255,255,255,.08)) border-box;
  border: 1px solid transparent; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 30px rgba(45, 212, 191,.10); animation: bob 6s ease-in-out infinite; }
.chip::before { display: none; }
.chip-ic { flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--cyan); display: grid; place-items: center; box-shadow: 0 0 18px rgba(45, 212, 191,.35); }
.chip-ic svg { width: 22px; height: 22px; fill: none; stroke: #0c2226; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip-t { display: flex; flex-direction: column; line-height: 1.2; }
.chip-t b { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px; color: var(--text); white-space: nowrap; }
.chip-t small { font-size: 13px; font-weight: 500; color: var(--muted); white-space: normal; line-height: 1.3; }
.chip.c1 { top: 18px; left: -70px; }
.chip.c2 { top: 120px; right: -90px; animation-delay: -1.5s; }
.chip.c3 { bottom: 120px; left: -90px; animation-delay: -3s; }
.chip.c4 { bottom: 14px; right: -60px; animation-delay: -4.5s; }
@media (max-width: 1180px) { .chip.c1 { left: -20px; } .chip.c2 { right: -20px; } .chip.c3 { left: -30px; } .chip.c4 { right: -10px; } }
@media (max-width: 860px) {
  .chip { gap: 8px; padding: 6px 11px 6px 6px; border-radius: 13px; }
  .chip-ic { width: 28px; height: 28px; border-radius: 9px; }
  .chip-ic svg { width: 15px; height: 15px; }
  .chip-t b { font-size: 12.5px; }
  .chip-t small { font-size: 10.5px; }
  .chip.c1 { top: 6px; left: -6px; } .chip.c2 { top: 92px; right: -8px; } .chip.c3 { bottom: 86px; left: -8px; } .chip.c4 { bottom: 4px; right: -4px; }
}

/* Text brightness: proper white, with a subtle shadow so it lifts off the particles */
body { color: var(--text); }
.lead, .section-lead, .hero h1, .stat span, .chip-t small, .ticker-track span { text-shadow: 0 1px 12px rgba(4, 20, 22, .55); }
.lead, .section-lead { color: #f2faf9; }
.ticker-track span { color: #ffffff; }
.stat span, .chip-t small { color: #e8f6f4; font-weight: 600; }

/* Hero right column: a square stage the 3D sphere centres on */
.hero-visual { align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 580px; }
.holo { width: min(100%, 580px); aspect-ratio: 1; height: auto; }
@media (max-width: 860px) { .hero-visual { min-height: 0; } .holo { width: min(100%, 320px); } }

/* Labels: a neat, equal-sized 2 x 2 group centred inside the sphere */
.holo { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); place-content: center; gap: 14px; }
.holo .chip { position: relative; inset: auto; top: auto; left: auto; right: auto; bottom: auto; width: 100%; animation: chipFloat 6s ease-in-out infinite; }
.holo .chip.c2 { animation-delay: -1.5s; } .holo .chip.c3 { animation-delay: -3s; } .holo .chip.c4 { animation-delay: -4.5s; }
@keyframes chipFloat { 50% { transform: translateY(-5px); } }
@media (max-width: 1180px) { .holo { grid-template-columns: repeat(2, minmax(0, 180px)); } }
@media (max-width: 860px) { .holo { grid-template-columns: repeat(2, minmax(0, 158px)); gap: 10px; } }

/* Labels stacked one below the other, centred in the sphere, equal width and spacing */
.holo, .holo { grid-template-columns: minmax(0, 280px); gap: 18px; }
@media (max-width: 1180px) { .holo { grid-template-columns: minmax(0, 250px); } }
@media (max-width: 860px) { .holo { grid-template-columns: minmax(0, 200px); gap: 10px; } }

.holo .chip, .holo .chip.c2, .holo .chip.c3, .holo .chip.c4 { animation-delay: 0s; }


/* ---------- Entrance: a one-second branded wipe before the hero (pure CSS, removes itself) ---------- */
.boot { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: #07181d;
  animation: bootOut .7s cubic-bezier(.76, 0, .24, 1) 1.25s forwards; }
.boot-in { display: flex; align-items: center; gap: 16px; animation: bootIn .7s cubic-bezier(.2, .7, .2, 1) both; }
.boot-in img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 0 44px rgba(45, 212, 191, .5); }
.boot-in b { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 40px; color: #fff; letter-spacing: -.02em; }
.boot-in .brand-dot { display: inline-block; width: 10px; height: 10px; margin-left: 3px; border-radius: 50%; background: var(--cyan); }
@keyframes bootIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bootOut { to { transform: translateY(-100%); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .boot { display: none; } }

/* ---------- The closing panel: one huge line and one button ---------- */
.cta-max { min-height: 88vh; display: grid; align-items: center; text-align: center; position: relative; overflow: hidden; }
.cta-max::before { content: ''; position: absolute; left: 50%; top: 55%; width: 1100px; height: 700px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(45, 212, 191, .16), transparent 70%); pointer-events: none; }
.cta-max .wrap { position: relative; }
.cta-huge { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: clamp(54px, 9.5vw, 148px); line-height: 1.02;
  letter-spacing: -.025em; color: #fff; margin: 14px 0 0; }
.cta-huge span { display: block; }
.cta-grad { background: linear-gradient(100deg, #5eead4, #14b8a6); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(45, 212, 191, .35)); }
.cta-sub { color: var(--muted); font-size: 18px; margin: 22px 0 34px; }
.cta-big-btn { font-size: 19px; padding: 18px 44px; border-radius: 999px; }
@media (max-width: 860px) { .cta-max { min-height: 70vh; } .cta-sub { font-size: 16px; } }


/* The whole hero visual (ball + cards move as one, the ball follows the cards) sits further right on wide
   screens, in the open space between the headline and the window edge (Werner, 11 Nov, red-box screenshot). */
@media (min-width: 1181px) {
  .hero-visual { transform: translate(clamp(0px, calc((100vw - var(--wrap)) / 3.8), 210px), -30px); }
}
