/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2235;
  --border: #1f2d40;
  --border-bright: #2a3f5f;
  --green: #00d4aa;
  --green-dim: rgba(0, 212, 170, 0.1);
  --red: #ff4757;
  --red-dim: rgba(255, 71, 87, 0.1);
  --gold: #f59e0b;
  --blue: #3b82f6;
  --text: #e2e8f0;
  --text-sub: #94a3b8;
  --text-muted: #4a5568;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 32px rgba(0, 212, 170, 0.08);
  --transition: 0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

input, select, button { font-family: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-sub); }

.text-accent { color: var(--green); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-sub);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #0a0e1a;
  font-weight: 700;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--green);
  font-weight: 600;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--green);
  color: #0a0e1a;
  transform: translateY(-2px);
}

.btn-sm  { padding: 0.45rem 1.1rem; font-size: 0.875rem; }
.btn-lg  { padding: 0.85rem 2rem;   font-size: 1rem; }

/* ============================================================
   BADGES
   ============================================================ */
.change-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.change-badge.positive { background: var(--green-dim); color: var(--green); }
.change-badge.negative { background: var(--red-dim);   color: var(--red);   }

.positive { color: var(--green); }
.negative { color: var(--red);   }

/* ============================================================
   NAV
   ============================================================ */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

#site-header {
  height: var(--nav-height);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

#site-header.scrolled {
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--nav-height);
}

/* desktop: panel stretches to fill space beside the logo */
.nav-panel {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.01em;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.85; }

.logo-icon {
  color: var(--green);
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(0, 212, 170, 0.5));
}

.logo-text { color: var(--text); }
.logo-accent { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto; /* pushes links to the right inside .nav-panel */
}

.nav-links a {
  position: relative;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* vertical separator between links and buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* hamburger open state */
.nav-container.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-container.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav-container.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   TICKER TAPE
   ============================================================ */
#ticker-tape {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 0;
  height: 38px;
}

.ticker-inner {
  display: inline-flex;
  gap: 2.5rem;
  align-items: center;
  animation: ticker-scroll 45s linear infinite;
}

#ticker-tape:hover .ticker-inner {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ticker-symbol { font-weight: 700; color: var(--text); }
.ticker-price  { color: var(--text-sub); }
.ticker-arrow  { font-size: 0.65rem; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height) - 38px);
  display: flex;
  align-items: center;
  margin-top: calc(var(--nav-height) + 38px);
  background-image: url('https://picsum.photos/seed/stockhero/1600/900');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 26, 0.95) 0%,
    rgba(10, 14, 26, 0.72) 55%,
    rgba(10, 14, 26, 0.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 4rem 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-content h1 { margin-bottom: 1.25rem; }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-sub);
  margin-bottom: 2rem;
  max-width: 560px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* hero entrance animation */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ============================================================
   MARKET OVERVIEW
   ============================================================ */
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.market-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.market-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-hover);
}

.market-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.market-index-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.market-index-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.market-chart-wrap {
  height: 80px;
  margin-bottom: 1rem;
}

.market-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.market-meta strong { color: var(--text-sub); }

/* ============================================================
   WATCHLIST / STOCK CARDS
   ============================================================ */
#watchlist { background: var(--bg-primary); }

.stocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.stock-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.stock-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-hover);
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.stock-symbol {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.stock-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.stock-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.stock-change {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stock-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stock-chart-wrap {
  height: 60px;
}

/* ============================================================
   INVESTMENT CALCULATOR
   ============================================================ */
#calculator { background: var(--bg-secondary); }

.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.input-group:focus-within { border-color: var(--green); }

.input-prefix, .input-suffix {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0,212,170,0.2);
}

select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
select:focus { border-color: var(--green); }

/* result card */
.result-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.result-gain {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.result-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--border);
}

