/*
 * Qirox website styles. Loaded after vendor Bootstrap 5.3 (assets/vendor/bootstrap).
 * Brand tokens mirror the app's design system (android core/designsystem/theme/Color.kt).
 */

/* ---------- Fonts (self-hosted, OFL, same files the app bundles) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space_grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains_mono.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --q-indigo: #4b3fe0;
  --q-indigo-600: #3d32c4;
  --q-indigo-700: #3127a6;
  --q-indigo-50: #efedff;
  --q-indigo-100: #e2dfff;
  --q-lime: #c8ff3d;
  --q-ink: #1b1b21;
  --q-ink-2: #4a4a5a; /* body secondary: 8.4:1 on --q-bg */
  --q-muted: #5d5d6e; /* 6.2:1 on --q-bg */
  --q-bg: #fbfaff;
  --q-surface: #ffffff;
  --q-line: #e4e2f0;
  --q-dark: #0e0e12;
  --q-dark-2: #17171d;
  --q-dark-line: #2a2a33;
  --q-dark-text: #ededf3;
  --q-dark-muted: #a9a9b8; /* 8.3:1 on --q-dark */

  --q-radius-sm: 10px;
  --q-radius: 16px;
  --q-radius-lg: 24px;
  --q-shadow: 0 1px 2px rgba(27, 27, 33, 0.06), 0 8px 24px rgba(27, 27, 33, 0.06);
  --q-shadow-lg: 0 24px 60px rgba(49, 39, 166, 0.18);

  --q-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --q-font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --q-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--q-font-body);
  --bs-body-color: var(--q-ink);
  --bs-body-bg: var(--q-bg);
  --bs-primary: var(--q-indigo);
  --bs-primary-rgb: 75, 63, 224;
  --bs-link-color: var(--q-indigo);
  --bs-link-color-rgb: 75, 63, 224;
  --bs-link-hover-color: var(--q-indigo-700);
  --bs-link-hover-color-rgb: 49, 39, 166;
  --bs-border-color: var(--q-line);
  --bs-focus-ring-color: rgba(75, 63, 224, 0.35);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@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;
  }
}

