/* Self-hosted fonts (no requests to Google; latin subset only). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

html { scroll-behavior: smooth; background: #0B0B14; }
body { margin: 0; }
a { color: #0B0B14; }
a:hover { color: #4F46E5; }
:focus-visible { outline: 3px solid #C6F432; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { outline: 3px solid #4F46E5; outline-offset: 0; }

/* Honeypot: off-screen for people, still filled in by naive bots. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

#form-status.ok { color: #3F6212; }
#form-status.error { color: #B91C1C; }
button[disabled] { opacity: 0.6; cursor: wait; }

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

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 20, 0.97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
}
.site-header__inner {
  max-width: 1320px; margin: 0 auto; padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo { display: flex; align-items: flex-end; text-decoration: none; }
.site-logo__word {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 30px;
  line-height: 1; letter-spacing: -0.045em; color: #F4F2EC;
}
.site-logo__cursor { display: block; width: 13px; height: 4px; background: #C6F432; margin: 0 0 3px 2px; }

.site-nav {
  display: flex; align-items: center; gap: 28px;
  font-family: 'JetBrains Mono', monospace; font-size: 15px;
}
.nav-link { color: #CBD5E1; text-decoration: none; }
.nav-link:hover { color: #C6F432; }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: #C6F432; color: #0B0B14; text-decoration: none; font-weight: 700;
  box-shadow: 4px 4px 0 #4F46E5;
}
.nav-cta:hover { color: #0B0B14; box-shadow: 2px 2px 0 #4F46E5; transform: translate(2px, 2px); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px; margin: 0;
  background: transparent; color: #F4F2EC; border: 2px solid #F4F2EC; border-radius: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav-toggle__bars span:first-child { top: 1px; }
.nav-toggle__bars span:last-child { top: 9px; }
.is-open .nav-toggle { background: #C6F432; color: #0B0B14; border-color: #C6F432; }
.is-open .nav-toggle__bars span:first-child { top: 5px; transform: rotate(45deg); }
.is-open .nav-toggle__bars span:last-child { top: 5px; transform: rotate(-45deg); }

/* Anchored sections land below the sticky header. */
section[id] { scroll-margin-top: 84px; }

@media (max-width: 760px) {
  .site-header__inner { padding: 14px 20px; }
  .site-logo__word { font-size: 26px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 24px;
    background: #0B0B14; border-bottom: 2px solid #C6F432;
    font-size: 20px;
  }
  .is-open .site-nav { display: flex; }
  .is-open.site-header { border-bottom-color: #2A2A44; }

  .nav-link {
    display: flex; align-items: center; min-height: 56px;
    border-bottom: 1px solid #2A2A44; color: #F4F2EC;
  }
  .nav-cta { justify-content: center; min-height: 56px; margin-top: 20px; font-size: 18px; }

  section[id] { scroll-margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bars span { transition: none; }
}

/* ---------- Case 01: feature tile and sync diagram ---------- */
.case-feature { padding: 48px; }

.sync-diagram-wrap { flex: 1 1 380px; min-width: 0; container-type: inline-size; }

.sync-diagram {
  display: grid;
  grid-template-columns: minmax(118px, 1.25fr) 28px minmax(96px, 1fr) 28px minmax(96px, 1fr);
  align-items: stretch;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; line-height: 1.3;
}
.sync-diagram__feeds { display: flex; flex-direction: column; gap: 10px; }
.sync-diagram__feed {
  display: block; padding: 12px; background: #0B0B14; color: #F4F2EC;
  font-size: 13px; white-space: nowrap;
}
.sync-diagram__engine,
.sync-diagram__store {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 16px 12px;
}
.sync-diagram__engine { background: #4F46E5; color: #FFFFFF; box-shadow: 5px 5px 0 #0B0B14; }
.sync-diagram__store { background: #FFFFFF; color: #0B0B14; border: 2px solid #0B0B14; }

/* Arrow drawn in CSS so it can turn from → to ↓ when the diagram stacks. */
.sync-diagram__arrow { position: relative; align-self: center; width: 28px; height: 28px; }
.sync-diagram__arrow::before {            /* shaft */
  content: ""; position: absolute; left: 2px; right: 8px; top: 13px; height: 2px; background: #0B0B14;
}
.sync-diagram__arrow::after {             /* head */
  content: ""; position: absolute; right: 3px; top: 9px; width: 8px; height: 8px;
  border-top: 2px solid #0B0B14; border-right: 2px solid #0B0B14; transform: rotate(45deg);
}

/* Narrow: stack top-to-bottom, feeds side by side. */
@container (max-width: 460px) {
  .sync-diagram { grid-template-columns: 1fr; gap: 8px; }
  .sync-diagram__feeds { flex-direction: row; gap: 6px; }
  .sync-diagram__feed { flex: 1 1 0; min-width: 0; padding: 10px 4px; text-align: center; font-size: 12px; }
  .sync-diagram__engine, .sync-diagram__store { padding: 14px 12px; }
  .sync-diagram__arrow { justify-self: center; transform: rotate(90deg); }
}

@media (max-width: 600px) {
  .case-feature { padding: 28px 22px; box-shadow: 8px 8px 0 #F4F2EC !important; }
}
