/* Blockgraf landing page — preview stage
   Dark, technical, blue-accented. No frameworks. */

:root {
  --bg: #070b12;
  --bg-elev: #0c121d;
  --bg-elev-2: #111a29;
  --panel: #0f1724;
  --panel-hover: #131e2e;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text: #f1f5f9;
  --text-dim: #a4b1c3;
  --text-mute: #738196;
  --accent: #2f81f7;
  --accent-2: #58a6ff;
  --accent-soft: rgba(47, 129, 247, 0.14);
  --canvas: #3b82f6;
  --type-text: #22c55e;
  --type-html: #a855f7;
  --type-map: #725cff;
  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 8%, rgba(47, 129, 247, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 32%, rgba(114, 92, 255, 0.06), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease),
              border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #368cff, #1f6ee9);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
              0 8px 24px -12px rgba(47, 129, 247, 0.9);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #58a6ff, #2f81f7);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -14px rgba(47, 129, 247, 0.95);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-lg { padding: 13px 26px; font-size: 1.02rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0 0;
  background: transparent;
  pointer-events: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.site-header.scrolled {
  background: transparent;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
  padding-left: 18px;
  padding-right: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 13, 22, 0.78);
  box-shadow: 0 18px 55px -32px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  pointer-events: auto;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.scrolled .header-inner {
  border-color: var(--border-strong);
  background: rgba(8, 13, 22, 0.94);
  box-shadow: 0 20px 55px -28px rgba(0, 0, 0, 0.95);
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}
.footer-logo { height: 44px; opacity: 0.95; }

.primary-nav {
  display: flex;
  gap: 26px;
  margin-left: 8px;
}
.primary-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}
.primary-nav a:hover { color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  pointer-events: auto;
  opacity: 0;
  translate: 0 -8px;
  transition: opacity 0.2s var(--ease), translate 0.2s var(--ease), display 0.2s allow-discrete;
}
.mobile-nav.open { display: flex; opacity: 1; translate: none; }
/* Leaving display: none has no "before" state to transition from; this is it */
@starting-style {
  .mobile-nav.open { opacity: 0; translate: 0 -8px; }
}
.mobile-nav a {
  color: var(--text-dim);
  padding: 10px 4px;
  font-weight: 500;
}
.mobile-nav a:hover { color: var(--text); }
.mobile-nav .btn { margin-top: 6px; }
.mobile-nav .btn-ghost, .mobile-nav .btn-primary { padding: 12px 18px; }

