/* Landing page (template/landing.html). Separate from style.css so the app's rules never
   leak in. The 3D globe is drawn by static/script/landing.js on the fixed #scene canvas. */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/Roboto-Variable.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --bg-soft: #f1fbf6;
  --ink: #0b2e24;
  --muted: #4d6b61;
  --green: #059669;
  --green-hover: #047857;
  --green-deep: #064e3b;
  --mint: #10b981;
  --mint-soft: rgba(16, 185, 129, 0.1);
  --line: rgba(5, 150, 105, 0.18);
  /* Text colours for the CURRENT background: green by default, swapped inside .band. */
  --fg: #ffffff;
  --fg-muted: #d1fae5;
  --fg-accent: #a7f3d0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  /* Dark green: a soft glow top-right fading into deep forest green. */
  background: radial-gradient(120% 90% at 75% 15%, #0a6e52 0%, var(--green-deep) 40%, #022c22 100%) fixed;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Roboto", sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

kbd {
  padding: 1px 6px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.85em;
  background: var(--mint-soft);
}

/* ---------- 3D layers ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Perspective grid floor drifting towards the viewer. */
.floor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 42vh;
  perspective: 420px;
  perspective-origin: 50% 0%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}

.floor-grid {
  position: absolute;
  inset: 0 -50%;
  transform: rotateX(68deg);
  transform-origin: 50% 0%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: floor-move 2.8s linear infinite;
}

@keyframes floor-move {
  to {
    background-position: 0 56px;
  }
}

/* Launch screen: fades in over the globe zoom (after a short delay so the zoom is seen),
   then shows the logo inside expanding rings with a filling progress bar. */
.warp {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background:
    radial-gradient(circle at 50% 45%, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0) 40%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease 0.35s, visibility 0s linear 0.85s;
}

body.launching .warp {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease 0.35s;
}

.warp-portal {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
}

.warp-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(5, 150, 105, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.18), inset 0 0 24px rgba(16, 185, 129, 0.1);
  opacity: 0;
}

body.launching .warp-ring {
  animation: warp-ring 1.6s cubic-bezier(0.2, 0.6, 0.3, 1) 0.4s infinite;
}

body.launching .warp-ring:nth-child(2) {
  animation-delay: 0.93s;
}

body.launching .warp-ring:nth-child(3) {
  animation-delay: 1.46s;
}

@keyframes warp-ring {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.warp-logo {
  position: relative;
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.35));
  opacity: 0;
  transform: scale(0.7);
}

body.launching .warp-logo {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease 0.55s, transform 0.7s var(--ease) 0.55s;
}

.warp-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.warp-dots::after {
  content: "";
  animation: warp-dots 1.2s steps(4) infinite;
}

@keyframes warp-dots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75% {
    content: "...";
  }
}

.warp-bar {
  width: min(240px, 60vw);
  height: 3px;
  overflow: hidden;
  background: rgba(5, 150, 105, 0.12);
  border-radius: 0;
}

.warp-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--green-deep), var(--green), var(--mint));
  box-shadow: 0 0 12px var(--mint);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

body.launching .warp-bar span {
  transform: scaleX(1);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
}

body.launching main,
body.launching .nav,
body.launching .foot {
  opacity: 0;
  transform: scale(0.96) translateZ(0);
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 56px);
  /* At the top: transparent, so the hero's own green runs up behind it as one surface.
     Once scrolled (.scrolled, set by landing.js): a white bar. */
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(2, 44, 34, 0.08);
}

.nav-logo {
  display: block;
  height: 45px;
  width: auto;
  filter: brightness(0) invert(1);
  /* white on the green header */
  transition: filter 0.35s ease;
}

.nav.scrolled .nav-logo {
  filter: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 600 16px/1 "Roboto", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.2s, box-shadow 0.3s, border-color 0.2s;
}

.btn-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--green-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary svg {
  transition: transform 0.3s var(--ease);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-ghost {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--green);
  background: var(--mint-soft);
}

.nav .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn:focus-visible,
.scroll-hint:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px clamp(16px, 6vw, 96px) 80px;
}

