/* BG Zen — site styles. Colours match the app's Figma tokens. */

:root {
  --ink: #0b1639;
  --text: #0b1639;
  --slate: #61708f;
  --muted: #95a0b6;
  --blue: #166af0;
  --brand-blue: #2583ff;
  --purple: #6445e7;
  --bg: #ffffff;
  --bg-soft: #f7f9fd;
  --surface: #ffffff;
  --border: #e7ebf2;
  --checker: #e8ebf0;
  --chip: #eef4ff;
  --gradient: linear-gradient(135deg, #1878fb 0%, #794fe8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(24, 120, 251, 0.1) 0%, rgba(121, 79, 232, 0.1) 100%);
  --shadow: 0 24px 60px -24px rgba(23, 53, 120, 0.28);
  --shadow-sm: 0 8px 24px -12px rgba(23, 53, 120, 0.22);
  --radius: 24px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #eef2ff;
    --slate: #a3aec7;
    --muted: #6f7a94;
    --bg: #070b18;
    --bg-soft: #0c1226;
    --surface: #111a33;
    --border: #1f2a47;
    --checker: #1a2440;
    --chip: #17213d;
    --gradient-soft: linear-gradient(135deg, rgba(24, 120, 251, 0.18) 0%, rgba(121, 79, 232, 0.18) 100%);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 31px;
}

/* "bg zen" wordmark: bold "bg", lighter "zen" (text-only until the logo mark lands). */
.brand .wm-light {
  font-weight: 500;
  margin-left: -4px;
}

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

.nav-links a {
  color: var(--slate);
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

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

@media (max-width: 760px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 12px 28px -10px rgba(37, 131, 255, 0.55);
}

.nav .btn-primary {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn small {
  font-weight: 500;
  opacity: 0.85;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 120%;
  background:
    radial-gradient(40% 50% at 78% 30%, rgba(121, 79, 232, 0.16), transparent 70%),
    radial-gradient(40% 50% at 18% 20%, rgba(24, 120, 251, 0.14), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.hero p.lead {
  margin: 0 0 32px;
  max-width: 520px;
  font-size: 19px;
  color: var(--slate);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    padding: 40px 0 64px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ---------- Before / after ---------- */

.compare {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  user-select: none;
  touch-action: pan-y;
  --pos: 52%;
}

@media (max-width: 900px) {
  .compare {
    margin: 0 auto;
  }
}

.compare .layer {
  position: absolute;
  inset: 0;
}

.compare img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checker {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, var(--checker) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .checker {
    background-color: #0f1730;
  }
}

.compare .before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare .divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.compare .handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 22, 57, 0.25);
  display: grid;
  place-items: center;
  color: var(--brand-blue);
  pointer-events: none;
}

.compare .tag {
  position: absolute;
  bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(11, 22, 57, 0.72);
  pointer-events: none;
}

.compare .tag.left {
  left: 16px;
}

.compare .tag.right {
  right: 16px;
}

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.compare input[type="range"]:focus-visible + .handle {
  outline: 3px solid var(--brand-blue);
  outline-offset: 3px;
}

/* ---------- Sections ---------- */

section {
  padding: 96px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-head p {
  margin: 0;
  font-size: 18px;
  color: var(--slate);
}

@media (max-width: 760px) {
  section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }
}

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

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gradient-soft);
  color: var(--brand-blue);
  margin-bottom: 18px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--slate);
  font-size: 15px;
}

.swatches {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.swatches span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
}

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

.step p {
  margin: 0;
  color: var(--slate);
  font-size: 15px;
}

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

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: 20px;
}

.member {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 12px 28px -12px rgba(100, 69, 231, 0.6);
}

.member h3 {
  margin: 0;
  font-size: 20px;
}

.member .role {
  margin: 4px 0 20px;
  color: var(--slate);
  font-size: 15px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--chip);
}

.links a:hover {
  text-decoration: none;
  color: var(--blue);
}

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

/* ---------- CTA band ---------- */