/* Hero */
.hero {
  position: relative;
  padding: clamp(72px, 10vw, 124px) 0 0;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(54% 48% at 50% 2%, rgba(47, 129, 247, 0.22), transparent 72%),
    linear-gradient(rgba(88, 166, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, transparent 65%, rgba(17, 26, 41, 0.65));
  background-size: auto, 42px 42px, 42px 42px, auto;
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(47, 129, 247, 0.1);
  border: 1px solid rgba(47, 129, 247, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.45rem, 6vw, 4.6rem);
  line-height: 1.01;
  letter-spacing: -0.048em;
  font-weight: 790;
  max-width: 14ch;
}
.hero-title .accent {
  background: linear-gradient(112deg, #58a6ff 10%, #8ec5ff 48%, #8b7cff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  margin: 0 auto 30px;
  max-width: 60ch;
  color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Product visual */
.product-visual {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: clamp(50px, 7vw, 84px) auto -64px;
}
.visual-glow {
  position: absolute;
  inset: -10% 10% 30%;
  background: radial-gradient(50% 60% at 50% 40%, rgba(47, 129, 247, 0.28), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}
/* Hero animation (LandingPage/js/heroAnimation.js). The stage is drawn at
   1800 x 800 and scaled to the visual's width (--hero-scale, set by the
   script); the caption stays outside the scaling so it is readable on phones.
   The blockset type colors are illustration, like the rest of this file. */
.hero-anim {
  --hero-scale: 0.555;
  --hero-ink: #0f172a;
  --hero-ink-soft: #475569;
  --hero-grey: #cbd5e1;
  --hero-line: #94a3b8;
  --hero-canvas-bg: linear-gradient(160deg, #0b7cf0, #0567db);
  --hero-text-bg: linear-gradient(160deg, #22c08a, #0f9566);
  --hero-report-bg: linear-gradient(160deg, #f29b14, #c66b04);
  --hero-ideamap-bg: linear-gradient(160deg, #8b6cf6, #6844d8);
  position: relative;
  width: 100%;
  aspect-ratio: 1800 / 800;
  font-family: Inter, system-ui, sans-serif;
}
.hero-anim__symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.hero-anim svg { overflow: visible; }
.hero-anim__stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1800px;
  height: 800px;
  transform: scale(var(--hero-scale));
  transform-origin: 0 0;
  border-radius: 22px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1.5px #232323, 0 30px 80px rgba(0, 0, 0, 0.5);
}
.hero-anim__bar {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 28px;
  border-bottom: 1.5px solid #232323;
}
.hero-anim__dot { width: 16px; height: 16px; border-radius: 8px; background: #ff5f57; }
.hero-anim__dot:nth-child(2) { background: #febc2e; }
.hero-anim__dot:nth-child(3) { background: #28c840; }
.hero-anim__name { margin-left: 22px; font-size: 20px; font-weight: 600; color: #ffffff; }
.hero-anim__count { margin-left: 8px; font-size: 17px; color: #8a8a8a; }
.hero-anim__canvas {
  position: absolute;
  left: 24px;
  top: 84px;
  width: 1752px;
  height: 692px;
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
}
.hero-anim__world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1752px;
  height: 692px;
  transform-origin: 0 0;
}
.hero-anim__cell {
  position: absolute;
  border-radius: 8px;
  background: #141414;
  box-shadow: inset 0 0 0 1px #222222;
}
.hero-anim__ghost {
  position: absolute;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #0b7cf0;
  opacity: 0;
}

/* Blocksets in the grid */
.hero-block {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  color: #0a0a0a;
  background: var(--hero-canvas-bg);
  box-shadow: 0 0 13px rgba(11, 124, 240, 0.21);
}
.hero-block[data-type="text"] { background: var(--hero-text-bg); box-shadow: 0 0 13px rgba(34, 192, 138, 0.21); }
.hero-block[data-type="report"] { background: var(--hero-report-bg); box-shadow: 0 0 13px rgba(242, 155, 20, 0.21); }
.hero-block[data-type="ideamap"] { background: var(--hero-ideamap-bg); box-shadow: 0 0 13px rgba(139, 108, 246, 0.21); color: #ffffff; }
.hero-block svg,
.hero-anim__symbols {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-icon-fill { fill: currentColor; }
.hero-icon-solid { stroke: none; }
.hero-icon-line { stroke: rgba(0, 0, 0, 0.35); }
.hero-block__mark {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 58px;
  height: 58px;
  opacity: 0.22;
  stroke-width: 2.4;
}
.hero-block__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero-block__badge svg { width: 12px; height: 12px; stroke-width: 2.6; }
.hero-block__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.hero-anim__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.55);
  opacity: 0;
}

/* The opened blockset: grows from its block into a card */
.hero-card {
  --hero-card-k: 0;
  position: absolute;
  overflow: hidden;
  visibility: hidden;
  box-shadow: 0 calc(24px * var(--hero-card-k)) calc(60px * var(--hero-card-k)) rgba(0, 0, 0, 0.5);
}
.hero-card__tint,
.hero-card__paper { position: absolute; inset: 0; }
.hero-card__tint { background: var(--hero-canvas-bg); opacity: calc(1 - var(--hero-card-k)); }
.hero-card[data-type="text"] .hero-card__tint { background: var(--hero-text-bg); }
.hero-card[data-type="report"] .hero-card__tint { background: var(--hero-report-bg); }
.hero-card[data-type="ideamap"] .hero-card__tint { background: var(--hero-ideamap-bg); }
.hero-card__paper { background: #f4f6fb; opacity: min(1, calc(var(--hero-card-k) * 1.4)); }
.hero-card__body {
  position: absolute;
  left: 0;
  top: 0;
  width: 880px;
  height: 380px;
  visibility: hidden;
  color: var(--hero-ink);
}
.hero-card__head {
  position: absolute;
  left: 26px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-card__pill {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #0567db;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1.5px #93c5fd;
}
.hero-card__pill[data-type="text"] { color: #047857; background: #d1fae5; box-shadow: inset 0 0 0 1.5px #6ee7b7; }
.hero-card__pill[data-type="report"] { color: #c2410c; background: #ffedd5; box-shadow: inset 0 0 0 1.5px #fdba74; }
.hero-card__pill[data-type="ideamap"] { color: #6d28d9; background: #ede9fe; box-shadow: inset 0 0 0 1.5px #c4b5fd; }
.hero-card__title { font-size: 21px; font-weight: 600; }

.hc-canvas__image {
  position: absolute;
  left: 40px;
  top: 92px;
  width: 300px;
  height: 190px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #bfdbfe, #93c5fd);
}
.hc-canvas__image svg { width: 100%; height: 100%; }
.hc-canvas__image path { fill: #3b82f6; opacity: 0.55; }
.hc-canvas__image circle { fill: #eff6ff; }
.hc-canvas__text { position: absolute; left: 390px; top: 104px; width: 420px; }
.hc-canvas__text strong { display: block; margin-bottom: 12px; font-size: 26px; font-weight: 600; }
.hc-canvas__text span { font-size: 19px; line-height: 1.5; color: var(--hero-ink-soft); }
.hc-canvas__buttons { position: absolute; left: 390px; top: 240px; display: flex; gap: 14px; }
.hc-canvas__primary,
.hc-canvas__secondary { padding: 12px 22px; border-radius: 10px; font-size: 18px; }
.hc-canvas__primary { background: var(--hero-canvas-bg); color: #0a0a0a; font-weight: 700; }
.hc-canvas__secondary { box-shadow: inset 0 0 0 1.5px var(--hero-grey); font-weight: 600; }
.hc-canvas__note {
  position: absolute;
  left: 660px;
  top: 300px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
  font-size: 16px;
}

.hc-text {
  position: absolute;
  left: 48px;
  top: 96px;
  width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hc-text__heading { font-size: 26px; font-weight: 600; }
.hc-text__item { display: flex; align-items: center; gap: 14px; font-size: 20px; color: var(--hero-ink-soft); }
.hc-text__item::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #10a874; flex-shrink: 0; }
.hc-text__lines { display: flex; flex-direction: column; gap: 10px; }
.hc-text__lines span { height: 14px; border-radius: 4px; background: var(--hero-grey); width: 92%; }
.hc-text__lines span + span { width: 70%; }

.hc-report__bar,
.hc-report__stem,
.hc-report__rail,
.hc-report__leaf { position: absolute; }
.hc-report__bar { left: 260px; top: 110px; width: 0; height: 22px; border-radius: 5px; background: var(--hero-report-bg); }
.hc-report__stem { left: 439px; top: 132px; width: 2px; height: 0; background: var(--hero-line); }
.hc-report__rail { top: 159px; height: 2px; background: var(--hero-line); }
.hc-report__leaf { height: 22px; border-radius: 5px; background: var(--hero-grey); opacity: 0; }

.hc-map__branches { position: absolute; left: 0; top: 0; width: 880px; height: 380px; }
.hc-map__branches path { fill: none; stroke: var(--hero-line); stroke-width: 2; opacity: 0; }
.hc-map__center,
.hc-map__node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.hc-map__center {
  left: 220px;
  top: 202px;
  width: 160px;
  height: 52px;
  border-radius: 26px;
  background: var(--hero-ideamap-bg);
  color: #eaf1ff;
  font-size: 20px;
}
.hc-map__node {
  width: 140px;
  height: 42px;
  border-radius: 21px;
  background: #ede9fe;
  box-shadow: inset 0 0 0 1.5px #c4b5fd;
  color: #6d28d9;
  font-size: 17px;
  opacity: 0;
}

.hero-anim__cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 42px;
  transform-origin: 4px 2px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  opacity: 0;
}
.hero-anim__cursor path { fill: #f4f6fb; stroke: #05080f; stroke-width: 2; stroke-linejoin: round; }

.hero-anim__caption {
  position: absolute;
  left: calc(48px * var(--hero-scale));
  bottom: calc(48px * var(--hero-scale));
  max-width: calc(100% - 96px * var(--hero-scale));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.94);
  box-shadow: inset 0 0 0 1px #232323, 0 10px 30px rgba(0, 0, 0, 0.4);
  color: #e5e5e5;
  font-size: clamp(11px, calc(26px * var(--hero-scale)), 15px);
  font-weight: 500;
  opacity: 0;
}
.hero-anim__caption-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; background: #0b7cf0; }
.hero-anim__caption[data-type="canvas"] .hero-anim__caption-dot { background: #93c5fd; }
.hero-anim__caption[data-type="text"] .hero-anim__caption-dot { background: #6ee7b7; }
.hero-anim__caption[data-type="report"] .hero-anim__caption-dot { background: #fdba74; }
.hero-anim__caption[data-type="ideamap"] .hero-anim__caption-dot { background: #c4b5fd; }

.scroll-hint {
  position: relative;
  z-index: 2;
  margin: 92px auto 0;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-hint .chev {
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg);
  animation: bob 1.8s var(--ease) infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* Sections */
.section { position: relative; padding: clamp(68px, 8vw, 96px) 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #8b7cff);
  box-shadow: 0 0 20px rgba(47, 129, 247, 0.45);
}
.section-head:has(.eyebrow)::before { display: none; }
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  letter-spacing: -0.035em;
  font-weight: 760;
}
.section-head p { margin: 0; color: var(--text-dim); font-size: 1.06rem; }

/* How it works */
.how {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 26, 41, 0.82), rgba(12, 18, 29, 0.94));
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(20, 30, 46, 0.9), rgba(12, 19, 30, 0.96));
  padding: 30px 26px;
  overflow: hidden;
  box-shadow: 0 18px 55px -42px rgba(0, 0, 0, 0.9);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.how-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -55px;
  top: -65px;
  border-radius: 50%;
  background: rgba(47, 129, 247, 0.09);
  filter: blur(4px);
}
.how-card:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 166, 255, 0.34);
  box-shadow: 0 26px 60px -38px rgba(47, 129, 247, 0.35);
}
.how-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 18px;
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 9px;
  background: rgba(47, 129, 247, 0.08);
}
.how-card h3, .use-card h3, .type-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.how-card p, .use-card p, .type-card p { margin: 0; color: var(--text-dim); }

/* Use cases */
.use-cases {
  background:
    radial-gradient(circle at 50% 0%, rgba(47, 129, 247, 0.055), transparent 35rem),
    var(--bg);
}
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.use-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(19, 29, 45, 0.94), rgba(11, 18, 29, 0.98));
  padding: 30px 26px 30px 30px;
  overflow: hidden;
  box-shadow: 0 20px 55px -44px rgba(0, 0, 0, 0.9);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease);
}
.use-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-2), rgba(114, 92, 255, 0.35), transparent);
  opacity: 0.9;
}
.use-card:nth-child(2)::before { background: linear-gradient(180deg, #8b7cff, rgba(114, 92, 255, 0.3), transparent); }
.use-card:nth-child(3)::before { background: linear-gradient(180deg, #22c55e, rgba(34, 197, 94, 0.25), transparent); }
.use-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }

/* Content types */
.content-types {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 18, 29, 0.96), rgba(15, 23, 36, 0.96));
}
.types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.type-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(19, 29, 45, 0.92), rgba(11, 18, 29, 0.98));
  padding: 26px 22px 28px;
  overflow: hidden;
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.type-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--canvas);
  opacity: 0.8;
}
.type-card:nth-child(2)::before { background: var(--type-text); }
.type-card:nth-child(3)::before { background: var(--type-html); }
.type-card:nth-child(4)::before { background: var(--type-map); }
.type-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 55px -38px rgba(0, 0, 0, 0.95);
}
.type-icon {
  display: inline-block;
  width: 40px; height: 40px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 10px 25px -16px rgba(0, 0, 0, 0.9);
  position: relative;
}
.icon-canvas::after {
  content: ""; position: absolute; inset: 10px;
  border: 2px solid var(--canvas); border-radius: 4px;
}
.icon-text::after {
  content: ""; position: absolute; left: 11px; right: 11px; top: 13px;
  height: 2px; background: var(--type-text);
  box-shadow: 0 6px 0 var(--type-text), 0 12px 0 rgba(34,197,94,0.5);
}
.icon-html::after {
  content: ""; position: absolute; left: 11px; bottom: 11px;
  width: 4px; height: 12px; background: var(--type-html);
  box-shadow: 7px 0 0 var(--type-html), 14px -6px 0 rgba(168,85,247,0.6);
}
.icon-map::before {
  content: ""; position: absolute; left: 10px; top: 19px;
  width: 20px; height: 2px; background: rgba(114, 92, 255, 0.55);
  transform: rotate(-18deg); transform-origin: center;
}
.icon-map::after {
  content: ""; position: absolute; left: 12px; top: 12px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--type-map);
  box-shadow: 11px 3px 0 var(--type-text), 4px 13px 0 var(--type-html);
}

/* Trending / featured public spaces */
.trending {
  border-top: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 46%, rgba(47, 129, 247, 0.09), transparent 28rem),
    var(--bg-elev);
}
.section-head .eyebrow { margin-bottom: 16px; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 720px;
  margin: 0 auto;
}
.featured-grid:has(.feat-card:only-child) { max-width: 820px; grid-template-columns: 1fr; }
.feat-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(19, 29, 45, 0.97), rgba(10, 16, 26, 0.99));
  overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.featured-grid:has(.feat-card:only-child) .feat-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: stretch;
}
.featured-grid:has(.feat-card:only-child) .feat-thumb { aspect-ratio: 16 / 10; }
.featured-grid:has(.feat-card:only-child) .feat-body { justify-content: center; padding: 28px; }
.feat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}
.feat-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #05080f;
  overflow: hidden;
}
.feat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  display: block;
}
.feat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #eaf2ff;
  background: rgba(10, 14, 23, 0.78);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 999px;
}
.feat-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}
.feat-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.feat-desc { color: var(--text-dim); font-size: 0.95rem; }
.feat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.feat-meta { color: var(--text-mute); font-size: 0.85rem; }
.feat-link { color: var(--accent-2); font-size: 0.9rem; font-weight: 600; }
.feat-card:hover .feat-link { text-decoration: underline; }

