/* =============================================================================
   Pathfinder Visualizer — showcase site
   Palette is lifted straight from the app: near-black board, hot pink for
   explored cells, yellow for the shortest path, cyan/orange for start & end.
   ========================================================================== */

/* ------------------------------- 1. Tokens ------------------------------- */
:root {
  /* Surfaces */
  --bg: #0d0d0d;
  --bg-soft: #111112;
  --bg-card: #141416;
  --bg-raised: #191a1c;

  /* Grid colours, straight from the visualizer */
  --pink: #e6007e;        /* explored / closed cells      */
  --pink-soft: #ff2f9b;   /* frontier / open cells        */
  --pink-text: #ff5fb0;   /* readable pink for small text */
  --yellow: #ffd400;      /* shortest path                */
  --cyan: #3bc6f0;        /* start node                   */
  --orange: #ff7a1a;      /* end node                     */
  --wall: #050505;        /* barriers                     */
  --open: #f4f4f5;        /* untouched cells              */

  /* Text */
  --text: #ececf0;
  --muted: #a0a2ab;
  --dim: #6e7079;

  /* Lines & effects */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --grid-line: rgba(255, 255, 255, 0.035);

  /* Type */
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    "SF Mono", Menlo, Consolas, monospace;
  --display: "Space Grotesk", "JetBrains Mono", ui-sans-serif, system-ui,
    -apple-system, Segoe UI, sans-serif;

  /* Layout */
  --wrap: 1160px;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

/* ------------------------------- 2. Reset -------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* keep anchored sections clear of the sticky nav */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

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

/* The page-wide grid pattern that echoes the app's own board. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px 42px);
  /* fade the grid out toward the bottom so it never fights the content */
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

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

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 200;
  background: var(--yellow); color: #000; padding: 0.6rem 1rem;
  font-size: 0.8rem; font-weight: 700; text-decoration: none; border-radius: 0 0 8px 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* --------------------------- 3. Reading progress -------------------------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120;
  background: rgba(255, 255, 255, 0.05);
}
.progress__bar {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
}

/* -------------------------------- 4. Nav --------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
}
.nav.is-stuck {
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  width: 22px; height: 22px; flex: none;
}
.brand__cell { display: block; border-radius: 2px; }
.brand__cell--a { background: var(--pink); }
.brand__cell--b { background: var(--yellow); }
.brand__cell--c { background: #2a2a2e; }
.brand__cell--d { background: var(--cyan); }
.brand:hover .brand__cell--c { background: var(--orange); }
.brand__cell { transition: background-color 0.25s var(--ease); }
.brand__text { font-size: 0.95rem; }
.brand__dim { color: var(--dim); }

.nav__menu { display: flex; align-items: center; gap: 1.35rem; }
.nav__link {
  position: relative; font-size: 0.82rem; color: var(--muted);
  text-decoration: none; transition: color 0.2s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--pink); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.25s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--text); }

.nav__toggle {
  display: none; width: 42px; height: 38px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--bg-card); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__bars, .nav__bars::before, .nav__bars::after {
  display: block; width: 17px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav__bars { position: relative; }
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
.nav__bars::before { top: -6px; }
.nav__bars::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------ 5. Buttons ------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.78rem 1.3rem; border-radius: 10px; border: 1px solid transparent;
  font-size: 0.85rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), color 0.2s var(--ease);
}
.btn--primary {
  background: var(--yellow); color: #10100c;
  box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(255, 212, 0, 0.55); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: var(--pink); color: var(--pink-text); transform: translateY(-2px); }
.btn--sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; }

/* ------------------------- 6. Section scaffolding ------------------------- */
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 0; }
.section__head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section__title { font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 0.75rem; }
.section__title em { font-style: normal; color: var(--yellow); }
.section__sub { color: var(--muted); font-size: 0.95rem; margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--pink-text); margin-bottom: 1rem;
}
.dot {
  width: 7px; height: 7px; background: var(--pink); border-radius: 2px;
  box-shadow: 0 0 12px 2px rgba(230, 0, 126, 0.7);
  animation: blink 2.4s var(--ease) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Scroll reveal: elements start slightly offset and settle in.
   Scoped to .js so the page is still readable if the script never runs. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

/* -------------------------------- 7. Hero -------------------------------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero__title {
  font-size: clamp(2.7rem, 8.5vw, 5.4rem);
  margin: 0 0 1.1rem; letter-spacing: -0.045em;
}
.grad {
  background: linear-gradient(100deg, var(--pink) 0%, var(--orange) 45%, var(--yellow) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { color: var(--muted); font-size: clamp(0.95rem, 1.6vw, 1.06rem); max-width: 48ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.9rem 0 2rem; }

.hero__legend { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: 0.74rem; color: var(--dim); }
.hero__legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.swatch { width: 11px; height: 11px; border-radius: 2px; display: block; }
.swatch--start { background: var(--cyan); }
.swatch--end { background: var(--orange); }
.swatch--wall { background: var(--wall); border: 1px solid var(--line-strong); }
.swatch--explored { background: var(--pink); }
.swatch--path { background: var(--yellow); }

/* Ambient glow behind the hero */
.hero__glow {
  position: absolute; z-index: -1; top: -18%; right: -12%;
  width: min(720px, 85vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 0, 126, 0.16) 0%, transparent 62%);
  filter: blur(10px); pointer-events: none;
}

