:root {
  --bg: #000000;
  --card: #101010;
  --card-2: #161616;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --white: #f5f5f5;
  --gray: #a3a3a3;
  --gray-dim: #8a8a8a; /* >= 4.5:1 on #000 and #161616 (WCAG AA) */
  --green: #3ddc84;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
::selection { background: rgba(255,255,255,0.2); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, video:focus-visible {
  outline: 2px solid #fff; outline-offset: 4px;
}
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 300; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; }

/* reveal: content stays visible if JS never runs (main.js adds .js) */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1), transform 300ms cubic-bezier(0.23, 1, 0.32, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-weight: 600; font-size: 15px; }
.brand .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: conic-gradient(from 210deg, #2a2a2a, #666, #1a1a1a, #4a4a4a, #2a2a2a);
  border: 1px solid var(--border-strong);
}
nav .links { display: flex; align-items: center; gap: 28px; }
nav .links a { color: var(--gray); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.25s; }
nav .links a:hover { color: var(--white); }

/* pill + buttons */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #141414; border: 1px solid var(--border);
  color: var(--white); font-size: 13px; font-weight: 500;
  padding: 7px 16px; border-radius: 99px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 99px;
  color: var(--white); text-decoration: none; font: inherit;
  font-size: 15px; font-weight: 500; padding: 12px 26px;
  transition: background 0.25s, border-color 0.25s, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  background: rgba(255,255,255,0.02);
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn .arr { font-size: 13px; transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
.btn.solid { background: var(--white); color: #000; border-color: var(--white); }
.btn:active:not(:disabled) { transform: scale(0.97); }
/* hover motion for mouse only: a tap on a phone fires :hover and leaves it stuck */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
  .btn:hover .arr { transform: translate(2px, -2px); }
  .btn.solid:hover { background: #ddd; }
}

h1, h2 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
.dim { color: var(--gray); }

/* hero */
.hero { text-align: center; padding: 110px 0 0; position: relative; }
.hero h1 { font-size: clamp(40px, 6.5vw, 72px); max-width: 920px; margin: 28px auto 0; }
.hero .sub { color: var(--gray); font-size: 17px; max-width: 580px; margin: 22px auto 0; }
.hero .cta { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .wrap > * { animation: rise 500ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.hero .wrap > :nth-child(2) { animation-delay: 0.08s; }
.hero .wrap > :nth-child(3) { animation-delay: 0.16s; }
.hero .wrap > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* hero orb: the spin, float and breathing glow are baked into one looping video
   (tools/render_hero_orb.py). Phones decode video in hardware, so scrolling stays smooth;
   stacked CSS animations under the blurred nav glitched in iPhone Safari. */
.blob-stage {
  --pointer-x: 0px; --pointer-y: 0px; --tilt-x: 0deg; --tilt-y: 0deg;
  position: relative; display: grid; place-items: center;
  overflow: hidden; overflow: clip;
  padding: 28px 0 0;
}
.blob-stage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 62%, var(--bg));
  pointer-events: none;
}
.orb-tilt { animation: orb-in 600ms cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes orb-in { from { opacity: 0; } }
.orb {
  display: block; width: min(560px, 90vw); height: auto; aspect-ratio: 1;
  background: var(--bg); user-select: none; pointer-events: none;
}
/* mouse devices only: the orb also turns as you scroll and tilts toward the pointer */
@media (hover: hover) and (pointer: fine) {
  @supports (animation-timeline: scroll()) {
    .orb-scroll { animation: scroll-turn linear both; animation-timeline: scroll(root block); animation-range: 0px 1400px; }
  }
  .blob-stage { perspective: 1000px; }
  .orb-tilt { transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1); } /* main.js sets the transform */
}
@keyframes scroll-turn { to { rotate: 210deg; } }
/* touch screens: a live blur over moving video is expensive in iPhone Safari, so use a solid bar */
@media (hover: none) {
  nav { background: rgba(0,0,0,0.94); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* sections */
section { padding: 110px 0; scroll-margin-top: 72px; }
#work { padding-top: 40px; }
.sec-head { text-align: center; margin-bottom: 64px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 48px); margin-top: 22px; }
.sec-head .sub { color: var(--gray); font-size: 16px; max-width: 560px; margin: 18px auto 0; }

/* automation projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.project { text-decoration: none; color: var(--white); display: block; }
.shot {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  height: 300px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color 200ms ease-out;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
@media (hover: hover) and (pointer: fine) { .project:hover .shot { border-color: var(--border-strong); } }
.pipeflow { /* steps stacked top-to-bottom; the glow running down them shows the flow */
  font-family: var(--mono); font-size: 13px; color: var(--gray);
  display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 0 20px;
}
.pipeflow .row { display: contents; }
.pipeflow .a { display: none; }
.pipeflow .node {
  background: var(--card-2); border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; color: #d4d4d4; white-space: nowrap;
  position: relative;
}
/* each step lights up in turn, like the workflow is running.
   The glow is drawn once on ::after and only its opacity animates (no repaint per frame). */
.pipeflow .node::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid rgba(61,220,132,0.65); box-shadow: 0 0 16px rgba(61,220,132,0.22);
  opacity: 0; animation: step 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.5s);
}
@keyframes step {
  0%, 30%, 100% { opacity: 0; }
  8%, 18% { opacity: 1; }
}
.pipeflow .ok { color: var(--green); }
.cap { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 18px; }
.cap h3 { font-size: 17px; font-weight: 600; }
.cap .tag { color: var(--gray-dim); font-size: 14px; white-space: nowrap; }

