/* ══ itsqub.com — design system ══
   Monochrome, Apple-like: white / near-black, hairline grays, generous space,
   SF type. No color accents — emphasis comes from weight, size, and ink. The
   character (white cube + ink face) is the only "figure" on the page.
   Theme-aware (light default, dark via prefers-color-scheme). */

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --paper-2: #f5f5f7;      /* Apple's signature light gray band */
  --card: #ffffff;
  --ink: #1d1d1f;          /* Apple near-black */
  --ink-2: #6e6e73;        /* secondary gray */
  --ink-3: #86868b;        /* tertiary gray */
  --line: #e3e3e6;
  --line-2: #d2d2d7;
  --accent: #1d1d1f;       /* "accent" = ink; buttons/emphasis are black */
  --accent-2: #424245;
  --accent-ink: #ffffff;   /* text on a black button */
  --good: #1d1d1f;         /* checks/indicators stay monochrome */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px -14px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 40px 80px -34px rgba(0, 0, 0, 0.3);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --maxw: 1120px;
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* the character's own colors (read by avatar3d.mjs) — brand white cube +
     toon ink in BOTH themes, deliberately not theme-following */
  --face-bg: #ffffff;
  --face-outline: #121316;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --paper-2: #101012;
    --card: #1a1a1c;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: #262629;
    --line-2: #38383a;
    --accent: #f5f5f7;       /* on dark, "accent" = white; buttons invert */
    --accent-2: #d2d2d7;
    --accent-ink: #1d1d1f;
    --good: #f5f5f7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 34px -16px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 50px 90px -32px rgba(0, 0, 0, 0.9);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
a {
  color: inherit;
  text-decoration: none;
}
.lu {
  display: block;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── type ─────────────────────────────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.lede {
  font-size: 20px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 640;
  font-size: 15.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px -8px var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 14px 30px -10px var(--accent);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  background: var(--card);
  border-color: var(--ink-3);
}
.btn .lu {
  width: 18px;
  height: 18px;
}
.btn-lg {
  padding: 16px 28px;
  font-size: 17px;
}

/* ── nav ──────────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
header.nav.scrolled {
  border-color: var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 720;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a.link {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 550;
  transition: color 0.15s ease;
}
.nav-links a.link:hover {
  color: var(--ink);
}
@media (max-width: 720px) {
  .nav-links .link {
    display: none;
  }
}

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 40px 0 20px;
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 26px;
}
.hero .pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 78px);
  max-width: 15ch;
  margin: 0 auto 22px;
}
.hero h1 .hl {
  background: linear-gradient(180deg, var(--ink) 35%, var(--ink-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  max-width: 56ch;
  margin: 0 auto 30px;
}
.hero .cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .subnote {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ── the cube stage: the EXACT app character (avatar3d WebGL + buddy.js) ───── */
.qub-stage {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 4px auto 6px;
  display: grid;
  place-items: center;
}
.qub-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ink) 9%, transparent), transparent 72%);
  filter: blur(34px);
  opacity: 0.7;
  animation: glowpulse 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowpulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(1);
  }
  50% {
    opacity: 0.66;
    transform: scale(1.07);
  }
}
/* buddy.js DOM contract (verbatim from the app): a 132px logical box; avatar3d
   prepends its oversized 340px WebGL canvas centered on it. */
#self-cube {
  position: relative;
  width: 132px;
  height: 132px;
}
#self-cube .sc-cube {
  position: absolute;
  inset: 0;
  cursor: grab;
}
#self-cube .sc-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.sc-face svg {
  display: block;
  width: 100%;
  height: 100%;
}
.vs-hand {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 40px;
  pointer-events: none;
  opacity: 0;
  transform-origin: 15px 20px;
  transform: translate(var(--hx, 51px), var(--hy, 120px)) rotate(var(--hr, 0deg)) scale(var(--hs, 0));
  transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.4, 1);
}
.qub-ground {
  position: absolute;
  bottom: 58px;
  left: 50%;
  width: 150px;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(20, 20, 15, 0.2), transparent 75%);
  filter: blur(5px);
  pointer-events: none;
  animation: shadowbob 4.4s ease-in-out infinite;
}
@keyframes shadowbob {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-50%) scale(0.85);
    opacity: 0.32;
  }
}

/* ── section scaffolding ──────────────────────────────────────────────────── */
section.band {
  padding: 92px 0;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 54px;
}
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin: 14px 0 16px;
}
.section-head p {
  font-size: 18.5px;
  color: var(--ink-2);
  margin: 0;
}

