/* ============================================================
   ChainBrief — Digital Asset Intelligence
   Dark editorial theme with tech accents. Mobile-first.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0e14;
  --bg-2: #10141d;
  --bg-3: #151a25;
  --line: rgba(230, 233, 240, 0.08);
  --line-strong: rgba(230, 233, 240, 0.16);
  --text: #e6e9f0;
  --text-2: #c2c9d6;
  --muted: #8b93a5;
  --amber: #f2a93b;
  --amber-2: #f7c05e;
  --amber-soft: rgba(242, 169, 59, 0.1);
  --cyan: #4fd8e0;
  --cyan-soft: rgba(79, 216, 224, 0.09);
  --radius: 14px;
  --header-h: 68px;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* faint engineering grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(230, 233, 240, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 233, 240, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}

main {
  flex: 1;
}

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

a {
  color: var(--amber);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--amber-2);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

::selection {
  background: rgba(242, 169, 59, 0.32);
  color: #fff;
}

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

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #232a38;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2e3748;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: #131313;
  padding: 10px 16px;
  z-index: 2000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "// ";
  color: var(--amber);
}

.sub {
  color: var(--muted);
  font-size: 15px;
  margin-top: -6px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

.mobile-only {
  display: inline-flex;
}
.desktop-only {
  display: none !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn .arrow {
  font-family: var(--font-mono);
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-2), var(--amber) 60%, #dd9427);
  color: #161616;
  box-shadow: 0 8px 26px rgba(242, 169, 59, 0.22);
}
.btn-primary:hover {
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(242, 169, 59, 0.32);
}

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

.btn-small {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background 0.35s ease, border-color 0.35s ease,
    backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled,
.site-header.menu-active {
  background: rgba(11, 14, 20, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.04em;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(242, 169, 59, 0.35));
}
.brand .brand-strong {
  color: var(--amber);
  font-weight: 700;
}

/* desktop nav */
.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(13, 17, 25, 0.98);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 10px 20px 18px;
  gap: 4px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s var(--ease);
}
.main-nav.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.main-nav a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, padding-left 0.25s var(--ease);
}
.main-nav a:last-child {
  border-bottom: 0;
}
.main-nav a:hover {
  color: var(--amber-2);
  padding-left: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* hamburger */
.menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s ease;
}
.menu-toggle:hover {
  border-color: var(--amber);
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 70px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-badges span {
  display: inline-flex;
  align-items: center;
}
.hero-badges span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  margin: 0 12px;
  box-shadow: 0 0 8px var(--amber);
}

.hero h1 {
  font-size: clamp(1.9rem, 5.4vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero-summary {
  font-size: 17px;
  color: var(--text-2);
  max-width: 56ch;
}

.hero-note {
  font-size: 13.5px;
  color: var(--muted);
  border-left: 2px solid var(--amber);
  padding-left: 14px;
  max-width: 52ch;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ambient orbs + sparks */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}
.orb-amber {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(242, 169, 59, 0.16), transparent 65%);
  animation: breathe 9s ease-in-out infinite;
}
.orb-cyan {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(79, 216, 224, 0.12), transparent 65%);
  animation: breathe 11s ease-in-out 1.5s infinite;
}
.spark {
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  filter: blur(1px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
  animation: drift 12s ease-in-out infinite;
}
.spark-1 { width: 6px; height: 6px; top: 22%; right: 18%; }
.spark-2 { width: 4px; height: 4px; top: 60%; right: 8%; animation-delay: 2s; background: var(--amber); }
.spark-3 { width: 5px; height: 5px; top: 34%; left: 6%; animation-delay: 4s; }
.spark-4 { width: 3px; height: 3px; top: 78%; left: 30%; animation-delay: 6s; background: var(--amber); }

@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

/* hero artwork */
.hero-art-wrap {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}
.hero-art-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  background: radial-gradient(circle, rgba(79, 216, 224, 0.12), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}
.hero-art .traces {
  stroke-dasharray: 5 9;
  animation: dashmove 26s linear infinite;
}
@keyframes dashmove {
  to { stroke-dashoffset: -280; }
}
.hero-art .af-1 { animation: floaty 9s ease-in-out infinite; }
.hero-art .af-2 { animation: floaty 11s ease-in-out -3s infinite reverse; }
.hero-art .af-3 { animation: floaty 13s ease-in-out -6s infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
}
.section-head {
  margin-bottom: 40px;
  max-width: 640px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

/* guide cards */
.cards {
  display: grid;
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), rgba(16, 20, 29, 0.6));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease,
    box-shadow 0.35s ease;
}
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.card:hover::after {
  opacity: 1;
}

.tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(79, 216, 224, 0.35);
  background: var(--cyan-soft);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 21px;
  margin-bottom: 12px;
}
.card h3 a {
  color: var(--text);
  transition: color 0.2s ease;
}
.card h3 a:hover {
  color: var(--amber-2);
}

.card p {
  color: var(--text-2);
  font-size: 14.5px;
  flex: 1;
}

