/* ==========================================================================
   Open Apex Drama — landing page
   ========================================================================== */

:root {
  --bg: #0b0c13;
  --bg-deep: #080810;
  --panel: #1a1a26;
  --text: #f5f3fb;
  --muted: #9d99b5;
  --muted-dim: #7d7897;
  --purple: #8b5cf6;
  --purple-bright: #a855f7;
  --purple-soft: #c4b5fd;
  --purple-deep: #6d28d9;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  /* 整页版心：全宽，两侧留白随窗口增长（下限 64px 保持 1440 设计稿观感） */
  --container: 100%;
  --gutter: clamp(64px, 4.5vw, 112px);
  --radius-lg: 24px;
  --font: "Inter", "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.text-grad {
  background: linear-gradient(100deg, #c9b8ff 0%, #8b5cf6 48%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-grad-soft {
  background: linear-gradient(100deg, #ffffff 10%, #d6c8ff 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  padding: 26px 0;
  transition: padding 0.35s var(--ease), background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 12px 0;
  background: rgba(9, 9, 18, 0.72);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(139, 92, 246, 0.45));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.main-nav {
  position: absolute;
  left: calc(50% + 22px);
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 46px;
}

.nav-link {
  position: relative;
  padding: 6px 2px;
  font-size: 17px;
  color: #cfcbe0;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a855f7, #7c3aed);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

.nav-link.is-active::after,
.nav-link:hover::after {
  width: 26px;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: #e9e6f5;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.gh-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.gh-pill .arrow {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 26px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 62px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn .icon {
  width: 19px;
  height: 19px;
}

.btn .arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn--primary {
  background: linear-gradient(100deg, #8b5cf6 0%, #a855f7 55%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: #f1eefb;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 168px 0 24px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  z-index: -3;
  top: 0;
  left: 50%;
  width: 1920px;
  height: 800px;
  transform: translateX(-50%);
  background: url("../images/hero-backdrop.jpg") center top / cover no-repeat;
  opacity: 0.82;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 96%);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, #0b0c13 0%, #0b0c13 24%, rgba(11, 12, 19, 0.92) 36%, rgba(11, 12, 19, 0.5) 58%, rgba(11, 12, 19, 0.1) 100%),
    linear-gradient(180deg, rgba(11, 12, 19, 0.5) 0%, rgba(11, 12, 19, 0.18) 42%, var(--bg) 94%);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 40px;
  right: -8%;
  width: 820px;
  height: 720px;
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.42), rgba(76, 29, 149, 0.12) 45%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  z-index: -1;
  left: -12%;
  right: -12%;
  bottom: -120px;
  height: 300px;
  background: radial-gradient(ellipse at 58% 100%, rgba(139, 92, 246, 0.22), transparent 60%);
  pointer-events: none;
}

.hero-wave::before {
  content: "";
  position: absolute;
  inset: 40% -10% -55%;
  border-radius: 50%;
  border-top: 1px solid rgba(196, 181, 253, 0.4);
  transform: rotate(-3deg);
  filter: blur(0.5px);
}

.hero-devices::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%;
  right: -12%;
  bottom: -30px;
  height: 220px;
  background: radial-gradient(ellipse at 55% 55%, rgba(124, 58, 237, 0.42), transparent 66%);
  filter: blur(34px);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  align-items: center;
  gap: 12px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-left: 4px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: 54px;
  font-weight: 900;
  line-height: 1.46;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-line--brand {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 4px;
}

.underlined {
  position: relative;
  display: inline-block;
}

.underlined::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -10px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 22'%3E%3Cpath d='M5 15c42 8 104 8 190-3' fill='none' stroke='%238b5cf6' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.hero-lead {
  margin-top: 32px;
  font-size: 19.5px;
  line-height: 1.9;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 44px;
}

.hero-cta .btn--primary {
  min-width: 190px;
}

.hero-cta .btn--ghost {
  min-width: 168px;
}

.tech-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 46px 0 0;
  padding: 0;
  list-style: none;
  color: #cfcbe0;
  font-size: 17px;
  font-weight: 500;
}

.tech-strip li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.28));
}

.tech-strip .tech-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.16);
}

