@import url("base.css");
@import url("layout.css");
@import url("components.css");
@import url("pages.css");
@import url("products-catalog.css");
@import url("atmosphere.css");

/* Admin Page overrides */
body.page-admin {
  --bg: #0c1220;
  --surface: #152032;
  --surface-2: #1a2740;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #22d3ee;
  --text: #f1f5f9;
  --text-muted: rgba(148, 163, 184, 0.9);
}
.page-admin header { padding: 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.page-admin main { padding: 2rem; max-width: 1400px; margin: 0 auto; }
.page-admin .toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 2rem; }
.page-admin .product-row { display: grid; grid-template-columns: 120px 1fr 200px; gap: 1.5rem; align-items: center; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 1rem; }
.page-admin .product-row img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.page-admin .login-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.page-admin .login-card { background: var(--surface); padding: 3rem; border-radius: var(--radius-lg); border: 1px solid var(--line); width: 100%; max-width: 400px; text-align: center; }

/* Additional missing classes from old main.css */
.stats-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .stats-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stats-container { grid-template-columns: 1fr; } }
.stat-card, .stat-item { text-align: center; }
.stat-number, .stat-value { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--accent); margin-bottom: 0.5rem; text-shadow: 0 0 20px var(--accent-glow); }
.stat-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 0.5rem; }
.stat-card p, .stat-item p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.panels-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .panels-container { grid-template-columns: 1fr; } }
.info-panel { display: flex; flex-direction: column; gap: 1rem; }
.panel-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.panel-content { color: var(--text-muted); line-height: 1.6; }
.panel-features { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.panel-feature { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; color: var(--text); }
.panel-feature i { color: var(--accent); }

.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .service-detail { grid-template-columns: 1fr; } }
.service-info h3 { font-size: 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.service-info h3 i { color: var(--accent); }
.service-info p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; }
.service-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) { .service-features { grid-template-columns: 1fr; } }
.service-feature { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--line); padding: 1.25rem; border-radius: var(--radius-md); display: flex; gap: 1rem; align-items: flex-start; transition: var(--transition); }
.service-feature:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.service-feature i { font-size: 1.25rem; color: var(--accent); margin-top: 0.25rem; }
.service-feature h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-feature p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.story-steps { display: flex; flex-direction: column; gap: 2rem; margin-top: 2rem; }
.story-step { position: relative; padding-left: 2rem; border-left: 2px solid var(--line); }
.story-step::before { content: ''; position: absolute; left: -7px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.story-step h4 { font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.5rem; }
.story-step p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.story-step strong { display: block; font-size: 1.25rem; color: var(--text); margin-bottom: 0.5rem; }

/* About Slider Fixes */
.about-slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); margin-bottom: 3rem; }
.about-viewport { width: 100%; overflow: hidden; }
.about-track { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.about-slide { min-width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: 3rem; background: linear-gradient(145deg, var(--surface), rgba(15,23,42,0.4)); }
@media (max-width: 900px) { .about-slide { grid-template-columns: 1fr; padding: 2rem; } }
.about-text h3 { font-size: 1.75rem; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 1rem; }
.about-text h3 i { color: var(--accent); }
.about-text p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.25rem; font-size: 1.05rem; }
.about-image img { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius-md); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.value-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.value-item i { color: var(--accent); font-size: 1.25rem; margin-top: 0.25rem; }
.value-item strong { color: var(--text); display: block; margin-bottom: 0.25rem; }
.about-arrows { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 1.5rem; pointer-events: none; }
.about-prev, .about-next { pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(15,23,42,0.8); border: 1px solid var(--line); color: var(--text); cursor: pointer; backdrop-filter: blur(4px); transition: var(--transition); }
.about-prev:hover, .about-next:hover { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent-glow); }
.about-nav { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.about-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; cursor: pointer; transition: var(--transition); }
.about-dot.active { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); transform: scale(1.2); }

/* Fix for compass image if it was added via CSS */
.footer-compass { display: none !important; }

/* Cross-page readability pass (about/services/contact/products) */
.site-khan section .section-title {
  margin-bottom: 1rem;
}

.site-khan section p,
.site-khan li {
  line-height: 1.72;
}

.site-khan .story-card p,
.site-khan .timeline-card p,
.site-khan .module-card p,
.site-khan .playbook p,
.site-khan .workflow-step p,
.site-khan .contact-item p,
.site-khan .service-info p {
  max-width: 68ch;
}

.site-khan .story-points {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.site-khan .story-points li {
  color: var(--text);
  font-size: 0.94rem;
  padding-left: 1rem;
  position: relative;
}

.site-khan .story-points li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.6em;
}

/* About: Operating values — icons centered, not clipped (card overflow + hover scale broke this) */
.site-khan .values-grid .value-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  overflow: visible;
}

