/* ============================================================
   sections.css – All sections below hero:
   Statistics, Features, Carousel, Chart, Map, and Footer.
   ============================================================ */

/* ---- STATISTICS ------------------------------------------ */
#stats {
  padding: 60px 8%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 32px 24px;
  text-align: center;
}

.stat-num {
  font-family: 'Paytone One', sans-serif;
  font-size: 26pt;
  color: var(--accent1);
  line-height: 1;
}

.stat-unit {
  font-size: 12pt;
  color: var(--accent2);
  margin-left: 4px;
}

.stat-label {
  font-size: 10pt;
  color: var(--accent4);
  margin-top: 8px;
}

/* Accent color variation per card */
.stat-card:nth-child(2) .stat-num { color: var(--accent2); }
.stat-card:nth-child(3) .stat-num { color: var(--accent4); }
.stat-card:nth-child(4) .stat-num { color: var(--accent1); }

/* ---- FEATURES -------------------------------------------- */
#features {
  background: transparent;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  padding: 36px 28px;
}

a.feature-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

a.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 var(--neu-light),
              0 0 0 1px rgba(120, 185, 255, 0.35);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    rgba(120, 185, 255, 0.2),
    rgba(0, 22, 255, 0.1));
  border: 1px solid rgba(120, 185, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h2 {
  font-size: 13pt;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 10.5pt;
  color: rgba(222, 222, 222, 0.75);
  line-height: 1.7;
}

/* ---- CAROUSEL -------------------------------------------- */
#carousel-section {
  overflow: hidden;
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.carousel-controls {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3e2e2e;
  box-shadow: 3px 3px 10px var(--neu-dark),
              -2px -2px 8px var(--neu-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  color: var(--accent4);
}

.carousel-btn:hover {
  box-shadow: 1px 1px 5px var(--neu-dark),
              -1px -1px 5px var(--neu-light);
  transform: scale(0.96);
  color: var(--accent1);
}

.carousel-track-wrap {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
}

.carousel-item {
  min-width: 320px;
  padding: 28px 24px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

a.carousel-item {
  text-decoration: none;
  color: inherit;
}

.carousel-item:hover {
  transform: translateY(-4px);
}

.carousel-item-tag {
  font-size: 8pt;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
}

.carousel-item h3 {
  margin-bottom: 10px;
  font-size: 13pt;
}

.carousel-item p {
  font-size: 10pt;
  color: rgba(222, 222, 222, 0.65);
  flex: 1;
}

.carousel-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.carousel-item-date {
  font-size: 9pt;
  color: rgba(222, 222, 222, 0.4);
}

.carousel-item-read {
  font-size: 9pt;
  color: var(--accent1);
}

/* --- Carousel WIP placeholder --- */
.carousel-wip {
  min-width: min(560px, 90vw);
  max-width: 560px;
  cursor: default;
}

.carousel-wip:hover { transform: none; }

.wip-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  opacity: 0.85;
}

.wip-icon svg { width: 100%; height: 100%; }

.wip-tag { color: var(--accent2); }

.carousel-wip p { margin-bottom: 12px; }

.wip-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.wip-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9pt;
  color: rgba(222, 222, 222, 0.45);
  letter-spacing: 0.3px;
}

/* ---- CHART ----------------------------------------------- */
.chart-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.chart-canvas-wrap {
  padding: 28px;
}

.chart-info h2 {
  margin-bottom: 16px;
}

.chart-info p {
  color: rgba(222, 222, 222, 0.75);
  margin-bottom: 20px;
}

.chart-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* SVG scroll wrapper — enables horizontal scroll for wide charts (length) */
.chart-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 4px;
}

/* SVG bar chart */
.bar-chart {
  width: 100%;
  display: block;
}

.bar {
  transition: height 0.6s ease, y 0.6s ease;
}

/* ---- INVEST CHART SUBTITLE (between buttons and chart) --- */
.chart-subtitle {
  font-size: 9pt;
  color: rgba(222, 222, 222, 0.6);
  margin-top: -8px;
  margin-bottom: 14px;
  line-height: 1.55;
}

/* ---- INVEST CHART LEGEND & CAPTION ----------------------- */
.invest-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.invest-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}

.invest-legend-swatch {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.invest-legend-label {
  font-size: 7.5pt;
  color: rgba(222, 222, 222, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-caption {
  font-size: 7.5pt;
  color: rgba(222, 222, 222, 0.55);
  margin-top: 8px;
  line-height: 1.5;
}

.chart-source {
  font-size: 7pt;
  color: rgba(222, 222, 222, 0.4);
  margin-top: 3px;
  font-style: italic;
}

/* ---- CHART TOOLTIP --------------------------------------- */
.chart-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(8, 12, 28, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(222, 222, 222, 0.12);
  border-radius: 8px;
  padding: 10px 13px;
  pointer-events: none;
  max-width: 260px;
  font-family: Roboto, sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.chart-tooltip-header {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 8px;
}

.chart-tooltip-swatch {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-top: 2px;
}

.chart-tooltip-cat {
  font-size: 8pt;
  color: rgba(222, 222, 222, 0.92);
  font-weight: 500;
  line-height: 1.35;
}

.chart-tooltip-body {
  border-top: 1px solid rgba(222, 222, 222, 0.1);
  padding-top: 7px;
}

.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
  font-size: 7.5pt;
  color: rgba(222, 222, 222, 0.6);
}

.chart-tooltip-row span:last-child {
  color: rgba(222, 222, 222, 0.9);
  font-weight: 500;
  white-space: nowrap;
}

.chart-tooltip-total {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(222, 222, 222, 0.07);
}

/* ---- MAP ------------------------------------------------- */
.map-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}

.map-text p {
  color: rgba(222, 222, 222, 0.75);
  margin-bottom: 22px;
}

.map-img-wrap {
  padding: 20px;
}

.map-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ---- MAP PANEL ------------------------------------------- */
.map-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-panel.active {
  max-height: 480px;
}

.map-panel-inner {
  padding: 24px 28px 20px;
  margin-top: 12px;
  position: relative;
}

.map-panel-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--accent4);
  font-size: 16pt;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.map-panel-close:hover { color: var(--accent1); }

.map-panel-tag {
  font-size: 8pt;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
}

.map-panel-title {
  font-family: 'Paytone One', sans-serif;
  font-size: 13pt;
  color: var(--accent1);
  margin-bottom: 14px;
  padding-right: 28px;
  line-height: 1.3;
}

.map-panel-text {
  font-size: 10.5pt;
  color: rgba(222, 222, 222, 0.78);
  line-height: 1.8;
}

/* ---- FOOTER ---------------------------------------------- */
footer {
  background: rgba(20, 12, 12, 0.8);
  border-top: 1px solid var(--glass-border);
  padding: 48px 8% 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo-img {
  height: 240px;
  width: auto;
}

.footer-brand p {
  font-size: 10pt;
  color: rgba(222, 222, 222, 0.55);
  margin-top: 12px;
  max-width: 240px;
}

.footer-col h3 {
  font-size: 10pt;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 10pt;
  color: rgba(222, 222, 222, 0.6);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent1); }

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 9pt;
  color: rgba(222, 222, 222, 0.35);
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(222, 222, 222, 0.06);
  border: 1px solid rgba(222, 222, 222, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent4);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.social-link:hover {
  background: rgba(120, 185, 255, 0.15);
  color: var(--accent1);
  border-color: var(--accent1);
}

.footer-contact a {
  color: rgba(222, 222, 222, 0.55);
  font-size: 10pt;
  transition: color 0.2s;
}

.footer-contact a:hover { color: var(--accent1); }
