/* ==========================================================================
   OOTT website — "Network Operations Terminal"
   A warm, retro-technical interface. Palette mirrors the app's Gruvbox
   dark theme (frontend/lib/theme); type pairs a characterful display
   grotesque with a refined body sans and a monospace for technical chrome.
   ========================================================================== */

:root {
  /* Gruvbox surfaces */
  --bg-hard: #1d2021;
  --bg: #282828;
  --bg-soft: #32302f;
  --bg1: #3c3836;
  --bg2: #504945;
  --bg3: #665c54;
  --bg4: #7c6f64;

  /* Text */
  --fg: #ebdbb2;
  --fg2: #d5c4a1;
  --gray: #928374;

  /* Accents (bright variants) */
  --orange: #fe8019;
  --blue: #83a598;
  --aqua: #8ec07c;
  --green: #b8bb26;
  --yellow: #fabd2f;
  --red: #fb4934;
  --purple: #d3869b;

  /* Semantic */
  --primary: var(--orange);
  --on-primary: var(--bg-hard);

  /* Layout */
  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 64px;

  /* Type */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-logo: "Barlow Condensed", var(--font-sans);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fine film-grain overlay for warmth/depth */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.4em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

.accent-word {
  color: var(--orange);
  font-style: italic;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

/* Small live "phosphor" status dot, reused in hero + footer */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent);
  animation: pulse-dot 2.4s var(--ease) infinite;
  vertical-align: middle;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Scroll-reveal: elements start hidden, JS adds .is-visible */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* --------------------------------------------------------------------------
   The OOTT logo badge (matches the Flutter app's AppBar)
   -------------------------------------------------------------------------- */

.logo-badge {
  display: inline-block;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--on-primary);
  background: var(--primary);
  padding: 4px 14px;
  border-radius: 10px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.16s var(--ease),
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--orange) 90%, transparent);
}

.btn-primary:hover {
  background: #ff922e;
  box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--orange) 85%, transparent);
}

.btn-ghost {
  background: color-mix(in srgb, var(--bg1) 40%, transparent);
  color: var(--fg);
  border-color: var(--bg2);
}

.btn-ghost:hover {
  border-color: var(--orange);
  background: var(--bg1);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--orange) 30%, transparent);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-hard) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--bg1);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  transition: transform 0.16s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--fg2);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.nav-menu a:hover {
  color: var(--fg);
  background: var(--bg1);
  text-decoration: none;
}

.nav-menu .btn-ghost {
  padding: 8px 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--bg2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s ease;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      900px 480px at 78% 8%,
      color-mix(in srgb, var(--orange) 14%, transparent),
      transparent 62%
    ),
    radial-gradient(
      700px 500px at 0% 100%,
      color-mix(in srgb, var(--blue) 10%, transparent),
      transparent 60%
    ),
    var(--bg-hard);
  padding: clamp(56px, 10vw, 116px) 0 clamp(56px, 9vw, 104px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg1) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg1) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 25%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero h1 {
  margin-bottom: 0.5em;
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: var(--fg2);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 20px;
}

.hero-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gray);
  margin: 0;
}

/* Radar / live scan visual ------------------------------------------------- */

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.radar {
  position: relative;
  width: min(420px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at center,
      color-mix(in srgb, var(--aqua) 8%, transparent),
      transparent 70%
    ),
    color-mix(in srgb, var(--bg-hard) 70%, transparent);
  border: 1px solid var(--bg2);
  box-shadow:
    inset 0 0 60px -20px color-mix(in srgb, var(--aqua) 40%, transparent),
    0 30px 80px -40px #000;
  overflow: hidden;
}

.radar-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border: 1px solid color-mix(in srgb, var(--aqua) 26%, transparent);
  border-radius: 50%;
}

.radar-ring:nth-child(1) {
  width: 33%;
  height: 33%;
}

.radar-ring:nth-child(2) {
  width: 66%;
  height: 66%;
}

.radar-ring:nth-child(3) {
  width: 99%;
  height: 99%;
}

.radar-cross {
  position: absolute;
  background: color-mix(in srgb, var(--aqua) 18%, transparent);
}

.radar-cross-h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

.radar-cross-v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 300deg,
    color-mix(in srgb, var(--aqua) 8%, transparent) 340deg,
    color-mix(in srgb, var(--aqua) 45%, transparent) 360deg
  );
  animation: sweep 4s linear infinite;
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

.radar-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--orange) 80%, transparent);
  animation: node-appear 0.5s var(--ease) forwards;
}

.radar-node::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  opacity: 0;
  animation: node-ping 2.6s var(--ease) infinite;
}

.radar-node.is-blue {
  background: var(--blue);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--blue) 80%, transparent);
}

.radar-node.is-blue::after {
  border-color: var(--blue);
}