body {
  font-family: var(--q-font-body);
  color: var(--q-ink);
  background: var(--q-bg);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.display-head {
  font-family: var(--q-font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
}
h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.08;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
}
h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

code,
kbd,
.mono {
  font-family: var(--q-font-mono);
}
code {
  color: var(--q-indigo-700);
  font-size: 0.9em;
}

a {
  text-underline-offset: 0.18em;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--q-ink);
  color: #fff;
  border-radius: var(--q-radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
  color: #fff;
}
:focus-visible {
  outline: 3px solid var(--q-indigo);
  outline-offset: 3px;
  border-radius: 6px;
}
.section-dark :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--q-lime);
}

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1.15rem;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-border-radius: 999px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-sm {
  min-height: 40px;
  --bs-btn-padding-y: 0.45rem;
  --bs-btn-padding-x: 0.95rem;
}
.btn-primary {
  --bs-btn-bg: var(--q-indigo);
  --bs-btn-border-color: var(--q-indigo);
  --bs-btn-hover-bg: var(--q-indigo-600);
  --bs-btn-hover-border-color: var(--q-indigo-600);
  --bs-btn-active-bg: var(--q-indigo-700);
  --bs-btn-active-border-color: var(--q-indigo-700);
  --bs-btn-focus-shadow-rgb: 75, 63, 224;
  box-shadow: 0 6px 18px rgba(75, 63, 224, 0.28);
}
.btn-outline-primary {
  --bs-btn-color: var(--q-indigo);
  --bs-btn-border-color: rgba(75, 63, 224, 0.4);
  --bs-btn-hover-bg: var(--q-indigo-50);
  --bs-btn-hover-color: var(--q-indigo-700);
  --bs-btn-hover-border-color: var(--q-indigo);
  --bs-btn-active-bg: var(--q-indigo-100);
  --bs-btn-active-color: var(--q-indigo-700);
  background: var(--q-surface);
}
.btn-lime {
  --bs-btn-bg: var(--q-lime);
  --bs-btn-color: var(--q-ink);
  --bs-btn-border-color: var(--q-lime);
  --bs-btn-hover-bg: #b8f229;
  --bs-btn-hover-color: var(--q-ink);
  --bs-btn-hover-border-color: #b8f229;
  --bs-btn-active-bg: #a8e01c;
  --bs-btn-active-color: var(--q-ink);
}
.btn-ghost-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.35);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.1);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: #fff;
}
.play-note {
  font-size: 0.85rem;
  color: var(--q-muted);
}

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(251, 250, 255, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--q-line);
  box-shadow: 0 4px 20px rgba(27, 27, 33, 0.05);
}
.site-header .navbar {
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--q-font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--q-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover {
  color: var(--q-ink);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.site-header .nav-link {
  font-weight: 500;
  color: var(--q-ink-2);
  padding: 0.6rem 0.85rem !important;
  border-radius: 999px;
}
.site-header .nav-link:hover {
  color: var(--q-ink);
  background: rgba(75, 63, 224, 0.06);
}
.site-header .nav-link.active,
.site-header .nav-link[aria-current="page"] {
  color: var(--q-indigo);
  background: var(--q-indigo-50);
}
.navbar-toggler {
  border: 1px solid var(--q-line);
  border-radius: 12px;
  min-width: 48px;
  min-height: 44px;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(75, 63, 224, 0.3);
}
@media (max-width: 991.98px) {
  .site-header .navbar-collapse {
    padding: 0.5rem 0 1rem;
  }
  .site-header .nav-cta {
    margin-top: 0.5rem;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.section-tight {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.section-alt {
  background: var(--q-surface);
  border-top: 1px solid var(--q-line);
  border-bottom: 1px solid var(--q-line);
}
.section-dark {
  background: var(--q-dark);
  color: var(--q-dark-text);
}
.section-dark .lead,
.section-dark .text-soft {
  color: var(--q-dark-muted);
}
.section-dark a:not(.btn) {
  color: var(--q-lime);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--q-font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--q-indigo);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-bottom-right-radius: 3px;
}
.section-dark .eyebrow {
  color: var(--q-lime);
}
.section-head {
  max-width: 720px;
  margin-bottom: 2.75rem;
}
.section-head.text-center {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--q-ink-2);
  font-weight: 400;
}
.text-soft {
  color: var(--q-muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(900px, 120vw);
  height: 900px;
  background: radial-gradient(closest-side, rgba(75, 63, 224, 0.16), rgba(75, 63, 224, 0) 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: -200px;
  bottom: -260px;
  width: 560px;
  height: 560px;
  background: radial-gradient(closest-side, rgba(200, 255, 61, 0.22), rgba(200, 255, 61, 0) 70%);
  pointer-events: none;
}
.hero > .container {
  position: relative;
  z-index: 1;
}
.hero-app {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: var(--q-surface);
  box-shadow: var(--q-shadow);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-app img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.hero-app .sep {
  color: var(--q-muted);
  font-weight: 400;
}
.hero h1 .hl {
  color: var(--q-indigo);
}
.hero .lead {
  max-width: 560px;
  margin: 1.25rem 0 1.75rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.trust-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--q-ink-2);
  font-size: 0.92rem;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.trust-list .bi {
  color: var(--q-indigo);
}

/* ---------- Phone frame + screenshots ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 720 / 1600;
  margin: 0 auto;
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(160deg, #2b2b35, #0b0b0f);
  box-shadow: var(--q-shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  background: var(--q-dark);
}
/* Shown only while a screenshot file is not in place yet: a plain branded panel, no fake UI. */
.phone.is-missing img {
  visibility: hidden;
}
.phone.is-missing::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 26px;
  background: url("../assets/icons/qirox-icon.svg") center / 64px 64px no-repeat,
    radial-gradient(circle at 50% 40%, #1d1b3a, var(--q-dark) 70%);
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}
.hero-visual .phone {
  max-width: 290px;
  transform: rotate(-2deg);
}
.scan-corners {
  position: absolute;
  inset: -18px;
  pointer-events: none;
}
.scan-corners span {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 5px solid var(--q-lime);
  animation: corner-pulse 2.8s ease-in-out infinite;
}
.scan-corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 16px;
}
.scan-corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 16px;
}
.scan-corners span:nth-child(3) {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 16px;
}
.scan-corners span:nth-child(4) {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 16px;
}
@keyframes corner-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.94);
  }
}
.hero-visual-wrap {
  position: relative;
  width: min(290px, 78vw);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 230px);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--q-indigo-100) transparent;
}
.shots:focus-visible {
  outline-offset: 6px;
}
.shot {
  scroll-snap-align: start;
  margin: 0;
}
.shot .phone {
  max-width: none;
  border-radius: 28px;
  padding: 7px;
  box-shadow: 0 14px 34px rgba(27, 27, 33, 0.16);
}
.shot .phone img,
.shot .phone.is-missing::after {
  border-radius: 22px;
}
.shot .phone.is-missing::after {
  inset: 7px;
}
.shot figcaption {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--q-ink-2);
}
.shot figcaption strong {
  display: block;
  font-family: var(--q-font-head);
  color: var(--q-ink);
  font-size: 1rem;
}
.shots-hint {
  font-size: 0.85rem;
  color: var(--q-muted);
}