.hero-copy {
  max-width: 720px;
  perspective: 800px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 14px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

h1 {
  font-size: clamp(44px, 7.5vw, 92px);
  font-weight: 700;
  line-height: 1.02;
  color: var(--fg);
}

h1 .line {
  display: block;
}

h1 .accent {
  background: linear-gradient(100deg, #ecfdf5 0%, #a7f3d0 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 500px;
  margin: 24px 0 36px;
  color: var(--fg-muted);
  font-size: clamp(16px, 1.6vw, 19px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cta-center {
  justify-content: center;
}

/* Download for Windows: dark, solid, sits beside the green launch button. */
.btn-download {
  color: #fff;
  background: #062f27;
  box-shadow: 0 10px 24px rgba(6, 47, 39, 0.25);
}

.btn-download:hover {
  background: #0b4337;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(6, 47, 39, 0.32);
}

.btn-download svg {
  transition: transform 0.3s var(--ease);
}

.btn-download:hover svg {
  transform: translateY(-1px) scale(1.08);
}

/* Both marks are cropped to their own outline (viewBox = the glyph's bounds), so one height
   makes them the same size; the width follows each logo's shape. */
.btn-download .os-logo {
  height: 18px;
  width: auto;
  flex: none;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
}

.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 0;
  background: var(--mint);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- Hero: "the AI at work" overlay on the 3D network ---------- */

/* Positioned in network units: --cx/--cy is the network centre and --u its scale (px),
   both set by landing.js, so the overlay stays glued to the canvas at any size. */
.ai-hud {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ai-hud>* {
  position: absolute;
  translate: -50% -50%;
}

.hud-status {
  left: var(--cx);
  top: calc(var(--cy) + var(--u) * 2.05);
  width: 300px;
  padding: 14px 16px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0;
  box-shadow: 0 18px 44px rgba(1, 30, 22, 0.4);
}

.hud-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hud-dot {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: hud-ping 1.4s infinite;
}

@keyframes hud-ping {
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hud-step {
  margin: 8px 0 12px;
  font-size: 15px;
  font-weight: 600;
  animation: hud-step-in 0.4s var(--ease);
}

@keyframes hud-step-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.hud-bar {
  height: 4px;
  overflow: hidden;
  background: #e3f3ec;
  border-radius: 0;
}

.hud-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--green));
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}

.hud-status.done .hud-dot {
  animation: none;
  background: var(--green);
}

.hud-out {
  left: calc(var(--cx) + var(--u) * 2.15);
  top: calc(var(--cy) - var(--u) * 1.45);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 8px;
  color: var(--ink);
  background: #fff;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 14px 32px rgba(1, 30, 22, 0.35);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.hud-out.show {
  opacity: 1;
  transform: none;
}

.hud-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-size: 14px;
}

/* Data heading into the network from the left (wide screens only — see @media). */
.hud-in {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: hud-drift 4.5s ease-in-out infinite;
}

.hud-in i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--c);
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
}

.in1 {
  left: calc(var(--cx) - var(--u) * 2.45);
  top: calc(var(--cy) - var(--u) * 1.35);
}

.in2 {
  left: calc(var(--cx) - var(--u) * 2.75);
  top: calc(var(--cy) + var(--u) * 0.05);
  animation-delay: -1.5s;
}

.in3 {
  left: calc(var(--cx) - var(--u) * 2.4);
  top: calc(var(--cy) + var(--u) * 1.4);
  animation-delay: -3s;
}

@keyframes hud-drift {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.85;
  }

  50% {
    transform: translateX(14px);
    opacity: 1;
  }
}

/* ---------- Features ---------- */

.features {
  padding: 100px clamp(16px, 6vw, 96px) 60px;
}

h2 {
  margin-bottom: 44px;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1000px;
}

.card {
  position: relative;
  color: var(--ink);
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 18px 40px rgba(6, 78, 59, 0.08);
}

/* Glare that follows the pointer (landing.js sets --gx / --gy). */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(16, 185, 129, 0.1), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 26px 50px rgba(6, 78, 59, 0.14);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  color: var(--green);
  background: var(--mint-soft);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 0;
  transform: translateZ(40px);
}

.card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  transform: translateZ(28px);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  transform: translateZ(18px);
}

/* ---------- Final CTA + footer ---------- */

.final {
  --fg: var(--ink);
  max-width: 1100px;
  margin: 60px auto 80px;
  padding: 72px 24px;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
  border-radius: 0;
  box-shadow: 0 30px 70px rgba(2, 44, 34, 0.3);
}

.final h2 {
  margin-bottom: 28px;
}