/* Hero device composition */
/* 高度由宽度按 761:660 推导（1440 设计稿的原始比例），
   版心全宽后设备组按列宽等比放大，到上限后不再增长 */

.hero-devices {
  position: relative;
  width: 100%;
  max-width: 840px;
  margin-left: auto;
  aspect-ratio: 761 / 660;
  perspective: 1800px;
  transform: translateZ(0);
}

.device {
  position: absolute;
  will-change: transform;
  transition: transform 0.6s var(--ease);
}

.phone-frame {
  position: relative;
  padding: 8px;
  border-radius: 42px;
  background: linear-gradient(150deg, #4a4a5e 0%, #15151f 18%, #24242f 48%, #0a0a11 82%, #33333f 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 0 0 3px rgba(0, 0, 0, 0.55),
    0 40px 80px rgba(0, 0, 0, 0.62),
    0 8px 22px rgba(0, 0, 0, 0.5);
}

.phone-frame::before,
.phone-frame::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #3a3a48, #14141c);
}

.phone-frame::before {
  left: -3px;
  top: 108px;
  height: 62px;
}

.phone-frame::after {
  right: -3px;
  top: 130px;
  height: 82px;
}

.phone-camera {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #05050a;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  aspect-ratio: 360 / 800;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-phone-front {
  z-index: 4;
  left: 0;
  top: 8px;
  width: 39%;
  transform: rotate(-1.6deg);
}

.device-phone-front .phone-frame {
  animation: float-slow 9s ease-in-out infinite;
}

.device-phone-back {
  z-index: 3;
  left: 40%;
  top: -2px;
  width: 33%;
  transform: rotate(3.6deg) rotateY(-6deg);
}

.device-phone-back .phone-frame {
  animation: float-slow 11s ease-in-out infinite reverse;
}

.device-tablet-hero {
  z-index: 2;
  right: 2%;
  top: 100px;
  width: 36%;
  transform: rotateY(-15deg) rotateX(4deg) rotateZ(1.6deg);
}

.tablet-frame {
  padding: 11px;
  border-radius: 26px;
  background: linear-gradient(150deg, #3d3d4c 0%, #13131c 24%, #262632 55%, #08080e 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 0 3px rgba(0, 0, 0, 0.5),
    0 46px 90px rgba(0, 0, 0, 0.66);
}

.tablet-screen {
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 3 / 2;
  background: #000;
}

.tablet-screen--portrait {
  aspect-ratio: 3 / 5;
}

.tablet-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  padding: 64px 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: 0.04em;
}

.eyebrow .icon {
  width: 17px;
  height: 17px;
}

.section-title {
  margin-top: 6px;
  font-size: 54px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-sub {
  margin-top: 14px;
  font-size: 19.5px;
  line-height: 1.8;
  color: var(--muted);
}

.opensource-copy .section-sub {
  font-size: 17px;
  max-width: 540px;
}

.section-sub--left {
  text-align: left;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.features {
  padding-top: 30px;
  padding-bottom: 34px;
  overflow: hidden;
}

.section-glow {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 42% at 74% 0%, rgba(124, 58, 237, 0.26), transparent 70%),
    radial-gradient(ellipse 50% 35% at 18% 40%, rgba(76, 29, 149, 0.14), transparent 75%);
}

.features::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -18%;
  top: -190px;
  width: 880px;
  height: 400px;
  border-radius: 50%;
  border-top: 1px solid rgba(167, 139, 250, 0.22);
  transform: rotate(-9deg);
  filter: blur(1px);
  pointer-events: none;
}

.features .container,
.faq .container {
  position: relative;
  z-index: 1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.feature-card {
  position: relative;
  padding: 32px 20px 28px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.01) 62%, rgba(255, 255, 255, 0.018) 100%);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  width: 240px;
  height: 200px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 68%);
  opacity: 0.8;
  transition: opacity 0.35s;
  pointer-events: none;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.32);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  color: #a855f7;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.75));
}

.feature-icon svg {
  width: 60px;
  height: 60px;
}

