/* Bluebox Templates — showcase
   Off-script storefront. Dark, hairline, oversized type.
   Accent stays Bluebox blue. Templates keep their own packs. */

:root {
  --bg: #06070b;
  --bg-2: #0b0d13;
  --bg-3: #11141c;
  --ink: #f3f5f8;
  --body: #9aa3b2;
  --muted: #6d7584;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #2388ff;
  --accent-2: #0d6ae6;
  --accent-soft: rgba(35, 136, 255, 0.16);
  --green: #74d184;
  --green-soft: rgba(116, 209, 132, 0.14);

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Syne", "Inter Tight", system-ui, sans-serif;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --container: 76rem;
  --gutter: 1.5rem;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
::selection {
  background: var(--accent);
  color: #fff;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.atmosphere__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 15%, transparent 72%);
  opacity: 0.7;
}
.atmosphere__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.atmosphere__glow--a {
  width: 52rem;
  height: 52rem;
  top: -18rem;
  left: 50%;
  background: radial-gradient(circle, rgba(35, 136, 255, 0.42) 0%, rgba(35, 136, 255, 0.12) 42%, transparent 70%);
  animation: drift-a 18s ease-in-out infinite alternate;
}
.atmosphere__glow--b {
  width: 36rem;
  height: 36rem;
  top: 20rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(29, 54, 182, 0.28) 0%, transparent 70%);
  animation: drift-b 22s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translateX(-58%) translateY(0); }
  to { transform: translateX(-42%) translateY(2.5rem); }
}
@keyframes drift-b {
  from { transform: translateY(0); }
  to { transform: translateY(-3rem) translateX(-1.5rem); }
}

.page { position: relative; z-index: 1; overflow-x: hidden; }

