/* ==========================================================================
   PortfolioPeakPros — Guia Editorial de Polvos e Cefalópodes
   Sistema visual "deep sea": superfícies escuras, luz âmbar, acento coral.
   ========================================================================== */

:root {
  --abyss: #030a10;
  --deep: #06121c;
  --deep-2: #081a27;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(180, 214, 235, 0.12);
  --line-strong: rgba(180, 214, 235, 0.22);

  --ink: #eef6fb;
  --ink-2: #c3d6e3;
  --muted: #8ba6b8;
  --faint: #63808f;

  --coral: #ff4d0d;
  --coral-2: #ff8a2b;
  --amber: #ffbe5c;
  --cyan: #45d3d8;
  --teal-glow: rgba(69, 211, 216, 0.35);
  --coral-glow: rgba(255, 90, 20, 0.45);

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 26px;

  --shadow-soft: 0 18px 50px -22px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 34px 80px -30px rgba(0, 0, 0, 0.95);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 68px;
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--coral); color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--coral);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------ atmosfera base -- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(255, 120, 40, 0.13), transparent 62%),
    radial-gradient(900px 620px at 88% 4%, rgba(40, 150, 190, 0.16), transparent 60%),
    radial-gradient(1200px 900px at 50% 108%, rgba(20, 90, 130, 0.16), transparent 62%),
    linear-gradient(180deg, #05121c 0%, #030a10 46%, #01060a 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='.5'/></svg>");
  mix-blend-mode: overlay;
}

/* partículas flutuantes */
.motes { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.mote {
  position: absolute;
  border-radius: 50%;
  background: rgba(200, 235, 255, 0.5);
  animation: drift linear infinite;
  will-change: transform, opacity;
}
@keyframes drift {
  0%   { transform: translate3d(0, 110vh, 0) scale(0.7); opacity: 0; }
  12%  { opacity: 0.55; }
  88%  { opacity: 0.45; }
  100% { transform: translate3d(38px, -12vh, 0) scale(1.15); opacity: 0; }
}

/* ---------------------------------------------------------- utilitários -- */

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 40px, var(--wrap-narrow)); margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  font-family: var(--sans);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--coral));
}

.lead { font-size: 1.16rem; color: var(--ink-2); line-height: 1.75; }
.muted { color: var(--muted); }
.center { text-align: center; }

section { position: relative; }

.section-pad { padding: clamp(64px, 9vw, 120px) 0; }

.section-head { margin-bottom: 42px; max-width: 720px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 14px 0 14px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 0;
}

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: linear-gradient(180deg, rgba(3, 10, 16, 0.92), rgba(3, 10, 16, 0.62));
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(3, 10, 16, 0.94);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; color: var(--ink); }
.brand img { height: 26px; width: auto; }
.brand span {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-top: -2px;
}

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 13px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.main-nav a:hover { color: #fff; background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--amber); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 17px;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--coral), var(--coral-2));
  box-shadow: 0 8px 26px -10px var(--coral-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-left: 8px;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px var(--coral-glow); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s;
}
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after { top: 5.5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: 70px 0 90px;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% center;
  opacity: 0.85;
  transform: scale(1.04);
  animation: heroFloat 26s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(-16px, -10px, 0); }
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 10, 16, 0.2) 0%, rgba(3, 10, 16, 0.62) 42%, rgba(3, 10, 16, 0.95) 74%, var(--abyss) 100%),
    linear-gradient(180deg, rgba(3, 10, 16, 0.75) 0%, transparent 26%, rgba(3, 10, 16, 0.9) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}
.hero-copy { grid-column: 2; }

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  margin: 20px 0 22px;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--amber), var(--coral-2) 55%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--ink-2);
  max-width: 54ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--coral-2));
  color: #fff;
  box-shadow: 0 16px 40px -16px var(--coral-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 50px -16px var(--coral-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-stats div strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1;
  color: #fff;
}
.hero-stats div span {
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

/* --------------------------------------------------------- page header -- */

.page-hero {
  position: relative;
  padding: clamp(52px, 8vw, 92px) 0 clamp(38px, 5vw, 56px);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(255, 110, 40, 0.16), transparent);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); margin: 16px 0 18px; }
.page-hero p { max-width: 62ch; }

.crumbs {
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}
.crumbs a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--amber); }
.crumbs span[aria-hidden] { opacity: 0.45; }

/* --------------------------------------------------- categoria em capa -- */

.cat-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 240px;
  padding: 24px;
  border-radius: var(--radius-l);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--deep-2);
  isolation: isolate;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s;
  grid-column: span 2;
}
.cat-card.is-wide { grid-column: span 3; min-height: 320px; }
.cat-card.is-tall { grid-column: span 3; min-height: 320px; }