/* Fake app window that frames the animated grid */
.window {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.window__bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.window__dots { display: inline-flex; gap: 5px; }
.window__dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c2c30; display: block; }
.window__dots i:first-child { background: #3a2a30; }
.window__title { font-size: 0.7rem; color: var(--dim); letter-spacing: 0.02em; }
.window__body { padding: 10px; background: var(--bg); }
.window__status {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.85rem; border-top: 1px solid var(--line); font-size: 0.7rem;
}
.status__key { color: var(--pink-text); }
.status__key.is-done { color: var(--yellow); }
.status__meta { color: var(--dim); }

/* The animated hero board */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 24), 1fr);
  gap: 2px;
}
.cell {
  aspect-ratio: 1; border-radius: 1px; background: #212126;
  transition: background-color 0.28s var(--ease), transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}
.cell.is-wall { background: var(--wall); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.cell.is-open { background: var(--pink-soft); }
.cell.is-closed { background: var(--pink); }
.cell.is-path { background: var(--yellow); box-shadow: 0 0 10px -1px rgba(255, 212, 0, 0.75); transform: scale(1.08); }
.cell.is-start { background: var(--cyan); box-shadow: 0 0 10px -1px rgba(59, 198, 240, 0.8); }
.cell.is-end { background: var(--orange); box-shadow: 0 0 10px -1px rgba(255, 122, 26, 0.8); }

/* ------------------------------- 8. About -------------------------------- */
.about__body { max-width: 68ch; color: var(--muted); }
.about__body strong { color: var(--text); font-weight: 700; }
.about__body em { font-style: normal; color: var(--pink-text); }
.about__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; margin-top: 2.5rem;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.about__stats li {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 1.1rem 1.25rem; background: var(--bg-card);
  transition: background-color 0.25s var(--ease);
}
.about__stats li:hover { background: var(--bg-raised); }
.stat__num { font-family: var(--display); font-size: 1.55rem; color: var(--yellow); line-height: 1; }
.stat__label { font-size: 0.72rem; color: var(--dim); letter-spacing: 0.06em; }

/* ----------------------------- 9. Algorithms ----------------------------- */
.cards { display: grid; gap: 1.15rem; }
/* Two roomy columns on desktop rather than three cramped ones plus an orphan. */
.cards--algos { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.algo {
  position: relative; display: flex; gap: 1.15rem; align-items: flex-start;
  padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), opacity 0.7s var(--ease);
  outline-offset: 4px;
}
.algo:hover, .algo:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(230, 0, 126, 0.55);
  box-shadow: 0 22px 45px -30px rgba(230, 0, 126, 0.9);
}
.algo__name {
  font-size: 1.02rem; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.algo__name .star { color: var(--pink-text); }
.algo__name kbd {
  font-size: 0.62rem; padding: 0.15rem 0.42rem; border-radius: 5px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong); color: var(--muted);
}
.algo__text p { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* Mini exploration icon — cells get an --i order index from script.js and
   animate outward with a staggered transition-delay on hover/focus. */
.algo__grid {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px;
  width: 92px; flex: none; padding: 5px; border-radius: 8px;
  background: #0a0a0b; border: 1px solid var(--line);
}
.algo__grid i {
  aspect-ratio: 1; border-radius: 1px; background: #232327;
  transition: background-color 0.28s var(--ease);
  transition-delay: 0ms;
}
.algo__grid i.m-wall { background: var(--wall); }
.algo__grid i.m-start { background: var(--cyan); }
.algo__grid i.m-end { background: var(--orange); }

.algo:hover .algo__grid i.m-ex,
.algo:focus-visible .algo__grid i.m-ex,
.algo.is-live .algo__grid i.m-ex {
  background: var(--pink);
  transition-delay: calc(var(--i, 0) * 26ms);
}
.algo:hover .algo__grid i.m-path,
.algo:focus-visible .algo__grid i.m-path,
.algo.is-live .algo__grid i.m-path {
  background: var(--yellow);
  transition-delay: calc(var(--i, 0) * 26ms);
}

/* ---------------------------- 10. Screenshots ---------------------------- */
.gallery { position: relative; }
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; border-radius: var(--radius);
  scrollbar-width: none; padding-bottom: 2px;
}
.gallery__track::-webkit-scrollbar { display: none; }