/* Closing */
.closing { border-top: 1px solid var(--border); text-align: center; }
.closing-inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: clamp(44px, 7vw, 72px) clamp(24px, 7vw, 80px);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -40%, rgba(47, 129, 247, 0.28), transparent 60%),
    linear-gradient(145deg, rgba(18, 29, 46, 0.96), rgba(9, 15, 25, 0.99));
  box-shadow: 0 35px 90px -55px rgba(47, 129, 247, 0.55);
}
.closing-inner::before,
.closing-inner::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(88, 166, 255, 0.09);
  border-radius: 50%;
}
.closing-inner::before { left: -105px; top: -110px; }
.closing-inner::after { right: -120px; bottom: -115px; }
.closing-inner > * { position: relative; z-index: 1; }
.closing h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.closing p { margin: 0 0 28px; color: var(--text-dim); font-size: 1.1rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #080d16;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-note { margin: 0; color: var(--text-mute); font-size: 0.92rem; }
.footer-contact {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-link {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.15s var(--ease);
}
.footer-link:hover { color: var(--accent-2); }
.footer-social {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.footer-social:hover { border-color: var(--accent); background: var(--accent-soft); }
.footer-social img { width: 18px; height: 18px; display: block; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.footer-copy { margin: 0; color: var(--text-mute); font-size: 0.85rem; }

/* Reveal on scroll: each block fades up as it enters the viewport, driven by
   its own scroll position instead of a timer or an IntersectionObserver. It
   animates `translate` and `scale`, not `transform`, so the cards keep their
   hover lift. The ranges use `cover`, which scales with the viewport: an
   `entry` range lasts only the block's own height and is over before the eye
   catches it. Even the last block above the footer reaches `cover 35%`.
   Browsers without view timelines show everything as before. */
@keyframes reveal {
  from { opacity: 0; translate: 0 var(--reveal-shift, 64px); scale: var(--reveal-scale, 0.96); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head, .how-card, .use-card, .type-card, .feat-card, .closing-inner {
      animation: reveal ease-out both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
    /* Cards on one row enter together; start each one a little later */
    :is(.how-card, .use-card, .type-card):nth-child(2) { animation-range: entry 5% cover 40%; }
    :is(.how-card, .use-card, .type-card):nth-child(3) { animation-range: entry 10% cover 45%; }
    .type-card:nth-child(4) { animation-range: entry 15% cover 50%; }
  }
  /* On a wide screen a whole row enters at once and 64px is lost in it: the
     blocks rise further and the cards of a row start clearly one after the
     other, each finishing a little higher on the screen. */
  @media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
    .section-head, .how-card, .use-card, .type-card, .feat-card, .closing-inner {
      --reveal-shift: 120px;
      --reveal-scale: 0.92;
      animation-range: entry 0% cover 30%;
    }
    :is(.how-card, .use-card, .type-card):nth-child(2) { animation-range: entry 20% cover 36%; }
    :is(.how-card, .use-card, .type-card):nth-child(3) { animation-range: entry 40% cover 42%; }
    .type-card:nth-child(4) { animation-range: entry 60% cover 48%; }
  }
}

/* Responsive */
@media (min-width: 761px) {
  /* The mobile menu must never leak onto desktop, even if left open on resize */
  .mobile-nav { display: none !important; }
}

@media (max-width: 900px) {
  .how-grid, .use-grid { grid-template-columns: 1fr 1fr; }
  .types-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .primary-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .site-header { padding-top: 7px; }
  .header-inner { height: 58px; border-radius: 14px; }
  .mobile-nav {
    margin: 7px 20px 0;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.95);
  }
  .br-desktop { display: none; }
  .product-visual { margin-bottom: -40px; }
  .scroll-hint { margin-top: 64px; }
  .featured-grid:has(.feat-card:only-child) .feat-card { grid-template-columns: 1fr; }
  .featured-grid:has(.feat-card:only-child) .feat-thumb { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .how-grid, .use-grid, .types-grid, .featured-grid { grid-template-columns: 1fr; }
  /* The scaled window is small here: the caption goes under it, not over it */
  .hero-anim__caption { top: calc(100% + 10px); bottom: auto; left: 0; max-width: 100%; }
  .product-visual { margin-bottom: 0; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
  .closing-inner { border-radius: 22px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint .chev { animation: none; }
  .btn, .how-card, .use-card, .type-card, .feat-card, .mobile-nav { transition: none; }
}

/* Controls share the app's focus indicator (static/css/blockgraf-ui.css). */
.btn:focus-visible,
.nav-toggle:focus-visible,
.primary-nav a:focus-visible,
.mobile-nav a:focus-visible,
.footer-link:focus-visible,
.feat-card:focus-visible,
.brand:focus-visible {
  outline: var(--bgf-focus-ring);
  outline-offset: var(--bgf-focus-offset);
}