.feature-card h3 {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.feature-card p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Platforms
   -------------------------------------------------------------------------- */

.platforms {
  padding-top: 30px;
  padding-bottom: 10px;
  overflow: hidden;
}

.platforms-glow {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -10%;
  width: 900px;
  height: 620px;
  transform: translateY(-50%);
  background:
    radial-gradient(ellipse at 60% 50%, rgba(124, 58, 237, 0.5), transparent 64%),
    radial-gradient(ellipse at 90% 20%, rgba(59, 130, 246, 0.16), transparent 62%);
  filter: blur(26px);
  pointer-events: none;
}

.platforms-glow::before,
.platforms-glow::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 120px;
  background: linear-gradient(90deg, transparent 6%, rgba(139, 92, 246, 0.24) 46%, rgba(196, 181, 253, 0.16) 62%, transparent 94%);
  transform: rotate(-16deg);
  filter: blur(26px);
}

.platforms-glow::before { top: 38%; left: -10%; }
.platforms-glow::after { top: 66%; left: -20%; opacity: 0.55; }

.platforms-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  align-items: center;
  gap: 24px;
}

.platforms-copy {
  padding-left: 4px;
}

.platforms-copy .section-title {
  margin-top: 8px;
  font-size: 51px;
}

.platform-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  max-width: 440px;
}

.btn--platform {
  height: 54px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 500;
}

.btn--platform .icon {
  width: 22px;
  height: 22px;
}

.platform-meta {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-dim);
  letter-spacing: 0.02em;
}

.platform-visual {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  aspect-ratio: 787 / 440;
  perspective: 1600px;
}

.platform-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 18%;
  right: -6%;
  bottom: 2%;
  height: 150px;
  background: radial-gradient(ellipse at 55% 60%, rgba(139, 92, 246, 0.42), transparent 68%);
  filter: blur(24px);
  pointer-events: none;
}

.laptop {
  position: absolute;
  top: 4px;
  right: 2%;
  width: 72%;
  transform: rotateY(-16deg) rotateX(6deg) rotateZ(-1.5deg);
  transform-style: preserve-3d;
}

.laptop-lid {
  position: relative;
  padding: 11px;
  border-radius: 15px 15px 5px 5px;
  background: linear-gradient(150deg, #45454f 0%, #191922 22%, #2b2b36 52%, #0a0a11 88%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 50px 90px rgba(0, 0, 0, 0.72),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

.laptop-camera {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #06060b;
  transform: translateX(-50%);
}

.laptop-screen {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 3 / 2;
  background: #000;
}

.laptop-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.laptop-base {
  position: relative;
  height: 26px;
  margin: -1px -4.5% 0;
  background: linear-gradient(180deg, #6c6c7a 0%, #3a3a48 26%, #20202c 62%, #0d0d15 100%);
  clip-path: polygon(2.6% 0, 97.4% 0, 100% 62%, 96.6% 100%, 3.4% 100%, 0 62%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  border-radius: 0 0 16px 16px;
}

.laptop-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.laptop-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 84px;
  height: 6px;
  border-radius: 0 0 8px 8px;
  background: #101018;
  transform: translateX(-50%);
}

.platform-phone {
  position: absolute;
  z-index: 2;
  left: 2%;
  bottom: 22px;
  width: 23%;
  transform: rotate(-2.5deg);
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.6));
}

.platform-phone .phone-frame {
  border-radius: 34px;
  padding: 7px;
}

.platform-phone .phone-screen {
  border-radius: 28px;
}

.platform-phone .phone-camera {
  top: 17px;
  width: 8px;
  height: 8px;
}

.platform-phone .phone-frame::before,
.platform-phone .phone-frame::after {
  display: none;
}

/* --------------------------------------------------------------------------
   Open source
   -------------------------------------------------------------------------- */

.opensource {
  padding-top: 30px;
  padding-bottom: 40px;
  overflow: hidden;
}

.opensource::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 12%, rgba(255, 255, 255, 0.07) 50%, transparent 88%);
}

.opensource-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 40%) minmax(0, 20%);
  align-items: center;
  gap: 24px;
}

.cube-stage {
  position: relative;
  height: 340px;
  width: 100%;
  max-width: 460px;
}

.cube-glow {
  position: absolute;
  inset: -2% 0% 0%;
  background: radial-gradient(circle at 52% 55%, rgba(139, 92, 246, 0.5), transparent 64%);
  filter: blur(24px);
}

.orbit-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.35));
}

.cube-scene {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  perspective: 1000px;
  z-index: 2;
}

