/* ==========================================================================
   Paravis — авторский вариант: «технический чертёж»
   Синий, тонкие линии, моно-подписи, крупная типографика.
   Один родной мотив из PSD как подпись в правом верхнем углу.
   ========================================================================== */

:root {
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* Тёмная версия */
  --bg: #070d16;
  --bg-soft: #0a1220;
  --surface: #0e1826;
  --surface-2: #142234;
  --surface-3: #1a2c42;

  --text: #e8f0fa;
  --text-soft: #c2d2e6;
  --muted: #6f849c;

  --line: rgba(150, 190, 240, 0.15);
  --line-strong: rgba(150, 190, 240, 0.32);

  --accent: #1f4263;
  --accent-2: #2f5a80;
  --accent-soft: rgba(31, 66, 99, 0.08);
  --accent-line: rgba(31, 66, 99, 0.32);
  --accent-ink: #06111f;
  --gradient: #1f4263;

  --btn-bg: #2a5078;
  --btn-bg-hover: #335c88;
  --btn-ink: #f2f8ff;

  --glow-1: transparent;
  --glow-2: transparent;
  --header-bg: rgba(7, 13, 22, 0.94);
  --header-bg-strong: #070d16;
  --overlay: rgba(3, 7, 13, 0.9);

  --shadow: none;
  --shadow-soft: none;
  --radius: 0px;
  --radius-sm: 0px;
  --container: 1200px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f1f4f8;
  --bg-soft: #e8edf3;
  --surface: #fbfcfe;
  --surface-2: #f0f4f9;
  --surface-3: #e4eaf2;

  --text: #0b1522;
  --text-soft: #2a3b50;
  --muted: #5f7288;

  --line: rgba(11, 40, 70, 0.16);
  --line-strong: rgba(11, 40, 70, 0.34);

  --accent: #1f5fa8;
  --accent-2: #2d74c4;
  --accent-soft: rgba(31, 95, 168, 0.06);
  --accent-line: rgba(31, 95, 168, 0.26);
  --accent-ink: #ffffff;
  --gradient: #1f5fa8;

  --btn-bg: #1f5fa8;
  --btn-bg-hover: #17508f;
  --btn-ink: #ffffff;

  --glow-1: transparent;
  --glow-2: transparent;
  --header-bg: rgba(241, 244, 248, 0.94);
  --header-bg-strong: #f1f4f8;
  --overlay: rgba(10, 20, 33, 0.72);
  color-scheme: light;
}

body {
  background-image: none;
  font-size: 16px;
}

/* Header */
.site-header {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  background: var(--header-bg-strong);
  box-shadow: none;
  border-bottom-color: var(--line-strong);
}