/* ---------- Feature cards ---------- */
.feature-card {
  height: 100%;
  padding: 1.6rem;
  background: var(--q-surface);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--q-shadow);
  border-color: var(--q-indigo-100);
}
.feature-card h3 {
  margin: 1rem 0 0.5rem;
}
.feature-card p {
  margin: 0;
  color: var(--q-ink-2);
  font-size: 0.97rem;
}
.feature-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--q-ink-2);
  font-size: 0.95rem;
}
.icon-tile {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--q-indigo-50);
  color: var(--q-indigo);
  font-size: 1.4rem;
}
.icon-tile.dark {
  background: var(--q-dark);
  color: var(--q-lime);
}
.feature-card.is-featured {
  background: linear-gradient(160deg, var(--q-indigo), var(--q-indigo-700));
  color: #fff;
  border-color: transparent;
}
.feature-card.is-featured p,
.feature-card.is-featured ul {
  color: rgba(255, 255, 255, 0.86);
}
.feature-card.is-featured .icon-tile {
  background: rgba(255, 255, 255, 0.14);
  color: var(--q-lime);
}
.tag {
  display: inline-block;
  font-family: var(--q-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--q-indigo-50);
  color: var(--q-indigo-700);
  vertical-align: middle;
  margin-left: 0.35rem;
}

/* ---------- Formats ---------- */
.format-panel {
  height: 100%;
  padding: 1.75rem;
  border-radius: var(--q-radius-lg);
  background: var(--q-dark-2);
  border: 1px solid var(--q-dark-line);
}
.format-panel h3 {
  color: #fff;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.format-panel h3 .count {
  font-family: var(--q-font-mono);
  color: var(--q-lime);
  font-size: 0.95rem;
}
.chips {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  font-family: var(--q-font-mono);
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--q-dark-line);
  background: #1f1f27;
  color: var(--q-dark-text);
}
.chips li.lime {
  border-color: rgba(200, 255, 61, 0.45);
  color: var(--q-lime);
}
.format-panel .sub {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--q-dark-muted);
  margin: 1.4rem 0 0;
  font-family: var(--q-font-mono);
}

/* ---------- Steps ---------- */
.step {
  position: relative;
  height: 100%;
  padding: 1.75rem;
  border-radius: var(--q-radius);
  background: var(--q-surface);
  border: 1px solid var(--q-line);
}
.step-num {
  font-family: var(--q-font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--q-indigo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--q-indigo);
  margin-bottom: 1rem;
}
.step p {
  color: var(--q-ink-2);
  margin: 0.5rem 0 0;
}

/* ---------- Privacy ---------- */
.privacy-card {
  height: 100%;
  padding: 1.6rem;
  border-radius: var(--q-radius);
  border: 1px solid var(--q-dark-line);
  background: var(--q-dark-2);
}
.privacy-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0.9rem 0 0.4rem;
}
.privacy-card p {
  color: var(--q-dark-muted);
  margin: 0;
  font-size: 0.95rem;
}
.privacy-card .bi {
  font-size: 1.5rem;
  color: var(--q-lime);
}
.ad-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.93rem;
}
.ad-table th,
.ad-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--q-dark-line);
  vertical-align: top;
  text-align: left;
}
.ad-table th {
  color: #fff;
  font-weight: 600;
  width: 34%;
}
.ad-table td {
  color: var(--q-dark-muted);
}

