:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --bg-2: #131110;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --ink: #f4efe9;
  --muted: rgba(244, 239, 233, 0.62);
  --soft: rgba(244, 239, 233, 0.40);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff7a45;
  --accent-soft: #ffa877;
  --max: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.5, 0.5, 1);
  font-family: Onest, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(58% 46% at 80% 2%, rgba(255, 122, 69, 0.10), transparent 60%),
    radial-gradient(50% 48% at 8% 30%, rgba(255, 122, 69, 0.05), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* very fine grain for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.grad-text {
  color: var(--accent);
}

/* ---------- reveal (below the fold) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 800ms var(--ease-soft), transform 800ms var(--ease-soft);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  transition: background 240ms ease, border-color 240ms ease, backdrop-filter 240ms ease;
}

.nav.is-scrolled {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 10, 9, 0.66);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  margin-right: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta,
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 200ms var(--ease), background 200ms ease, border-color 200ms ease, filter 200ms ease;
}

.nav-cta {
  padding: 0 22px;
  background: var(--accent);
  color: #1a0d06;
  font-size: 14px;
}

.nav-cta:hover,
.btn:hover {
  transform: translateY(-2px);
}

.btn {
  padding: 0 26px;
  border: 1px solid transparent;
  font-size: 15px;
}

.btn.primary {
  background: var(--accent);
  color: #1a0d06;
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.btn.secondary {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.btn.secondary:hover {
  border-color: rgba(255, 122, 69, 0.45);
}

/* ---------- hero (centered) ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 128px 0 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 560px;
  height: 560px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 69, 0.14), transparent 64%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 680px;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 {
  letter-spacing: -0.045em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 4.3vw, 58px);
  font-weight: 900;
  line-height: 1.02;
}

.hero p {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  margin-top: 32px;
}

.hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin-top: clamp(16px, 3vh, 44px);
}

/* phone + bubbles travel together as one cluster, grounded at the bottom */
.phone-cluster {
  position: relative;
  display: flex;
  justify-content: center;
  width: min(700px, 100%);
}

/* ---------- phone in hand + rotating screens ---------- */
.phone-hand {
  position: relative;
  z-index: 2;
  width: min(380px, 52vh, 72%);
  margin: 0 auto;
  transform-origin: center bottom;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.5));
  -webkit-mask-image: linear-gradient(180deg, #000 73%, transparent 91%);
  mask-image: linear-gradient(180deg, #000 73%, transparent 91%);
  animation: hand-float 9s ease-in-out 1.6s infinite alternate;
}

.hand-base {
  width: 100%;
  height: auto;
}

.phone-display {
  position: absolute;
  left: 31.4%;
  top: 9.3%;
  z-index: 1;
  width: 39.7%;
  height: 59.3%;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  animation: shot-cycle 20s linear infinite;
}

.shot:nth-child(1) { animation-delay: 0s; }
.shot:nth-child(2) { animation-delay: 5s; }
.shot:nth-child(3) { animation-delay: 10s; }
.shot:nth-child(4) { animation-delay: 15s; }

/* ---------- feature bubbles (clear glass) ---------- */
.bubble-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  z-index: 5;
  translate: 0 0;
  animation: drift-a 19s ease-in-out var(--fd, 0s) infinite;
  -webkit-tap-highlight-color: transparent;
}

.bubble:focus-visible {
  outline: none;
}

.bubble:focus-visible .bubble-orb {
  border-color: rgba(255, 122, 69, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 122, 69, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.bubble-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  transform-origin: center center;
  will-change: transform, opacity;
}

.bubble-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--orb, 96px);
  height: var(--orb, 96px);
  border-radius: 50%;
  color: var(--accent-soft);
  background:
    radial-gradient(125% 125% at 30% 22%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 40%, rgba(255, 255, 255, 0.015) 62%, rgba(255, 255, 255, 0.07) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 8px -10px 22px rgba(255, 150, 100, 0.05),
    0 14px 30px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(5px) saturate(115%);
  -webkit-backdrop-filter: blur(5px) saturate(115%);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* glossy specular highlight */
.bubble-orb::before {
  content: "";
  position: absolute;
  left: 23%;
  top: 15%;
  width: 30%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 70%);
  filter: blur(0.6px);
}

/* pop ring */
.bubble-orb::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.bubble-orb svg {
  width: 38%;
  height: 38%;
  opacity: 0.92;
}

