/* =========================================================================
   Dropwire — landing site styles
   Vanilla CSS, no build step. Responsive, light + dark, accessible.

   PALETTE: Brand accent is "Live Wire"
   lime (#C6F032 light / #D2FF3A dark) on "Wire Black" #0E1116, with faintly
   warm-green neutrals. Lime is a *fill* color — text on it is always Wire
   Black ink (--accent-contrast), never white (lime + white fails contrast).
   ========================================================================= */

/* ---------------------------- Design tokens ---------------------------- */
:root {
  /* Brand accent — "Live Wire" lime. Lime is a FILL color:
     text/icons on top are always Wire Black ink (--accent-contrast). */
  --accent: #c6f032;
  --accent-strong: #a8d616;
  --accent-soft: #eef7c9;
  --accent-contrast: #0e1116;
  --link: #4f6b00;

  /* Light theme surfaces + ink (faint warm-green undertone) */
  --bg: #f7f9f5;
  --bg-elevated: #ffffff;
  --bg-muted: #ecefea;
  --surface-border: #dde2d8;
  --ink: #0e1116;
  --ink-soft: #5b6470;
  --ink-faint: #62696f;

  --ring: rgba(168, 214, 22, 0.45);
  --shadow-sm: 0 1px 2px rgba(28, 29, 34, 0.06), 0 1px 3px rgba(28, 29, 34, 0.05);
  --shadow-md: 0 6px 20px rgba(28, 29, 34, 0.08), 0 2px 6px rgba(28, 29, 34, 0.05);
  --shadow-lg: 0 18px 50px rgba(28, 29, 34, 0.12);

  /* Type + layout */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono",
    Menlo, Consolas, monospace;

  --maxw: 1080px;
  --maxw-narrow: 720px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --space: clamp(1rem, 2.5vw, 1.5rem);
}