.cta {
  padding: 0 0 96px;
}

.cta-card {
  position: relative;
  overflow: hidden;
  padding: 56px 40px;
  border-radius: 32px;
  text-align: center;
  color: #fff;
  background: var(--gradient);
}

.cta-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.cta-card h2 {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.cta-card p {
  position: relative;
  margin: 0 0 28px;
  font-size: 17px;
  opacity: 0.9;
}

.cta-card .btn {
  position: relative;
  color: var(--ink);
  background: #fff;
}

/* ---------- Footer ---------- */

footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--slate);
}

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

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

footer nav a {
  color: var(--slate);
}

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc {
  padding: 56px 0 96px;
}

.doc .container {
  max-width: 760px;
}

.doc h1 {
  margin: 10px 0 6px;
  font-size: clamp(34px, 5vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.doc .updated {
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 15px;
}

.doc h2 {
  margin: 44px 0 12px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.doc p,
.doc li {
  color: var(--slate);
  font-size: 16px;
}

.doc strong {
  color: var(--text);
}

.doc ul {
  padding-left: 20px;
}

.doc li {
  margin: 6px 0;
}

.callout {
  margin: 0 0 32px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
}

.callout p {
  margin: 0;
  color: var(--text);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 40px;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-card .label {
  font-size: 14px;
  color: var(--muted);
}

.contact-card .email {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

summary::after {
  content: "+";
  color: var(--blue);
  font-weight: 600;
}

details[open] summary::after {
  content: "–";
}

details p {
  margin: 10px 0 0;
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 20px;
}

.notfound h1 {
  font-size: 72px;
  margin: 0;
  letter-spacing: -0.04em;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ======================================================================
   Studio (Pixaivo Labs) pages
   ====================================================================== */

.studio-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  text-align: center;
}

.studio-hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 110%;
  background:
    radial-gradient(40% 50% at 82% 25%, rgba(121, 79, 232, 0.16), transparent 70%),
    radial-gradient(40% 50% at 15% 20%, rgba(24, 120, 251, 0.15), transparent 70%);
  pointer-events: none;
}

.studio-hero .container {
  position: relative;
}

.studio-hero h1 {
  margin: 16px auto 18px;
  max-width: 820px;
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.studio-hero p.lead {
  margin: 0 auto 32px;
  max-width: 600px;
  font-size: 19px;
  color: var(--slate);
}

.studio-hero .hero-actions {
  justify-content: center;
}

.tile-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 56px;
}

.tile {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
}

.tile:nth-child(1) {
  transform: rotate(-8deg) translateY(6px);
}

.tile:nth-child(3) {
  transform: rotate(8deg) translateY(6px);
}

.tile img {
  width: 44px;
  height: 48px;
}

.tile.ghost {
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
  font-size: 30px;
  font-weight: 300;
}

/* Featured app */

.featured {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 16px;
}

.app-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-icon img {
  width: 34px;
  height: 38px;
}

.app-icon.gradient {
  border: 0;
  color: #fff;
  background: var(--gradient);
}

.featured h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.featured .meta {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.featured p.about {
  margin: 0 0 24px;
  max-width: 480px;
  font-size: 17px;
  color: var(--slate);
}

.featured .compare {
  max-width: 340px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px 22px;
  }
}

/* All apps grid */

.apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.app-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.app-card .app-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.app-card .app-icon img {
  width: 30px;
  height: 34px;
}

.app-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.app-card p {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--slate);
}

.app-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blue);
  background: var(--chip);
}

.badge.soon {
  color: var(--slate);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.app-card.placeholder {
  border-style: dashed;
  background: transparent;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.app-card .arrow {
  color: var(--blue);
}

@media (max-width: 900px) {
  .apps {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .studio-hero {
    padding: 56px 0 56px;
  }

  .tile {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }
}

/* Values strip */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.value h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.value p {
  margin: 0;
  font-size: 15px;
  color: var(--slate);
}

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

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.breadcrumb a {
  color: var(--slate);
}