.foot {
  position: relative;
  z-index: 1;
  padding: 24px 16px 32px;
  color: var(--fg-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Scroll reveal (landing.js adds .in) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(40px) rotateX(-18deg);
  transform-origin: 50% 100%;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

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

/* Cards: once revealed, landing.js drives the transform for the tilt. */
.card.reveal.in {
  transition: opacity 0.9s var(--ease), transform 0.25s ease-out, border-color 0.3s, box-shadow 0.3s;
}

/* ---------- Nav links ---------- */

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav.scrolled .nav-links a {
  color: var(--muted);
}

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

/* "Open WorkHub": white on green, green on white. */
.nav .btn-ghost {
  color: var(--green-deep);
  background: #fff;
  border-color: transparent;
}

.nav.scrolled .btn-ghost {
  color: #fff;
  background: var(--green);
}

.nav.scrolled .btn-ghost:hover {
  background: var(--green-hover);
}

/* ---------- Shared section shell ---------- */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px clamp(16px, 6vw, 48px) 40px;
  scroll-margin-top: 40px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--fg-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.features {
  scroll-margin-top: 40px;
}

/* ---------- 1. How it works: spinning number cubes ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Dashed track behind the cubes, with a light running along it. */
.steps::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 16%;
  right: 16%;
  height: 2px;
  background:
    linear-gradient(90deg, transparent, #fff, transparent) 0 0 / 30% 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0 8px, transparent 8px 16px);
  animation: track 3s linear infinite;
}

@keyframes track {
  from {
    background-position: -30% 0, 0 0;
  }

  to {
    background-position: 130% 0, 0 0;
  }
}

.step {
  position: relative;
  text-align: center;
}

.step h3 {
  margin: 26px 0 8px;
  font-size: 22px;
}

.step p {
  max-width: 300px;
  margin: 0 auto;
  color: var(--fg-muted);
}

.cube {
  --s: 88px;
  position: relative;
  width: var(--s);
  height: var(--s);
  margin: 0 auto;
  transform-style: preserve-3d;
  animation: cube-spin 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.step:nth-child(2) .cube {
  animation-delay: -3s;
}

.step:nth-child(3) .cube {
  animation-delay: -6s;
}

.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--green-deep);
  background: linear-gradient(145deg, #ffffff, #d1fae5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0;
  font: 700 36px/1 "Roboto", sans-serif;
  box-shadow: inset 0 0 20px rgba(5, 150, 105, 0.15);
  backface-visibility: hidden;
}

.f1 {
  transform: translateZ(calc(var(--s) / 2));
}

.f2 {
  transform: rotateY(90deg) translateZ(calc(var(--s) / 2));
}

.f3 {
  transform: rotateY(180deg) translateZ(calc(var(--s) / 2));
}

.f4 {
  transform: rotateY(-90deg) translateZ(calc(var(--s) / 2));
}

.f5 {
  transform: rotateX(90deg) translateZ(calc(var(--s) / 2));
}

.f6 {
  transform: rotateX(-90deg) translateZ(calc(var(--s) / 2));
}

@keyframes cube-spin {

  0%,
  20% {
    transform: rotateX(-18deg) rotateY(-28deg);
  }

  50%,
  70% {
    transform: rotateX(-18deg) rotateY(152deg);
  }

  100% {
    transform: rotateX(-18deg) rotateY(332deg);
  }
}

/* ---------- 2. Live preview: tilted app window ---------- */

.preview-stage {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  perspective: 1400px;
}

/* landing.js eases --tilt from 22deg to 0 as the window scrolls into the middle. */
.window {
  --tilt: 22deg;
  overflow: hidden;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 40px 90px rgba(6, 78, 59, 0.2);
  transform: rotateX(var(--tilt)) scale(calc(1 - var(--tilt) / 300deg));
  transform-origin: 50% 0%;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #062e25;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.r {
  background: #f87171;
}

.dot.y {
  background: #fbbf24;
}

.dot.g {
  background: #34d399;
}

.window-title {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
}

.window-body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 380px;
}

.mini-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px;
  background: #053a2e;
}

.mini-btn {
  height: 28px;
  margin-bottom: 8px;
  border-radius: 0;
  background: var(--green);
}

.mini-row {
  height: 10px;
  border-radius: 0;
  background: rgba(167, 243, 208, 0.18);
}

.mini-row.active {
  background: rgba(167, 243, 208, 0.45);
}

.mini-row.short {
  width: 60%;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  color: #10231d;
  font-size: 14.5px;
}