/* Type */
.display,
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.display-xl {
  font-size: clamp(3.1rem, 8.2vw, 6.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.display-l {
  font-size: clamp(2.25rem, 5vw, 4rem);
}
.display-m {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.display-s {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 600;
}
.lede {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.45;
  color: var(--body);
}
.p { margin: 0; color: var(--body); }
.p-sm { margin: 0; font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker__index {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Layout */
.container {
  width: min(var(--container), calc(100vw - var(--gutter) * 2));
  margin-inline: auto;
}
.section { padding-block: 7.5rem; }
.section--tight { padding-block: 5rem; }
.section-head { max-width: 42rem; }
.section-head .display-l { margin-top: 1rem; }
.section-head .lede { margin-top: 1.25rem; }
.section-head + * { margin-top: 3.5rem; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, color 0.3s;
}
.btn__label { position: relative; z-index: 1; }
.btn__wipe {
  position: absolute;
  inset: auto -12% -160%;
  width: 124%;
  height: 14rem;
  border-radius: 100vw;
  transition: transform 0.5s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover .btn__wipe { transform: translateY(-55%); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary .btn__wipe { background: var(--accent-2); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost .btn__wipe { background: rgba(255, 255, 255, 0.08); }
.btn--solid {
  background: #fff;
  color: #06070b;
  border-color: #fff;
}
.btn--solid .btn__wipe { background: #dce8ff; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
}
.nav__inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100vw - var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 11, 0.55);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.3s var(--ease), border-color 0.3s;
}
.nav.is-scrolled::before {
  opacity: 1;
  border-bottom-color: var(--line);
}
.brand,
.nav__links,
.nav__end { position: relative; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}
.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.15s ease-out;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__end { display: flex; align-items: center; gap: 0.5rem; }
.nav__toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.nav__toggle svg { width: 1.15rem; height: 1.15rem; }

/* Hero */
.hero {
  position: relative;
  min-width: 0;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 4rem;
  padding-bottom: 0;
}
.hero__copy { padding-bottom: 6.5rem; }
.hero__copy .display-xl { max-width: 16ch; }
.hero__copy .lede { margin-top: 1.5rem; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.hero__back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__watermark {
  position: absolute;
  left: -0.15em;
  bottom: 7.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(6rem, 22vw, 18rem);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  user-select: none;
  white-space: nowrap;
}
/* Catalogue */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature {
  display: block;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.feature:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.feature__stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.feature__stage img {
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
  transition: transform 0.8s var(--ease);
}
.feature:hover .feature__stage img { transform: scale(1.06); }
.feature__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 7, 11, 0.55) 100%);
  pointer-events: none;
}
.feature__spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(28rem 20rem at var(--spot-x, 50%) var(--spot-y, 40%), rgba(35, 136, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
}
.feature:hover .feature__spotlight { opacity: 1; }
.feature__go {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.feature__meta {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem 1.4rem;
}
.feature__meta h3 { margin: 0; }
.feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip--live {
  border-color: rgba(116, 209, 132, 0.28);
  background: var(--green-soft);
  color: var(--green);
}
.chip--live::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(116, 209, 132, 0.15);
}

/* Why / rules */
.board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(11, 13, 19, 0.72);
}
.board__cell {
  padding: 1.75rem 1.6rem 1.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.board--3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.board--3 .board__cell:nth-child(3n) { border-right: 0; }
.board--3 .board__cell:nth-last-child(-n + 3) { border-bottom: 0; }
.board__num {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.board__cell h3 { margin-bottom: 0.7rem; }
.board__cell p { margin: 0; color: var(--body); }

/* Process */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  padding: 2rem 0 0;
  padding-right: 2.5rem;
  border-right: 1px solid var(--line);
}
.step:last-child { border-right: 0; padding-right: 0; padding-left: 2.5rem; }
.step:nth-child(2) { padding-left: 2.5rem; }
.step__num {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--accent);
  line-height: 1;
}
.step h3 { margin: 1.25rem 0 0.7rem; }

/* CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding: 5rem 3rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  background:
    radial-gradient(40rem 20rem at 80% 120%, rgba(35, 136, 255, 0.22), transparent 55%),
    var(--bg-2);
  text-align: left;
}
.cta .lede { margin-top: 1.15rem; }
.cta .hero__actions { margin-top: 2rem; justify-content: flex-start; }

/* Footer */
.footer {
  padding: 5rem 0 0;
  border-top: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer__brand p { margin-top: 1rem; max-width: 26ch; }
.footer h2 {
  margin: 0 0 1.1rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer a { color: var(--body); transition: color 0.15s; }
.footer a:hover { color: var(--ink); }
.footer li + li { margin-top: 0.7rem; }
.footer__word {
  margin-top: 3.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.5rem, 14vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  user-select: none;
}
.footer__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Inner pages */
.page-head { padding-top: 5.5rem; padding-bottom: 3.5rem; }
.page-head .display-l { margin-top: 1rem; }
.page-head .lede { margin-top: 1.25rem; }
.page-head .hero__actions { margin-top: 2rem; }

.preview-frame {
  display: block;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.preview-frame:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.preview-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: #0a0c12;
  border-bottom: 1px solid var(--line);
}
.preview-frame__bar i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #2a3140;
}
.preview-frame__bar i:nth-child(1) { background: #ff5f57; }
.preview-frame__bar i:nth-child(2) { background: #febc2e; }
.preview-frame__bar i:nth-child(3) { background: #28c840; }
.preview-frame__url {
  margin-left: 0.65rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.preview-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 40%;
}

.pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.pages a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0.15rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink);
  transition: color 0.15s, padding 0.3s var(--ease);
}
.pages a span { color: var(--muted); transition: transform 0.3s var(--ease), color 0.15s; }
.pages a:hover { color: var(--accent); }
.pages a:hover span { color: var(--accent); transform: translate(3px, -3px); }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
}
.split img {
  width: 100%;
  height: 28rem;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.split .lede { margin-top: 1.25rem; }
.split .p { margin-top: 1.15rem; }

.arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  font-weight: 600;
  color: var(--ink);
}
.arrow span { transition: transform 0.3s var(--ease); }
.arrow:hover { color: var(--accent); }
.arrow:hover span { transform: translate(3px, -3px); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  animation: rise 0.75s var(--ease-out) both;
}
.reveal-1 { animation-delay: 0.08s; }
.reveal-2 { animation-delay: 0.16s; }
.reveal-3 { animation-delay: 0.24s; }
.reveal-4 { animation-delay: 0.32s; }

[data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.4rem); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 991px) {
  .section { padding-block: 5rem; }
  .board--3 { grid-template-columns: 1fr 1fr; }
  .board--3 .board__cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .board--3 .board__cell:nth-child(2n) { border-right: 0; }
  .board--3 .board__cell:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .board--3 .board__cell:nth-last-child(-n + 2) { border-bottom: 0; }
  .steps, .footer__grid, .split, .pages, .template-grid { grid-template-columns: 1fr 1fr; }
  .step, .step:nth-child(2), .step:last-child { padding-left: 0; padding-right: 1.5rem; }
  .step:nth-child(2) { border-right: 0; }
  .step:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 2rem 0 0;
  }
  .split { gap: 2rem; }
  .split img { height: 20rem; }
  .cta { padding: 3rem 1.75rem; }
}

@media (max-width: 767px) {
  :root { --gutter: 1.1rem; --nav-h: 4rem; }
  .section { padding-block: 3.75rem; }
  .hero { min-height: auto; padding-top: 4.5rem; }
  .hero__copy { padding-bottom: 3rem; }
  .display-xl { font-size: 2.55rem; }
  .display-l { font-size: 2rem; }
  .hero__back { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .nav__links, .nav__end .btn { display: none; }
  .nav__toggle { display: grid; place-items: center; }
  .nav.is-open { height: auto; }
  .nav.is-open::before {
    opacity: 1;
    border-bottom-color: var(--line);
    background: rgba(6, 7, 11, 0.94);
  }
  .nav.is-open .nav__inner {
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
  }
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    order: 3;
    gap: 1rem;
    padding: 1rem 0 0.25rem;
  }
  .nav.is-open .nav__end .btn { display: inline-flex; }
  .board--3, .steps, .footer__grid, .split, .pages, .template-grid {
    grid-template-columns: 1fr;
  }
  .board--3 .board__cell,
  .board--3 .board__cell:nth-child(3n),
  .board--3 .board__cell:nth-child(2n) { border-right: 0; }
  .board--3 .board__cell:last-child { border-bottom: 0; }
  .step, .step:nth-child(2), .step:last-child {
    padding: 1.5rem 0 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .feature__meta { flex-direction: column; align-items: flex-start; }
  .feature__tags { justify-content: flex-start; }
  .feature__stage img,
  .preview-frame img { aspect-ratio: 4 / 3; }
  .split img { height: 16rem; }
  .footer__bar { flex-direction: column; }
  .footer__word { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .reveal, [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
