/*
 * GBX Engine — the landing page.
 *
 * Bootstrap does the grid and the carousel; everything that makes the page
 * look like the product is here. The palette is lifted straight from the
 * editor's own tokens, because a website in different colours from the tool it
 * sells is a website that feels like somebody else made it.
 */

:root {
  --bg: #0c0e13;
  --bg-deep: #08090d;
  --panel: #14161c;
  --panel-alt: #181b22;
  --line: #262a33;
  --line-strong: #333846;
  --text: #e6e8ec;
  --text-dim: #9aa1ad;
  --text-faint: #6b7280;
  --accent: #ff8a3d;
  --accent-hot: #ff6f1f;
  --accent-dim: rgba(255, 138, 61, 0.14);
  --ok: #55c98a;
  --radius: 14px;
  --shell: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /*
   * `clip`, not `hidden`.
   *
   * `overflow-x: hidden` on the body makes the body the scrolling element
   * instead of the document — and then window.scrollY stays at zero, the
   * sticky bar never learns it has been scrolled, anchor links do not move,
   * and an IntersectionObserver against the viewport never fires. Which is to
   * say the whole page below the fold stayed invisible. `clip` trims the same
   * overflow without taking the scrolling away.
   */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* The orange wash behind the top of the page, and a second under the footer.
   Fixed rather than scrolled: it is lighting, not content. */
body::before {
  content: "";
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(255, 138, 61, 0.16), transparent 70%),
    radial-gradient(40% 50% at 85% 10%, rgba(90, 130, 255, 0.10), transparent 70%);
}

main, header, footer { position: relative; z-index: 1; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 14px; color: var(--text-dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hot); }
.lead { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: var(--text-dim); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.gbx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.gbx-btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-hot));
  color: #16110b;
  box-shadow: 0 10px 30px -12px rgba(255, 138, 61, 0.8);
}
.gbx-btn-primary:hover { transform: translateY(-2px); color: #16110b; box-shadow: 0 16px 38px -14px rgba(255, 138, 61, 0.95); }
.gbx-btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); color: var(--text); }
.gbx-btn-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.gbx-btn-sm { height: 38px; padding: 0 16px; font-size: 0.9rem; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */

.gbx-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.gbx-nav.scrolled {
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.gbx-nav .inner { display: flex; align-items: center; gap: 22px; height: 72px; }
.gbx-brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.gbx-brand img { width: 34px; height: 34px; border-radius: 9px; }
.gbx-brand span i { color: var(--accent); font-style: normal; }
.gbx-links { display: flex; gap: 4px; margin-left: auto; }
.gbx-links a {
  padding: 8px 13px; border-radius: 8px; color: var(--text-dim);
  font-size: 0.94rem; font-weight: 500; transition: color 0.15s ease, background 0.15s ease;
}
.gbx-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.gbx-nav-actions { display: flex; align-items: center; gap: 10px; }
.gbx-burger { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); width: 40px; height: 38px; }

@media (max-width: 991px) {
  .gbx-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 12px 20px 18px;
    background: rgba(10, 12, 16, 0.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .gbx-links.open { display: flex; }
  .gbx-burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .gbx-nav-actions .gbx-btn-ghost { display: none; }
  /* The bar has to hold a logo, a menu button and a call to action inside
     390 pixels, and the logo is the part that can afford to give way. */
  .gbx-brand { font-size: 0.9rem; letter-spacing: 0.02em; }
  .gbx-brand img { width: 30px; height: 30px; }
  .gbx-nav .inner { gap: 12px; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero { padding: 150px 0 60px; text-align: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 22px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.02em;
}
.hero .eyebrow b { color: var(--accent); font-weight: 600; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 62ch; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-note { font-size: 0.86rem; color: var(--text-faint); }

.hero-shot {
  margin-top: 54px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 138, 61, 0.08);
}
.hero-shot img { width: 100%; display: block; }
.shot-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel-alt);
}
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); display: block; }
.shot-bar i:first-child { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar small { margin-left: 10px; color: var(--text-faint); font-size: 0.78rem; }

/* ── Stats ───────────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 56px 0 0; }
.stat {
  padding: 22px 18px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.stat b { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }
.stat span { font-size: 0.86rem; color: var(--text-dim); }
@media (max-width: 767px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ── Sections ────────────────────────────────────────────────────────────── */

section { padding: 84px 0; }
.section-head { max-width: 62ch; margin: 0 auto 44px; text-align: center; }
.section-head .kicker {
  display: block; margin-bottom: 12px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* ── Feature grid ────────────────────────────────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 991px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.feature {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.feature::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255, 138, 61, 0.07), transparent 60%);
  opacity: 0; transition: opacity 0.22s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.feature:hover::after { opacity: 1; }
.feature .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 15px;
  border-radius: 11px; background: var(--accent-dim); color: var(--accent);
  font-size: 1.15rem;
}
.feature h3 { margin-bottom: 7px; }
.feature p { margin: 0; font-size: 0.94rem; }

/* ── Alternating showcase rows ───────────────────────────────────────────── */