.radar-node.is-yellow {
  background: var(--yellow);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--yellow) 80%, transparent);
}

.radar-node.is-yellow::after {
  border-color: var(--yellow);
}

.radar-label {
  position: absolute;
  left: 13px;
  top: -7px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--fg2);
  background: color-mix(in srgb, var(--bg-hard) 78%, transparent);
  border: 1px solid var(--bg2);
  padding: 1px 6px;
  border-radius: 5px;
}

@keyframes node-appear {
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes node-ping {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.radar-readout {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--gray);
  margin: 0;
  letter-spacing: 0.03em;
}

.readout-label {
  color: var(--aqua);
}

.readout-label::before {
  content: "▸ ";
}

.readout-count {
  color: var(--orange);
  font-weight: 600;
  margin: 0 2px;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  z-index: 2;
  padding: clamp(60px, 9vw, 108px) 0;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--bg1);
  border-bottom: 1px solid var(--bg1);
}

.section-head {
  max-width: 60ch;
  margin: 0 auto clamp(40px, 5vw, 60px);
  text-align: center;
}

.section-head p:not(.section-tag) {
  color: var(--fg2);
  font-size: 1.12rem;
  margin: 0;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 16px;
}

.section-tag-center {
  text-align: center;
  margin-bottom: 28px;
}

/* A secondary heading band inside a section (e.g. the app showcase
   consolidated under Features). */
.section-subhead {
  margin-top: clamp(60px, 8vw, 96px);
}

.section-subhead h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 18px;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  --accent: var(--orange);
  position: relative;
  background: var(--bg);
  border: 1px solid var(--bg1);
  border-radius: var(--radius);
  padding: 30px 26px 28px;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    transform 0.2s var(--ease),
    box-shadow 0.25s ease;
}

/* Top accent line that lights up on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--bg2));
  transform: translateY(-4px);
  box-shadow:
    0 24px 50px -30px #000,
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  color: var(--fg2);
  margin: 0;
  font-size: 0.98rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s var(--ease);
}

.card:hover .card-icon {
  box-shadow: 0 0 22px -4px color-mix(in srgb, var(--accent) 70%, transparent);
  transform: translateY(-1px);
}

.card-icon svg {
  width: 25px;
  height: 25px;
}

/* --------------------------------------------------------------------------
   Deploy / code
   -------------------------------------------------------------------------- */

.deploy {
  max-width: 780px;
  margin: 0 auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tab {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--fg2);
  background: var(--bg);
  border: 1px solid var(--bg1);
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.tab:hover {
  border-color: var(--bg3);
  color: var(--fg);
}

.tab.is-active {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 22px -12px color-mix(in srgb, var(--orange) 90%, transparent);
}

.panel[hidden] {
  display: none;
}

.code-block {
  position: relative;
  background: var(--bg-hard);
  border: 1px solid var(--bg1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -40px #000;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 70%, var(--bg-hard));
  border-bottom: 1px solid var(--bg1);
}

.code-dots {
  display: inline-flex;
  gap: 6px;
}

.code-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg3);
}

.code-dots i:nth-child(1) {
  background: var(--red);
}

.code-dots i:nth-child(2) {
  background: var(--yellow);
}

.code-dots i:nth-child(3) {
  background: var(--green);
}

.code-file {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray);
}

.code-block pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--fg);
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 50px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--fg2);
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--fg);
  border-color: var(--orange);
}

.copy-btn.is-copied {
  color: var(--on-primary);
  background: var(--green);
  border-color: var(--green);
}

.code-note {
  color: var(--fg2);
  font-size: 0.95rem;
  margin: 16px 2px 0;
}

.deploy-links {
  text-align: center;
  color: var(--gray);
  margin: 34px 0 0;
}

/* --------------------------------------------------------------------------
   Store buttons
   -------------------------------------------------------------------------- */

.store-intro {
  text-align: center;
  color: var(--fg2);
  margin: 40px 0 18px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
  padding: 11px 22px;
  border: 1px solid var(--bg2);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.store-glyph svg {
  width: 24px;
  height: 24px;
  color: var(--fg2);
}

.store-text {
  display: inline-flex;
  flex-direction: column;
}

.store-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-sub {
  font-size: 0.72rem;
  color: var(--gray);
}

.store-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
}

.store-note {
  max-width: 60ch;
  margin: 22px auto 0;
  text-align: center;
  color: var(--fg2);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Apps showcase
   -------------------------------------------------------------------------- */

.showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  flex-wrap: wrap;
}

.device-screen {
  position: relative;
}

.shot-caption {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg2);
  background: color-mix(in srgb, var(--bg-hard) 82%, transparent);
  border: 1px solid var(--bg2);
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.device-browser {
  flex: 1 1 540px;
  max-width: 660px;
  margin: 0;
  background: var(--bg-hard);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s ease;
}

