* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; }
body {
    background-color: #0a0a0c;
    color: #e4e6eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    visibility: hidden;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJmIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBudW1PY3RhdmVzPSIzIiAvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNmKSIgb3BhY2l0eT0iMC4wMTUiIC8+PC9zdmc+');
    opacity: 0.12;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* --- SPLITTING.JS: animated h1 chars --- */
h1 {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.0;
    margin-bottom: 1.2rem;
    background: linear-gradient(145deg, #ffffff 0%, #e0d5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
}
h2 {
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #f0edfa;
    letter-spacing: -0.01em;
    overflow: hidden;
}
h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #eae2ff;
}
p {
    color: #b1b6c5;
    font-size: 1.2rem;
    max-width: 720px;
    margin: 1.2rem 0;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* tsParticles canvas */
#tsparticles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ----- TOP NOTIFICATION BAR ----- */
.top-notification {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 40px;
    background-color: #0F0F0F;
    color: #fff;
    z-index: 110;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}
.top-notification.hidden { transform: translateY(-100%); }
.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 0 0 1.5rem;
}
.notification-message {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}
.notification-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.notification-link:hover { color: #cbb5ff; }
.notification-close {
    width: 40px; height: 40px;
    background: none; border: none;
    color: #fff; font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.8; padding: 0; line-height: 1;
}
.notification-close:hover { opacity: 1; }

/* ----- HEADER ----- */
header {
    position: fixed;
    top: 40px; left: 0; width: 100%;
    padding: 1.2rem 2.5rem 1.2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.2s, backdrop-filter 0.2s, padding 0.2s, top 0.3s ease;
    background: transparent;
}
header.scrolled {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border-bottom: 1px solid rgba(160, 130, 255, 0.1);
}
header.notification-hidden { top: 0; }
.no-transition { transition: none !important; }
.nav-links {
    display: flex;
    gap: 2.8rem;
    font-size: 1rem;
    font-weight: 450;
    color: #cfd4e0;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: #cbb5ff;
    transition: width 0.25s ease;
}
.nav-links a:hover { color: #cbb5ff; }
.nav-links a:hover::after { width: 100%; }

/* ----- HERO ----- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}
.glow-ball {
    position: absolute;
    width: 60vmin; height: 60vmin;
    background: radial-gradient(circle at 25% 30%, rgba(170, 130, 255, 0.3) 0%, rgba(90, 60, 180, 0.1) 60%, transparent 85%);
    filter: blur(70px) brightness(1.2);
    top: 15%; left: 15%;
    z-index: 0;
    animation: floatBall 20s infinite alternate ease-in-out;
    mix-blend-mode: screen;
    opacity: 0.4;
}
@keyframes floatBall {
    0% { transform: translate(-3%, -2%) scale(1); }
    100% { transform: translate(6%, 5%) scale(1.05); }
}

/* second ambient glow ball (new) */
.glow-ball-2 {
    position: absolute;
    width: 40vmin; height: 40vmin;
    background: radial-gradient(circle, rgba(100, 60, 255, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    bottom: 10%; right: 10%;
    z-index: 0;
    animation: floatBall2 25s infinite alternate ease-in-out;
    mix-blend-mode: screen;
    opacity: 0.3;
}
@keyframes floatBall2 {
    0% { transform: translate(3%, 2%) scale(1.05); }
    100% { transform: translate(-5%, -4%) scale(1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 950px;
}
.hero p {
    color: #bdc2d4;
    font-size: 1.3rem;
    margin: 1.5rem auto 2.5rem;
    max-width: 750px;
    opacity: 0; /* animated in via GSAP */
}
.hero-badges {
    margin-top: 0rem;
    margin-bottom: 3rem;
    font-size: 0.9rem;
    color: #7f79a0;
    opacity: 0;
}
.hero-cta {
    opacity: 0;
    transform: translateY(20px);
}

/* typed cursor */
.typed-cursor { color: #cbb5ff; font-weight: 400; }

/* ----- BUTTONS ----- */
@keyframes borderFlow {
    0% { border-color: #8d75d9; }
    50% { border-color: #b28aff; }
    100% { border-color: #8d75d9; }
}
.btn {
    display: inline-block;
    background: transparent;
    border: 2px solid #8d75d9;
    color: #ccbeff;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 3rem;
    border-radius: 60px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    background-color: rgba(5, 5, 12, 0.5);
    backdrop-filter: blur(4px);
    animation: borderFlow 10s infinite ease-in-out;
}
.btn:hover {
    background-color: #8d75d9;
    border-color: #8d75d9;
    color: #0a0a0c;
    box-shadow: 0 0 18px rgba(141, 117, 217, 0.3);
    transform: translateY(-2px);
}
.btn:active { transform: translateY(0); }

/* ----- BENCHMARK ----- */
.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0 1rem;
}
.card {
    background: #12121a;
    border: 1px solid #2a2738;
    border-radius: 12px;
    padding: 1.8rem 1.5rem;
    transition: border 0.2s, transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    transform: translateY(30px);
}
.card:hover {
    border-color: #6f5ca0;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.card-label { font-size: 1rem; font-weight: 500; color: #a7a2c0; margin-bottom: 0.5rem; }
.card-value { font-size: 2.2rem; font-weight: 500; color: #eae2ff; line-height: 1.2; }
.card-unit { font-size: 0.9rem; color: #6a6185; margin-left: 0.3rem; }
.card-note { font-size: 0.9rem; color: #8c86a3; margin-top: 0.5rem; }

/* CHART */
.chart-container {
  background: #12121a;
  border: 1px solid #2a2738;
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0 1rem;
  position: relative;
  opacity: 0; /* for GSAP reveal */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chart-container::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141,117,217,0.4), transparent);
  pointer-events: none;
  z-index: 1;
}
.chart-container:hover {
    border-color: #3a334d;       /* almost the same as original, just a hint */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #1a1826;
}
.chart-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #a7a2c0;
  margin-bottom: 0.18rem;
}
.chart-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #45425a;
  letter-spacing: 0.03em;
}
.legend {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #a7a2c0;
}

.legend-item:has(.legend-dot[style*="#8d75d9"]) .legend-dot,
.legend-dot.koltra {
    box-shadow: 0 0 6px rgba(141, 117, 217, 0.4);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-dash {
  width: 22px;
  height: 0;
  border-top: 2px dashed #dd5454b3;
  flex-shrink: 0;
}

.canvas-wrap {
  height: 200px;              /* slightly taller for breathing room */
  padding: 0;                 /* canvas fills the full wrap now */
  position: relative;
}

.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: static;           /* single canvas, no stacking needed */
}

/* Remove the old z-index rules that targeted #latencyChart / #hoverCanvas */
#latencyChart { z-index: unset; }
#hoverCanvas  { z-index: unset; display: none; }   /* hide old overlay canvas if still in DOM */


/* ----- TOOLTIP ----- */
#koltra-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
  transform: translate(-50%, calc(-100% - 10px));
}
#koltra-tooltip.visible { opacity: 1; }
.vt-inner {
  background: #13121c;
  border: 1px solid #2a2738;
  border-radius: 8px;
  min-width: 150px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  overflow: hidden;
}
.vt-header {
  padding: 0.4rem 0.9rem;
  border-bottom: 1px solid #1e1c2a;
  background: #0f0e17;
}
.vt-provider {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #4e4a62;
}
.vt-body { padding: 0.55rem 0.9rem 0.65rem; }
.vt-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 500;
  color: #c8c2e0;
  display: block;
  margin-bottom: 0.2rem;
}
.vt-range.koltra { color: #cbb5ff; }
.vt-note {
  font-size: 0.68rem;
  color: #6a6580;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
}
.vt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(141,117,217,0.08);
  border: 1px solid rgba(141,117,217,0.2);
  border-radius: 3px;
  padding: 0.12rem 0.45rem;
  font-size: 0.6rem;
  color: #cbb5ff;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}
.vt-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6fcf97;
  box-shadow: 0 0 5px #6fcf97;
}

/* ----- LIVE BADGE ----- */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1c1b26;
    /*border: 1px solid #4a4560;*/
    border-radius: 40px;
    padding: 0.3rem 1rem 0.3rem 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #cfd4e0;
    margin-left: 1rem;
}
.latency-ms {
    color: #cbb5ff;
}
.pulse-dot {
    width: 10px; height: 10px;
    background: #6fcf97;
    border-radius: 50%;
    box-shadow: 0 0 8px #6fcf97;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } }

/* ----- STATS ----- */
.stats-row {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 3rem 0 2rem;
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 2.5rem;
    font-weight: 500;
    color: #eae2ff;
    font-family: 'JetBrains Mono', monospace;
}
.stat-label { font-size: 0.9rem; color: #8c86a3; }

/* ----- EDGE ----- */
.edge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}
.edge-card {
    background: #0f0f17;
    border: 1px solid #2c2840;
    border-radius: 12px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(24px);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.edge-card:hover {
    border-color: #6f5ca0;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(141,117,217,0.12);
}
.edge-card h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.edge-card p { color: #b0b3c9; font-size: 1rem; }

/* ----- GRPC REGIONS ----- */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0 -2rem;
}
.region-card {
    border: 1px solid #2a2738;
    border-radius: 16px;
    padding: 1.2rem 1rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 90px;
    opacity: 0;
    z-index: 5 !important;
}
.region-card:hover {
    border-color: #8d75d9;
    transform: scale(1.04);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.region-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.region-name { color: #eae2ff; font-weight: 600; font-size: 0.9rem; }
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #6fcf97;
    box-shadow: 0 0 6px #6fcf97;
}
.region-latency {
    font-family: 'JetBrains Mono', monospace;
    color: #cbb5ff;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: auto;
    text-align: left;
}
.region-latency small {
    font-size: 0.9rem;
    color: #7f78a0;
    margin-left: 0.2rem;
    font-weight: 400;
}
.code-badge {
    font-family: 'JetBrains Mono', monospace;
    background: #0b0b16;
    border: 1px solid #323045;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    color: #cbb5ff;
    font-size: 0.9rem;
}

/* ----- SCAN LINE (new subtle detail) ----- */
.scanline {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
    );
}

/* ----- FOOTER ----- */
footer {
    background: #08080c;
    border-top: 1px solid #252131;
    padding: 1.5rem 2rem;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    width: 100%;
}
.footer-left { color: #7f78a0; white-space: normal; flex: 1; text-align: left; }
.footer-left a { color: #7f78a0; transition: color 0.2s; text-decoration: none; margin-left: 0.2rem; }
.footer-left a:hover { color: #cbb5ff; text-decoration: underline; }
.footer-center { color: #7f78a0; white-space: normal; flex: 1; text-align: center; }
.footer-right { flex: 1; text-align: right; }
.footer-right a {
    color: #7f78a0; font-size: 1.4rem;
    transition: color 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
}
.footer-right a:hover { color: #cbb5ff; }
@media (max-width: 800px) {
    .footer-content { flex-direction: column; text-align: center; gap: 0.5rem; }
    .footer-left, .footer-center, .footer-right { flex: none; text-align: center; }
}

/* ----- MODAL ----- */
body.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: #14141e;
    border-radius: 0;
    width: 90%;
    max-width: 460px;
    padding: 2.5rem 2rem;
    border: 1px solid #3a3552;
    transform: scale(0.96);
    transition: transform 0.2s;
    position: relative;
}
.active .modal { transform: scale(1); }
.modal .close-btn {
    position: absolute;
    top: 1.2rem; right: 1.5rem;
    background: none; border: none;
    color: #b0a9cc; font-size: 2rem;
    cursor: pointer; line-height: 1;
}
.modal h3 { font-size: 2rem; margin-bottom: 2rem; color: #ffffff; font-family: 'JetBrains Mono', monospace; }
.form-group { margin-bottom: 1.5rem; }
.modal label { display: block; margin-bottom: 0.4rem; color: #c0c3d4; font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; }
.modal input, .modal select {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: #1d1b2a;
    border: 1px solid #4a445a;
    border-radius: 0;
    font-size: 1rem;
    color: #f0eaff;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
}
.modal input:focus, .modal select:focus { border-color: #9d86e6; background: #262437; }
.modal select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c86a3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.8rem;
}
.modal select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c86a3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}
.btn-modal {
    width: 100%;
    background: #9d86e6;
    color: #0a0a0c;
    border: none;
    font-weight: 500;
    padding: 0.9rem;
    border-radius: 0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}
.btn-modal:hover { background: #b39eff; }
.btn-modal.small { width: auto; padding: 0.7rem 2rem; display: inline-block; }
.required-note { font-size: 0.8rem; color: #7f78a0; margin-top: 1rem; font-family: 'JetBrains Mono', monospace; }
.error-message {
    color: #ff8a8a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin: 0.5rem 0 1rem;
    text-align: center;
    background: #2a1a1a;
    padding: 0.5rem;
    border: 1px solid #b33f3f;
}
#successMessage { display: none; text-align: center; font-family: 'JetBrains Mono', monospace; }
#successMessage p:first-of-type { font-size: 1.1rem; margin-bottom: 1rem; color: #eae2ff; }
#successMessage p:nth-of-type(2) { color: #b1b6c5; margin-bottom: 2rem; }
.modal-success { max-width: 560px !important; padding: 2rem; }

@media (max-width: 700px) {
    header { padding: 1rem 1.5rem 1rem 0.8rem; }
    .nav-links { gap: 1.5rem; font-size: 0.9rem; }
    h1 { font-size: 3.8rem; }
    .hero p { font-size: 1.1rem; }
    .btn { padding: 0.8rem 2rem; font-size: 1.1rem; }
    .notification-message { white-space: normal; padding: 0 0.5rem; }
    #successMessage p:first-of-type { font-size: 0.9rem; }
}

/* ----- SPINNER (fixed & smooth) ----- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(10, 10, 12, 0.3);
  border-top-color: #0a0a0c;
  border-radius: 50%;
  /* Use only rotation — no translate in keyframes */
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -10px;   /* half of height */
  margin-left: -10px;  /* half of width */
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: spin 0.75s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
  pointer-events: none;
}

/* Use margin offset instead of transform so keyframes can own the rotation cleanly */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading state on the button */
.btn-modal {
  position: relative;
  transition: background 0.15s, color 0.15s;
  overflow: hidden;
}

.btn-modal.loading {
  color: transparent;        /* hides button text smoothly */
  pointer-events: none;
  cursor: not-allowed;
}

.btn-modal.loading .spinner {
  opacity: 1;
}

/* ── BENEFITS TABS ── */
.tab-nav {
  display: flex;
  border-bottom: 1px solid #2a2738;
  margin-bottom: 0;
}
.tab-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6185;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: #b0a9cc; }
.tab-btn.active { color: #cbb5ff; border-bottom-color: #8d75d9; }

.tab-panes {
  position: relative;
  background: #0e0e16;
  border: 1px solid #2a2738;
  border-top: none;
  border-radius: 0 0 12px 12px;
}
.tab-pane {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  padding: 2.5rem 2rem;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  transition: opacity 0.35s ease;
}
.tab-pane.active {
  opacity: 1;
  pointer-events: auto;
}
.tab-pane.leaving {
  opacity: 0;
  position: absolute;
  visibility: visible;
  pointer-events: none;
}

.benefit-card {
  background: #12121c;
  border: 1px solid #252235;
  border-radius: 10px;
  padding: 1.8rem 1.6rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.benefit-card:hover { border-color: #6f5ca0; box-shadow: 0 6px 20px rgba(15,15,15,15.1); }
.benefit-card:hover::before { border-color: #8d75d9; }

.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a5475;
  margin-bottom: 0.9rem;
}
.benefit-card h3 { font-size: 1.15rem; font-weight: 500; color: #eae2ff; margin-bottom: 0.75rem; }
.benefit-card p  { font-size: 0.95rem; color: #8c88a8; line-height: 1.65; max-width: none; margin: 0; }
.card-stat {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.7rem;
  font-weight: 500;
  color: #cbb5ff;
  margin-top: 1.2rem;
  line-height: 1;
}
.card-stat small { font-size: 0.8rem; color: #7f78a0; margin-left: 0.2rem; }









/* --- Map component (gRPC section) --- */
.map-card {
  width: 100%;
  max-width: 2060px;
  margin: 0 auto;
  /*border: 1px solid var(--brd, #1e1c2e);*/
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.map-card:hover {
    border-color: #3a334d;       /* almost the same as original, just a hint */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  border-bottom: 0px solid var(--brd, #1e1c2e);
  background: rgba(11,10,18,0.5);
}

.map-htitle {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt, #a8a2c8);
  letter-spacing: 0.03em;
}

.map-hsub {
  font-size: 0.7rem;
  color: var(--muted, #6a6488);
  margin-top: 0.1rem;
  font-weight: 400;
}

.map-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 29%;          /* maintains aspect ratio */
  background: #0a0914;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #0a0a0c 30%, #0a0a0c 75%, transparent);
}

#mc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* tooltip – same as before, but ensure it’s above other content */
#tt {
  position: fixed;
  pointer-events: none;
  background: #13121f;
  border: 0px solid #252238;
  border-radius: 7px;
  padding: 0.45rem 0.8rem;
  font-size: 0.67rem;
  color: var(--txt, #a8a2c8);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0,0,0,0.5);
}

#tt.v {
  opacity: 1;
}

#tt b {
  display: block;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  color: var(--acl, #c4b6ff);
  margin-bottom: 0.1rem;
}

/* node bar – grid of PoPs */
.map-nbar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 0px solid var(--brd, #1e1c2e);
}

@media (max-width: 640px) {
  .map-nbar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) {
  .map-nbar { grid-template-columns: repeat(2, 1fr); }
}

.map-ni {
  padding: 0.7rem 1rem;
  border-right: 1px solid var(--brd, #1e1c2e);
}

@media (max-width: 640px) {
  .map-ni:nth-child(3n) { border-right: none; }
  .map-ni:nth-child(n+4) { border-top: 1px solid var(--brd, #1e1c2e); }
}
@media (max-width: 380px) {
  .map-ni:nth-child(2n) { border-right: none; }
  .map-ni:nth-child(n+3) { border-top: 1px solid var(--brd, #1e1c2e); }
}
.map-ni:last-child { border-right: none; }
.map-ni:hover { background: rgba(124,104,204,0.04); }

.map-ni-city {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--txt, #a8a2c8);
  margin-bottom: 0.06rem;
}

.map-ni-reg {
  font-size: 0.58rem;
  color: var(--muted, #6a6488);
  margin-bottom: 0.32rem;
}

.map-ni-ms {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--acl, #c4b6ff);
  line-height: 1;
}

.map-ni-ms span {
  font-size: 0.54rem;
  color: var(--muted, #6a6488);
  font-weight: 400;
}

.map-ni-status {
  margin-top: 0.26rem;
}

.map-ni-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green, #5dbe85);
  box-shadow: 0 0 5px var(--green, #5dbe85);
  display: inline-block;
}

/* ── MOBILE MENU BUTTON ──────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #cfd4e0;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.77,0,0.18,1),
              opacity   0.25s ease,
              width     0.3s ease;
  transform-origin: center;
}
/* open state */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
 
/* ── MOBILE DRAWER ───────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: #0a0a0c;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 0px solid #2a2738;
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 3rem;
  gap: 0.3rem;
  /* initial hidden state */
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.77,0,0.18,1),
              opacity   0.35s ease,
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.77,0,0.18,1),
              opacity   0.35s ease,
}
.mobile-menu a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: #eae2ff;
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid #1a1826;
  letter-spacing: 0.02em;
  transition: color 0.2s, padding-left 0.25s;
  /* stagger set via JS / inline style */
  opacity: 0;
  transform: translateX(18px);
  transition: color 0.2s,
              padding-left 0.25s,
              opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open a {
  opacity: 1;
  transform: translateX(0);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover {
  color: #cbb5ff;
}
 
/* backdrop scrim */
.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 140;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  backdrop-filter: blur(2px);
}
.menu-scrim.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}
 
/* How it works cards – inherit benchmark card look */
#how-it-works .card {
  background: #12121a;
  border: 1px solid #2a2738;
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  transition: border 0.2s, transform 0.2s, box-shadow 0.2s;
  opacity: 0;                     /* hidden until GSAP reveals */
  transform: translateY(30px);
}

#how-it-works .card:hover {
  border-color: #6f5ca0;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

/* Step tag (STEP 01 etc.) */
#how-it-works .stag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .07em;
  color: #ccbeff;
  background: rgba(141,117,217,.09);
  border: 1px solid rgba(141,117,217,.18);
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: .8rem;
}

/* Card headings and paragraphs – smaller than global h3/p */
#how-it-works .card h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #eae2ff;
  margin-bottom: .38rem;
}

#how-it-works .card p {
  font-size: 1rem;
  color: #9a9db0;
  line-height: 1.68;
}

/* Visualization area (canvas wrapper) */
#how-it-works .viz {
  margin-bottom: 1rem;
  line-height: 0;
  overflow: hidden;
  border-radius: 4px;
}

/* Pipe layout (responsive) */
#how-it-works .pipe.wide {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: start;
}

#how-it-works .pipe.narrow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#how-it-works .conn {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2.65rem;
}

#how-it-works .pipe.narrow .conn {
  padding-top: 0;
  transform: rotate(90deg);
}

/* Make connection arrows brighter */
#how-it-works .conn svg line {
  stroke: rgba(141, 117, 217, 0.6) !important;
}
#how-it-works .conn svg polyline {
  stroke: rgba(141, 117, 217, 0.6) !important;
}


/* ===== Integration component ===== */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.compat {
  margin-top: 2.2rem;
}
.compat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cbb5ff;
  margin-bottom: 0.75rem;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: #0b0b16;
  border: 1px solid #2a2738;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  color: #6a6580;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}
.pill:hover {
  color: #ccbeff;
  border-color: #8d75d9;
}

.editor {
  background: #12121a;
  border-radius: 6px;
  overflow: visible;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  position: relative;
}


.tabbar {
  background: #0f0f17;
  border-bottom: 1px solid #1e1c2e;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 44px;
  overflow: visible;
}
.tabs {
  display: flex;
  align-items: stretch;
}
.tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #4e4a62;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 1.4rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.tab:hover { color: #9d97c0; }
.tab.active {
  color: #ccbeff;
  border-bottom-color: #8d75d9;
}

.lang-picker {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  position: relative;
}
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #6a6580;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  user-select: none;
}
.lang-btn:hover {
  color: #ccbeff;
  background: rgba(141,117,217,.08);
}
.lang-btn.open {
  color: #ccbeff;
  background: rgba(141,117,217,.1);
}
.lang-chevron {
  width: 9px; height: 9px;
  flex-shrink: 0;
  transition: transform 0.18s;
  opacity: 0.7;
}
.lang-btn.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #16151f;
  border: 1px solid #2a2738;
  border-radius: 8px;
  overflow: hidden;
  min-width: 130px;
  box-shadow: 0 16px 48px rgba(0,0,0,.65);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(.97);
  transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}
.lang-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.lang-option {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: #9d97c0;
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  transition: color 0.12s, background 0.12s;
  border-bottom: 1px solid #1e1c2e;
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover {
  color: #e4e0f8;
  background: rgba(141,117,217,.07);
}
.lang-option.selected { color: #ccbeff; }
.lang-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #8d75d9;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.lang-option.selected .lang-dot { opacity: 1; }

.code-area {
  position: relative;
  height: 310px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.code-pane {
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity .18s;
  position: absolute;
  display: flex;
  pointer-events: none;
  background: #0f0f17;
  /* NO overflow here */
}

.code-pane.active {
  opacity: 1;
  pointer-events: auto;
}

.line-nums{flex-shrink:0;width:40px;padding:1.16rem 0;text-align:right;border-right:1px solid #1a1826;background:transparent;pointer-events:none}
.line-nums span {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  color: #302d42;
  padding-right: 10px;
  user-select: none;
}

.code-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 1rem 0 1.5rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #2a2738 transparent;
}
.code-scroll::-webkit-scrollbar { width: 3px; height: 3px; }
.code-scroll::-webkit-scrollbar-thumb { background: #2a2738; border-radius: 3px; }

/* --- Line‑based code display (for full‑width highlight) --- */
.line {
  display: block;
  white-space: pre;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.56;
  color: #ccbeff;
}

/* Full‑width highlight using pseudo‑element – never breaks the line */
.line.hl-line {
  position: relative;
  z-index: 1;
}

.line.hl-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1rem;               /* extend to left edge (matches .code-scroll padding) */
  right: -1rem;              /* extend to right edge */
  bottom: 0;
  background: rgba(141,117,217,.15);
  border-left: 2px solid #8d75d9;
  pointer-events: none;        /* so you can still select text */
  z-index: -1;
}

pre {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;       /* fallback, but .line handles whitespace */
}
.kw{color:#c9b8ff}.fn{color:#7ecbcb}.st{color:#89c9a0}.cm{color:#3d3557;font-style:italic}.ty{color:#c9b8ff}.va{color:#e0daf5}.pu{color:#4e4470}

/* Responsive adjustments for the integration component */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}
@media (max-width: 640px) {
  .code-area { height: 260px; }
  pre { font-size: 0.74rem; }
  .line-nums { display: none; }
  .tab { padding: 0 .9rem; font-size: .7rem; }
}
@media (max-width: 400px) {
  .tab { padding: 0 .7rem; font-size: .65rem; letter-spacing: .02em; }
}

/* ── HEADER ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; } /* hide desktop nav */
  .hamburger { display: flex; }
 
  header {
    padding: 0.9rem 1.2rem 0.9rem 0.8rem;
  }
  header.scrolled {
    padding: 0.7rem 1.2rem 0.7rem 0.8rem;
  }
}
 
/* ── NOTIFICATION BAR — wraps to 2 lines, text stays centered ─ */
@media (max-width: 640px) {
  .top-notification {
    height: auto;          /* grow with content */
    min-height: 40px;
    padding: 7px 0;
  }
  .notification-content {
    align-items: center;
    justify-content: center;
    padding: 0 0 0 1rem;
    gap: 0;
    min-height: 26px;
  }
  .notification-message {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.66rem;
    white-space: normal;   /* allow wrap */
    line-height: 1.45;
    overflow: visible;
  }
  .notification-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
  }
}
 
/* ── LOGO + LIVE BADGE ───────────────────────────────────── */
@media (max-width: 480px) {
  #koltra-logo { height: 28px; }
 
  .live-badge {
    font-size: 0.72rem;
    margin-left: 0.6rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .pulse-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
  }
}
 
@media (max-width: 360px) {
  .live-badge { display: none; } /* extreme small: hide entirely */
}
 
/* ── HERO ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 8rem 1.2rem 4rem;
    min-height: 100svh;
  }
  .hero p {
    font-size: 1.05rem;
    margin: 1.2rem auto 2rem;
  }
  .hero-badges {
    font-size: 0.8rem;
    margin-bottom: 2rem;
  }
  .btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
  }
}
 
/* ── BENCHMARK CARDS ─────────────────────────────────────── */
@media (max-width: 640px) {
  .benchmark-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .card {
    padding: 1.2rem 1rem;
  }
  .card-value {
    font-size: 1.7rem;
  }
}
@media (max-width: 400px) {
  .benchmark-grid {
    grid-template-columns: 1fr;
  }
}
 
/* ── CHART ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }
  .legend { gap: 0.9rem; flex-wrap: wrap; }
  .canvas-wrap { height: 200px; }
}
 
/* ── STATS ROW ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .stats-row {
    gap: 1.1rem;
  }
  .stat-number { font-size: 2rem; }
}
 
/* ── REGION GRID ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .region-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }
  .region-card {
    padding: 1rem 0.85rem;
    min-height: 76px;
  }
  .region-latency {
    font-size: 1.25rem;
  }
}
@media (max-width: 380px) {
  .region-grid { grid-template-columns: 1fr; }
}
 
/* ── MAP ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .map-wrap { display: none; }
  .map-card { display: none; }
  .map-nbar { grid-template-columns: repeat(3, 1fr); border-top: none; }
  .map-ni { padding: 0.85rem 0.9rem; }
  /* remove orphan right-border on last item of each row */
  .map-ni:nth-child(3n) { border-right: none; }
  .map-ni:nth-child(n+4) { border-top: 1px solid #1e1c2e; }
}
@media (max-width: 480px) {
  .map-nbar { grid-template-columns: repeat(2, 1fr); }
  .map-ni:nth-child(3n) { border-right: 1px solid #1e1c2e; } /* reset */
  .map-ni:nth-child(n+4) { border-top: none; }               /* reset */
  .map-ni:nth-child(2n) { border-right: none; }
  .map-ni:nth-child(n+3) { border-top: 1px solid #1e1c2e; }
}
/* Tablet: taller aspect ratio keeps nodes in view */
@media (max-width: 900px) and (min-width: 641px) {
  .map-wrap { padding-bottom: 44%; }
}
 
/* ── FEATURES / TABS ─────────────────────────────────────── */
@media (max-width: 700px) {
  .tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-nav::-webkit-scrollbar { display: none; }
 
  .tab-btn {
    padding: 0.8rem 1.1rem;
    font-size: 0.78rem;
    flex-shrink: 0;
  }
 
  /* tab pane needs a real height on mobile so cards don't collapse */
  .tab-pane {
    position: relative; /* override absolute so height is natural */
    grid-template-columns: 1fr;
    padding: 1.6rem 1.2rem;
  }
  /* Hide inactive panes cleanly (re-apply absolute only for leaving) */
  .tab-pane:not(.active):not(.leaving) {
    display: none;
  }
  .tab-pane.leaving {
    position: absolute;
    display: grid;
  }
 
  .benefit-card {
    padding: 1.4rem 1.2rem;
  }
  .benefit-card h3 { font-size: 1rem; }
  .card-stat { font-size: 1.4rem; }
}
 
/* Fix tab-panes container height on desktop (existing bug fix) */
@media (min-width: 701px) {
  .tab-panes {
    /* auto-size to the active pane */
    position: relative;
  }
  .tab-pane {
    /* keep absolute for cross-fade, but set a floor so container doesn't collapse */
  }
  .tab-pane.active {
    position: relative; /* active pane drives the height */
  }
  .tab-pane:not(.active) {
    position: absolute;
  }
}
 
/* ── FOOTER ──────────────────────────────────────────────── */
@media (max-width: 800px) {
  footer { padding: 1.5rem 1.2rem; }
  .footer-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-left, .footer-center, .footer-right {
    flex: none;
    text-align: center;
    width: 100%;
    font-size: 0.8rem;
  }
  .footer-center { max-width: 70%; order: 2; font-size: 0.75rem; color: #4a4560; }
  .footer-left   { order: 3; }
  .footer-right  { order: 1; }
  .footer-right a { font-size: 1.5rem; margin: 0 0.3rem; }
}
 
/* ── GENERAL SECTION PADDING ─────────────────────────────── */
@media (max-width: 640px) {
  section.container,
  section[style*="padding: 5rem"] {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.4rem; }
  p  { font-size: 1rem; }
  .container { padding: 0rem !important; }
}

@media (max-width: 640px) {
  #contact {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }
}

@media (max-width: 640px) {
  #footerEarlyBtn {
    font-size: 1rem !important;
  }
}
 
/* ── MODAL ───────────────────────────────────────────────── */
@media (max-width: 500px) {
  .modal {
    padding: 2rem 1.3rem;
    width: 96%;
  }
  .modal h3 { font-size: 1.5rem; margin-bottom: 1.4rem; }
  .modal input, .modal select { padding: 0.7rem 0.9rem; font-size: 0.9rem; }
  .btn-modal { font-size: 1rem; padding: 0.85rem; }
}


    .flow-steps {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem;
      margin: 3rem 0 1rem;
    }
    .flow-step {
      flex: 1 1 220px;
      background: #12121a;
      border: 1px solid #2c2840;
      border-radius: 12px;
      padding: 1.8rem 1.5rem;
      position: relative;
      transition: border-color 0.2s, transform 0.2s;
    }
    .flow-step:hover {
      border-color: #8d75d9;
    }
    .flow-step .step-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.8rem;
      color: #8d75d9;
      background: rgba(141,117,217,0.1);
      display: inline-block;
      padding: 0.2rem 0.9rem;
      border-radius: 20px;
      margin-bottom: 1rem;
      border: 1px solid rgba(141,117,217,0.2);
    }
    .flow-step h3 {
      font-size: 1.3rem;
      margin-bottom: 0.75rem;
    }
    .flow-step p {
      font-size: 0.95rem;
      color: #b1b6c5;
    }
    .flow-arrow {
      font-size: 1.8rem;
      color: #3a334d;
      margin: 0 -0.5rem;
    }
    .flow-arrow i {
      filter: drop-shadow(0 0 6px rgba(141,117,217,0.2));
    }
    @media (max-width: 900px) {
      .flow-arrow { transform: rotate(90deg); margin: 0.5rem 0; }
    }