/* promo videos */
.reel { display: grid; grid-template-columns: 1.25fr 1fr 0.62fr; gap: 24px; align-items: center; }
.clip figure { margin: 0; }
.clip video {
  display: block; width: 100%; height: auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 20px;
}
.clip figcaption { margin-top: 14px; }
.clip figcaption strong { display: block; font-size: 16px; font-weight: 600; }
.clip figcaption span { color: var(--gray-dim); font-size: 14px; }

/* about */
.about { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: center; }
.portrait {
  height: 440px; border-radius: 20px; border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.14), transparent 55%), linear-gradient(160deg, #161616, #060606);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px;
}
.portrait .term { color: #bdbdbd; background: rgba(0,0,0,0.82); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 20px 22px; line-height: 2; }
.portrait .term .p { color: var(--green); }
.about h2 { font-size: clamp(28px, 3.6vw, 42px); }
.about .bio { color: var(--gray); font-size: 15px; margin-top: 18px; max-width: 480px; }
/* 200px min = widest number ("1:1 · 16:9 · 9:16") on one line; narrower drops to 1 column */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 36px 24px; margin-top: 44px; }
.stat { display: flex; flex-direction: column; }
.stat .lbl { color: var(--gray); font-size: 13px; }
.stat .num { margin-top: auto; /* numbers line up even when labels wrap differently */ font-size: clamp(34px, 4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.stat .num small { font-size: 0.45em; font-weight: 500; color: var(--gray); letter-spacing: 0; }
.footnote { color: var(--gray-dim); font-size: 12px; margin-top: 18px; }

/* marquee */
.marquee-wrap {
  border: 1px solid var(--border); border-radius: 99px; overflow: hidden; padding: 18px 0; margin-top: 96px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee { display: flex; gap: 56px; width: max-content; animation: slide 32s linear infinite; }
.marquee span { color: var(--gray); font-size: 15px; font-weight: 500; white-space: nowrap; }
.marquee span b { color: var(--white); font-weight: 500; }
@keyframes slide { to { transform: translateX(-50%); } }

/* process */
.rows { border-top: 1px solid var(--border); }
.row2 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; padding: 44px 0; border-bottom: 1px solid var(--border); }
.row2 .left { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.row2 h3 { font-size: 19px; font-weight: 600; }
.row2 .when { color: var(--gray-dim); font-size: 14px; }
.row2 p { color: var(--gray); font-size: 15px; }

/* services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.scard {
  display: block; color: inherit; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 34px 30px; transition: border-color 200ms ease-out;
}
@media (hover: hover) and (pointer: fine) { .scard:hover { border-color: var(--border-strong); } }
.scard.featured { border-color: rgba(61,220,132,0.35); }
.scard .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 22px; }
.scard h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.scard p { color: var(--gray); font-size: 14px; }
.scard .price { font-family: var(--mono); font-size: 13px; color: var(--gray-dim); margin-top: 20px; }
.center-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 56px; }

/* clipify: streamer subscription */
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 26px 22px; }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--gray-dim); }
.step h3 { font-size: 16px; font-weight: 600; margin: 10px 0 8px; }
.step p { color: var(--gray); font-size: 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 34px 30px; }
.plan.main { border-color: rgba(61,220,132,0.35); background: var(--card-2); }
.plans.three { grid-template-columns: repeat(3, 1fr); }
.plan .lbl { color: var(--gray); font-size: 13px; font-weight: 500; }
.plan .amt { font-size: clamp(36px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-top: 10px; }
.plan .amt small { font-size: 16px; color: var(--gray); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan li { color: var(--gray); font-size: 14px; padding-left: 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--green); }
.plan li b { color: var(--white); font-weight: 600; }
.founder { text-align: center; color: var(--gray); font-size: 14px; margin-top: 22px; }
.founder b { color: var(--white); font-weight: 600; }
.billing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.bill { border-top: 1px solid var(--border-strong); padding-top: 18px; }
.bill h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.bill p { color: var(--gray); font-size: 14px; }
.soon { font-family: var(--mono); font-size: 11px; color: var(--gray-dim); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; margin-left: 6px; white-space: nowrap; display: inline-block; line-height: 1.4; }
@media (max-width: 860px) {
  .steps4 { grid-template-columns: 1fr 1fr; }
  .plans, .plans.three, .billing { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .steps4 { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.qa { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color 0.3s; }
.qa:hover { border-color: var(--border-strong); }
.qa button {
  width: 100%; background: none; border: none; color: var(--white);
  font: inherit; font-size: 15px; font-weight: 600; text-align: left;
  padding: 22px 24px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.qa .chev { color: var(--gray); transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); flex-shrink: 0; }
.qa button[aria-expanded="true"] .chev { transform: rotate(180deg); }
.qa .ans p { color: var(--gray); font-size: 14px; padding: 0 24px 22px; }

/* contact */
.contact { position: relative; text-align: center; padding: 150px 0; overflow: hidden; }
.contact .fluid {
  position: absolute; inset: -20% -10%;
  background:
    radial-gradient(ellipse 60% 40% at 25% 40%, rgba(255,255,255,0.08), transparent),
    radial-gradient(ellipse 50% 35% at 75% 60%, rgba(255,255,255,0.06), transparent),
    radial-gradient(ellipse 70% 30% at 50% 50%, rgba(255,255,255,0.05), transparent);
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translateX(4%) scale(1.06); } }
.contact .inner { position: relative; }
.contact h2 { font-size: clamp(34px, 5vw, 56px); margin-top: 24px; }
.contact .sub { color: var(--gray); margin: 16px auto 36px; max-width: 640px; }
.contact .alt { margin-top: 26px; color: var(--gray); font-size: 14px; }
.contact .alt a { color: var(--white); }

/* enquiry dialog (native <dialog>: focus trap, Escape, focus return for free) */
dialog.enquiry {
  margin: auto; width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px);
  background: #111; color: var(--white); border: 1px solid var(--border-strong);
  border-radius: 22px; padding: 28px; box-shadow: 0 24px 90px #000;
}
dialog.enquiry::backdrop { background: rgba(0,0,0,.82); }
html:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.dialog-head h2 { font-size: 22px; letter-spacing: -0.01em; }
.dialog-close { border: 1px solid var(--border); background: #191919; color: var(--white); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 20px; flex-shrink: 0; }
.enquiry .intro { color: var(--gray); margin: 12px 0 8px; }
.enquiry label { display: block; color: var(--gray); font-size: 13px; margin: 14px 0 6px; }
.enquiry input, .enquiry textarea { width: 100%; background: #090909; color: var(--white); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px; font: inherit; }
.enquiry textarea { min-height: 110px; resize: vertical; }
.enquiry .consent { color: var(--gray-dim); font-size: 12px; margin-top: 14px; }
.enquiry .consent a { color: var(--gray); }
.dialog-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.dialog-status { min-height: 22px; margin-top: 12px; font-size: 13px; color: var(--gray); }
.dialog-status.ok { color: var(--green); }
.dialog-status.err { color: #ff9b9b; }
.email-chooser { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #0a0a0a; }
.chooser-label { color: var(--gray); font-size: 13px; margin-bottom: 10px; }
.chooser-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chooser-btns .btn { padding: 8px 14px; font-size: 13px; flex: 1 1 auto; justify-content: center; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* floating WhatsApp button (also the sticky contact button on mobile) */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: #25d366; color: #052e16; text-decoration: none;
  font-weight: 600; font-size: 15px; padding: 12px 18px 12px 14px; border-radius: 99px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.55); transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.wa-float:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { transform: translateY(-2px); } }
.wa-float svg { width: 22px; height: 22px; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 64px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot .tag { color: var(--gray); font-size: 14px; margin-top: 14px; max-width: 260px; }
.foot .mail { color: var(--gray); font-size: 14px; margin-top: 22px; display: block; text-decoration: none; }
.foot .mail:hover { color: var(--white); }
.foot .cols { display: flex; gap: 72px; }
.foot .col { display: flex; flex-direction: column; gap: 12px; }
.foot .col a { color: var(--gray); text-decoration: none; font-size: 14px; transition: color 0.25s; }
.foot .col a:hover { color: var(--white); }
.legal { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--gray-dim); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.legal a { color: inherit; }
.legal:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* legal page */
.doc { max-width: 720px; margin: 0 auto; padding: 80px 32px 120px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.doc .updated { color: var(--gray-dim); font-size: 14px; margin-bottom: 40px; }
.doc h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--gray); font-size: 15px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin-top: 8px; }
.doc li { margin-top: 6px; }
.doc a { color: var(--white); }
.doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); color: var(--gray); vertical-align: top; }
.doc th { color: var(--white); font-weight: 600; }

/* responsive */
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .projects, .about, .row2 { grid-template-columns: 1fr; }
  .shot { height: 240px; }
  .reel { grid-template-columns: 1fr; gap: 40px; }
  .clip.tall { width: min(340px, 100%); margin-inline: auto; }
  .about { gap: 40px; }
  .portrait { height: 320px; }
  .row2 { gap: 10px; padding: 34px 0; }
  nav .links a:not(:last-child) { display: none; }
  section { padding: 80px 0; }
  .hero { padding-top: 72px; }
  .foot .cols { gap: 48px; }
  footer { padding-bottom: 110px; } /* room for the WhatsApp button */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .wrap > *, .orb-tilt, .orb-scroll,
  .pipeflow .node, .marquee, .contact .fluid { animation: none; }
  .orb-tilt { transform: none; transition: none; }
  .js .reveal { transform: none; transition: opacity 200ms ease-out; } /* keep a gentle fade, drop the movement */
  .btn:active, .wa-float:active, .wa-float:hover { transform: none; }
}