.chat>* {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.chat>.show {
  opacity: 1;
  transform: none;
}

.bubble {
  max-width: 86%;
  padding: 12px 15px;
  border-radius: 0;
  line-height: 1.55;
}

.bubble.user {
  align-self: flex-end;
  color: #fff;
  background: var(--green);
  border-bottom-right-radius: 4px;
}

.typed::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: currentColor;
  animation: caret 0.8s steps(1) infinite;
}

.typed.done::after {
  display: none;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.bubble.ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e3ece8;
  border-bottom-left-radius: 4px;
}

.tool {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 9px;
  padding: 7px 12px;
  color: #3d5a50;
  background: #eef6f2;
  border: 1px solid #dcebe4;
  border-radius: 0;
  font-size: 13px;
}

.tool-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.spin {
  width: 12px;
  height: 12px;
  border: 2px solid #b7d9cb;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tool.ok .spin {
  width: auto;
  height: auto;
  border: 0;
  animation: none;
}

.tool.ok .spin::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.approve {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0;
  font-weight: 500;
}

.approve-actions {
  display: flex;
  gap: 8px;
}

.approve b {
  padding: 6px 14px;
  border-radius: 0;
  font-size: 13px;
}

.approve .yes {
  color: #fff;
  background: var(--green);
}

.approve .no {
  color: #3d5a50;
  background: #fff;
  border: 1px solid #e3ece8;
}

.float-chip {
  position: absolute;
  padding: 10px 16px;
  color: var(--ink);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 0;
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 18px 36px rgba(6, 78, 59, 0.14);
  animation: bob 5s ease-in-out infinite;
}

.float-chip.c1 {
  top: 18%;
  left: -60px;
}

.float-chip.c2 {
  right: -50px;
  bottom: -22px;
  animation-delay: -2.5s;
}

@keyframes bob {
  50% {
    transform: translateY(-14px) rotate(-1.5deg);
  }
}

/* ---------- 3. Connectors: an orbit around the WorkHub core ---------- */

/* Both dashed rings turn together (same speed and direction), so the chips never drift into
   each other: radii and the outer ring's 39deg offset were chosen to keep every pair of chips
   apart at any angle. Each chip counter-turns so its label stays upright. It never pauses.
   Phones get the same chips as a plain grid instead. */
.connectors {
  overflow-x: clip;
  --r1: 170px;
  /* inner ring radius */
  --r2: 340px;
  /* outer ring radius */
}

.orbit {
  position: relative;
  width: calc(var(--r2) * 2 + 180px);
  max-width: 100%;
  height: calc(var(--r2) * 2 + 80px);
  margin: 0 auto;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  padding: 0;
  list-style: none;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: orbit-spin var(--dur) linear infinite;
}

.orbit-ring {
  --dur: 80s;
}

.orbit-ring.inner {
  --r: var(--r1);
}

.orbit-ring.outer {
  --r: var(--r2);
  border-color: rgba(255, 255, 255, 0.16);
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(var(--a) * -1));
}

/* Undo the ring's turn so the chip stays level. */
.chip-spin {
  display: block;
  translate: -50% -50%;
  animation: orbit-spin var(--dur) linear infinite reverse;
}

@keyframes orbit-spin {
  to {
    rotate: 360deg;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 7px;
  color: var(--ink);
  background: #fff;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(1, 30, 22, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.chip i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--c);
  border-radius: 50%;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.orbit .chip:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(167, 243, 208, 0.6), 0 14px 32px rgba(1, 30, 22, 0.4);
}

/* The hub: the app mark with a soft glow and pulses rippling out to the rings. */
.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 170px;
  margin: -85px 0 0 -85px;
  color: var(--ink);
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #ecfdf5 70%, #d1fae5 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.08), 0 0 60px rgba(167, 243, 208, 0.45);
}

.orbit-core::before,
.orbit-core::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(167, 243, 208, 0.5);
  border-radius: 50%;
  animation: core-pulse 3.2s ease-out infinite;
}

.orbit-core::after {
  animation-delay: 1.6s;
}

@keyframes core-pulse {
  from {
    opacity: 0.9;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(2.1);
  }
}

.orbit-core img {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
}

.orbit-core strong {
  font-size: 34px;
  line-height: 1;
}