.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(-31deg);
  animation: cube-float 8s ease-in-out infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(216, 204, 255, 0.5);
  background:
    linear-gradient(150deg, rgba(167, 139, 250, 0.28), rgba(76, 29, 149, 0.1) 55%, rgba(139, 92, 246, 0.2));
  box-shadow:
    inset 0 0 52px rgba(139, 92, 246, 0.3),
    0 0 30px rgba(124, 58, 237, 0.16);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.cube-face--front {
  display: grid;
  place-items: center;
  transform: translateZ(105px);
  background:
    linear-gradient(150deg, rgba(216, 204, 255, 0.34), rgba(91, 33, 182, 0.12) 52%, rgba(139, 92, 246, 0.24));
}

.cube-face--back { transform: rotateY(180deg) translateZ(105px); }
.cube-face--right { transform: rotateY(90deg) translateZ(105px); }
.cube-face--left { transform: rotateY(-90deg) translateZ(105px); }

.cube-face--top {
  transform: rotateX(90deg) translateZ(105px);
  background: linear-gradient(150deg, rgba(216, 204, 255, 0.5), rgba(139, 92, 246, 0.2));
}

.cube-face--bottom {
  transform: rotateX(-90deg) translateZ(105px);
  background: linear-gradient(150deg, rgba(76, 29, 149, 0.4), rgba(139, 92, 246, 0.25));
}

.cube-play {
  width: 72%;
  height: 72%;
  filter: drop-shadow(0 0 22px rgba(196, 181, 253, 0.65));
}

@keyframes cube-float {
  0%, 100% { transform: rotateX(-18deg) rotateY(-31deg) translateY(0); }
  50% { transform: rotateX(-16deg) rotateY(-27deg) translateY(-10px); }
}

.cube-platform {
  position: absolute;
  z-index: 1;
  left: 51%;
  bottom: 4px;
  width: 286px;
  height: 180px;
  margin-left: -143px;
  transform: perspective(700px) rotateX(62deg);
  transform-origin: 50% 60%;
}

.platform-slab {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(196, 181, 253, 0.42);
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.5), rgba(32, 20, 68, 0.92));
  box-shadow:
    0 0 60px rgba(124, 58, 237, 0.55),
    inset 0 0 46px rgba(139, 92, 246, 0.4);
  border-radius: 20px;
  transform: translate(-50%, -50%);
}

.platform-slab--1 {
  width: 250px;
  height: 250px;
  opacity: 0.65;
}

.platform-slab--2 {
  width: 190px;
  height: 190px;
  background: linear-gradient(150deg, rgba(196, 181, 253, 0.5), rgba(55, 33, 110, 0.92));
}

.platform-slab--3 {
  width: 130px;
  height: 130px;
  background: linear-gradient(150deg, rgba(216, 204, 255, 0.55), rgba(76, 29, 149, 0.72));
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.7), inset 0 0 30px rgba(233, 213, 255, 0.35);
}

.platform-light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 204, 255, 0.5), transparent 64%);
  filter: blur(18px);
}

.orbit-icon {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #cbbdff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(150deg, rgba(58, 48, 92, 0.75), rgba(20, 16, 39, 0.85));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: float-slow 7s ease-in-out infinite;
}

.orbit-icon svg {
  width: 30px;
  height: 30px;
}

.orbit-icon--github {
  left: -1%;
  top: 60%;
}

.orbit-icon--code {
  right: -1%;
  top: 9%;
  animation-delay: -2.5s;
}

.orbit-icon--heart {
  right: 7%;
  bottom: 16%;
  animation-delay: -4s;
}

.spark {
  position: absolute;
  z-index: 3;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e9d5ff;
  box-shadow: 0 0 10px 2px rgba(196, 181, 253, 0.7);
}

.spark--1 { left: 12%; top: 30%; }
.spark--2 { right: 24%; top: 8%; width: 3px; height: 3px; }
.spark--3 { left: 30%; bottom: 14%; width: 3px; height: 3px; opacity: 0.7; }

.opensource-copy {
  padding: 0 8px;
}

.opensource-copy .section-title {
  margin-top: 8px;
  font-size: 52px;
}

.opensource-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 34px;
}