/* ── feature grid ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 18px;
}
.grid.c3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.c2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) {
  .grid.c3,
  .grid.c2 {
    grid-template-columns: 1fr;
  }
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.feature .ic {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent);
  margin-bottom: 18px;
}
.feature .ic .lu {
  width: 23px;
  height: 23px;
}
.feature h3 {
  font-size: 20px;
  margin-bottom: 9px;
  letter-spacing: -0.02em;
}
.feature p {
  color: var(--ink-2);
  font-size: 15.5px;
  margin: 0;
  line-height: 1.55;
}

/* big split feature rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
}
.split.rev .visual {
  order: 2;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .split.rev .visual {
    order: 0;
  }
}
.split h3 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 14px;
}
.split p {
  color: var(--ink-2);
  font-size: 17px;
}
.visual {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--paper-2), var(--card));
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

/* ── mock desktop chrome (used in split visuals) ──────────────────────────── */
.mock {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock .bar {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mock .tl {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line-2);
}
.mock .body {
  flex: 1;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
}
.mock .ln {
  height: 9px;
  border-radius: 5px;
  background: var(--line);
}
.mock .ln.s {
  width: 55%;
}
.mock .ln.m {
  width: 78%;
}
.mock .ln.accent {
  background: color-mix(in srgb, var(--accent) 40%, var(--line));
  width: 40%;
}
.mock .bubble {
  align-self: flex-end;
  max-width: 70%;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  font-size: 13px;
}
.mock .bubble.them {
  align-self: flex-start;
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 14px 14px 14px 4px;
}
.mini-cube {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(160deg, #fff, #ecebe3);
  border: 1px solid rgba(20, 20, 20, 0.1);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}
.mini-cube::before,
.mini-cube::after {
  content: "";
  width: 5px;
  height: 12px;
  border-radius: 3px;
  background: #141414;
}
.mini-cube::after {
  margin-left: 8px;
}

/* ── pricing ──────────────────────────────────────────────────────────────── */
.prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 940px) {
  .prices {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}
.price {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.price.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
  transform: scale(1.02);
}
@media (max-width: 940px) {
  .price.featured {
    transform: none;
  }
}
.price .tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.price .pname {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
}
.price .amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 8px 0 4px;
}
.price .amount .n {
  font-family: var(--display);
  font-size: 46px;
  font-weight: 760;
  letter-spacing: -0.03em;
}
.price .amount .per {
  color: var(--ink-3);
  font-size: 15px;
}
.price .blurb {
  color: var(--ink-2);
  font-size: 14.5px;
  min-height: 44px;
  margin-bottom: 18px;
}
.price ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.price li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--ink);
}
.price li .lu {
  width: 18px;
  height: 18px;
  color: var(--good);
  flex: none;
  margin-top: 2px;
}
.price li.muted {
  color: var(--ink-3);
}
.price li.muted .lu {
  color: var(--ink-3);
}
.price .btn {
  width: 100%;
  justify-content: center;
}

/* ── testimonials / social proof ──────────────────────────────────────────── */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .quotes {
    grid-template-columns: 1fr;
  }
}
.quote {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.quote p {
  font-size: 15.5px;
  margin: 0 0 16px;
  line-height: 1.55;
}
.quote .who {
  display: flex;
  align-items: center;
  gap: 11px;
}
.quote .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.quote .who b {
  font-size: 14px;
}
.quote .who span {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
.proofbar {
  display: flex;
  justify-content: center;
  gap: 44px;
  flex-wrap: wrap;
  margin-bottom: 50px;
  color: var(--ink-3);
  font-size: 14px;
}
.proofbar b {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 620;
  font-size: 17.5px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 16px;
}

/* ── CTA band ─────────────────────────────────────────────────────────────── */
.finale {
  text-align: center;
  background: #000;
  color: #fff;
  border-radius: 32px;
  padding: 72px 32px;
  position: relative;
  overflow: hidden;
}
.finale .btn-primary {
  background: #fff;
  color: #111;
  box-shadow: none;
}
.finale .btn-primary:hover {
  background: #e9e9ec;
}
.finale h2 {
  color: #fff;
  font-size: clamp(30px, 5vw, 52px);
  margin-bottom: 18px;
}
.finale p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 19px;
  max-width: 48ch;
  margin: 0 auto 30px;
}
.finale .glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent 70%);
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(40px);
  opacity: 0.5;
}

/* ── footer ───────────────────────────────────────────────────────────────── */
footer.foot {
  padding: 60px 0 44px;
  border-top: 1px solid var(--line);
  margin-top: 90px;
}
.foot-in {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.foot-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.foot-col a {
  display: block;
  color: var(--ink-2);
  font-size: 14.5px;
  padding: 5px 0;
  transition: color 0.15s ease;
}
.foot-col a:hover {
  color: var(--ink);
}
.foot-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* ── scroll reveal ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ── auth + dashboard shared ──────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: 26px;
  margin-bottom: 6px;
}
.auth-card .sub {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 24px;
}
label.fld {
  display: block;
  margin-bottom: 14px;
}
label.fld span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
input.inp {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  font-size: 15.5px;
  font-family: var(--font);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input.inp:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.msg {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  display: none;
}
.msg.err {
  display: block;
  background: color-mix(in srgb, #e5484d 14%, transparent);
  color: #c9333a;
}
.msg.ok {
  display: block;
  background: color-mix(in srgb, var(--good) 16%, transparent);
  color: var(--good);
}
.auth-alt {
  text-align: center;
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.auth-alt a {
  color: var(--accent);
  font-weight: 600;
}