/* Dark theme — applied via prefers-color-scheme OR explicit data-theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #d2ff3a;
    --accent-strong: #b6e830;
    --accent-soft: #21280a;
    --accent-contrast: #0e1116;
    --link: var(--accent);

    --bg: #0e1116;
    --bg-elevated: #171b22;
    --bg-muted: #21262f;
    --surface-border: #2c333d;
    --ink: #f2f5ef;
    --ink-soft: #9ba6b2;
    --ink-faint: #6b7480;

    --ring: rgba(210, 255, 58, 0.45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);
  }
}

/* Explicit dark toggle (overrides everything) */
:root[data-theme="dark"] {
  --accent: #d2ff3a;
  --accent-strong: #b6e830;
  --accent-soft: #21280a;
  --accent-contrast: #0e1116;
  --link: var(--accent);

  --bg: #0e1116;
  --bg-elevated: #171b22;
  --bg-muted: #21262f;
  --surface-border: #2c333d;
  --ink: #f2f5ef;
  --ink-soft: #9ba6b2;
  --ink-faint: #6b7480;

  --ring: rgba(210, 255, 58, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
  .packet { animation: none !important; opacity: 0; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1rem; }

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

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

/* Skip-link lands focus on <main> for keyboard users without a visible ring */
#main:focus { outline: none; }

/* Offset in-page anchors so the sticky header doesn't cover section tops */
:where(main[id], section[id]) { scroll-margin-top: 80px; }

/* --------------------------- Layout helpers --------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.container-narrow { max-width: var(--maxw-narrow); }

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.section-muted { background: var(--bg-muted); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.section-sub {
  color: var(--ink-soft);
  font-size: 1.075rem;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.78rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--surface-border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ----------------------------- Header --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--surface-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-name { font-size: 1.2rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  margin-left: auto;
}
.site-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.975rem;
}
.site-nav a:hover { color: var(--link); text-decoration: none; }
.nav-github {
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--surface-border);
  border-radius: 8px;
  color: var(--ink) !important;
}
.nav-github:hover { border-color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--surface-border);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

/* Show moon when in dark mode (so user sees the option to go light) */
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ------------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}
.hero::before {
  /* subtle single ambient glow — restrained, not gradient-overload */
  content: "";
  position: absolute;
  inset: -20% 0 auto 0;
  height: 420px;
  background: radial-gradient(
    60% 70% at 50% 0%,
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

#hero-title {
  font-size: clamp(2.3rem, 6.5vw, 4rem);
  margin-bottom: 1.1rem;
}
.accent-text { color: var(--link); }

.subhead {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.cta-note {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-faint);
}
.cta-note a { color: var(--ink-soft); text-decoration: underline; }
.cta-note a:hover { color: var(--link); }

/* Hero transfer illustration */
.hero-figure {
  position: relative;
  z-index: 1;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.transfer-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  max-width: 880px;
  margin-inline: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.device { min-width: 0; }
.device-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-muted);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
  color: var(--ink);
  max-width: 100%;
}
.file-chip svg { color: var(--accent-strong); flex: none; }
.code-pill {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.code-pill strong {
  font-family: var(--font-mono);
  color: var(--accent-strong);
  letter-spacing: 0.01em;
}

.wire {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-direct {
  background: var(--accent-soft);
  color: var(--link);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.wire-track {
  position: relative;
  width: 100%;
  height: 24px;
}
.wire-line {
  display: block;
  width: 100%;
  height: 24px;
}
.wire-line line {
  stroke: var(--surface-border);
  stroke-width: 3;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
}
.packet {
  position: absolute;
  top: 50%;
  left: 2%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: packet-move 2.4s ease-in-out infinite;
}
@keyframes packet-move {
  0%   { left: 2%;  opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 92%; opacity: 0; }
}

.progress-mock { margin-top: 0.2rem; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--surface-border);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.progress-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ------------------------------ Steps --------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  counter-reset: step;
}
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.1rem;
}

/* ------------------------------ Cards --------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border));
}
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 1.1rem;
}

/* ------------------------------- FAQ ---------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.075rem;
  color: var(--ink);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--link); }
.chevron {
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  color: var(--ink-faint);
}
.faq-item[open] .chevron { transform: rotate(-135deg); }
.faq-body {
  padding: 0 1.3rem 1.2rem;
}
.faq-body p { margin: 0; color: var(--ink-soft); }

/* ---------------------------- Download --------------------------------- */
.download {
  background: var(--bg-muted);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}
.download-inner { text-align: center; }
.download-inner h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.75rem 0 1rem;
}

/* ------------------------------ Footer -------------------------------- */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--surface-border);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  padding-bottom: 2.5rem;
}
.footer-brand { max-width: 320px; }
.footer-tagline {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
}
.footer-links {
  display: flex;
  gap: clamp(2rem, 6vw, 4rem);
}
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 0.35rem;
}
.footer-col a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--link); }

.footer-bottom {
  border-top: 1px solid var(--surface-border);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { margin: 0; font-size: 0.9rem; color: var(--ink-faint); }
.made-with a { color: var(--link); font-weight: 600; }
.privacy-note { max-width: 480px; }

/* --------------------------- Responsive ------------------------------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav a:not(.nav-github) { display: none; }
  .transfer-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .wire { flex-direction: column; align-items: center; gap: 0.5rem; min-width: 0; padding-block: 0.75rem; }
  .wire-line, .packet { display: none; }
  /* vertical "wire" connecting the two stacked device cards, flowing downward */
  .wire-track {
    position: relative;
    width: 14px;
    height: 52px;
    background: none;
  }
  .wire-track::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 7px);
    background: repeating-linear-gradient(
      color-mix(in srgb, var(--accent) 75%, transparent) 0 5px,
      transparent 5px 10px);
  }
  .wire-track::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--accent);
  }
  .device-b { margin-top: 0.5rem; }
}

@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .cta-row .btn, .download-buttons .btn { flex: 1 1 100%; justify-content: center; }
  .footer-inner { flex-direction: column; gap: 2rem; }
}

