/* Base theme */
:root {
  --bg: #0b0f14;
  --bg-alt: #0f141b;
  --card: #121924;
  --text: #e7eef8;
  --muted: #a1afc3;
  --brand: #6aa1ff;
  --brand-600: #4f89ff;
  --line: #233145;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(ellipse 1200px 800px at 80% -10%, #12243a 0%, rgba(18,36,58,0) 60%),
              radial-gradient(ellipse 800px 600px at -20% 60%, #1a2f4d 0%, rgba(26,47,77,0) 60%),
              var(--bg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(120%) blur(10px);
  background: rgba(11,15,20,0.7);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.nav a:hover { color: var(--text); }
.nav .cta { color: #fff; background: var(--brand); padding: 8px 12px; border-radius: 8px; }
.nav .cta:hover { background: var(--brand-600); }

/* Hero */
.hero { padding: 64px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: center; }
.hero-copy h1 { margin: 0 0 10px; font-size: 40px; line-height: 1.15; }
.lead { color: var(--muted); font-size: 18px; }
.cta-row { margin: 20px 0 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-block; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-600); }
.button.ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }
.button.ghost:hover { border-color: var(--brand); color: #fff; }
.subtle { color: var(--muted); font-size: 13px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* Decorative animated glows */
.bg-glows { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(60px); opacity: 0.35; mix-blend-mode: screen; animation: float 12s ease-in-out infinite; }
.glow.g1 { background: #1e88ff; top: -60px; left: 55%; animation-delay: 0s; }
.glow.g2 { background: #8a2be2; bottom: -120px; left: 10%; animation-delay: 2s; }
.glow.g3 { background: #00c2ff; top: 40%; right: -120px; animation-delay: 4s; }
@keyframes float { 0%,100%{ transform: translateY(0) scale(1);} 50%{ transform: translateY(-16px) scale(1.05);} }

/* Pills */
.pill-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--muted); padding: 6px 10px; border-radius: 999px; font-size: 12px; }

/* Device frame */
.device { background: rgba(0,0,0,0.3); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.device-chrome { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)); border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.device-screen { position: relative; }
.device-screen img { display: block; width: 100%; height: auto; }
.screen-reflection { position: absolute; inset: 0; background: linear-gradient(60deg, rgba(255,255,255,0.12), transparent 35%); mix-blend-mode: screen; pointer-events: none; }

/* Sections */
.section { padding: 48px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-top: 0; font-size: 28px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.card .icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(106,161,255,0.12); color: #9bc0ff; margin-bottom: 8px; }
.card h3 { margin-top: 0; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 8px 0; }
.step-note { color: var(--muted); margin-left: 6px; font-size: 13px; }
.tight { margin: 8px 0 0; padding-left: 16px; }
.tight a { color: var(--text); text-decoration: none; }
.tight a:hover { color: var(--brand); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Carousel */
.carousel { display: flex; overflow-x: auto; gap: 16px; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.carousel .shot { min-width: min(720px, 90%); scroll-snap-align: start; }
.carousel img { display: block; }

/* Minimap mock */
.minimap-wrap { margin-top: 18px; }
.minimap-demo { display: grid; grid-template-columns: repeat(8, 14px); grid-template-rows: repeat(2, 10px); gap: 4px; padding: 10px; width: max-content; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); box-shadow: var(--shadow); }
.minimap-demo .cell { width: 14px; height: 10px; background: rgba(255,255,255,0.08); border-radius: 2px; }
.minimap-demo .tint-a { background: rgba(106,161,255,0.5); }
.minimap-demo .tint-b { background: rgba(98,226,173,0.5); }
.minimap-demo .tint-c { background: rgba(243,135,255,0.5); }

/* Shortcuts */
.shortcuts { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.sep { width: 10px; height: 2px; background: rgba(255,255,255,0.2); display: inline-block; margin: 0 6px; }

/* CTA strip */
.cta-strip { padding: 40px 0; position: relative; }
.cta-inner { background: radial-gradient(120% 180% at 80% -40%, rgba(106,161,255,0.3), transparent 50%), linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; background: rgba(0,0,0,0.2); }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.foot-left { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.foot-left img { width: 22px; height: 22px; }
.foot-center { text-align: center; color: var(--muted); }
.foot-right { display: flex; gap: 16px; justify-self: end; }
.foot-right a { color: var(--muted); text-decoration: none; }
.foot-right a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .cards.two { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* Hide navigation menu text in header on mobile */
  .nav a:not(.cta) { display: none; }

  /* Hide footer navigation links on mobile, keep heart text */
  .foot-right { display: none; }

  /* Prevent Infinity Terminal text from wrapping in footer */
  .foot-left { white-space: nowrap; }

  /* Move heart text to right side on mobile */
  .footer-inner { grid-template-columns: auto 1fr; }
  .foot-center { text-align: right; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }

  /* Fix list layout on mobile to prevent number from wrapping */
  .steps {
    padding-left: 0;
    list-style: none;
    counter-reset: step-counter;
  }

  .steps li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    line-height: 1.5;
  }

  .steps li::before {
    content: counter(step-counter) ". ";
    flex-shrink: 0;
    margin-right: 8px;
    font-weight: inherit;
  }

  /* Handle long code snippets and URLs on mobile */
  code {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    flex: 1;
  }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
