/* ================================================
   RAYA Energy Intelligence — Infrastructure Grade
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Root Variables --- */
:root {
  --dark-bg: #0d0f11;
  --dark-bg-alt: #131518;
  --light-bg: #f2f4f6;
  --light-bg-alt: #e9ecef;
  
  --accent: #37475a;  /* Muted industrial steel */
  --accent-hover: #2c3338;
  
  --text-white: #e8eaed;
  --text-muted: #80868b;
  --text-dark: #121314;
  --text-dark-muted: #5f6368;
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-dark: rgba(0, 0, 0, 0.08);

  /* Spacing Rhythm */
  --pad-expansive: 140px 0;
  --pad-standard: 100px 0;
  --pad-compressed: 60px 0;
}

/* --- Base Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-white);
  line-height: 1.8; /* Increased for readability/serious feel */
  -webkit-font-smoothing: antialiased;
}

/* --- Global Depth Overlay (Subtle Pattern) --- */
.depth-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.03;
  background-image: radial-gradient(#ffffff 0.5px, transparent 0.5px);
  background-size: 30px 30px;
}

/* --- Section Bases --- */
.dark-section {
  background-color: var(--dark-bg);
  color: var(--text-white);
  padding: var(--pad-standard);
  position: relative;
}

.dark-section-alt {
  background-color: var(--dark-bg-alt);
  padding: var(--pad-expansive); /* More breathing space */
}

.light-section {
  background-color: var(--light-bg);
  color: var(--text-dark);
  padding: var(--pad-standard);
}

.light-section-alt {
  background-color: var(--light-bg-alt);
  color: var(--text-dark);
  padding: var(--pad-compressed); /* Varied rhythm */
}

/* --- Container --- */
.section-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Hero Section --- */
.hero-section {
  background-image: url('../assets/raya_energy.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  background-color: #080a0c;
  min-height: 95vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 15, 17, 0.9) 0%,
    rgba(13, 15, 17, 0.7) 50%,
    rgba(13, 15, 17, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 800; /* Increased weight */
  line-height: 1.1;
  letter-spacing: -0.02em; /* Tighter letter spacing */
  color: var(--text-white);
  max-width: 800px;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: 1.25rem;
  font-weight: 300; /* Lighter weight for contrast */
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 48px;
}

/* --- CTA Buttons (Sharpened) --- */
.cta-btn {
  display: inline-block;
  padding: 12px 30px; /* More compact */
  background-color: var(--accent);
  color: #fff;
  font-size: 0.88rem; /* Smaller text */
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 2px; /* Sharper radius */
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255,255,255,0.05);
}

.cta-btn:hover {
  background-color: var(--accent-hover);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.cta-trust {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 18px;
  opacity: 0.6;
}

/* --- Section Headlines --- */
.section-headline {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.section-headline-center {
  text-align: center;
}

.section-subtext {
  font-size: 1.1rem;
  font-weight: 300; /* Lighter weight */
  line-height: 1.85;
}

.section-subtext.muted-dark {
  color: var(--text-dark-muted);
}

/* --- Two Column Layout --- */
.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* Asymmetric balance */
  gap: 80px;
  align-items: start;
}

/* --- Bullet Lists --- */
.styled-list {
  list-style: none;
}

.styled-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 300;
}

.styled-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1px;
  background-color: var(--accent);
}

/* --- 2x2 Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card-grid .card {
  border: 1px solid var(--border-dark);
  background-color: rgba(0,0,0,0.01);
  border-radius: 2px;
  padding: 30px 24px;
}

.card .card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card .card-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-dark-muted);
}

/* --- Architecture Layers --- */
.arch-layer {
  padding: 50px 0;
  border-top: 1px solid var(--border-dark);
}

.arch-layer h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

/* --- Governance Cards (Refined & Asymmetric) --- */
.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 instead of 4 row */
  gap: 30px;
  margin-top: 60px;
}

.governance-card {
  border: 1px solid var(--border-light);
  background-color: rgba(255,255,255,0.01);
  padding: 40px;
  transition: background 0.2s ease;
}

.governance-card:hover {
  background-color: rgba(255,255,255,0.02);
}

.governance-card .gov-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.governance-card .gov-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 12px;
}

.governance-card .gov-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* --- Deployment Environment Grid --- */
.env-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--border-dark); /* Creates thin borders */
}

.env-grid .env-item {
  background-color: var(--light-bg);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 20px;
  text-align: center;
}

/* --- Stat Blocks --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.stat-block .stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.stat-block .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Closing Text --- */
.closing-text {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* --- Utility Typography --- */
.tech-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .split-layout { grid-template-columns: 1fr; gap: 40px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .governance-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 2.8rem; }
}

/* --- Navbar Alignment Override --- */
#navbar-placeholder .max-w-6xl {
  max-width: 1080px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
}

/* =========================================================
   RAYA ENERGY INTELLIGENCE — MOBILE RESPONSIVE
========================================================= */

