/* ==========================================================================
   Blup Landing (blup.mx) — Design System & Modern Responsive CSS
   Zero external font requests · Zero trackers · Blup v1.0.0 palette
   ========================================================================== */

:root {
  --bg: #071a20;
  --bg-deep: #041116;
  --surface: #0e2a33;
  --surface-high: #153c48;
  --surface-glass: rgba(12, 39, 48, 0.78);
  --border: rgba(76, 229, 226, 0.22);
  --border-strong: rgba(76, 229, 226, 0.48);

  --text-primary: #eef9fa;
  --text-secondary: #b7d8dc;
  --text-muted: #7fa7ae;

  --accent: #4ce5e2;
  --accent-deep: #1b8c96;
  --ok: #34d399;
  --warm: #fbbf24;
  --danger: #f87171;
  --violet: #c3b6ff;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-card: 0 18px 46px rgba(2, 11, 15, 0.45);
  --shadow-glow: 0 0 36px rgba(76, 229, 226, 0.16);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;

  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background:
    radial-gradient(900px 540px at 85% -6%, rgba(76, 229, 226, 0.14), transparent 60%),
    radial-gradient(760px 460px at 10% 18%, rgba(36, 158, 168, 0.12), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #8df4f2;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -120px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #041d24;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout Containers */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.25rem, 2.2rem + 4vw, 5.5rem);
}

.section--alt {
  background: linear-gradient(
    180deg,
    rgba(13, 40, 49, 0.46) 0%,
    rgba(7, 26, 32, 0.12) 100%
  );
  border-block: 1px solid rgba(76, 229, 226, 0.08);
}

/* Responsive Typography (clamp max <= 2.5x min for WCAG 1.4.4 200% zoom) */
h1,
.h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.35rem + 2.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

h2,
.h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.5rem, 1.15rem + 1.45vw, 2.45rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

h3,
.h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.28;
  font-weight: 700;
}

.lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1.03rem, 0.96rem + 0.35vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(76, 229, 226, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow--ok {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
}

.eyebrow--warm {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.12);
  color: var(--warm);
}

.eyebrow--danger {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
}

.eyebrow--violet {
  border-color: rgba(195, 182, 255, 0.5);
  background: rgba(195, 182, 255, 0.12);
  color: var(--violet);
}

.text-accent {
  color: var(--accent);
}

.text-ok {
  color: var(--ok);
}

.text-warm {
  color: var(--warm);
}

.text-danger {
  color: var(--danger);
}

.text-muted {
  color: var(--text-muted);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 26, 32, 0.86);
  border-bottom: 1px solid rgba(76, 229, 226, 0.14);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #249ea8, #4ce5e2);
  padding: 4px;
}

.brand-version {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(76, 229, 226, 0.14);
  color: var(--accent);
  border: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0.35rem 0.2rem;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 70px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem 1.25rem 1.35rem;
    background: rgba(7, 26, 32, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.5rem;
    font-size: 1rem;
  }
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2bc7cc);
  color: #041d24;
  box-shadow: 0 8px 26px rgba(76, 229, 226, 0.25);
}

.btn--primary:hover {
  color: #041d24;
  background: linear-gradient(135deg, #6cf1ee, #3dd7dc);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  color: var(--accent);
  background: var(--surface-high);
}

.btn--subtle {
  background: rgba(76, 229, 226, 0.1);
  color: var(--accent);
  border-color: var(--border);
  min-height: 40px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

.btn--subtle:hover {
  background: rgba(76, 229, 226, 0.18);
  color: var(--text-primary);
}

/* Hero */
.hero {
  min-height: 82dvh;
  display: grid;
  align-items: center;
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--surface);
  aspect-ratio: 4 / 5;
  max-width: 470px;
  width: 100%;
  justify-self: center;
}

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

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.78rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(14, 42, 51, 0.9);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.pill--ok {
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--ok);
}

.pill--warm {
  border-color: rgba(251, 191, 36, 0.45);
  color: var(--warm);
}