.cat-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s;
  filter: saturate(0.92) brightness(0.82);
}
.cat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 10, 16, 0.15) 0%, rgba(3, 10, 16, 0.6) 48%, rgba(3, 10, 16, 0.95) 100%);
  transition: opacity 0.4s;
}
.cat-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.cat-card:hover img { transform: scale(1.07); filter: saturate(1.05) brightness(0.92); }

.cat-card h3 {
  font-size: 1.36rem;
  margin: 0 0 7px;
  color: #fff;
}
.cat-card.is-wide h3, .cat-card.is-tall h3 { font-size: 1.7rem; }
.cat-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 44ch;
}
.cat-card .tag-count {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(255, 190, 92, 0.11);
  border: 1px solid rgba(255, 190, 92, 0.26);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* -------------------------------------------------------------- cards -- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.35s;
}
.entry:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}
.entry-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--deep-2);
}
.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.85);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s;
}
.entry:hover .entry-thumb img { transform: scale(1.06); filter: saturate(1.05) brightness(0.95); }
.entry-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 18, 28, 0.85) 100%);
}
.entry-kicker {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(4, 12, 18, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  padding: 5px 10px;
  border-radius: 999px;
}
.entry-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.entry-body h3 {
  font-size: 1.2rem;
  line-height: 1.24;
  margin: 0 0 9px;
  transition: color 0.2s;
}
.entry:hover .entry-body h3 { color: var(--amber); }
.entry-body p {
  margin: 0 0 16px;
  font-size: 14.4px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.05em;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.entry-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.level {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
}
.level-intro { color: #7be0c8; background: rgba(123, 224, 200, 0.1); }
.level-medio { color: var(--amber); background: rgba(255, 190, 92, 0.1); }
.level-avancado { color: #ff9a6b; background: rgba(255, 154, 107, 0.1); }

/* ------------------------------------------------------ hub / filtros -- */

.finder {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(3, 10, 16, 0.96) 70%, rgba(3, 10, 16, 0));
  backdrop-filter: blur(10px);
  margin-bottom: 8px;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 4px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-shell:focus-within {
  border-color: rgba(255, 138, 43, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 90, 20, 0.1);
}
.search-shell svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-shell input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  padding: 13px 0;
  min-width: 0;
}
.search-shell input::placeholder { color: var(--faint); }
.search-clear {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.search-clear:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 9px;
  flex-shrink: 0;
  width: 74px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.2px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: #fff; background: rgba(255, 255, 255, 0.08); }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(255, 77, 13, 0.9), rgba(255, 138, 43, 0.9));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px -10px var(--coral-glow);
}
.chip.is-extra,
.chip[hidden] { display: none; }
.chips.mostra-extras .chip.is-extra { display: inline-block; }
.chip-mais {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
  font-weight: 600;
}
.chip-mais:hover { color: var(--amber); border-color: var(--amber); background: transparent; }

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.result-bar strong { color: var(--ink); }
.sort-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.sort-select option { background: var(--deep-2); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  background: rgba(255, 255, 255, 0.02);
}
.empty-state h3 { font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p { color: var(--muted); margin: 0 0 22px; }

mark.hit { background: rgba(255, 190, 92, 0.28); color: #fff; border-radius: 3px; padding: 0 2px; }

/* ------------------------------------------------------------ trilhas -- */

.trail {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  padding: 30px;
  overflow: hidden;
}
.trail::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 110, 40, 0.16), transparent);
  pointer-events: none;
}
.trail-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.trail-index {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  flex-shrink: 0;
}
.trail-head h3 { font-size: 1.55rem; margin: 0 0 8px; }
.trail-head p { margin: 0; color: var(--muted); font-size: 14.6px; }

.trail-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.trail-progress span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.trail-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.trail-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  transition: background 0.22s;
}
.trail-step:hover { background: rgba(255, 255, 255, 0.045); }
.trail-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all 0.25s;
  padding: 0;
}
.trail-check svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.5); transition: all 0.25s; }
.trail-check[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--coral), var(--coral-2));
  border-color: transparent;
  box-shadow: 0 6px 18px -8px var(--coral-glow);
}
.trail-check[aria-pressed="true"] svg { opacity: 1; transform: scale(1); color: #fff; }
.trail-step a {
  text-decoration: none;
  font-size: 15.2px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
  flex: 1;
}
.trail-step a:hover { color: var(--amber); }
.trail-step.done a { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.trail-step .mins { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* ----------------------------------------------------------- anatomia -- */

.anatomy-stage {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: start;
}
.anatomy-figure {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 420px at 50% 40%, rgba(40, 150, 190, 0.14), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  padding: 18px;
  overflow: hidden;
}
.anatomy-figure svg { width: 100%; height: auto; display: block; }

/* corpo do polvo esquemático */
#diagrama .arm-body { fill: url(#gBraco); stroke: rgba(255, 190, 140, 0.16); stroke-width: 1; }
#diagrama .suckers circle { fill: rgba(255, 214, 176, 0.62); }
#diagrama .mantle,
#diagrama .head { fill: url(#gCorpo); stroke: rgba(255, 190, 140, 0.22); stroke-width: 1.2; }
#diagrama .head { opacity: 0.98; }
#diagrama .organ { fill: rgba(255, 214, 150, 0.14); stroke: rgba(255, 214, 150, 0.3); stroke-dasharray: 4 5; }
#diagrama .ink { fill: #0a0d12; stroke: rgba(180, 220, 240, 0.35); stroke-width: 1.1; }
#diagrama .gill-stem,
#diagrama .gill path { fill: none; stroke: rgba(120, 226, 232, 0.62); stroke-width: 2.1; }
#diagrama .gill path { stroke-width: 1.5; }
#diagrama .heart-b { fill: url(#gOrgao); stroke: rgba(120, 226, 232, 0.7); stroke-width: 1.3; }
#diagrama .heart-s { fill: rgba(255, 106, 60, 0.5); stroke: rgba(255, 160, 110, 0.85); stroke-width: 1.5; }
#diagrama .vessel { fill: none; stroke: rgba(120, 200, 255, 0.4); stroke-width: 2.2; stroke-linecap: round; }
#diagrama .funnel path { fill: rgba(255, 190, 140, 0.22); stroke: rgba(255, 214, 176, 0.45); stroke-width: 1.2; }
#diagrama .funnel-mouth { fill: #06121c; stroke: rgba(255, 214, 176, 0.5); stroke-width: 1.2; }
#diagrama .eye-white { fill: #f4e2c4; stroke: rgba(90, 45, 20, 0.6); stroke-width: 1.6; }
#diagrama .pupil { fill: #10141a; }
#diagrama .brain { fill: rgba(255, 214, 150, 0.28); stroke: rgba(255, 214, 150, 0.6); stroke-width: 1.3; }
#diagrama .beak { fill: #12181f; stroke: rgba(255, 214, 176, 0.5); stroke-width: 1.2; }
#diagrama .skin-hint circle { fill: rgba(255, 214, 176, 0.35); }

.hot { cursor: pointer; }
.hot circle.halo {
  fill: rgba(255, 138, 43, 0.3);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.hot.active circle.halo { animation: ringPulse 2.6s ease-out infinite; }
.hot circle.ring {
  fill: rgba(6, 18, 28, 0.85);
  stroke: rgba(255, 190, 92, 0.55);
  stroke-width: 1.2;
  transition: stroke 0.28s;
}
.hot circle.core { fill: var(--amber); transition: fill 0.28s, r 0.28s; }
.hot:hover circle.core { fill: #ffd58a; r: 12.4; }
.hot.active circle.ring { stroke: #fff; }
.hot.active circle.core { fill: #fff; r: 12.4; }
.hot text {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  fill: #06121c;
  text-anchor: middle;
  pointer-events: none;
}
.hot.active text { fill: var(--coral); }
@keyframes ringPulse {
  0%   { opacity: 0.75; transform: scale(1); }
  70%  { opacity: 0; transform: scale(2.2); }
  100% { opacity: 0; transform: scale(2.2); }
}

.anatomy-panel {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  padding: 28px;
  min-height: 340px;
}
.anatomy-panel .eyebrow { margin-bottom: 12px; }
.anatomy-panel h3 { font-size: 1.75rem; margin: 0 0 14px; }
.anatomy-panel p { color: var(--ink-2); font-size: 15.4px; margin: 0 0 16px; }
.anatomy-facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 9px; }
.anatomy-facts li {
  display: flex;
  gap: 10px;
  font-size: 14.2px;
  color: var(--muted);
  line-height: 1.55;
}
.anatomy-facts li::before { content: "▸"; color: var(--coral-2); flex-shrink: 0; }
.anatomy-nav { display: flex; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.anatomy-nav button {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
}
.anatomy-nav button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ------------------------------------------------------- profundidade -- */

.depth-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

.depth-rail {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  height: 62vh;
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background-image: linear-gradient(180deg, rgba(3,10,16,.2), rgba(3,10,16,.55)), url("../img/bg-profundidades.jpg");
  background-size: cover;
  background-position: center;
}
.depth-rail-inner { position: absolute; inset: 0; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; }
.depth-tick {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(230, 245, 255, 0.55);
  font-weight: 600;
}
.depth-tick::before { content: ""; width: 14px; height: 1px; background: currentColor; }
.depth-marker {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), transparent);
  box-shadow: 0 0 22px 3px rgba(255, 90, 20, 0.5);
  transition: top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  top: 8%;
}
.depth-marker span {
  position: absolute;
  right: 10px;
  top: -11px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--coral-2));
  padding: 2px 9px;
  border-radius: 999px;
}

.depth-zones { display: flex; flex-direction: column; gap: 22px; }
.zone {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  padding: 30px;
  transition: border-color 0.4s, transform 0.4s, background 0.4s;
}
.zone.is-active {
  border-color: rgba(255, 138, 43, 0.42);
  background: linear-gradient(160deg, rgba(255, 120, 40, 0.09), rgba(255, 255, 255, 0.015));
}
.zone-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.zone-depth {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--amber);
  font-weight: 700;
}
.zone h3 { font-size: 1.6rem; margin: 0; }
.zone p { color: var(--ink-2); margin: 0 0 18px; font-size: 15.3px; }
.zone-species { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-species span {
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
}

/* -------------------------------------------------------------- artigo -- */

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  box-shadow: 0 0 14px rgba(255, 120, 40, 0.7);
  transition: width 0.1s linear;
}

.article-hero { position: relative; padding: 44px 0 0; }
.article-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 16px 0 20px; max-width: 20ch; }
.article-hero .lead { max-width: 62ch; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.8px;
  color: var(--faint);
}

.article-figure {
  margin: 38px 0 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.article-figure img { width: 100%; height: auto; }
.article-figure figcaption {
  font-size: 12.6px;
  color: var(--faint);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--line);
}

.article-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  padding: 54px 0 20px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  font-size: 13.6px;
}
.toc strong {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 7px 0 7px 14px;
  border-left: 1.5px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--amber); border-left-color: var(--coral); }

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  margin-top: 2.1em;
  margin-bottom: 0.55em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h3 {
  font-size: 1.28rem;
  margin-top: 1.7em;
  margin-bottom: 0.4em;
  color: var(--amber);
}
.prose p { color: var(--ink-2); }
.prose strong { color: #fff; font-weight: 600; }
.prose em { color: var(--ink); }
.prose a { color: var(--amber); text-decoration-color: rgba(255, 190, 92, 0.4); text-underline-offset: 3px; }
.prose a:hover { color: var(--coral-2); }
.prose ul, .prose ol { padding-left: 1.15em; color: var(--ink-2); }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--coral-2); }