.opensource-actions .btn {
  height: 54px;
  padding: 0 26px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: #d8d4e8;
  transition: color 0.2s;
}

.text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover {
  color: #fff;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.opensource-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-self: end;
  width: 100%;
  max-width: 248px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.stat-card:hover {
  border-color: rgba(167, 139, 250, 0.34);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  transform: translateY(-3px);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #a78bfa;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.45));
}

.stat-icon svg {
  width: 30px;
  height: 30px;
}

.stat-body {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-dim);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  padding-top: 34px;
  padding-bottom: 42px;
}

.faq::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 12%, rgba(255, 255, 255, 0.07) 50%, transparent 88%);
}

.faq .section-head .section-title {
  font-size: 36px;
}

.faq-list {
  max-width: 100%;
  margin: 26px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s, background 0.3s;
}

.faq-item[open] {
  border-color: rgba(167, 139, 250, 0.28);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), rgba(255, 255, 255, 0.012));
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.2s;
}

.faq-item[open] summary .icon {
  transform: rotate(180deg);
  color: #a78bfa;
}

.faq-body {
  padding: 0 24px 18px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
}

.faq-body a {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(11, 12, 19, 0.4), #08080f);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
}

.footer-brand .brand-mark {
  width: 30px;
  height: 30px;
}

.footer-brand .brand-name {
  font-size: 17px;
}

.footer-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.14);
}

.footer-slogan {
  font-size: 13px;
  color: var(--muted-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
}

.footer-links a {
  position: relative;
  padding: 0 18px;
  font-size: 13.5px;
  color: #b8b3cc;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-links a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
}

.footer-links a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #ddd9ea;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.footer-social a:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 19px;
  height: 19px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .container { padding: 0 32px; }
  .main-nav { gap: 30px; }
  .hero-title { font-size: 52px; }
  .hero-line--brand { font-size: 54px; }
  .section-title { font-size: 48px; }
  .platforms-copy .section-title { font-size: 46px; }
  .opensource-copy .section-title { font-size: 44px; }
  .footer-links a { padding: 0 12px; }

  .opensource-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cube-stage {
    height: 380px;
    margin: 0 auto;
  }

  .opensource-copy,
  .opensource-copy .section-sub,
  .opensource-copy .section-sub--left {
    text-align: center;
  }

  .opensource-copy .section-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .opensource-actions {
    justify-content: center;
  }

  .opensource-stats {
    grid-column: 1 / -1;
    flex-direction: row;
    max-width: none;
    justify-self: stretch;
  }

  .stat-card { flex: 1; }
}