.bubble-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(244, 239, 233, 0.72);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.bubble:hover .bubble-orb {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 8px -10px 22px rgba(255, 150, 100, 0.07),
    0 18px 36px rgba(0, 0, 0, 0.4);
}

/* bubble positions (radial around the centered phone) + varied drift for an organic float */
.bubble--frame   { left: 2%;   top: 3%;    animation-name: drift-a; animation-duration: 19s; }
.bubble--zoom    { right: 2%;  top: 3%;    animation-name: drift-b; animation-duration: 23s; }
.bubble--caption { left: -3%;  top: 37%;   animation-name: drift-c; animation-duration: 17s; }
.bubble--export  { right: -3%; top: 36%;   animation-name: drift-b; animation-duration: 21s; }
.bubble--bg      { left: 6%;   bottom: 3%;  animation-name: drift-c; animation-duration: 24s; }
.bubble--ratio   { right: 5%;  bottom: 1%;  animation-name: drift-a; animation-duration: 18s; }

/* pop + reform */
.bubble.is-popping .bubble-inner {
  animation: bubble-pop 0.42s cubic-bezier(0.4, 0, 0.7, 1) forwards;
}

.bubble.is-popping .bubble-orb::after {
  animation: ring-burst 0.46s ease-out forwards;
}

.bubble.is-reforming .bubble-inner {
  animation: bubble-reform var(--reform-dur, 0.95s) cubic-bezier(0.4, 1.2, 0.6, 1) forwards;
}

/* droplets flung during pop */
.shard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  animation: shard-fly 0.5s ease-out forwards;
}

/* ---------- sections ---------- */
.workflow,
.cta {
  position: relative;
  z-index: 1;
  padding: 112px 0;
}

.workflow-shell {
  display: grid;
  gap: 44px;
}

.section-heading {
  max-width: 780px;
}

.section-heading h2,
.cta h2 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 900;
  line-height: 1.02;
}

.section-heading p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: steps;
}

.workflow-steps article {
  position: relative;
  overflow: visible;
  min-height: 220px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, background 0.4s ease;
}

.workflow-steps article:hover {
  z-index: 3;
  transform: translateY(-6px);
  border-color: rgba(255, 122, 69, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.workflow-steps .step-name,
.workflow-steps p {
  position: relative;
  z-index: 1;
  max-width: 60%;
}

.step-img {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 104px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: rotate(-6deg);
  transform-origin: bottom right;
  filter: saturate(0.92) brightness(0.88);
  transition: transform 0.5s var(--ease-back), box-shadow 0.5s ease, filter 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.workflow-steps article:hover .step-img {
  transform: translate(8px, -27px) scale(1.28) rotate(-3deg);
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.12);
  filter: saturate(1.05) brightness(1);
}

.workflow-steps article::before {
  counter-increment: steps;
  content: "0" counter(steps);
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 122, 69, 0.12);
  border: 1px solid rgba(255, 122, 69, 0.38);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.step-name {
  display: block;
  margin: 20px 0 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.workflow-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

/* ---------- cta ---------- */
.cta {
  padding-top: 24px;
}

.cta-card {
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: none;
  padding: 62px 54px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(255, 122, 69, 0.10), transparent 58%),
    var(--bg-2);
}

.cta-card p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 44px 0 58px;
  color: var(--soft);
  border-top: 1px solid var(--line);
}

.footer .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
  font-size: 13px;
}

/* ---------- page-load entrance ---------- */
.preload .nav,
.preload .eyebrow,
.preload .hero h1,
.preload .hero-copy p,
.preload .hero-actions,
.preload .phone-hand,
.preload .phone-screen,
.preload .bubble-inner {
  opacity: 0;
}

.preload .nav { transform: translateY(-14px); }
.preload .eyebrow,
.preload .hero h1,
.preload .hero-copy p,
.preload .hero-actions { transform: translateY(24px); }
.preload .phone-hand { transform: translateY(44px) scale(0.97); }
.preload .phone-screen { transform: scale(0.94); }
.preload .bubble-inner { transform: scale(0.3); }

.nav,
.eyebrow,
.hero h1,
.hero-copy p,
.hero-actions,
.phone-screen {
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
}

