/* ==========================================================================
   Paravis Flash — shared styles
   Modern, dependency-free stylesheet for the main page and the changelog.
   ========================================================================== */

/* ----------------------------- 1. Design tokens -------------------------- */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas,
    "Liberation Mono", monospace;

  --bg: #060b14;
  --bg-soft: #081223;
  --surface: #0d1a2d;
  --surface-2: #11243c;
  --surface-3: #162b47;

  --text: #eef5ff;
  --text-soft: #d3e2f6;
  --muted: #93aac6;

  --line: rgba(124, 176, 240, 0.14);
  --line-strong: rgba(124, 176, 240, 0.28);

  --accent: #63b3ff;
  --accent-2: #8ce2ff;
  --accent-soft: rgba(99, 179, 255, 0.1);
  --accent-line: rgba(99, 179, 255, 0.22);
  --accent-ink: #04101f;
  --gradient: linear-gradient(120deg, #8ce2ff 0%, #63b3ff 48%, #7c8dff 100%);

  --glow-1: rgba(54, 130, 255, 0.16);
  --glow-2: rgba(0, 200, 255, 0.07);
  --header-bg: rgba(6, 11, 20, 0.72);
  --header-bg-strong: rgba(6, 11, 20, 0.94);
  --overlay: rgba(3, 8, 15, 0.86);

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --shadow-soft: 0 16px 40px -24px rgba(0, 0, 0, 0.65);
  --radius: 16px;
  --radius-sm: 12px;
  --container: 1180px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f7fc;
  --bg-soft: #eaf0f9;
  --surface: #ffffff;
  --surface-2: #f1f6fd;
  --surface-3: #e4edfa;

  --text: #0a1a2e;
  --text-soft: #20344f;
  --muted: #526783;

  --line: rgba(20, 60, 110, 0.12);
  --line-strong: rgba(20, 60, 110, 0.24);

  --accent: #1668d9;
  --accent-2: #0a8fb8;
  --accent-soft: rgba(26, 111, 224, 0.08);
  --accent-line: rgba(26, 111, 224, 0.2);
  --accent-ink: #ffffff;
  --gradient: linear-gradient(120deg, #0aa6d8 0%, #1a6fe0 52%, #5b5cf0 100%);

  --glow-1: rgba(26, 111, 224, 0.1);
  --glow-2: rgba(10, 166, 216, 0.07);
  --header-bg: rgba(244, 247, 252, 0.78);
  --header-bg-strong: rgba(244, 247, 252, 0.96);
  --overlay: rgba(10, 24, 44, 0.7);

  --shadow: 0 24px 60px -30px rgba(20, 50, 100, 0.35);
  --shadow-soft: 0 16px 40px -28px rgba(20, 50, 100, 0.3);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 85% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 600px at -5% 15%, var(--glow-2), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.visually-hidden {
  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: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

/* ----------------------------- 3. Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 12px 32px -12px rgba(60, 140, 255, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -14px rgba(60, 140, 255, 0.65);
}

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

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  filter: grayscale(0.55);
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.nav-link.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-quiet {
  color: var(--text-soft);
  background: transparent;
  border-color: transparent;
  padding-inline: 0.6rem;
}

.btn-quiet:hover {
  color: var(--accent);
}

/* ------------------------------ 4. Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg-strong);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px -24px rgba(0, 0, 0, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  filter: drop-shadow(0 0 12px rgba(99, 179, 255, 0.22));
}

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

.brand-name em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.35rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--surface);
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ------------------------------ 5. Hero ---------------------------------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 65% 18%,
    #000 0%,
    transparent 75%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at 65% 18%,
    #000 0%,
    transparent 75%
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  z-index: -1;
  width: 56vw;
  height: 56vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(70, 150, 255, 0.2),
    transparent 62%
  );
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.85rem 0.42rem 0.65rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero h1 span {
  font-weight: 750;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-version {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  letter-spacing: 0.01em;
}

.hero-version strong {
  display: inline-block;
  margin-left: 0.1rem;
  padding: 0.14rem 0.5rem;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 600;
  vertical-align: 1px;
}

.hero-lead {
  max-width: 40ch;
  margin: 1.4rem 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.6rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

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

.hero-links svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.hero-links a:hover svg {
  transform: translateX(2px);
}

/* Hero visual */
.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 540px;
  padding: 1.5rem 1.5rem 2.5rem;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% 2% -2%;
  z-index: -1;
  border-radius: 28px;
  background: radial-gradient(
    ellipse at 60% 45%,
    rgba(99, 179, 255, 0.24),
    rgba(80, 100, 255, 0.1) 45%,
    transparent 72%
  );
  filter: blur(26px);
}

.hero-frame {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 12px;
}

.frame-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame-bar i:nth-child(1) {
  background: #ff6b6b;
}

.frame-bar i:nth-child(2) {
  background: #ffc857;
}

.frame-bar i:nth-child(3) {
  background: #4ad991;
}

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

.hero-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 13px;
  background: #03070d;
}

.frame-caption {
  position: absolute;
  right: 1.6rem;
  bottom: 1.15rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
}

/* ---------------------------- 6. Section base ---------------------------- */
.section {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

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

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.section-sub {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

/* --------------------------- 7. Components ------------------------------- */
.components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.component {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  transition: transform 0.22s ease, border-color 0.22s ease,
    background-color 0.22s ease;
}

.component:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.component-num {
  flex: none;
  min-width: 2.05rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.component p {
  margin: 0.1rem 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.52;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

/* ----------------------------- 8. Gallery -------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #03070d;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.045);
}

.gallery-zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(
    180deg,
    rgba(4, 10, 20, 0.1),
    rgba(4, 10, 20, 0.6)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-zoom,
.gallery-item:focus-visible .gallery-zoom {
  opacity: 1;
}

.gallery-zoom span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(6, 16, 30, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #eef5ff;
}

.gallery-zoom svg {
  width: 20px;
  height: 20px;
}

.gallery-caption {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.gallery-index {
  flex: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
}

/* ----------------------------- 9. Lightbox -------------------------------- */
.lightbox {
  width: min(1120px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: var(--overlay);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lb-shell {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

.lb-bar,
.lb-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
}

.lb-bar {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.lb-count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.lb-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 200px;
  overflow: hidden;
  background: #03070d;
}

.lb-img {
  max-width: 100%;
  max-height: calc(92vh - 132px);
  object-fit: contain;
}

.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(6, 16, 30, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #eef5ff;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lb-nav:hover {
  background: rgba(6, 16, 30, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.lb-nav svg {
  width: 20px;
  height: 20px;
}

.lb-prev {
  left: 0.8rem;
}

.lb-next {
  right: 0.8rem;
}

.lb-foot {
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.lb-caption {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.lb-hint {
  color: var(--muted);
  font-size: 0.72rem;
}

/* -------------------------- 10. Footer / to top -------------------------- */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

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

.footer-links svg {
  width: 14px;
  height: 14px;
}

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--header-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, color 0.25s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* --------------------------- 11. Changelog page -------------------------- */
.page-hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -45%;
  left: 50%;
  z-index: -1;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(70, 150, 255, 0.16),
    transparent 65%
  );
  transform: translateX(-50%);
  filter: blur(20px);
  pointer-events: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 2rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

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

.page-sub {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
}

.changelog-wrap {
  padding: 1.75rem 0 clamp(4rem, 8vw, 6rem);
}

.changelog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  margin-bottom: 0.75rem;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 360px;
}

.search > svg {
  position: absolute;
  left: 0.95rem;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 0.68rem 2.4rem 0.68rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: linear-gradient(
      45deg,
      transparent 45%,
      var(--muted) 45%,
      var(--muted) 55%,
      transparent 55%
    ),
    linear-gradient(
      -45deg,
      transparent 45%,
      var(--muted) 45%,
      var(--muted) 55%,
      transparent 55%
    );
  cursor: pointer;
}

.search-count {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Version quick-jump */
.release-nav {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0.65rem 0.25rem 1rem;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg) 72%,
    transparent 100%
  );
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.release-nav::-webkit-scrollbar {
  height: 4px;
}

.release-nav::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--line-strong);
}

.release-nav a {
  flex: none;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.release-nav a:hover {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--surface-2);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  bottom: 0;
  left: calc(8.75rem + 1rem);
  width: 1px;
  background: linear-gradient(
    180deg,
    var(--accent-line),
    var(--line) 12%,
    var(--line) 88%,
    transparent
  );
}

.release {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  gap: 2rem;
  position: relative;
  padding-bottom: 1.4rem;
  scroll-margin-top: 56px;
}

.release::before {
  content: "";
  position: absolute;
  top: 1.55rem;
  left: calc(8.75rem + 1rem - 4px);
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(99, 179, 255, 0.5);
}

.release-date {
  padding-top: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: right;
}

.release-card {
  padding: 1.15rem 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  transition: border-color 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease;
}

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

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.65rem;
}

.release-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.release-tag {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.release-body {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

.release-body > p {
  margin: 0 0 0.55rem;
}

.release-body > p:last-child {
  margin-bottom: 0;
}

.changes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
}

.changes:last-child {
  margin-bottom: 0;
}

.change {
  display: grid;
  grid-template-columns: 2.05rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.change-num {
  display: inline-block;
  padding: 0.08rem 0.25rem;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.change-text {
  color: var(--text-soft);
}

.change-sub {
  display: block;
  margin-top: 0.35rem;
  padding-left: 0.15rem;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.change-sub + .change-sub {
  margin-top: 0.3rem;
}

.empty-state {
  display: none;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.is-filtered {
  display: none !important;
}

/* ------------------------------ 12. Motion ------------------------------- */
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--accent-soft);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 7px transparent;
    opacity: 0.7;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

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

/* ---------------------------- 13. Responsive ----------------------------- */
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-visual {
    justify-self: center;
    max-width: 560px;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 12vw, 5.4rem);
  }
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 64px;
  }

  .nav {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    max-height: calc(100vh - 64px);
    margin: 0;
    padding: 0.75rem clamp(1rem, 4vw, 2rem) 1.1rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease,
      visibility 0.22s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 0.75rem 0.6rem;
    border-radius: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .release-nav {
    top: 64px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 80px;
  }

  .components {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline::before {
    left: 4px;
  }

  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    padding-left: 1.4rem;
  }

  .release::before {
    top: 1.9rem;
    left: -1px;
  }

  .release-date {
    padding-top: 0;
    font-size: 0.7rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .release-card {
    padding: 1rem 1.05rem 1.1rem;
  }

  .release-head h2 {
    font-size: 1.1rem;
  }

  .change {
    grid-template-columns: 1.95rem minmax(0, 1fr);
    gap: 0.5rem;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero-frame {
    transform: none;
  }

  .frame-caption {
    display: none;
  }

  .gallery-grid {
    gap: 0.6rem;
  }

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

  .gallery-index {
    display: none;
  }

  .lb-nav {
    width: 38px;
    height: 38px;
  }

  .lb-prev {
    left: 0.45rem;
  }

  .lb-next {
    right: 0.45rem;
  }

  .lb-hint {
    display: none;
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .site-header,
  .to-top,
  .hero-visual,
  .gallery-zoom,
  .release-nav,
  .changelog-tools {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .release-card,
  .component {
    border-color: #ccc;
    background: #fff;
    box-shadow: none;
  }
}