@media (max-width: 1024px) {
  .main-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: rgba(8, 8, 16, 0.96);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    transform: none;
    left: 0;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 55;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .main-nav .nav-link {
    font-size: 20px;
  }

  .main-nav .nav-link::after {
    bottom: -2px;
  }

  .menu-toggle {
    display: block;
    z-index: 61;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    padding-top: 150px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-copy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    align-items: center;
    font-size: 46px;
  }

  .hero-line--brand { font-size: 48px; }

  .hero-lead br { display: none; }

  .hero-cta,
  .tech-strip {
    justify-content: center;
  }

  .hero-devices {
    width: min(680px, 100%);
    margin: 0 auto;
    height: 620px;
    aspect-ratio: auto;
  }

  .device-phone-front { left: 1%; top: 30px; width: 35%; }
  .device-phone-back { left: 36%; top: 10px; width: 31%; }
  .device-tablet-hero { right: 0; width: 40%; top: 70px; }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platforms-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .platforms-copy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .platforms-copy .section-sub,
  .section-sub--left {
    text-align: center;
  }

  .platform-actions {
    justify-content: center;
    width: 100%;
  }

  .platform-visual {
    height: 440px;
    width: min(680px, 100%);
    margin: 10px auto 0;
    aspect-ratio: auto;
  }

  .laptop { width: 80%; right: 4%; }

  .footer-inner {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 20px;
  }

  .footer-links { order: 3; width: 100%; justify-content: center; }
  .footer-social { margin-left: auto; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }

  .site-header { padding: 14px 0; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 30px; height: 30px; }
  .gh-pill span { display: none; }
  .gh-pill { padding: 0 13px; height: 40px; }

  .hero {
    padding-top: 118px;
    padding-bottom: 20px;
  }

  .hero-title {
    font-size: 33px;
    line-height: 1.4;
  }

  .hero-line--brand { font-size: 34px; }

  .hero-lead {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.9;
  }

  .hero-cta {
    margin-top: 28px;
    gap: 12px;
  }

  .btn {
    height: 50px;
    padding: 0 22px;
    font-size: 14px;
  }

  .hero-cta .btn--primary,
  .hero-cta .btn--ghost {
    min-width: 0;
    flex: 1;
  }

  .tech-strip {
    margin-top: 28px;
    gap: 14px;
    font-size: 13px;
  }

  .tech-icon { width: 20px; height: 20px; }

  .hero-devices {
    height: 430px;
    margin-top: 6px;
    aspect-ratio: auto;
  }

  .device-phone-front { top: 44px; left: -2%; width: 40%; }
  .device-phone-back { top: 22px; left: 37%; width: 34%; }
  .device-tablet-hero { top: 78px; right: 0; width: 41%; }

  .phone-frame { padding: 5px; border-radius: 28px; }
  .phone-screen { border-radius: 23px; }
  .phone-camera { width: 6px; height: 6px; top: 12px; }
  .tablet-frame { padding: 7px; border-radius: 18px; }
  .tablet-screen { border-radius: 10px; }

  .section { padding: 70px 0; }
  .section-title { font-size: 30px; }
  .section-sub { font-size: 14.5px; }
  .eyebrow { font-size: 13px; }

  .features { padding-top: 56px; }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 30px;
  }
  .feature-card { padding: 22px 20px; }
  .feature-icon { width: 50px; height: 50px; margin-bottom: 10px; }
  .feature-icon svg { width: 44px; height: 44px; }
  .feature-card h3 { font-size: 19px; }
  .feature-card p { margin-top: 8px; font-size: 14px; line-height: 1.85; }

  .platforms { padding-top: 40px; }
  .platforms-copy .section-title { font-size: 32px; }
  .platform-actions { width: 100%; }
  .btn--platform { flex: 1; padding: 0 16px; }
  .platform-meta { font-size: 11px; }
  .platform-visual { height: 300px; }
  .laptop { width: 86%; right: 0; top: 0; }
  .laptop-lid { padding: 6px; border-radius: 10px; }
  .laptop-base { height: 14px; }
  .platform-phone { width: 30%; left: 2%; bottom: 24px; }
  .platform-phone .phone-frame { border-radius: 24px; padding: 4px; }
  .platform-phone .phone-screen { border-radius: 20px; }

  .opensource { padding-top: 52px; padding-bottom: 64px; }
  .opensource-inner { grid-template-columns: 1fr; gap: 20px; }
  .cube-stage { height: 330px; max-width: 330px; margin: 0 auto; }
  .orbit-icon { width: 44px; height: 44px; }
  .orbit-icon svg { width: 22px; height: 22px; }
  .orbit-icon--github { left: 1%; top: 58%; }
  .orbit-icon--code { right: 1%; top: 8%; }
  .orbit-icon--heart { right: 4%; bottom: 15%; }
  .opensource-copy { text-align: center; }
  .opensource-copy .section-sub,
  .opensource-copy .section-sub--left { text-align: center; }
  .opensource-copy .section-title { font-size: 34px; }
  .opensource-actions { justify-content: center; }
  .opensource-stats { flex-direction: row; gap: 12px; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 19px; }
  .stat-icon svg { width: 24px; height: 24px; }

  .faq { padding: 54px 0 64px; }
  .faq .section-head .section-title { font-size: 28px; }
  .faq-list { margin-top: 30px; }
  .faq-item summary { padding: 16px 18px; font-size: 14.5px; }
  .faq-body { padding: 0 18px 18px; font-size: 13.5px; }

  .site-footer { padding: 26px 0; }
  .footer-inner { gap: 18px; }
  .footer-brand { gap: 12px; }
  .footer-divider { display: none; }
  .footer-slogan { width: 100%; text-align: center; }
  .footer-brand { flex-wrap: wrap; justify-content: center; }
  .footer-social { margin: 0 auto; }
  .footer-links { flex-wrap: wrap; row-gap: 8px; }
  .footer-links a { font-size: 12.5px; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