.site-khan .values-grid .value-card > i {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  margin: 0 0 0.35rem;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
  align-self: center;
  overflow: visible;
  box-sizing: border-box;
  font-size: 1.2rem;
}

.site-khan .values-grid .value-card > i::before {
  display: block;
  line-height: 1;
}

.site-khan .values-grid .value-card:hover > i {
  transform: none;
}

.site-khan .story-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
}

.site-khan .metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-khan .metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 100%;
}

.site-khan .metric-value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.site-khan .metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.site-khan .metric-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Services page: Performance pulse hard styles */
#pulse .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

#pulse .metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

#pulse .metric-value {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

#pulse .metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.45rem;
}

#pulse .metric-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-khan .leaders-grid,
.site-khan .values-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-khan .module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-khan .workflow-steps,
.site-khan .playbooks,
.site-khan .matrix-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-khan .contact-container {
  align-items: start;
  gap: 2rem;
}

.site-khan .hero-lede {
  max-width: 56ch;
}

.site-khan .hero-board ul {
  gap: 0.75rem;
}

.site-khan .hero-board li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
}

.site-khan .hero-board li:last-child {
  border-bottom: 0;
}

/* About narrative hierarchy improvements */
.page-about .story-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.page-about .story-step {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.015);
}

.page-about .story-step h4 {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.page-about .story-step strong {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.page-about .story-step p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.page-about .now-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.page-about .now-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.015);
}

.page-about .now-item .timeline-number {
  font-size: 1.7rem;
  margin-bottom: 0.2rem;
}

.page-about .now-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-about .now-item p {
  margin: 0;
  font-size: 0.84rem;
}

.page-about .metric-card {
  border-top: 2px solid var(--accent);
  padding: 1rem;
}

.page-about .metric-value {
  font-size: clamp(2.1rem, 3.2vw, 2.9rem);
}

.page-about .metric-card p {
  font-size: 0.84rem;
}

.page-about .leaders-grid .leader-card--featured {
  grid-column: span 2;
}

.page-about .leaders-grid .leader-card--featured h3 {
  font-size: 1.35rem;
}

.page-about .footprint-map-content .story-points {
  margin-top: 0.75rem;
}

.page-about .cta-card .story-points {
  margin: 0.8rem auto 1rem;
  max-width: 38rem;
}

/* About: enforce layout system and reading path */
.page-about .hero-grid,
.page-contact .hero-grid,
.page-products .hero-grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: 2rem;
}

.page-services .hero--services-inner {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: 2rem;
}

.page-services .cta-card {
  text-align: left;
  max-width: 44rem;
}

.page-services .cta-card .hero-cta {
  width: fit-content;
}

.page-services .cta-card h3 {
  margin-top: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.page-about #metrics .metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.page-about #metrics .metric-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  min-height: 190px;
}

.page-about .leaders-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.page-about .leaders-grid .leader-card--featured {
  grid-column: auto;
}

.page-about .values-grid .value-card {
  min-height: 220px;
}

.page-about .values-grid .value-card h4 {
  margin: 0.1rem 0 0.25rem;
}

.page-about .values-grid .value-card p {
  margin: 0;
  max-width: 32ch;
}

.page-about .footprint-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.page-about .footprint-map,
.page-about .footprint-card {
  text-align: left;
  min-height: 240px;
}

.page-about .footprint-map .section-title,
.page-about .footprint-card .section-title {
  margin-bottom: 0.75rem;
}

.page-about .cta-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  text-align: left;
}

.page-about .cta-card .hero-cta {
  width: fit-content;
}

.site-khan .contact-form .form-group {
  margin-bottom: 0.9rem;
}

.site-khan .product-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* remove noisy corner decorators that hurt readability */
:where(.stat-card, .desk-card, .info-panel, .product-card, .module-card)::after,
.desk-card::before,
.info-panel::before {
  display: none !important;
}

@media (max-width: 1100px) {
  .site-khan .metrics-grid,
  .site-khan .leaders-grid,
  .site-khan .values-grid,
  .site-khan .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pulse .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-khan .story-grid,
  .site-khan .workflow-steps,
  .site-khan .playbooks,
  .site-khan .matrix-grid {
    grid-template-columns: 1fr;
  }

  .page-about .story-steps,
  .page-about .now-grid,
  .page-about #metrics .metrics-grid,
  .page-about .leaders-grid,
  .page-about .footprint-grid {
    grid-template-columns: 1fr;
  }

  .page-about .hero-grid,
  .page-services .hero--services-inner,
  .page-contact .hero-grid,
  .page-products .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-khan .metrics-grid,
  .site-khan .leaders-grid,
  .site-khan .values-grid,
  .site-khan .module-grid {
    grid-template-columns: 1fr;
  }

  #pulse .metrics-grid {
    grid-template-columns: 1fr;
  }
}
