/* Zinia Hub — Resources editorial system */

:root {
  --paper: #fbfaf8;
  --paper-2: #f4f1eb;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #57606e;
  --hairline: #e5e0d6;
  --purple: hsl(262 83% 58%);
  --purple-deep: hsl(262 60% 42%);
  --teal: hsl(160 84% 32%);
  --dark: hsl(222 47% 5%);
  --dark-2: hsl(217 33% 10%);
  --radius: 12px;
  --display: "Gabarito", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--dark);
  color: #fff;
  border-bottom: 3px solid var(--purple);
}

.masthead-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.wordmark img {
  height: 24px;
  width: auto;
  display: block;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14.5px;
}

.masthead nav a {
  color: hsl(220 15% 78%);
  text-decoration: none;
  transition: color 160ms ease;
}

.masthead nav a:hover { color: #fff; }

.masthead nav a.cta {
  color: #fff;
  background: var(--purple);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.masthead nav a.cta:hover { background: hsl(262 83% 64%); }

/* ---------- Article scaffold ---------- */

.sheet {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--hairline);
  animation: rise 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-deep);
  margin: 0 0 18px;
}

.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  max-width: 21ch;
}

.standfirst {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 28px;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.byline .dot { color: var(--hairline); }

.byline .tag {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 12px;
  background: #fff;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- In brief (answer box) ---------- */

.in-brief {
  background: var(--dark);
  color: hsl(220 25% 92%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 44px 0 8px;
  position: relative;
  overflow: hidden;
  animation: rise 640ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.in-brief::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(closest-side, hsl(262 83% 58% / 0.35), transparent);
  pointer-events: none;
}

.in-brief .label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(160 84% 55%);
  margin: 0 0 10px;
}

.in-brief p {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.65;
  max-width: 70ch;
}

.in-brief strong { color: #fff; }

/* ---------- Layout: prose + rail ---------- */

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 56px;
  padding: 48px 0 72px;
}

@media (max-width: 900px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { order: -1; }
}

.prose { max-width: 68ch; }

.prose h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 52px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  counter-increment: section;
  position: relative;
}

.prose h2::before {
  content: counter(section, decimal-leading-zero);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--purple);
  display: block;
  margin-bottom: 6px;
}

.prose { counter-reset: section; }

.prose h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 19.5px;
  margin: 30px 0 8px;
}

.prose p { margin: 0 0 18px; }

.prose a {
  color: var(--purple-deep);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 160ms ease;
}

.prose a:hover { color: var(--purple); }

.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--purple); font-weight: 600; }

.prose strong { color: var(--ink); }

.pull {
  border-left: 3px solid var(--teal);
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
  color: var(--ink-2);
  font-size: 16.5px;
}

.pull strong { color: var(--teal); }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 26px 0; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
}

caption {
  caption-side: top;
  text-align: left;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  padding: 0 0 10px;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

thead th {
  background: var(--dark);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  border-bottom: none;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--paper); }

td:first-child { color: var(--ink); font-weight: 500; }

/* ---------- Rail / TOC ---------- */

.rail { font-size: 14px; }

.rail-box {
  position: sticky;
  top: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px 22px;
}

.rail-box .rail-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.rail-box ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-box ol li {
  border-top: 1px solid var(--hairline);
}

.rail-box ol li:first-child { border-top: none; }

.rail-box ol a {
  display: block;
  padding: 9px 0;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 140ms ease, padding-left 140ms ease;
}

.rail-box ol a:hover {
  color: var(--purple-deep);
  padding-left: 6px;
}

.rail-cta {
  margin-top: 16px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--purple), hsl(262 70% 45%));
  color: #fff;
  padding: 20px 22px;
}

.rail-cta p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: hsl(262 100% 94%);
}

.rail-cta strong { color: #fff; }

.rail-cta a {
  display: inline-block;
  background: #fff;
  color: var(--purple-deep);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
}

/* ---------- FAQ ---------- */

.faq { margin: 10px 0 0; }

.faq .qa {
  border-top: 1px solid var(--hairline);
  padding: 20px 0;
}

.faq .qa:last-child { border-bottom: 1px solid var(--hairline); }

.faq h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 17.5px;
  margin: 0 0 8px;
}

.faq p { margin: 0; color: var(--ink-2); }

/* ---------- Article footer / next reads ---------- */

.next-reads {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 8px;
}

.next-reads .rail-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.read-card {
  display: block;
  border: 1px solid var(--hairline);
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--ink-2);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.read-card:hover {
  transform: translateY(-3px);
  border-color: hsl(262 50% 78%);
  box-shadow: 0 12px 28px -18px hsl(262 60% 40% / 0.35);
}

.read-card .k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-deep);
  display: block;
  margin-bottom: 8px;
}

.read-card .t {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.35;
  display: block;
  margin-bottom: 6px;
}

.read-card .d {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Site footer ---------- */

.site-footer {
  background: var(--dark);
  color: hsl(220 15% 72%);
  margin-top: 72px;
}

.site-footer .foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 14px;
}

.site-footer a { color: hsl(220 20% 88%); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.site-footer .cols { display: flex; gap: 40px; flex-wrap: wrap; }
.site-footer .cols div { display: flex; flex-direction: column; gap: 8px; }

.site-footer .col-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(220 10% 55%);
  margin-bottom: 2px;
}

.site-footer .legal {
  border-top: 1px solid hsl(217 33% 14%);
  padding: 18px 24px;
}

.site-footer .legal-inner {
  max-width: 1080px;
  margin: 0 auto;
  font-size: 12.5px;
  color: hsl(220 10% 55%);
}

/* ---------- Index (hub) page ---------- */

.hub-head { padding: 72px 0 48px; }

.hub-head h1 { max-width: 18ch; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 8px 0 72px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--hairline);
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: var(--ink-2);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: hsl(262 50% 78%);
  box-shadow: 0 16px 36px -20px hsl(262 60% 40% / 0.4);
}

.hub-card .k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-deep);
}

.hub-card h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.3;
  margin: 0;
}

.hub-card p { margin: 0; font-size: 15px; color: var(--muted); }

.hub-card .go {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--purple-deep);
}

/* ---------- Motion ---------- */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