@media (max-width: 700px) {

  /* -------------------------------------------------------
     GLOBAL
  ------------------------------------------------------- */

  body {
    overflow-x: hidden;
  }

  .section-container {
    width: 100%;
    max-width: 100%;
    padding-left: 22px;
    padding-right: 22px;
  }


  /* -------------------------------------------------------
     SECTION SPACING
  ------------------------------------------------------- */

  .dark-section,
  .light-section {
    padding: 70px 0;
  }

  .dark-section-alt {
    padding: 75px 0;
  }

  .light-section-alt {
    padding: 60px 0;
  }


  /* -------------------------------------------------------
     HERO
  ------------------------------------------------------- */

  .hero-section {
    min-height: 100svh;
    padding: 100px 0 70px;
    background-position: center center;
  }

  .hero-content {
    width: 100%;
  }

  .hero-headline {
    font-size: clamp(2.15rem, 10vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    max-width: 100%;
    margin-bottom: 24px;
  }

  .hero-sub {
    font-size: 1rem;
    line-height: 1.65;
    max-width: 100%;
    margin-bottom: 14px;
  }

  .hero-tagline {
    font-size: 0.68rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    margin-bottom: 30px;
  }

  .hero-section .cta-btn {
    width: 100%;
    text-align: center;
  }

  .hero-section .cta-trust {
    text-align: center;
    line-height: 1.5;
  }


  /* -------------------------------------------------------
     TYPOGRAPHY
  ------------------------------------------------------- */

  .section-headline {
    font-size: clamp(2rem, 9vw, 2.7rem);
    line-height: 1.12;
    margin-bottom: 24px;
  }

  .section-subtext {
    font-size: 1rem;
    line-height: 1.7;
  }

  .tech-label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }


  /* -------------------------------------------------------
     TWO COLUMN SECTIONS
  ------------------------------------------------------- */

  .split-layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }


  /* -------------------------------------------------------
     PROBLEM LIST
  ------------------------------------------------------- */

  .styled-list li {
    font-size: 0.92rem;
    padding-left: 20px;
    margin-bottom: 12px;
  }

  .styled-list li::before {
    width: 9px;
  }


  /* -------------------------------------------------------
     2 × 2 CARDS
  ------------------------------------------------------- */

  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card-grid .card {
    padding: 24px 20px;
  }

  .card .card-title {
    font-size: 0.85rem;
  }

  .card .card-desc {
    font-size: 0.8rem;
    line-height: 1.6;
  }


  /* -------------------------------------------------------
     ARCHITECTURE
  ------------------------------------------------------- */

  .arch-layer {
    padding: 36px 0;
  }

  .arch-layer h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .arch-layer p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .arch-layer .cta-trust {
    line-height: 1.5;
  }


  /* -------------------------------------------------------
     GOVERNANCE
  ------------------------------------------------------- */

  .governance-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 38px;
  }

  .governance-card {
    padding: 26px 22px;
  }

  .governance-card .gov-number {
    font-size: 0.7rem;
    margin-bottom: 14px;
  }

  .governance-card .gov-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .governance-card .gov-desc {
    font-size: 0.8rem;
    line-height: 1.6;
  }


  /* -------------------------------------------------------
     DEPLOYMENT ENVIRONMENT
  ------------------------------------------------------- */

  .env-grid {
    grid-template-columns: 1fr;
  }

  .env-grid .env-item {
    padding: 17px 12px;
    font-size: 0.72rem;
  }

  .env-grid .env-item[style] {
    grid-column: auto !important;
  }


  /* -------------------------------------------------------
     PERFORMANCE
  ------------------------------------------------------- */

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
    margin-top: 30px;
  }

  .stat-block .stat-number {
    font-size: 2rem;
    line-height: 1.05;
    word-break: break-word;
  }

  .stat-block .stat-label {
    font-size: 0.62rem;
    line-height: 1.5;
  }


  /* -------------------------------------------------------
     FINAL PORTAL
  ------------------------------------------------------- */

  .dark-section[style*="160px"] {
    padding: 90px 0 !important;
  }

  .closing-text {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
  }

  .dark-section .cta-btn {
    width: 100%;
    text-align: center;
  }

  .dark-section .cta-trust {
    text-align: center;
    line-height: 1.5;
  }

}

/* =========================================================
   ENERGY PAGE — MOBILE FOOTER FIX
========================================================= */

@media (max-width: 700px) {

  #footer-placeholder {
    width: 100%;
    overflow: hidden;
  }

  #footer-placeholder footer {
    width: 100%;
    padding: 40px 0 24px !important;
  }

  /* Footer main container */
  #footer-placeholder footer > div:nth-child(2) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Footer columns */
  #footer-placeholder footer > div:nth-child(2) > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    width: 100% !important;
  }

  /* Footer brand */
  #footer-placeholder footer .text-xl {
    font-size: 18px !important;
    line-height: 24px !important;
  }

  #footer-placeholder footer .text-\[0\.65rem\] {
    font-size: 10px !important;
    line-height: 1.6 !important;
  }

  #footer-placeholder footer .max-w-xs {
    max-width: 100% !important;
  }

  /* Footer headings */
  #footer-placeholder footer h4 {
    font-size: 12px !important;
    line-height: 18px !important;
    margin-bottom: 14px !important;
  }

  /* Footer links */
  #footer-placeholder footer li {
    margin-bottom: 8px !important;
  }

  #footer-placeholder footer a {
    font-size: 12px !important;
    line-height: 18px !important;
  }

  /* Contact text */
  #footer-placeholder footer .text-sm {
    font-size: 12px !important;
    line-height: 18px !important;
  }

  #footer-placeholder footer .text-xs {
    font-size: 10px !important;
    line-height: 16px !important;
  }

  /* Bottom copyright area */
  #footer-placeholder footer > div:nth-child(2) > div:last-child {
    margin-top: 32px !important;
    padding-top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 10px !important;
    line-height: 16px !important;
    width: 100% !important;
  }

  #footer-placeholder footer > div:nth-child(2) > div:last-child > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
  }

}

@media (max-width: 700px) {

  #navbar-placeholder .max-w-6xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

}

