/* === 1. GOOGLE FONTS IMPORT === */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fraunces:ital,wght@0,300;1,300&family=JetBrains+Mono:wght@400;500&display=swap');


/* === 2. CSS CUSTOM PROPERTIES === */
:root {
  /* Colors */
  --color-bg:           #F9F7F4;
  --color-text:         #1A1A1A;
  --color-text-secondary: #6B7280;
  --color-card:         #FFFFFF;
  --color-border:       #E8E4DF;
  --color-nav-bg:       rgba(249, 247, 244, 0.85);
  --color-accent:       #4F46E5;
  --color-accent-soft:  rgba(79, 70, 229, 0.08);
  --color-placeholder-bg: #EDEAE5;
  --color-placeholder-text: #AAAAAA;

  /* Font Families */
  --font-primary:  'Plus Jakarta Sans', sans-serif;
  --font-editorial:'Fraunces', serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Type Scale */
  --text-display: 80px;
  --text-h1:      52px;
  --text-h2:      32px;
  --text-h3:      24px;
  --text-h4:      20px;
  --text-body-lg: 20px;
  --text-body:    17px;
  --text-quote:   16px;
  --text-mono:    13px;
  --text-label:   13px;
  --text-nav:     15px;

  /* Font Weights */
  --weight-light:      300;
  --weight-regular:    400;
  --weight-medium:     500;
  --weight-semibold:   600;
  --weight-bold:       700;
  --weight-extrabold:  800;

  /* Spacing — 8px base unit */
  --space-1:   8px;
  --space-2:   16px;
  --space-3:   24px;
  --space-4:   32px;
  --space-5:   40px;
  --space-6:   48px;
  --space-7:   56px;
  --space-8:   64px;
  --space-9:   72px;
  --space-10:  80px;
  --space-11:  88px;
  --space-12:  96px;
  --space-13:  104px;
  --space-14:  112px;
  --space-15:  120px;
  --space-16:  128px;
  --space-17:  136px;
  --space-18:  144px;
  --space-19:  152px;
  --space-20:  160px;

  /* Layout */
  --max-width:      1200px;
  --max-width-wide: 1440px;
  --nav-height:     64px;
  --section-pad:    120px;
  --section-pad-sm: 80px;

  /* Border Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 48px rgba(0, 0, 0, 0.13);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;
}


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

html {
  scroll-behavior: smooth;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}


/* === 4. BASE BODY === */
body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* === 5. TYPOGRAPHY CLASSES === */
.display {
  font-family: var(--font-primary);
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
}

.h1 {
  font-family: var(--font-primary);
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
}

.h2 {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #1A1A1A;
}

.h3 {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  color: var(--color-text);
}

.h4 {
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: #1A1A1A;
  margin-bottom: 10px;
}

.body-lg {
  font-family: var(--font-primary);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.quote {
  font-family: var(--font-editorial);
  font-size: 20px;
  font-weight: var(--weight-light);
  font-style: italic;
  color: #3A3A3A;
  line-height: 1.75;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
}

.label {
  font-family: var(--font-primary);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--color-text-secondary);
}


/* === 6. LAYOUT UTILITIES === */
.container {
  max-width: none;
  padding-left: 64px;
  padding-right: 64px;
  width: 100%;
  box-sizing: border-box;
}

.container--wide {
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section--sm {
  padding-top: var(--section-pad-sm);
  padding-bottom: var(--section-pad-sm);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.grid-asymmetric {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-10);
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* === 7. NAVIGATION === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  align-items: center;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-cta {
  padding: 8px 20px;
  font-size: 14px;
}

.nav-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  width: 0;
  transition: width 0.15s linear;
}


/* === 8. CARDS === */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card--flat {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  box-shadow: none;
}

.card--flat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}


/* === 9. IMAGE PANELS === */
.image-panel {
  background: var(--color-placeholder-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
}

.image-panel img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-panel[data-placeholder="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  position: relative;
  background: linear-gradient(160deg, #EEF0FF 0%, #E8E4F0 50%, #EDE8FF 100%);
}

.image-panel[data-placeholder="true"]::after {
  content: attr(data-caption);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: var(--weight-medium);
  color: var(--color-placeholder-text);
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: center;
  padding: var(--space-3);
}


/* === 10. BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background: var(--color-text);
  color: #FFFFFF;
  border: 1.5px solid var(--color-text);
}

.btn--primary:hover {
  background: #333333;
  border-color: #333333;
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-text);
}

.btn--accent {
  background: var(--color-accent);
  color: #FFFFFF;
  border: 1.5px solid var(--color-accent);
}

.btn--accent:hover {
  background: #4338CA;
  border-color: #4338CA;
}


/* === 11. TAGS & BADGES === */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: var(--text-mono);
  font-weight: var(--weight-medium);
  line-height: 1;
  white-space: nowrap;
}

.tag--accent {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.tag--gray {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-secondary);
}

.tag--dark {
  background: var(--color-text);
  color: #FFFFFF;
}


/* === 12. STAT BLOCKS === */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: var(--weight-medium);
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.stat-sublabel {
  font-family: var(--font-primary);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  margin-top: 2px;
}


/* === 13. DIVIDERS === */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  width: 100%;
}


/* === 14. ANIMATION INITIAL STATES === */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
}

