/* ==========================================================================
   resources.css — Resources hub (Resources in top nav).
   Standard HomeCV palette: warm off-white paper, brand teal + gold accents,
   warm near-black ink. Bright, editorial, low cognitive load.
   Loads LAST, after tokens + landing + story. Uses the shared tokens as-is
   (no dark override) so nav / mega-menus / footer / buttons stay on-brand.
   ========================================================================== */

/* ── 1 · Section scaffolding ───────────────────────────────────────────── */
.res-section { position: relative; padding: clamp(58px, 8vw, 104px) 0; }
.res-section + .res-section { padding-top: 0; }

/* soft tinted band variant */
.res-section--light { background: var(--surface); border-block: 1px solid var(--line); }

.res-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}
.res-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: 0.5; }
.res-h { font-family: var(--serif); font-weight: 600; color: var(--brown); line-height: 1.04; letter-spacing: -0.01em; margin: 16px 0 0; }
.res-sub { color: var(--brown-3); line-height: 1.6; margin: 16px 0 0; max-width: 60ch; }
.res-head { max-width: 70ch; }
.res-head.center { margin: 0 auto; text-align: center; }
.res-head.center .res-sub { margin-inline: auto; }

/* ── 2 · Hero (bright) ─────────────────────────────────────────────────── */
.res-hero {
  padding: clamp(84px, 12vw, 140px) 0 clamp(40px, 6vw, 72px);
  position: relative; overflow: hidden;
  background: var(--bg);
}
.res-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 70% at 88% -6%, rgba(23,95,100,0.10), transparent 60%),
    radial-gradient(50% 60% at 2% 102%, rgba(179,136,74,0.10), transparent 62%);
}
.res-hero .wrap { position: relative; z-index: 1; }
.res-hero-grid {
  display: grid; grid-template-columns: 1.45fr 0.55fr;
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.res-hero .res-h { font-size: clamp(34px, 4.6vw, 62px); max-width: 22ch; line-height: 1.08; }
.res-hero .res-h em { font-style: italic; color: var(--accent); }
.res-hero .res-sub { font-size: clamp(17px, 1.5vw, 20px); max-width: 60ch; margin-top: clamp(26px, 3vw, 38px); }
.res-hero-rule { margin-top: clamp(30px, 4vw, 48px); height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* figure (plain cutout, no frame) */
.res-hero-figure { display: flex; justify-content: center; }
.res-arch {
  position: relative;
  width: clamp(180px, 18vw, 250px);
}
.res-arch-glow { display: none; }
.res-arch img {
  width: 100%; max-width: none; display: block;
}
@media (max-width: 860px) {
  .res-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .res-hero .res-h, .res-hero .res-sub { max-width: 60ch; }
  .res-hero-figure { order: -1; }
  .res-arch { width: clamp(180px, 46vw, 240px); }
}

/* ── 3 · Browse: filter rail + editorial feed (Every-style) ────────────── */
.res-browse {
  display: grid; grid-template-columns: 248px 1fr; gap: clamp(40px, 5vw, 76px);
  margin-top: clamp(38px, 4vw, 56px); align-items: start;
}

/* left rail */
.res-rail { position: sticky; top: 104px; }
.res-rail-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brown-4); margin: 0 0 18px;
}
.res-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.res-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1.2;
  color: var(--brown-2); background: var(--bg);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 18px; cursor: pointer; text-align: left;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.res-pill:hover { border-color: var(--line-strong); color: var(--brown); }
.res-pill.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}
.res-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.res-rail-note {
  display: flex; gap: 9px; margin: 26px 0 0; padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.5; color: var(--brown-4);
}
.res-rail-note i { flex: 0 0 auto; color: var(--accent); font-size: 16px; margin-top: 1px; }

/* right feed */
.res-feed { min-width: 0; }
.rf-item {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 26px 0; text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: padding .18s ease;
}
.rf-item:first-child { padding-top: 0; }
.rf-item:hover { padding-left: 6px; }
.rf-tx { min-width: 0; }
.rf-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); display: inline-block; margin-bottom: 12px;
}
.rf-title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; color: var(--brown);
  margin: 0; transition: color .16s ease; text-wrap: balance;
}
.rf-item:hover .rf-title { color: var(--accent); }
.rf-dek { font-size: 17px; line-height: 1.55; color: var(--brown-3); margin: 12px 0 0; max-width: 54ch; }
.rf-meta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-family: var(--sans); font-size: 14px; color: var(--brown-4);
}
.rf-sep { opacity: 0.6; }
.rf-thumb {
  flex: 0 0 auto; width: 188px; height: 124px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
  box-shadow: 0 18px 38px -26px rgba(36,30,22,0.4);
}
.rf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease; }
.rf-item:hover .rf-thumb img { transform: scale(1.05); }

/* featured first item — larger */
.rf-item--feat {
  align-items: center; gap: 44px; padding: 0 0 34px; margin-bottom: 8px;
}
.rf-item--feat .rf-title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.06; }
.rf-item--feat .rf-thumb { width: 320px; height: 220px; border-radius: 18px; }

.rf-empty { font-size: 17px; color: var(--brown-3); padding: 30px 0; margin: 0; }

@media (max-width: 920px) {
  .res-browse { grid-template-columns: 1fr; gap: 32px; }
  .res-rail { position: static; }
  .res-pills { flex-direction: row; flex-wrap: wrap; }
  .res-rail-note { display: none; }
}
@media (max-width: 600px) {
  .rf-item, .rf-item--feat { gap: 18px; }
  .rf-thumb { width: 110px; height: 84px; }
  .rf-item--feat .rf-thumb { width: 130px; height: 110px; }
  .rf-dek { display: none; }
}

/* ── 4 · Glossary feature band (teal accent on light) ──────────────────── */
.res-glossary {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  background: linear-gradient(110deg, #0c2b31 0%, #175f64 60%, #0c2b31 100%);
  border: 1px solid rgba(23,95,100,0.4); border-radius: 20px; padding: 32px 36px;
  box-shadow: 0 30px 60px -40px rgba(23,95,100,0.5);
}
.res-glossary .res-topic-ic {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,255,255,0.12); color: var(--gold-soft); font-size: 25px;
}
.res-glossary-tx { flex: 1; min-width: 260px; }
.res-glossary-tx h3 { font-family: var(--serif); font-weight: 600; font-size: 28px; color: #fff; margin: 0 0 6px; }
.res-glossary-tx p { font-size: 16px; line-height: 1.55; color: rgba(245,242,235,0.82); margin: 0; }

/* ── 5 · Closing band (bright) ─────────────────────────────────────────── */
.res-close { position: relative; overflow: hidden; text-align: center; padding: clamp(72px, 10vw, 128px) 0; background: var(--surface); border-top: 1px solid var(--line); }
.res-close::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 110% at 50% 0%, rgba(23,95,100,0.08), transparent 62%);
}
.res-close .wrap { position: relative; z-index: 1; }
.res-close .res-h { font-size: clamp(32px, 4.6vw, 56px); }
.res-close .res-h em { font-style: italic; color: var(--accent); }
.res-close .res-sub { color: var(--brown-3); }
.res-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* ── 6 · Reveal-on-scroll (landing.js toggles .in) ─────────────────────── */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; } }