.result-bar-principal {
  height: 100%;
  background: var(--text-muted);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-bar-gain {
  height: 100%;
  background: var(--green);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.legend-principal { background: var(--text-muted); }
.legend-gain { background: var(--green); }

.result-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   FEATURES
   ============================================================ */
#features { background: var(--bg-primary); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-align: center;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dim);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-sm);
  margin: 0 auto 1.25rem;
  color: var(--green);
}

.feature-card h3 {
  margin-bottom: 0.6rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   NEWS
   ============================================================ */
#news { background: var(--bg-secondary); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-hover);
}

.news-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .news-image img { transform: scale(1.05); }

.news-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--green);
  color: #0a0e1a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-body { padding: 1.25rem; }

.news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.news-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.news-excerpt {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.news-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  transition: gap var(--transition);
}
.news-read-more:hover { opacity: 0.8; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand .nav-logo {
  display: inline-flex;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-social a:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-sub);
  padding: 0.3rem 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--green); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner  { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  /* tighter container on mobile */
  .container { padding: 0 1rem; }

  section { padding: 2.75rem 0; }

  /* fix hero so it fills viewport without overflowing */
  #hero {
    min-height: calc(100vh - var(--nav-height) - 38px);
    background-attachment: scroll;
    align-items: flex-start;
  }

  .hero-content {
    padding: 2rem 1rem 2.5rem;
    max-width: 100%;
  }

  .hero-subtitle { font-size: 0.95rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 1.25rem;
    flex-wrap: wrap;
  }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.72rem; }

  /* nav */
  .nav-panel {
    display: none;
    position: fixed;
    flex: unset;
  }
  .nav-hamburger { display: flex; }
  .nav-actions { border-left: none; margin-left: 0; padding-left: 0; }

  /* mobile menu panel */
  .nav-panel {
    position: fixed;
    top: calc(var(--nav-height) + 38px);
    left: 0;
    right: 0;
    z-index: 998;
    background: rgba(13, 18, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-bright);
    padding: 1.25rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  }

  /* backdrop */
  .nav-panel::after {
    content: '';
    position: fixed;
    top: calc(var(--nav-height) + 38px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }

  .nav-container.nav-open .nav-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-container.nav-open .nav-panel::after {
    opacity: 1;
    pointer-events: auto;
  }

  /* individual link items */
  .nav-panel .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-left: 0;
    margin-bottom: 1.25rem;
    width: 100%;
  }

  .nav-panel .nav-links li {
    width: 100%;
  }

  .nav-panel .nav-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-sub);
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
    transition: color 0.18s ease, background 0.18s ease;
  }
  .nav-panel .nav-links li a:hover {
    color: var(--green);
    background: rgba(0, 212, 170, 0.06);
  }

  /* divider */
  .nav-panel .nav-links::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-bright), transparent);
    margin-top: 0.5rem;
  }

  /* action buttons */
  .nav-panel .nav-actions {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.25rem;
  }
  .nav-panel .nav-actions a {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  /* grids → single column */
  .market-grid   { grid-template-columns: 1fr; }
  .stocks-grid   { grid-template-columns: 1fr; }
  .news-grid     { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* market card */
  .market-meta { flex-direction: column; gap: 0.2rem; }

  /* calculator */
  .calc-wrapper { grid-template-columns: 1fr; gap: 1.75rem; }
  .result-value { font-size: 2.4rem; }
  .result-card  { padding: 1.5rem; }

  /* news */
  .news-image { height: 160px; }

  /* section headers */
  .section-header { margin-bottom: 2rem; }

  /* footer */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 0.875rem; }

  section { padding: 2.25rem 0; }

  /* hero */
  .hero-badge { font-size: 0.72rem; }
  .hero-stats { justify-content: flex-start; gap: 1.5rem; }

  /* features → single col on tiny screens */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card  { padding: 1.25rem 1rem; text-align: left; }
  .feature-icon  { margin: 0 0 1rem; }

  /* market */
  .market-index-value { font-size: 1.4rem; }

  /* stocks */
  .stock-price { font-size: 1.3rem; }

  /* calculator */
  .result-value { font-size: 2rem; }
  .result-legend { gap: 1rem; }

  /* footer */
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom p { font-size: 0.72rem; padding: 0 0.5rem; }
}