/* Each slide is a framed viewer: the screenshots are square, so the image is
   height-capped and centred instead of stretching the section to 1000px tall. */
.slide {
  margin: 0; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: clamp(0.9rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 32px),
    var(--bg-soft);
}
.slide img {
  max-height: clamp(280px, 54vh, 560px);
  width: auto; max-width: 100%; height: auto;
  border-radius: 8px; border: 1px solid var(--line); background: #000;
  box-shadow: 0 25px 60px -35px rgba(0, 0, 0, 0.95);
}
.slide figcaption {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  flex-wrap: wrap; text-align: center; font-size: 0.78rem; color: var(--muted);
}
.tag {
  padding: 0.12rem 0.5rem; border-radius: 5px; font-size: 0.68rem; font-weight: 700;
  background: rgba(230, 0, 126, 0.14); color: var(--pink-text);
  border: 1px solid rgba(230, 0, 126, 0.35);
}

.gallery__nav {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; color: var(--text);
  background: rgba(13, 13, 13, 0.78); border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.gallery__nav:hover { background: var(--pink); border-color: var(--pink); transform: translateY(-50%) scale(1.06); }
.gallery__nav--prev { left: 0.6rem; }
.gallery__nav--next { right: 0.6rem; }

.gallery__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.3rem; }
.gallery__dots button {
  width: 26px; height: 4px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
  background: #2e2e33; transition: background-color 0.25s var(--ease), width 0.25s var(--ease);
}
.gallery__dots button.is-active { background: var(--yellow); width: 40px; }

/* ----------------------------- 11. Features ------------------------------ */
.cards--features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  position: relative; padding: 1.6rem 1.4rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease), opacity 0.7s var(--ease);
}
.feature::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}
.feature:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--bg-raised); }
.feature:hover::after { transform: scaleX(1); }
.feature__icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1.05rem;
  border-radius: 11px; color: var(--yellow);
  background: rgba(255, 212, 0, 0.08); border: 1px solid rgba(255, 212, 0, 0.22);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.84rem; margin: 0; }
.feature code {
  font-size: 0.78rem; padding: 0.06rem 0.32rem; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06); color: var(--cyan);
}