.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--coral);
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.5;
  color: #fff;
  font-style: italic;
}

.callout {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(69, 211, 216, 0.07), rgba(255, 255, 255, 0.015));
  padding: 22px 24px;
  margin: 2em 0;
}
.callout strong.callout-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 9px;
  font-weight: 700;
}
.callout p { margin: 0; font-size: 15px; color: var(--ink-2); }
.callout.warm { background: linear-gradient(150deg, rgba(255, 138, 43, 0.09), rgba(255, 255, 255, 0.015)); }
.callout.warm strong.callout-title { color: var(--amber); }

.factbox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 6px 24px;
  margin: 2em 0;
}
.factbox dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; }
.factbox dt,
.factbox dd {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  font-size: 14.6px;
}
.factbox dt { color: var(--faint); font-weight: 600; }
.factbox dd { color: var(--ink); }
.factbox dl > :nth-last-child(1),
.factbox dl > :nth-last-child(2) { border-bottom: 0; }

.data-table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 14.6px; }
.data-table th,
.data-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.data-table th {
  font-size: 10.8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}
.data-table td { color: var(--ink-2); }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.table-scroll { overflow-x: auto; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15.4px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--coral-2);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--amber); }
.faq .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: 15px; }
.faq .faq-body p { margin: 0; }