.brand img {
  border-radius: 0;
  filter: grayscale(1) contrast(1.1);
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-name em {
  color: var(--accent);
}

.nav-link {
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link svg {
  color: var(--accent);
}

.nav-link:hover {
  background: none;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

/* Header download button */
.nav-download,
.nav-download:hover {
  text-decoration: none;
}

.nav-download {
  margin-right: 0.25rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.nav-download:hover {
  border-color: var(--btn-bg-hover);
  background: var(--btn-bg-hover);
  color: var(--btn-ink);
}

.icon-btn {
  border-radius: 0;
  background: transparent;
}

/* Hero */
.hero {
  padding-top: 0;
  padding-bottom: 0.5rem;
  overflow: visible;
}

.hero-inner {
  align-items: start;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.hero-visual {
  order: 1;
  justify-self: start;
}

.hero-copy {
  order: 2;
  max-width: 680px;
}

.hero::before {
  display: none;
}

.hero::after {
  display: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.hero-badge::after {
  content: "";
  flex: none;
  width: 56px;
  height: 1px;
  background: var(--line-strong);
}

.badge-dot {
  display: none;
}

.hero h1 {
  position: static;
  width: min(489px, 100%);
  aspect-ratio: 489 / 160;
  height: auto;
  margin: 0 0 1rem;
  overflow: hidden;
  text-indent: -9999px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  line-height: 0;
  background: url("flash-logo-art-dark.png?v=9") no-repeat left top / contain;
}

.hero h1 span {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--accent);
  font-weight: 800;
}

html[data-theme="light"] .hero h1 {
  background-image: url("flash-logo-art-light.png?v=9");
}

.hero-copy {
  padding-top: 0;
}

/* The "USB build" badge was useless at the very top */
.hero-badge {
  display: none;
}

.hero-version {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.3rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  max-width: 28rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-version strong {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1em;
}

.hero-lead {
  max-width: 44ch;
  margin-top: 1.3rem;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.btn {
  border-radius: 0;
  padding: 0.8rem 1.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.btn-primary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
}

.btn-primary:hover {
  transform: none;
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  box-shadow: none;
}

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

.btn-ghost:hover {
  transform: none;
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.hero-links {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

/* Remove the third hero button */
.hero-actions a[href="#about"] {
  display: none;
}

.hero-links a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent-line);
}

.hero-links a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Hero visual: technical corner marks instead of a browser chrome */
.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: none;
  border-radius: 0;
  filter: none;
  inset: auto;
  pointer-events: none;
}

.hero-visual::before {
  top: 0.4rem;
  left: 0.4rem;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.hero-visual::after {
  right: 0.4rem;
  bottom: 0.4rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.hero-frame {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.frame-bar {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.frame-bar i {
  display: none;
}

.frame-bar span {
  margin-left: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.frame-bar span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  background: var(--accent);
  vertical-align: 1px;
}

.hero-frame img {
  border-radius: 0;
  background: #04070c;
}

.frame-caption {
  right: 0.8rem;
  bottom: 0.6rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.frame-caption::before {
  content: "— ";
  color: var(--accent);
}

/* Sections */
.section {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.section + .section {
  border-top: 1px solid var(--line-strong);
}

.section-head {
  max-width: 760px;
  margin-bottom: 2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  background: var(--accent);
  opacity: 1;
}

.section h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #d3dfed;
}

html[data-theme="light"] .section h2 {
  color: var(--text);
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
}

/* No rule under the first heading and a tighter gap to the list */
#about .section-head {
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 0;
}

/* Components: shared grid rows so both columns align */
.components {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(8, auto);
  grid-auto-flow: column;
  column-gap: 2.6rem;
  border-top: 1px solid var(--line);
}

.component {
  break-inside: avoid;
  padding: 0.85rem 0.35rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.component:hover {
  transform: none;
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.component-num {
  min-width: 2.6rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.component p {
  margin-top: 0.05rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Gallery */
.gallery-grid {
  gap: 0.9rem;
}

.gallery-item {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.gallery-item:hover {
  transform: none;
  box-shadow: inset 0 2px 0 var(--accent);
  border-color: var(--line-strong);
}

.gallery-item:hover .gallery-thumb img {
  transform: none;
}

.gallery-thumb {
  border-radius: 0;
  background: #04070c;
}

.gallery-zoom {
  background: rgba(4, 10, 18, 0.55);
}

.gallery-zoom span {
  border-radius: 0;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.gallery-caption {
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.gallery-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: transparent;
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.footer-links a:hover {
  color: var(--accent);
}

.to-top {
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: opacity 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, color 0.25s ease, bottom 0.2s ease;
}

/* Near the page bottom lift the button above the footer links */
.to-top.is-bottom {
  bottom: calc(clamp(1rem, 3vw, 2rem) + 4.5rem);
}

/* Lightbox */
.lightbox,
.lb-shell {
  border-radius: 0;
}

.lb-shell {
  border-color: var(--line-strong);
  box-shadow: none;
}

.lb-stage {
  background: #04070c;
}

.lb-nav {
  border-radius: 0;
  background: rgba(4, 10, 18, 0.75);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.lb-close {
  border-radius: 0;
}

/* Changelog */
.page-hero::before {
  display: none;
}

.page-hero {
  position: relative;
  border-bottom: 1px solid var(--line-strong);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Same PSD wordmark as the home hero, aligned to the content container */
.page-hero .container::after {
  content: "";
  position: absolute;
  top: -0.75rem;
  right: 0;
  z-index: 0;
  width: min(489px, 42vw);
  aspect-ratio: 489 / 160;
  background: url("flash-logo-art-dark.png?v=9") no-repeat right top / contain;
  opacity: 0.9;
  pointer-events: none;
}

html[data-theme="light"] .page-hero .container::after {
  background-image: url("flash-logo-art-light.png?v=9");
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-weight: 800;
  letter-spacing: -0.045em;
}

.page-hero h1 span {
  color: var(--accent);
}

.back-link,
.release-nav a {
  border-radius: 0;
  background: transparent;
}

/* Back link uses the same fill as the active download button */
.back-link {
  border-color: var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.back-link:hover {
  border-color: var(--btn-bg-hover);
  background: var(--btn-bg-hover);
  color: var(--btn-ink);
}

.search input {
  border-radius: 0;
  background: transparent;
}

.release-card {
  border-radius: 0;
  background: transparent;
  border-color: var(--line);
}

.release-card:hover {
  box-shadow: none;
  border-color: var(--line-strong);
}

.release-date {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.timeline::before {
  background: var(--line);
}

.release::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.release-tag,
.change-num {
  border-radius: 0;
  background: transparent;
  border-color: var(--accent-line);
  color: var(--accent);
}

.change-num {
  font-family: var(--font-mono);
}

.empty-state {
  border-radius: 0;
}

/* Secondary labels use the same muted tone as the section sub-text */
.component-num,
.hero-version strong,
.gallery-index,
.release-date,
.release-tag,
.change-num,
.nav-link svg {
  color: var(--muted);
}

/* Motion: none of the generic reveal */
.reveal {
  animation: none !important;
}

/* Narrow screens */
@media (max-width: 980px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }

  /* Let the hero children be reordered independently on mobile */
  .hero-copy {
    display: contents;
  }

  .hero h1 {
    order: 1;
    width: min(381px, 100%);
    margin: 0;
    font-size: 1rem;
    position: static;
    background-size: contain;
  }

  .hero-lead {
    order: 2;
    margin-top: 0;
  }

  .hero-visual {
    order: 3;
    width: 100%;
    max-width: 100%;
    justify-self: auto;
  }

  .hero-version {
    order: 4;
    margin-top: 0.4rem;
  }

  .hero-actions {
    order: 5;
    margin-top: 0.4rem;
  }

  .hero-links {
    order: 6;
    margin-top: 0.4rem;
  }
}

@media (max-width: 900px) {
  .header-actions {
    margin-left: auto;
  }

  /* Mobile menu: a panel anchored to the top-right, not a full-width sheet */
  .nav {
    left: auto;
    right: 0.75rem;
    width: min(300px, calc(100vw - 1.5rem));
    padding: 0.5rem;
    border: 1px solid var(--line-strong);
    background: var(--bg);
  }
}

@media (max-width: 760px) {
  .components {
    display: block;
  }

  .page-hero .container::after {
    display: none;
  }
}

@media (max-width: 540px) {
  .hero h1 {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }

  .gallery-caption {
    font-size: 0.72rem;
  }
}