/* ----------------------------- 12. Controls ------------------------------ */
.controls__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.15rem; }
.keypanel {
  padding: 1.6rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px),
    var(--bg-card);
}
.panel__title {
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.35rem;
}
.keys li { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0; font-size: 0.86rem; color: var(--muted); }
.keys li + li { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.keys strong { color: var(--text); }

/* Physical-looking keycaps */
.cap {
  flex: none; display: grid; place-items: center;
  min-width: 46px; height: 42px; padding: 0 0.7rem;
  font-size: 0.78rem; font-weight: 700; color: var(--text);
  background: linear-gradient(180deg, #26262b, #17171a);
  border: 1px solid #303036; border-radius: 9px;
  box-shadow: 0 4px 0 0 #0b0b0d, 0 6px 12px -6px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.07);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), color 0.2s var(--ease);
}
.cap--wide { min-width: 116px; }
.keys li:hover .cap {
  transform: translateY(3px); color: var(--yellow);
  box-shadow: 0 1px 0 0 #0b0b0d, inset 0 1px 0 0 rgba(255, 255, 255, 0.07);
}

.keys--mouse li { align-items: flex-start; }
.mouse {
  position: relative; flex: none; width: 26px; height: 38px; margin-top: 2px;
  border: 1.5px solid var(--line-strong); border-radius: 13px; background: #17171a;
}
.mouse::before {
  content: ""; position: absolute; top: 3px; width: 9px; height: 13px; border-radius: 4px;
  background: var(--pink);
}
.mouse--left::before { left: 3px; }
.mouse--right::before { right: 3px; background: var(--cyan); }
.panel__note { margin: 1.1rem 0 0; font-size: 0.76rem; color: var(--dim); }
.c-cyan { font-style: normal; color: var(--cyan); }
.c-orange { font-style: normal; color: var(--orange); }
.keys em { font-style: normal; color: var(--text); }

/* --------------------------- 13. Installation ---------------------------- */
.install .code {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden; max-width: 780px;
}
.code__bar {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.code__file { font-size: 0.7rem; color: var(--dim); margin-right: auto; }
.copy {
  padding: 0.35rem 0.8rem; font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  color: var(--text); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.copy:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.copy.is-done { background: var(--yellow); border-color: var(--yellow); color: #10100c; }

.code__body {
  margin: 0; padding: 1.25rem 1.35rem; overflow-x: auto;
  font-size: 0.82rem; line-height: 1.85; color: var(--text);
}
.c-com { color: var(--dim); }
.c-cmd { color: var(--yellow); font-weight: 700; }
.install__hint { margin-top: 1.1rem; font-size: 0.82rem; color: var(--muted); max-width: 60ch; }
.install__hint code { color: var(--cyan); }
.install__hint kbd, .install__hint em { font-style: normal; color: var(--text); }

/* ------------------------------- 14. Footer ------------------------------ */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; background: var(--bg-soft); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 0.9rem; }
.footer__name { margin: 0; font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.footer__meta { margin: 0; font-size: 0.74rem; color: var(--dim); }
.footer__meta a { color: var(--pink-text); text-decoration: none; }
.footer__meta a:hover { text-decoration: underline; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.78rem; }
.footer__links a { color: var(--muted); text-decoration: none; transition: color 0.2s var(--ease); }
.footer__links a:hover { color: var(--yellow); }

/* ----------------------------- 15. Responsive ---------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }

  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 var(--pad); background: rgba(13, 13, 13, 0.97);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.35s var(--ease), padding 0.35s var(--ease), visibility 0.35s;
  }
  .nav__menu.is-open { max-height: 420px; visibility: visible; padding: 0.5rem var(--pad) 1.1rem; }
  .nav__link { padding: 0.75rem 0; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .nav__link::after { display: none; }
  .nav__menu .btn { margin-top: 0.9rem; justify-content: center; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .algo { flex-direction: column; }
  .algo__grid { width: 86px; }
  .gallery__nav { display: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* --------------------- 16. Reduced-motion preferences -------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .gallery__track { scroll-behavior: auto; }
}