.pill--violet {
  border-color: rgba(195, 182, 255, 0.45);
  color: var(--violet);
}

/* Proof / Metrics Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-item {
  padding: 0.5rem 0.75rem;
}

.stat-value {
  font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.9rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Container-Query Driven Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1.35rem;
}

.card-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.feature-shell,
.download-shell,
.split-shell {
  container-type: inline-size;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1.45rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(19, 54, 66, 0.88), rgba(11, 34, 42, 0.94));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.card--highlight {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(76, 229, 226, 0.2);
  background: var(--bg-deep);
  cursor: zoom-in;
}

.card-media--4x5 {
  aspect-ratio: 4 / 5;
}

.card-media--9x16 {
  aspect-ratio: 9 / 16;
}

.card-media--square {
  aspect-ratio: 1 / 1;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.card-media:hover img {
  transform: scale(1.025);
}

/* @container query: horizontal layout inside wide feature/download shells */
@container (min-width: 540px) {
  .split-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 1.75rem;
  }

  .split-card--reverse {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 1.25rem + 2vw, 3.25rem);
  align-items: center;
}

@media (max-width: 860px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

/* Interactive Hop / River Stepper */
.stepper-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.stepper-tab {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.stepper-tab[aria-selected="true"] {
  background: rgba(76, 229, 226, 0.18);
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-panel {
  padding: 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.stepper-panel[hidden] {
  display: none;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.check-list li {
  position: relative;
  padding-left: 1.65rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ok);
  font-weight: 800;
}

/* Story / Artwork Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.15rem;
}

.gallery-trigger {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color 160ms ease, transform 180ms ease;
}

.gallery-trigger:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.gallery-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--bg-deep);
}

.gallery-thumb--4x5 {
  aspect-ratio: 4 / 5;
}

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

.gallery-caption {
  padding: 0.85rem 1rem;
}

.gallery-caption strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.gallery-caption span {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Code & SHA-256 Verification Box */
.code-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #a7f3d0;
  overflow-x: auto;
}

.code-box code {
  word-break: break-all;
}

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 0.9rem 1.05rem;
  text-align: left;
  border-bottom: 1px solid rgba(76, 229, 226, 0.12);
  font-size: 0.92rem;
}

th {
  background: rgba(4, 17, 22, 0.55);
  color: var(--accent);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
}

details.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 1.25rem;
}

details.faq-item[open] {
  border-color: var(--border-strong);
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

details.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item p {
  margin: 0.85rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Legal / Prose Pages */
.prose {
  max-width: 78ch;
}

.prose h2 {
  margin-top: 2.25rem;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.65rem);
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.notice-box {
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-md);
  background: rgba(76, 229, 226, 0.08);
  border: 1px solid var(--border-strong);
  margin-block: 1.25rem;
}

.notice-box--warn {
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.45);
}

/* Native <dialog> Lightbox (modern-web-guidance: light-dismiss-a-dialog) */
dialog.lightbox {
  margin: auto;
  padding: 0;
  width: min(94vw, 680px);
  max-height: 90dvh;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

dialog.lightbox::backdrop {
  background-color: rgba(3, 14, 18, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.lightbox-header h2 {
  margin: 0;
  font-size: 1rem;
}

.lightbox-close {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-body {
  padding: 1rem;
  overflow: auto;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.lightbox-body img {
  max-height: 70dvh;
  width: auto;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Scroll-Driven Entry Animations (modern-web-guidance: scroll-entry-exit-effects) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes blup-reveal {
      from {
        opacity: 0;
        transform: translateY(22px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .reveal {
      animation: blup-reveal auto linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
    }
  }
}

/* Fallback class toggled by IntersectionObserver only when CSS scroll timelines are unsupported */
.reveal.is-js-hidden {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-js-hidden.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(76, 229, 226, 0.14);
  background: var(--bg-deep);
  padding-block: 2.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

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

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

.footer-title {
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(76, 229, 226, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