.share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.share-row span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.share-row a, .share-row button {
  font-size: 13.4px;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
}
.share-row a:hover, .share-row button:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.09); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 34px;
}
.pager a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.25s;
  background: rgba(255, 255, 255, 0.025);
}
.pager a:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.055); transform: translateY(-2px); }
.pager small { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.pager strong { font-family: var(--serif); font-size: 1.06rem; font-weight: 600; line-height: 1.3; }
.pager .next { text-align: right; }

/* -------------------------------------------------------------- extras -- */

.cta-band {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  padding: clamp(34px, 5vw, 58px);
  background: linear-gradient(140deg, rgba(255, 90, 20, 0.14), rgba(69, 211, 216, 0.07) 60%, rgba(255, 255, 255, 0.02));
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 120, 40, 0.28), transparent);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 14px 0 14px; max-width: 20ch; }
.cta-band p { color: var(--ink-2); max-width: 56ch; margin: 0 0 26px; }

.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list a {
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.25s;
}
.mini-list a:hover { padding-left: 8px; }
.mini-list a:hover h4 { color: var(--amber); }
.mini-list .num {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  width: 30px;
  flex-shrink: 0;
}
.mini-list h4 { font-family: var(--sans); font-size: 15.2px; font-weight: 600; margin: 0 0 3px; transition: color 0.2s; }
.mini-list p { margin: 0; font-size: 13px; color: var(--faint); }