.orbit-core small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Phone layout: the same chips, wrapped. */
.connector-grid {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* ---------- 4. Control: flip cards + models ---------- */

.flips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.flip {
  height: 230px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  perspective: 1000px;
}

.flip-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}

.flip:hover .flip-inner,
.flip.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 0;
  backface-visibility: hidden;
}

.flip-front {
  background: #fff;
  box-shadow: 0 18px 40px rgba(6, 78, 59, 0.08);
}

.flip-front strong,
.flip-back strong {
  font: 700 22px "Roboto", sans-serif;
}

.flip-front em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.mode-badge {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: var(--mint-soft);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 0;
  font-size: 28px;
}

.flip-back {
  color: #ecfdf5;
  background: linear-gradient(160deg, var(--green), #064e3b);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  transform: rotateY(180deg);
}

.flip.featured .flip-front {
  border-color: var(--green);
  box-shadow: 0 18px 44px rgba(5, 150, 105, 0.18);
}

.models {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.models-label {
  margin-right: 6px;
  color: var(--fg-muted);
  font-size: 14px;
}

.model {
  color: var(--ink);
  padding: 9px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  font-weight: 600;
  font-size: 15px;
}

.model small {
  margin-left: 4px;
  color: var(--green);
  font-size: 11px;
  text-transform: uppercase;
}

/* ---------- 5. FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}

.faq details {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s;
}

.faq details[open] {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.08);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 22px;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  color: var(--green);
  background: var(--mint-soft);
  border-radius: 50%;
  font-size: 18px;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
}

/* On the green hero the main call to action is white, so it stands out from the page. */
.hero .btn-primary {
  color: var(--green-deep);
  background: #fff;
  box-shadow: 0 12px 30px rgba(2, 44, 34, 0.3);
}

.hero .btn-primary:hover {
  background: #ecfdf5;
  box-shadow: 0 16px 36px rgba(2, 44, 34, 0.35);
}

.hero .btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

/* ---------- Alternating bands: green page, white .band sections ---------- */

/* The page itself is green (the 3D globe, stars and grid show through there). A .band is a
   white section: its full-bleed ::before covers the scene, and text switches to dark. */
.band {
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --fg-accent: var(--green);
  position: relative;
  isolation: isolate;
  padding-bottom: 110px;
  color: var(--fg);
}

.band::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  margin-left: -50vw;
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(16, 185, 129, 0.1), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
}

.band .card {
  border-color: var(--line);
  box-shadow: 0 18px 40px rgba(6, 78, 59, 0.08);
}

.band .flip-back {
  color: #ecfdf5;
}

/* ==========================================================================
   Responsive (keep every @media query below this line)
   ========================================================================== */

@media (min-width: 1500px) {
  .hud-in {
    display: flex;
  }
}

/* Below desktop the hero copy is too wide for the overlay — the network alone tells the story. */
@media (max-width: 1099px) {
  .ai-hud {
    display: none;
  }
}

@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }

  .float-chip.c1 {
    left: -10px;
  }

  .float-chip.c2 {
    right: -10px;
  }
}

@media (max-width: 860px) {

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

  .steps {
    gap: 48px;
  }

  .steps::before {
    display: none;
  }

  .flip {
    height: 190px;
  }

  /* Shrink the whole orbit so its overlap-free layout is kept as is. */
  .orbit {
    zoom: 0.75;
  }
}

@media (max-width: 760px) {

  .hero {
    align-items: flex-end;
    padding-bottom: 96px;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .floor {
    height: 30vh;
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .cta-row .btn {
    width: 100%;
  }

  .nav .btn {
    padding: 0 14px;
  }

  .section {
    padding-top: 80px;
  }

  .window-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mini-side {
    display: none;
  }

  .chat {
    padding: 16px;
    font-size: 13.5px;
  }

  .bubble {
    max-width: 100%;
  }

  .float-chip {
    display: none;
  }

  .orbit {
    display: none;
  }

  .connector-grid {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .floor-grid,
  .hud-dot,
  .hud-in,
  .pulse,
  .scroll-hint span,
  .steps::before,
  .cube,
  .float-chip,
  .orbit-ring,
  .chip-spin,
  .orbit-core::before,
  .orbit-core::after {
    animation: none;
  }

  .window {
    --tilt: 0deg;
  }

  .chat>* {
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* On the dark hero the solid dark button sank into the background: outline it in white. */
.hero .btn-download {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.hero .btn-download:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  box-shadow: none;
}
