/* ============================================================
   Orbitask — Intelligence Designed To Evolve
   Single-viewport, full-bleed video-background landing page
   ============================================================ */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Background video ---------- */
.bg {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Page shell ---------- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
}

/* ============================================================
   1) Header
   ============================================================ */
.site-header {
  flex-shrink: 0;
  width: 100%;
  z-index: 1;
  animation: slideDown 0.7s var(--ease-out) both;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
}

.logo {
  flex-shrink: 0;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease-out);
}

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.logo:hover {
  transform: scale(1.04);
}

/* Nav pill (white) */
.nav-pill {
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 18px);
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  padding: 4px 2px 8px;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.active {
  opacity: 1;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

/* Sign in */
.sign-in {
  flex-shrink: 0;
  height: clamp(44px, 5.2vw, 48px);
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(16px, 2vw, 22px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  font-size: clamp(13px, 1.4vw, 14.5px);
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sign-in:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

/* Burger (mobile only) */
.burger {
  display: none;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--pill-dark);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

/* ============================================================
   2) Hero
   ============================================================ */
.hero {
  flex: 1;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Trust row */
.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.avatar {
  position: relative;
  width: var(--trust-size);
  height: var(--trust-size);
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  padding: 5px;
  transition: transform 0.35s var(--ease-out);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: #111;
  font-size: calc(var(--trust-size) * 0.34);
}

.a1 { z-index: 1; }
.a2 { z-index: 2; margin-left: calc(var(--trust-size) * -0.42); }
.a3 { z-index: 4; margin-left: calc(var(--trust-size) * -0.42); }

.a1:hover { transform: translateY(-2px); }
.a2:hover { transform: translateY(-4px); }
.a3:hover { transform: translateY(-2px); }

/* Trust pill */
.trust-pill {
  height: var(--trust-size);
  display: inline-flex;
  align-items: center;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  margin-left: calc(var(--trust-size) * -0.42);
  padding-left: calc(var(--trust-size) * 0.58);
  padding-right: clamp(14px, 2vw, 22px);
  font-size: clamp(12px, 1.4vw, 13.5px);
  font-weight: 500;
  color: var(--trust-text);
  white-space: nowrap;
  z-index: 3;
}

/* Headline */
.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 6.2vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

.headline.anim {
  opacity: 1;
  animation: none;
}

.headline span {
  display: block;
  opacity: 0;
  animation: headlineFade 0.85s var(--ease-out) forwards;
}

.headline .line1 { animation-delay: 0.12s; }
.headline .line2 { animation-delay: 0.3s; }

/* Subhead */
.subhead {
  max-width: min(500px, 92%);
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  color: #d0d0d0;
  opacity: 0.8;
  line-height: 1.55;
  font-weight: 400;
  margin-top: clamp(14px, 2vh, 20px);
}

/* CTA */
.cta-row {
  margin-top: clamp(18px, 2.6vh, 26px);
}

.cta {
  display: inline-block;
  background: #fff;
  color: #000;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  letter-spacing: -0.01em;
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 22px rgba(255, 255, 255, 0.32), 0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.2);
}

/* Product pill (CostSense) */
.product-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(18px, 2.6vh, 26px);
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  padding: 9px 18px 9px 14px;
  color: var(--trust-text);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.product-pill:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: #323234;
  transform: translateY(-1px);
}

.product-glyph {
  font-family: var(--font-display);
  font-size: 17px;
  color: #fff;
  line-height: 1;
}

.product-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.product-desc {
  font-size: 12px;
  font-weight: 500;
  color: var(--trust-text);
  white-space: nowrap;
}

.product-arrow {
  font-size: 11px;
  color: var(--trust-text);
  transition: transform 0.25s ease, color 0.25s ease;
}

.product-pill:hover .product-arrow {
  transform: translateX(3px);
  color: #fff;
}

/* ============================================================
   3) Stats footer
   ============================================================ */
.stats {
  flex-shrink: 0;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 40px);
  margin-top: clamp(22px, 3.4vh, 36px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.stat-icon {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1;
  color: var(--text);
  margin-bottom: 2px;
}

.stat-value-row {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.stat-value,
.stat-suffix {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}

.stat-label {
  font-size: clamp(11px, 1.2vw, 12.5px);
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================================
   Shared entrance animation
   ============================================================ */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
  will-change: opacity, transform, filter;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headlineFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    filter: blur(0);
  }
  75% {
    transform: scale(0.99);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.cta-row .cta.anim {
  animation-name: revealPulse;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translate(-50%, -14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes linkIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Mobile menu
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5;
  animation: overlayIn 0.28s ease both;
}

.mobile-menu {
  position: fixed;
  top: clamp(68px, 10vh, 90px);
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 32px));
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 6;
  animation: menuIn 0.38s var(--ease-out) both;
}

.mobile-links {
  display: flex;
  flex-direction: column;
}

.mobile-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nav-text);
  padding: 13px 8px;
  opacity: 0;
  animation: linkIn 0.4s var(--ease-out) forwards;
  text-align: center;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }

.mobile-link.active {
  font-weight: 600;
}

.mobile-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.mobile-signin {
  display: block;
  text-align: center;
  margin-top: 14px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 13px 0;
  border-radius: 999px;
  opacity: 0;
  animation: linkIn 0.4s var(--ease-out) 0.25s forwards;
}

.mobile-signin:hover {
  background: #323234;
  color: #fff;
}

/* ============================================================
   Mobile (≤720px)
   ============================================================ */
@media (max-width: 720px) {
  .nav-pill,
  .sign-in {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .burger {
    display: flex;
  }

  /* Open state */
  body.menu-open .burger {
    background: #fff;
  }

  body.menu-open .burger span {
    background: #000;
  }

  body.menu-open .burger span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  body.menu-open .burger span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .burger span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* Stats: 2×2 */
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 16px;
  }

  /* Headline tweaks */
  .headline {
    letter-spacing: -0.08em;
    line-height: 1.05;
  }

  .product-desc {
    display: none;
  }
}

/* ≤420px */
@media (max-width: 420px) {
  .trust {
    --trust-size: 34px;
  }

  .trust-pill {
    font-size: 12px;
  }

  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
  }
}

/* Short viewports (≤700px height) — tighten hero spacing */
@media (max-height: 700px) {
  .page {
    padding-top: clamp(12px, 1.6vh, 18px);
    padding-bottom: clamp(12px, 1.6vh, 18px);
  }

  .trust {
    margin-bottom: clamp(10px, 1.6vh, 16px);
  }

  .subhead {
    margin-top: 10px;
  }

  .cta-row {
    margin-top: 12px;
  }

  .product-pill {
    margin-top: 12px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .stats {
    margin-top: clamp(12px, 2vh, 20px);
    gap: 12px 16px;
  }

  .stat-icon {
    font-size: clamp(18px, 2.4vw, 26px);
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .anim,
  .headline span,
  .site-header,
  .menu-overlay,
  .mobile-menu,
  .mobile-link,
  .mobile-signin {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