.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.showcase + .showcase { margin-top: 90px; }
.showcase.flip .showcase-copy { order: 2; }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; gap: 30px; }
  .showcase.flip .showcase-copy { order: 0; }
}
.showcase-copy .kicker {
  display: block; margin-bottom: 11px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.showcase-copy ul { margin: 18px 0 0; padding: 0; list-style: none; }
.showcase-copy li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-dim); font-size: 0.95rem; }
.showcase-copy li::before {
  content: "";
  position: absolute; left: 6px; top: 9px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent);
}

.frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--panel);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.frame img { width: 100%; display: block; }

/* ── Carousel ────────────────────────────────────────────────────────────── */

.shots { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); }
.shots .carousel-item img { width: 100%; display: block; }
.shots .carousel-caption {
  left: 0; right: 0; bottom: 0; padding: 46px 26px 18px; text-align: left;
  background: linear-gradient(180deg, transparent, rgba(6, 7, 10, 0.92) 55%);
}
.shots .carousel-caption p { margin: 0; color: var(--text); font-weight: 500; font-size: 0.98rem; }
.shot-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.shot-tab {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text-dim); font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: all 0.18s ease;
}
.shot-tab:hover { color: var(--text); border-color: var(--line-strong); }
.shot-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ── Export targets ──────────────────────────────────────────────────────── */

.targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .targets { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .targets { grid-template-columns: 1fr; } }
.target {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); transition: border-color 0.2s ease, transform 0.2s ease;
}
.target:hover { border-color: var(--accent); transform: translateY(-3px); }
.target .ico { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.target h3 { font-size: 1rem; margin-bottom: 5px; }
.target p { font-size: 0.9rem; margin: 0; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 900px; margin: 0 auto; }
@media (max-width: 767px) { .plans { grid-template-columns: 1fr; } }
.plan {
  padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 30px 70px -40px rgba(255, 138, 61, 0.6); }
.plan .tag {
  align-self: flex-start; margin-bottom: 14px; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.plan .price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 2px; }
.plan .price small { font-size: 0.95rem; font-weight: 500; color: var(--text-faint); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; }
.plan li { position: relative; padding-left: 26px; margin-bottom: 9px; color: var(--text-dim); font-size: 0.94rem; }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.plan .gbx-btn { margin-top: auto; width: 100%; }

/* ── Call to action ──────────────────────────────────────────────────────── */

.cta {
  text-align: center; padding: 64px 30px; margin: 0 auto;
  border: 1px solid var(--line-strong); border-radius: 20px;
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(255, 138, 61, 0.15), transparent 60%),
    var(--panel);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); padding: 46px 0 34px; background: var(--bg-deep); }
.foot { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: flex-start; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--text-dim); font-size: 0.92rem; }
.foot-links a:hover { color: var(--accent); }
.foot small { color: var(--text-faint); font-size: 0.84rem; }

/* ── Reveal on scroll ────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.seen { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/*
 * Somebody who has asked their system for less movement gets less movement.
 * The page still reveals; it just does not slide about while doing it.
 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gbx-btn:hover, .feature:hover, .target:hover { transform: none; }
  .float { animation: none !important; }
}

.float { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/*
 * Screenshots on a phone.
 *
 * A 1760-pixel editor squeezed into a 350-pixel column is not a small
 * screenshot, it is a grey smudge: the panels are there and none of them can
 * be read. Cropping to a band of the middle — where the viewport is — shows
 * something that is actually legible, and says the same thing the whole
 * picture was there to say.
 */
@media (max-width: 767px) {
  .hero-shot img,
  .frame img,
  .shots .carousel-item img {
    height: 280px;
    object-fit: cover;
    object-position: 56% 42%;
  }
  .shots .carousel-caption { padding: 30px 16px 14px; }
  .shots .carousel-caption p { font-size: 0.88rem; }
  .hero { padding: 120px 0 40px; }
  section { padding: 60px 0; }
  .showcase + .showcase { margin-top: 56px; }
  .cta { padding: 44px 20px; }
}

/* ── Download ────────────────────────────────────────────────────────────── */

.downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 991px) { .downloads { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .downloads { grid-template-columns: 1fr; } }

.download-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 26px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.download-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.download-card.featured { border-color: var(--accent); }
.download-card .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 15px;
  border-radius: 11px; background: var(--accent-dim); color: var(--accent); font-size: 1.25rem;
}
.download-card h3 { margin-bottom: 7px; }
.download-card p { font-size: 0.92rem; flex: 1; }
.download-card .gbx-btn { width: 100%; height: 42px; font-size: 0.92rem; }
.download-card small { margin-top: 10px; font-size: 0.8rem; color: var(--text-faint); }

/* A platform whose build has not been uploaded says so rather than offering a
   link that answers 404. */
.download-card.unavailable { opacity: 0.55; }
.download-card.unavailable .gbx-btn { pointer-events: none; border-style: dashed; color: var(--text-faint); }

#heroDownload a { border-bottom: 1px solid rgba(255, 138, 61, 0.35); }
#heroDownloadMeta { color: var(--text-faint); margin-left: 6px; font-size: 0.82em; }