.device-browser:hover {
  transform: perspective(1600px) rotateX(2deg) translateY(-4px);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.85);
}

.browser-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--bg1);
}

.browser-dots {
  display: inline-flex;
  gap: 7px;
}

.browser-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg3);
}

.browser-dots i:nth-child(1) {
  background: var(--red);
}

.browser-dots i:nth-child(2) {
  background: var(--yellow);
}

.browser-dots i:nth-child(3) {
  background: var(--green);
}

.browser-url {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--gray);
  background: var(--bg-hard);
  border: 1px solid var(--bg1);
  border-radius: 6px;
  padding: 3px 12px;
  flex: 1;
  max-width: 280px;
}

.device-phone {
  flex: 0 0 200px;
  width: 200px;
  margin: 0;
  background: var(--bg-hard);
  border: 6px solid var(--bg1);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  transition: transform 0.4s var(--ease);
}

.device-phone:hover {
  transform: translateY(-6px);
}

/* Clickable screenshots ---------------------------------------------------- */
.shot-link {
  cursor: pointer;
}

.shot-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.shot-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--fg2);
  background: color-mix(in srgb, var(--bg-hard) 82%, transparent);
  border: 1px solid var(--bg2);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  pointer-events: none;
}

.shot-expand svg {
  width: 16px;
  height: 16px;
}

.shot-link:hover .shot-expand,
.shot-link:focus-visible .shot-expand {
  opacity: 1;
  transform: scale(1);
}

@media (hover: none) {
  .shot-expand {
    opacity: 1;
    transform: scale(1);
  }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox:not([open]) {
  display: none;
}

.lightbox[open] .lightbox-body {
  animation: lightbox-in 0.28s var(--ease);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--fg);
  background: var(--bg-hard);
  border: 1px solid var(--bg2);
  cursor: pointer;
  transition:
    transform 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.lightbox-close:hover {
  transform: scale(1.06);
  border-color: var(--orange);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

/* Gallery navigation arrows ------------------------------------------------ */
.lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 3;
  display: none;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 999px;
  color: var(--fg);
  background: var(--bg-hard);
  border: 1px solid var(--bg2);
  cursor: pointer;
  transition:
    transform 0.16s var(--ease),
    border-color 0.16s var(--ease),
    opacity 0.16s var(--ease);
}

.lightbox.is-gallery .lightbox-nav {
  display: grid;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-nav:hover {
  transform: scale(1.06);
  border-color: var(--orange);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  border-color: var(--bg2);
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 540px) {
  .lightbox-nav {
    width: 44px;
    height: 44px;
    margin-top: -22px;
  }
}

.lightbox-body {
  max-height: 94vh;
}

/* Single (web) image */
.lightbox-single {
  display: grid;
  place-items: center;
}

.lightbox-single img {
  max-width: 96vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--bg2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

/* Horizontal scrollable gallery (mobile) */
.lightbox-gallery {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  max-height: 94vh;
  padding: 4px 4px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
  -webkit-overflow-scrolling: touch;
}

.lightbox-gallery::-webkit-scrollbar {
  height: 8px;
}

.lightbox-gallery::-webkit-scrollbar-thumb {
  background: var(--bg3);
  border-radius: 999px;
}

.lightbox-shot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  scroll-snap-align: center;
}

.lightbox-shot img {
  height: min(82vh, 760px);
  width: auto;
  max-width: none;
  border-radius: 26px;
  border: 6px solid var(--bg1);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

.lightbox-shot figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg2);
}

/* --------------------------------------------------------------------------
   Open source
   -------------------------------------------------------------------------- */

.os-grid {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.os-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--bg-hard);
  border-top: 1px solid var(--bg1);
  padding: 50px 0 34px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--bg1);
}

.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-brand p {
  color: var(--gray);
  margin: 0;
  max-width: 32ch;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  color: var(--fg2);
  font-weight: 500;
}

.footer-bottom {
  padding-top: 24px;
}

.footer-status {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--gray);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .radar-wrap {
    order: -1;
    margin-bottom: 8px;
  }
}

@media (max-width: 860px) {
  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .os-grid {
    gap: 28px;
  }
}

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

  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 20px;
    background: var(--bg-hard);
    border-bottom: 1px solid var(--bg1);
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.8);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    padding: 12px;
  }

  .nav-menu .btn-ghost {
    margin-top: 6px;
    justify-content: center;
  }

  .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);
  }
}

@media (max-width: 540px) {
  body {
    font-size: 16px;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .device-phone {
    flex-basis: 170px;
    width: 170px;
  }

  .store-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — disable scan/sweep/reveals, show everything statically
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .radar-sweep {
    display: none;
  }

  .radar-node {
    transform: translate(-50%, -50%) scale(1);
  }
}