.card-link {
  margin-top: 18px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card-link .arrow {
  font-family: var(--font-mono);
  transition: transform 0.25s var(--ease);
}
.card-link:hover .arrow {
  transform: translateX(4px);
}

/* editorial principles */
.principles {
  border-top: 1px solid var(--line);
}
.principles ol {
  list-style: none;
  counter-reset: principle;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.principles li {
  counter-increment: principle;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px 84px;
  position: relative;
  font-size: 15.5px;
  color: var(--text-2);
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}
.principles li:hover {
  border-color: rgba(242, 169, 59, 0.4);
  transform: translateY(-3px);
}
.principles li::before {
  content: counter(principle, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 20px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(242, 169, 59, 0.45);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(16, 20, 29, 0.7));
  margin-top: 40px;
  padding: 52px 0 34px;
}
.footer-grid {
  display: grid;
  gap: 30px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 46ch;
  margin: 16px 0 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-content: start;
}
.footer-links a {
  color: var(--text-2);
  font-size: 14px;
}
.footer-links a:hover {
  color: var(--amber-2);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.footer-bottom p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- Article pages ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  z-index: 1100;
  box-shadow: 0 0 12px rgba(242, 169, 59, 0.5);
}

.article {
  padding: calc(var(--header-h) + 44px) 0 90px;
  max-width: 780px;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--amber-2);
}
.breadcrumb .sep {
  color: rgba(139, 147, 165, 0.5);
}

.article-header {
  margin-bottom: 14px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.article-header h1 {
  font-size: clamp(1.8rem, 4.6vw, 2.7rem);
  font-weight: 700;
  margin: 18px 0 20px;
}
.article-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
}
.article-meta .sep {
  color: var(--amber);
  margin: 0 12px;
}

.article-body {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--text-2);
}
.article-body .lead {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 30px;
}
.article-body h2 {
  font-size: 1.55rem;
  color: var(--text);
  margin: 2.4em 0 0.7em;
  padding-top: 0.4em;
}
.article-body p {
  margin-bottom: 1.2em;
}
.article-body ul {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
}
.article-body ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.7em;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  transform: rotate(45deg) translateY(-50%);
}
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--cyan);
}

/* callouts */
.callout {
  margin: 30px 0;
  padding: 22px 24px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.7;
}
.callout p {
  margin: 0;
}
.callout-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.key-conclusion {
  background: var(--amber-soft);
  border: 1px solid rgba(242, 169, 59, 0.35);
  border-left: 3px solid var(--amber);
}
.key-conclusion .callout-label {
  color: var(--amber);
}

.fact-box {
  background: rgba(11, 14, 20, 0.6);
  border: 1px solid rgba(242, 169, 59, 0.45);
}
.fact-box .callout-label {
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.6);
  animation: pulse 2s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(242, 169, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 169, 59, 0); }
}

.security-notice {
  background: var(--cyan-soft);
  border: 1px solid rgba(79, 216, 224, 0.3);
  border-left: 3px solid var(--cyan);
}
.security-notice .callout-label {
  color: var(--cyan);
}

/* sources */
.sources {
  margin: 0 0 1.6em;
  padding: 0;
  list-style: none;
}
.sources li {
  margin-bottom: 0.55em;
  padding-left: 22px;
  position: relative;
  font-size: 15px;
}
.sources li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.8;
}
.sources a {
  text-decoration: underline;
  text-decoration-color: rgba(242, 169, 59, 0.4);
  text-underline-offset: 3px;
}
.sources a:hover {
  text-decoration-color: var(--amber-2);
}

.article-note {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line-strong);
  padding-top: 16px;
  margin-top: 2em;
}

.article-footer-nav {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.article-footer-nav .btn .arrow {
  transition: transform 0.25s var(--ease);
}
.article-footer-nav .btn:hover .arrow-back {
  transform: translateX(-4px);
}
.arrow-back {
  font-family: var(--font-mono);
}

/* ---------- Permanent pages ---------- */
.page {
  padding: calc(var(--header-h) + 56px) 0 90px;
  max-width: 780px;
}
.page-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.page-header .updated {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.page-body {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--text-2);
}
.page-body h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 2em 0 0.6em;
}
.page-body p {
  margin-bottom: 1.2em;
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 20px 80px;
  position: relative;
  overflow: hidden;
}
.not-found-code {
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 16vw, 8rem);
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(242, 169, 59, 0.25));
  margin-bottom: 10px;
}
.not-found h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 12px;
}
.not-found p {
  color: var(--muted);
  margin-bottom: 32px;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 20, 29, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--amber);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease),
    border-color 0.25s ease;
  z-index: 900;
}
.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--amber);
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .principles ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .principles li {
    padding: 76px 24px 22px;
  }
  .principles li::before {
    left: 24px;
    top: 22px;
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
  .footer-links {
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }
  .desktop-only {
    display: inline-flex !important;
  }

  .menu-toggle {
    display: none;
  }
  .main-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 34px;
    background: transparent;
    border: 0;
    padding: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .main-nav a {
    font-size: 14.5px;
    padding: 6px 2px;
    border-bottom: 0;
    position: relative;
    color: var(--text-2);
  }
  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), var(--cyan));
    transition: right 0.3s var(--ease);
  }
  .main-nav a:hover {
    padding-left: 2px;
    color: var(--text);
  }
  .main-nav a:hover::after {
    right: 0;
  }

  .hero {
    padding: calc(var(--header-h) + 84px) 0 110px;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
  }
  .hero-art-wrap {
    max-width: 520px;
  }
  .section {
    padding: 90px 0;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
