/* resources.css - v1.5 Resources section (tabbed: Takeaways + Tools) */

.resources-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.resources-glow {
  position: relative;
}

.resources-glow::before {
  content: '';
  position: absolute;
  top: -60px; left: -40px;
  width: 320px; height: 240px;
  background: radial-gradient(ellipse at center, rgba(224, 90, 43, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.resources-glow::after {
  content: '';
  position: absolute;
  top: -40px; right: -80px;
  width: 280px; height: 200px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.resources-glow > * { position: relative; z-index: 1; }

.resources-header { margin-bottom: 48px; }

.resources-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.resources-kicker::after {
  content: '';
  display: block;
  height: 1px;
  width: 48px;
  background: linear-gradient(90deg, var(--ember) 0%, transparent 100%);
}

.resources-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.resources-h2-sub {
  font-weight: 400;
  color: rgba(240, 235, 227, 0.6);
}

/* ============================================================
   TAB BAR
============================================================ */
.tab-bar-wrapper {
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.tab-bar {
  display: flex;
  gap: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-bar__item { flex-shrink: 0; }

.tab-bar__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 48px;
  min-width: 44px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
  margin-bottom: -1px;
}
.tab-bar__btn:hover { color: var(--white); }
.tab-bar__btn[aria-selected="true"] {
  color: var(--ember);
  border-bottom-color: var(--ember);
}
.tab-bar__btn:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: -2px;
  border-radius: 3px;
}

.tab-bar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(240, 235, 227, 0.1);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}
.tab-bar__btn[aria-selected="true"] .tab-bar__count {
  background: rgba(224, 90, 43, 0.2);
  color: var(--ember);
}

/* ============================================================
   TAB PANELS
============================================================ */
.tab-panels { position: relative; }

/* No-JS: all panels visible, stacked */
.tab-panel { display: block; }

/* JS active: panels hidden except selected */
.js-tabs-ready .tab-panel {
  display: none;
  opacity: 0;
}
.js-tabs-ready .tab-panel.is-active {
  display: block;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js-tabs-ready .tab-panel.is-active {
    animation: panel-fade-in 200ms ease both;
  }
}

@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* No-JS separator between stacked panels */
.tab-panels:not(.js-panels-ready) .tab-panel + .tab-panel {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* No-JS panel labels (hidden when JS runs) */
.no-js-panel-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: none;
}
.tab-panels:not(.js-panels-ready) .no-js-panel-label { display: block; }
.js-panels-ready .no-js-panel-label { display: none !important; }

/* ============================================================
   PANEL: TAKEAWAYS
============================================================ */
.takeaway-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 36px;
}

.takeaway-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--border);
}
.takeaway-item:last-child { border-bottom: none; }

.takeaway-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ember);
  opacity: 0.7;
  padding-top: 2px;
  letter-spacing: 0.05em;
}

.takeaway-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.takeaway-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--white);
}

.takeaway-ep-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.takeaway-ep-tag::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(110, 106, 122, 0.6);
}

.panel-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
}

.ember-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ember);
  text-decoration: none;
  padding: 10px 0;
  transition: color 160ms ease, gap 160ms ease;
  min-height: 44px;
}
.ember-link:hover { color: var(--ember-hover); gap: 10px; }
.ember-link:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }

.ember-link__arrow {
  font-size: 0.9rem;
  transition: transform 160ms ease;
}
.ember-link:hover .ember-link__arrow { transform: translateX(3px); }

.panel-count-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================================
   PANEL: TOOLS
============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover {
  border-color: rgba(224, 90, 43, 0.35);
  box-shadow: 0 0 0 1px rgba(224, 90, 43, 0.1), 0 4px 24px rgba(224, 90, 43, 0.06);
}

.tool-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tool-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.type-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid;
}
.type-tag--skill {
  color: var(--violet);
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.1);
}
.type-tag--walkthrough {
  color: rgba(224, 90, 43, 0.9);
  border-color: rgba(224, 90, 43, 0.35);
  background: rgba(224, 90, 43, 0.08);
}

.tool-card__desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--white);
  line-height: 1.6;
  opacity: 0.85;
}

.tool-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.tool-card__ep {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.copy-ready-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgba(224, 90, 43, 0.12);
  border: 1px solid rgba(224, 90, 43, 0.3);
  border-radius: 4px;
  padding: 3px 8px;
}
.copy-ready-badge::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ember);
}

.tool-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ember);
  text-decoration: none;
  padding: 8px 0;
  min-height: 44px;
  transition: color 160ms ease;
}
.tool-card__link:hover { color: var(--ember-hover); }
.tool-card__link:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (prefers-reduced-motion: reduce) {
  .js-tabs-ready .tab-panel.is-active { animation: none !important; opacity: 1 !important; transform: none !important; }
  .ember-link, .ember-link__arrow, .tool-card, .tab-bar__btn, .tab-bar__count { transition: none !important; }
}

@media (max-width: 480px) {
  .tab-bar__btn { padding: 0 14px; font-size: 0.6rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .takeaway-item { grid-template-columns: 28px 1fr; gap: 10px; }
  .panel-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 768px) {
  .resources-h2 { font-size: 1.5rem; }
}