/* ----------------------- Screenshots showcase ------------------------- */
.showcase {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
.shot-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin: 0;
}
.shot-row.reverse .shot-media { order: 2; }
.shot-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-lg);
  background: #0e1116;
}
.shot-copy { margin: 0; }
.shot-copy h3 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); margin: 0 0 0.5rem; }
.shot-copy p { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
.shot-copy em { font-style: normal; color: var(--link); font-weight: 600; }

.install-showcase { margin-top: clamp(3rem, 7vw, 5rem); text-align: center; }
.install-title { font-size: 1.2rem; margin: 0 0 1.5rem; }
.install-pair {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 3rem);
  justify-content: center;
  align-items: flex-end;
}
.install-pair figure { margin: 0; }
.install-pair img {
  display: block;
  height: 230px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  background: #0e1116;
}
.install-pair figcaption {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
}
.install-note { margin: 1.3rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.install-note code { font-family: var(--font-mono); font-size: 0.85em; }
.platforms {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
}

@media (max-width: 760px) {
  .shot-row { grid-template-columns: 1fr; gap: 1.1rem; }
  .shot-row.reverse .shot-media { order: 0; }
  .install-pair img { height: auto; width: 100%; max-width: 420px; }
}

/* tappable thumbnails */
.shot-media img, .install-pair img { cursor: zoom-in; }

/* ------------------------- Demo video embed --------------------------- */
.video-embed { max-width: 880px; margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.video-embed-btn {
  display: block;
  width: 100%;
  padding: 0;
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0e1116;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
.video-embed-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-embed-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 13, 0.30);
  transition: background 0.18s ease;
}
.video-embed-btn:hover .video-embed-play,
.video-embed-btn:focus-visible .video-embed-play { background: rgba(8, 10, 13, 0.12); }
.video-embed-play svg {
  width: clamp(62px, 9vw, 80px);
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
  transition: transform 0.18s ease;
}
.video-embed-btn:hover .video-embed-play svg,
.video-embed-btn:focus-visible .video-embed-play svg { transform: scale(1.07); }
.video-embed-note { text-align: center; font-size: 0.9rem; color: var(--ink-soft); margin: 0.8rem 0 0; }
.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ------------------------------ Lightbox ------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(8, 10, 13, 0.88); backdrop-filter: blur(3px); }
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  background: #0e1116;
  cursor: zoom-out;
}
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] .lightbox-img { animation: lb-in 0.2s ease both; }
  @keyframes lb-in { from { opacity: 0; transform: scale(0.97); } }
}

/* --------------------------- Guides / articles ------------------------- */
.article { padding-block: clamp(2rem, 5vw, 3.5rem); }
.crumbs { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs span { margin: 0 0.4rem; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 1rem; }
.article > p { font-size: 1.06rem; line-height: 1.7; }
.article h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-top: 2.5rem; }
.article h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li { margin-bottom: 0.5rem; line-height: 1.65; }
.article p a, .article li a, .article td a {
  color: var(--link); font-weight: 500; text-decoration: underline; text-underline-offset: 2px;
}
.article table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.94rem; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid var(--surface-border); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.article thead th { background: var(--bg-muted); font-weight: 600; white-space: nowrap; }
.article code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-muted); padding: 0.1em 0.35em; border-radius: 5px; }
.article blockquote { border-left: 3px solid var(--accent); margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1rem; color: var(--ink-soft); }
.article-note { font-size: 0.9rem; color: var(--ink-faint); font-style: italic; margin-top: -0.5rem; }
.article-faq { margin-top: 3rem; }
.article-faq h2 { margin-bottom: 1rem; }
.article-cta { margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--bg-muted); border: 1px solid var(--surface-border); border-radius: var(--radius); text-align: center; }
.article-cta h2 { margin-top: 0; }
.article-cta p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 1.25rem; }
.guides-list { display: grid; gap: 1.25rem; }
.guide-card { display: block; background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border)); text-decoration: none; }
.guide-card h2 { font-size: 1.25rem; margin: 0 0 0.4rem; color: var(--ink); }
.guide-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