/* ---------- FAQ (native details/summary, works without JS) ---------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  background: var(--q-surface);
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s ease;
}
.faq details[open] {
  box-shadow: var(--q-shadow);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 3.25rem 1.1rem 1.35rem;
  font-family: var(--q-font-head);
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.35rem;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--q-indigo);
  border-bottom: 2px solid var(--q-indigo);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq .answer {
  padding: 0 1.35rem 1.2rem;
  color: var(--q-ink-2);
}
.faq .answer p:last-child,
.faq .answer ul:last-child {
  margin-bottom: 0;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--q-radius-lg);
  padding: clamp(2.25rem, 5vw, 3.75rem);
  background: radial-gradient(circle at 85% 20%, rgba(200, 255, 61, 0.16), transparent 40%),
    linear-gradient(140deg, var(--q-indigo), var(--q-indigo-700));
  color: #fff;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.86);
}
.cta-band .icon-xl {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.cta-band .play-note {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4.25rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--q-line);
  background: radial-gradient(circle at 90% 0%, rgba(75, 63, 224, 0.1), transparent 45%), var(--q-bg);
}
.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}
.page-hero .lead {
  max-width: 720px;
  margin-top: 1rem;
}
.breadcrumb {
  --bs-breadcrumb-divider-color: var(--q-muted);
  --bs-breadcrumb-item-active-color: var(--q-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--q-indigo);
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.92rem;
  color: var(--q-muted);
  margin-top: 1.1rem;
}
.meta-line .bi {
  color: var(--q-indigo);
  margin-right: 0.3rem;
}

/* ---------- Long-form (legal) ---------- */
.prose {
  max-width: 780px;
  font-size: 1.02rem;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.9rem;
  padding-top: 0.25rem;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.6rem;
}
.prose p,
.prose li {
  color: #2e2e3a;
}
.prose li {
  margin-bottom: 0.35rem;
}
.prose table {
  width: 100%;
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
  font-size: 0.93rem;
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  border: 1px solid var(--q-line);
  padding: 0.6rem 0.75rem;
  vertical-align: top;
  text-align: left;
}
.prose th {
  background: var(--q-indigo-50);
  font-weight: 600;
}
.prose blockquote {
  border-left: 4px solid var(--q-indigo);
  background: var(--q-indigo-50);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--q-radius-sm) var(--q-radius-sm) 0;
  margin: 1.25rem 0;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.toc {
  position: sticky;
  top: 92px;
  font-size: 0.9rem;
  padding: 1.25rem;
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  background: var(--q-surface);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc h2 {
  font-size: 0.8rem;
  font-family: var(--q-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--q-muted);
  margin: 0 0 0.75rem;
}
.toc ol {
  padding-left: 1.1rem;
  margin: 0;
}
.toc li {
  margin-bottom: 0.3rem;
}
.toc a {
  color: var(--q-ink-2);
  text-decoration: none;
}
.toc a:hover {
  color: var(--q-indigo);
  text-decoration: underline;
}

/* ---------- Info / contact cards ---------- */
.info-card {
  height: 100%;
  padding: 1.6rem;
  border-radius: var(--q-radius);
  background: var(--q-surface);
  border: 1px solid var(--q-line);
}
.info-card h2,
.info-card h3 {
  font-size: 1.15rem;
  margin: 0.9rem 0 0.5rem;
}
.info-card p {
  color: var(--q-ink-2);
}
.info-card p:last-child {
  margin-bottom: 0;
}
.notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--q-radius-sm);
  background: var(--q-indigo-50);
  color: var(--q-ink);
  font-size: 0.95rem;
}
.notice .bi {
  color: var(--q-indigo);
  font-size: 1.15rem;
  line-height: 1.4;
}
.email-link {
  font-family: var(--q-font-mono);
  font-weight: 600;
  word-break: break-all;
}
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
}
.kv dt {
  font-weight: 600;
  color: var(--q-ink);
}
.kv dd {
  margin: 0;
  color: var(--q-ink-2);
}
@media (max-width: 575.98px) {
  .kv {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .kv dd {
    margin-bottom: 0.6rem;
  }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}
.notfound .code {
  font-family: var(--q-font-mono);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 7rem);
  line-height: 1;
  color: var(--q-indigo);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--q-dark);
  color: var(--q-dark-muted);
  padding: 4rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer .brand {
  color: #fff;
}
.site-footer h2 {
  font-family: var(--q-font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--q-dark-text);
  margin-bottom: 1rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 0.25rem;
}
.site-footer a {
  color: var(--q-dark-muted);
  text-decoration: none;
  display: inline-block;
  padding: 0.3rem 0;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid var(--q-dark-line);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer-note {
  max-width: 360px;
}

/* ---------- Reveal on scroll (only when JS + motion allowed) ---------- */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

[hidden] {
  display: none !important;
}

/* ---------- Small-screen refinements ---------- */
@media (max-width: 575.98px) {
  .ad-table th,
  .ad-table td {
    display: block;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .ad-table th {
    border-bottom: 0;
    padding-bottom: 0.2rem;
  }
  .hero-visual-wrap {
    width: min(240px, 66vw);
  }
  .hero-ctas .btn {
    width: 100%;
  }
}