.nav { transition-delay: 0.05s; }
.eyebrow { transition-delay: 0.12s; }
.hero h1 { transition-delay: 0.22s; }
.hero-copy p { transition-delay: 0.36s; }
.hero-actions { transition-delay: 0.5s; }
.phone-screen { transition: opacity 0.9s var(--ease) 1s, transform 1.1s var(--ease) 1s; }

.phone-hand { animation: hand-float 9s ease-in-out 1.6s infinite alternate, hand-in 1s var(--ease) 0.6s backwards; }

.bubble-inner {
  transition: opacity 0.7s var(--ease) var(--in, 1.3s), transform 0.7s var(--ease) var(--in, 1.3s);
}

.bubble.is-formed .bubble-inner {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---------- keyframes ---------- */
@keyframes hand-float {
  0% { translate: 0 -8px; }
  100% { translate: 0 10px; }
}

@keyframes hand-in {
  0% { opacity: 0; transform: translateY(44px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drift-a {
  0%   { translate: 0 0; }
  25%  { translate: 9px -13px; }
  50%  { translate: -7px -6px; }
  75%  { translate: 5px 10px; }
  100% { translate: 0 0; }
}

@keyframes drift-b {
  0%   { translate: 0 0; }
  22%  { translate: -10px -7px; }
  46%  { translate: 6px -14px; }
  72%  { translate: 11px 5px; }
  100% { translate: 0 0; }
}

@keyframes drift-c {
  0%   { translate: 0 0; }
  28%  { translate: 8px 11px; }
  54%  { translate: -10px 6px; }
  80%  { translate: -5px -11px; }
  100% { translate: 0 0; }
}

@keyframes shot-cycle {
  0% { opacity: 0; }
  2% { opacity: 1; }
  23% { opacity: 1; }
  27% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes bubble-pop {
  0% { transform: scale(1); opacity: 1; }
  28% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes ring-burst {
  0% { opacity: 0.8; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.8); }
}

@keyframes bubble-reform {
  0% { transform: translate(var(--sx, 0), var(--sy, 0)) scale(0.2); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

@keyframes shard-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3); }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero { padding: 116px 0 0; }
  .phone-cluster { width: min(540px, 100%); }
  .phone-hand { width: min(360px, 54vh, 70%); }
  .bubble { --orb: 84px; }
  .bubble-label { font-size: 11.5px; }

  .bubble--frame   { left: 0;    top: 4%; }
  .bubble--zoom    { right: 0;   top: 4%; }
  .bubble--caption { left: -4%;  top: 38%; }
  .bubble--export  { right: -4%; top: 37%; }
  .bubble--bg      { left: 4%;   bottom: 3%; }
  .bubble--ratio   { right: 3%;  bottom: 1%; }

  .workflow-steps { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, var(--max)); }
  .nav { min-height: 64px; padding-inline: 14px; }
  .brand { font-size: 16px; }
  .brand img { width: 30px; height: 30px; }
  .nav-cta { min-height: 40px; padding-inline: 16px; font-size: 13px; }

  .hero { padding-top: 104px; }
  .hero h1 { font-size: clamp(34px, 9vw, 46px); }
  .hero p { font-size: 15px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; }

  .hero-stage { margin-top: 14px; }
  .phone-cluster { width: 100%; }
  .phone-hand { width: min(290px, 48vh, 66%); }
  .phone-screen { border-radius: 22px; }

  .bubble { --orb: 58px; }
  .bubble-label { font-size: 9.5px; }

  .bubble--frame   { left: 1%;  top: 2%; }
  .bubble--zoom    { right: 1%; top: 2%; }
  .bubble--caption { left: -1%; top: 38%; }
  .bubble--export  { right: -1%; top: 37%; }
  .bubble--bg      { left: 4%;  bottom: 2%; }
  .bubble--ratio   { right: 3%; bottom: 0%; }

  .workflow, .cta { padding: 78px 0; }
  .workflow-steps article { padding: 26px; border-radius: 22px; }
  .cta-card { padding: 44px 26px; border-radius: 24px; }
  .footer .shell { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .preload .nav,
  .preload .eyebrow,
  .preload .hero h1,
  .preload .hero-copy p,
  .preload .hero-actions,
  .preload .phone-hand,
  .preload .phone-screen,
  .preload .bubble-inner { opacity: 1; transform: none; }
  .shot { opacity: 0; }
  .shot:nth-child(1) { opacity: 1; }
}