.fade-in {
  opacity: 0;
}

.fade-left {
  opacity: 0;
  transform: translateX(-28px);
}

.fade-right {
  opacity: 0;
  transform: translateX(28px);
}

.scale-in {
  opacity: 0;
  transform: scale(0.96);
}


/* === 15. RESPONSIVE === */
@media (max-width: 1024px) {
  .grid-asymmetric {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .display {
    font-size: 44px;
  }

  .h1 {
    font-size: 36px;
  }

  .h2 {
    font-size: 28px;
  }

  .container,
  .container--wide {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .section {
    padding-top: var(--section-pad-sm);
    padding-bottom: var(--section-pad-sm);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .stat-number {
    font-size: 40px;
  }
}


/* === 16. LEFT SIDEBAR NAV === */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid #E8E4DF;
  padding: 40px 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 32px 28px 24px 28px;
  border-bottom: 1px solid #E8E4DF;
  font-size: 15px;
  font-weight: 700;
  color: #1A1A1A;
  text-decoration: none;
  font-family: var(--font-primary);
}

.sidebar-logo span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #6B7280;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.sidebar-nav {
  padding: 24px 0;
  flex: 1;
  list-style: none;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 28px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-primary);
  transition: background var(--transition-fast);
  border-radius: 0;
}

.sidebar-section-btn:hover {
  background: #F9F7F4;
}

.sidebar-section-btn.active {
  background: rgba(79, 70, 229, 0.06);
}

.sidebar-section-number {
  font-size: 11px;
  font-weight: 500;
  color: #6B7280;
  font-family: var(--font-mono);
  margin-right: 12px;
  min-width: 20px;
}

.sidebar-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  flex: 1;
}

.sidebar-section-btn.active .sidebar-section-title {
  color: #4F46E5;
}

.sidebar-chevron {
  font-size: 10px;
  color: #6B7280;
  transition: transform var(--transition-fast);
}

.sidebar-section-btn.open .sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-subsections {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.sidebar-subsections.open {
  max-height: 300px;
}

.sidebar-sublink {
  display: block;
  padding: 7px 28px 7px 60px;
  font-size: 13px;
  font-weight: 400;
  color: #6B7280;
  text-decoration: none;
  transition: color var(--transition-fast);
  font-family: var(--font-primary);
}

.sidebar-sublink:hover {
  color: #1A1A1A;
}

.sidebar-sublink.active {
  color: #4F46E5;
  font-weight: 500;
}

.sidebar-footer {
  padding: 24px 28px;
  border-top: 1px solid #E8E4DF;
  font-size: 12px;
  color: #6B7280;
  font-family: var(--font-mono);
}

.sidebar-progress-bar {
  height: 3px;
  background: #E8E4DF;
  border-radius: 99px;
  margin-top: 10px;
  overflow: hidden;
}

.sidebar-progress-fill {
  height: 100%;
  background: #4F46E5;
  border-radius: 99px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Main content pushed right when sidebar is present */
.page-with-sidebar {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
  width: calc(100% - 260px);
  overflow-x: hidden;
}

/* Sidebar hidden on mobile, content full width */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .page-with-sidebar {
    margin-left: 0;
  }
}

/* === 17. HERO INTERACTIVE CARD (interfacecraft style) === */

.hero-card-scene {
  perspective: 1000px;
  width: 100%;
}

.hero-card-inner {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
}

/* JS will add inline transform on mousemove */
/* On mouse leave, smoothly returns to flat */