.pill-links { display: flex; flex-wrap: wrap; gap: 9px; }
.pill-links a {
  text-decoration: none;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-2);
  transition: all 0.22s;
}
.pill-links a:hover { color: #fff; border-color: var(--coral); background: rgba(255, 77, 13, 0.14); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 0.3s, transform 0.3s;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.feature-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(255, 138, 43, 0.22), rgba(69, 211, 216, 0.12));
  border: 1px solid var(--line-strong);
  margin-bottom: 16px;
  color: var(--amber);
}
.feature-ico svg { width: 19px; height: 19px; }
.feature h3 { font-size: 1.15rem; margin: 0 0 8px; }
.feature p { margin: 0; font-size: 14.3px; color: var(--muted); line-height: 1.6; }

.form-grid { display: grid; gap: 16px; }
.field label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 7px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 15px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(255, 138, 43, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 90, 20, 0.1);
}
.field select option { background: var(--deep-2); }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  margin-top: clamp(70px, 10vw, 130px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent);
  padding: 58px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 44px;
}
.footer-brand .brand { margin-bottom: 18px; color: var(--ink); }
.footer-brand .brand img { height: 26px; width: auto; }
.footer-brand p { font-size: 14.2px; color: var(--muted); margin: 0; max-width: 40ch; line-height: 1.65; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 10.8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 15px;
  font-weight: 700;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  text-decoration: none;
  font-size: 14.2px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.8px;
  color: var(--faint);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber); }

/* ------------------------------------------------------------- reveal -- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* -------------------------------------------------------- responsivo -- */

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { grid-column: 1; }
  .hero-media img { object-position: 60% center; }
  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(3, 10, 16, 0.7) 0%, rgba(3, 10, 16, 0.55) 30%, rgba(3, 10, 16, 0.96) 82%, var(--abyss) 100%);
  }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .toc {
    position: static;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
  }
  .toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 18px; }
  .anatomy-stage { grid-template-columns: 1fr; }
  .anatomy-panel { position: static; }
  .depth-wrap { grid-template-columns: 1fr; }
  .depth-rail { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 20px 26px;
    background: rgba(4, 12, 19, 0.985);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: 13px 12px; font-size: 16px; border-radius: 10px; }
  .nav-cta { margin: 10px 0 0; justify-content: center; padding: 13px; }
  .nav-toggle { display: flex; }
  .brand small { display: none; }

  .cat-mosaic { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cat-card,
  .cat-card.is-wide,
  .cat-card.is-tall { grid-column: span 2; min-height: 220px; }
  .card-grid { grid-template-columns: 1fr; gap: 18px; }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .filter-label { width: 100%; padding-top: 0; margin-bottom: 2px; }
  .finder { position: static; }
  .factbox dl { grid-template-columns: 1fr; }
  .factbox dt { padding-bottom: 0; border-bottom: 0; }
  .factbox dd { padding-top: 4px; }
  .hero-stats { gap: 22px; }
  .hero-stats div strong { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .trail { padding: 22px 18px; }
  .zone { padding: 22px 20px; }
}

@media (max-width: 480px) {
  .wrap, .wrap-narrow { width: calc(100% - 32px); }
  .cat-mosaic { grid-template-columns: 1fr; }
  .cat-card, .cat-card.is-wide, .cat-card.is-tall { grid-column: span 1; }
  .hero { min-height: auto; padding: 46px 0 60px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .motes { display: none; }
}

@media print {
  .site-header, .site-footer, .motes, .atmosphere, .toc, .share-row, .pager { display: none !important; }
  body { background: #fff; color: #111; }
  .prose p, .prose li { color: #222; }
}
