@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg-0: rgb(10, 20, 32);
  --bg-1: rgb(22, 36, 52);
  --bg-2: rgb(32, 50, 70);

  --text-primary: #f3f7fb;
  --text-secondary: #b6c2cf;
  --text-muted: #7f8fa3;

  --accent: #1fb6ff;
  --accent-soft: rgba(31, 182, 255, 0.14);

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --nav-height: 76px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;          /* guard against any horizontal spill on small screens */
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text-primary);
  background:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
    radial-gradient(110% 90% at 85% -10%, rgba(31,182,255,0.10), transparent 55%),
    var(--bg-0);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

.page-main { flex: 1 0 auto; }

.wrap { width: min(var(--maxw), 92%); margin: 0 auto; }

.label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.label .accent { color: var(--accent); }

.ticks { position: relative; }
.ticks::before, .ticks::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border: 1px solid var(--accent);
}
.ticks::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ticks::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(10, 20, 32, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: min(var(--maxw), 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease;
  animation: axis-morse 21s linear infinite;
}
.brand:hover .brand-mark { border-color: var(--accent); }

@keyframes axis-morse {
  0%      { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  1.333%  { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  1.413%  { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  2.667%  { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  2.747%  { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  6.667%  { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  6.747%  { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  16.000% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  16.080% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  20.000% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  20.080% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  21.333% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  21.413% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  22.667% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  22.747% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  24.000% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  24.080% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  25.333% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  25.413% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  26.667% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  26.747% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  30.667% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  30.747% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  40.000% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  40.080% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  41.333% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  41.413% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  42.667% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  42.747% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  44.000% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  44.080% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  53.333% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  53.413% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  54.667% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  54.747% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  56.000% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  56.080% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  57.333% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  57.413% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  58.667% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  58.747% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  60.000% { box-shadow: 0 0 8px 0 rgba(31,182,255,0.3); }
  60.080% { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
  100%    { box-shadow: 0 0 0 0 rgba(31,182,255,0); }
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 12px;
  transition: color 0.18s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text-primary); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 9px 14px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-cta:hover { color: var(--text-primary); border-color: var(--accent); }
.nav-cta small { color: var(--text-muted); font-size: 10px; }

/* ---- mobile menu (native <details>, no JS) ---- */
.nav-menu { display: none; }            /* shown only on small screens */
.nav-burger {
  list-style: none;
  width: 42px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.nav-burger::-webkit-details-marker { display: none; }
.nav-burger:hover { border-color: var(--accent); }
.nav-burger:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.nav-burger .bars,
.nav-burger .bars::before,
.nav-burger .bars::after {
  content: "";
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text-secondary);
  transition: transform 0.2s ease, background 0.2s ease, top 0.2s ease;
}
.nav-burger .bars { position: relative; }
.nav-burger .bars::before { position: absolute; top: -6px; left: 0; }
.nav-burger .bars::after  { position: absolute; top: 6px; left: 0; }
/* open → morph into an × */
.nav-menu[open] .bars { background: transparent; }
.nav-menu[open] .bars::before { top: 0; transform: rotate(45deg); }
.nav-menu[open] .bars::after  { top: 0; transform: rotate(-45deg); }

.nav-menu-panel {
  position: absolute;
  top: calc(var(--nav-height) - 1px);
  left: 4%; right: 4%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: rgba(10, 20, 32, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
}
.nav-menu-panel a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-menu-panel a:last-child { border-bottom: none; }
.nav-menu-panel a:hover { color: var(--text-primary); background: rgba(31, 182, 255, 0.06); }

.btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary {
  position: relative;
  background: var(--accent);
  color: var(--bg-0);
  font-weight: 600;
  border: 1px solid var(--accent);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 7px 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-primary[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.panel {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.18));
}
.readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.cell { background: var(--bg-0); padding: 18px 16px; min-height: 116px; }
.cell .idx { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.cell h4 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  color: var(--text-primary);
}
.cell p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }

.section-head .label { display: block; margin-bottom: 16px; }
.section-head h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.section-head p { margin: 0; color: var(--text-secondary); line-height: 1.6; font-size: 16px; max-width: 62ch; }

footer { border-top: 1px solid var(--line); padding: 26px 0; flex-shrink: 0; }
.footer-inner {
  width: min(var(--maxw), 92%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-inner > span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--text-secondary); text-transform: uppercase; }
.footer-links a:hover { color: var(--text-primary); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
  }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .nav-cta { margin-left: auto; }   /* keep App Access + menu grouped on the right */
}

@media (max-width: 560px) {
  /* on phones, drop the "coming soon" placeholder CTA; brand + menu is enough */
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
