/* ==========================================================================
   MELD Institute Custom Stylesheet — Fully Patched
   Design Ethos: Academic, Minimal, Dark, Premium, Ultra-modern typography
   ========================================================================== */

/* 1. Global System Reset & CSS Custom Variables (Featuring extracted logo colors) */
:root {
  /* Base Colors */
  --bg-dark: #07090e; /* Deep elegant navy-charcoal */
  --bg-card: #0f1219; /* Soft dark card background */
  --text-primary: #f3f4f6; /* Off-white readable text */
  --text-secondary: #94a3b8; /* Muted slate gray */

  /* Elegant Gradients extracted from the MELD Logo */
  --grad-teal-blue: linear-gradient(135deg, #39d3b4 0%, #0b72a4 100%);
  --grad-coral-gold: linear-gradient(135deg, #df796b 0%, #fad06c 100%);
  --grad-teal-mint: linear-gradient(135deg, #24b0a7 0%, #39d3b4 100%);

  /* Flat Solid Accents (for small borders/markers) */
  --color-teal: #39d3b4;
  --color-blue: #0b72a4;
  --color-coral: #df796b;
  --color-gold: #fad06c;

  /* Typography */
  --font-serif: "Lora", serif;
  --font-sans: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

/* Typography Base Defaults */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
}

strong {
  color: var(--text-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 2. Modern Floating Glassmorphic Header Styling */
.main-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px); /* Initially hidden above screen */
  width: 90%;
  max-width: 1000px;
  background: rgba(15, 18, 25, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 0.75rem 1.5rem;
  z-index: 1000;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
  opacity: 0;
}

/* Turns active via JS scroll sensor */
.main-header.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.muted-text-light {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.95rem;
  opacity: 0.8;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: var(--text-primary);
}

/* 3. Global Buttons styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
}

.btn-exclusive {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 1rem 2.5rem;
  transition:
    border-color 0.5s ease,
    background-color 0.5s ease;
}

.btn-exclusive:hover {
  border-color: var(--color-blue);
  background-color: rgba(11, 114, 164, 0.04);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-block {
  width: 100%;
}

/* 4. Section 1: Hero Section (Minimalist, Dramatic Typography) */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6rem 0;
}

.hero-container {
  text-align: center;
  max-width: 850px;
}

.hero-logo-wrapper {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
}

.hero-logo-img {
  max-width: 100px;
  height: auto;
}

.hero-logo-fallback {
  filter: drop-shadow(0 0 15px rgba(57, 211, 180, 0.15));
}

.hero-headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* Custom Gradient Typography Effect */
.gradient-text {
  background: var(--grad-teal-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 3rem;
  color: var(--text-secondary);
}

/* 5. Section 2: The Problem We Solve */
.problem-section {
  padding: 8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .section-grid {
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
  }
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--grad-teal-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.section-header {
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.lead-text {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  font-family: var(--font-serif);
  line-height: 1.5;
}

.pressure-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .pressure-list {
    grid-template-columns: 1fr 1fr;
  }
}

.pressure-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.list-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.bullet-coral {
  background: var(--color-coral);
  box-shadow: 0 0 10px var(--color-coral);
}
.bullet-gold {
  background: var(--color-gold);
  box-shadow: 0 0 10px var(--color-gold);
}
.bullet-teal {
  background: var(--color-teal);
  box-shadow: 0 0 10px var(--color-teal);
}
.bullet-blue {
  background: var(--color-blue);
  box-shadow: 0 0 10px var(--color-blue);
}

.pressure-list strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.pressure-list p {
  font-size: 0.85rem;
}

.problem-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.problem-footer p {
  margin-bottom: 1rem;
}

.highlight-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  background: var(--grad-coral-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 5.1 Stats Callout Section Style Layout (Patch 3) */
.stats-section {
  padding: 6rem 0;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.stat-item {
  min-width: 240px;
  padding: 0 1rem;
}

.stat-item:nth-child(2) .stat-number {
  background: var(--grad-coral-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  padding-bottom: 0.15em;
  padding-right: 0.25em;
  margin-bottom: 0.5rem;
  background: var(--grad-teal-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  max-width: 250px;
  line-height: 1.5;
  margin: 0 auto;
}

/* 6. Section 3: What We Do (Visual Card Grid) */
.services-section {
  padding: 8rem 0;
  background: rgba(15, 18, 25, 0.3);
}

.services-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.services-intro .subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.card-indicator {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.c-teal {
  background: var(--grad-teal-mint);
}
.c-coral {
  background: var(--color-coral);
}
.c-gold {
  background: var(--grad-coral-gold);
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-text {
  font-size: 0.9rem;
  margin-bottom: 1.25 rem;
}

.card-text.secondary {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25 rem;
}

.card-footer-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-teal);
  margin-top: 1rem;
}

/* 7. Section 4: Who We Are & Podcast Integration */
.about-section {
  padding: 8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.body-dark-highlight {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.body-muted {
  font-size: 0.95rem;
  margin-bottom: 3rem;
}

/* Premium Podcast Card Box */
.podcast-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2.5rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

/* Glowing background halo */
.podcast-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: var(--grad-teal-blue);
  opacity: 0.08;
  filter: blur(80px);
  pointer-events: none;
}

.podcast-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-coral);
  margin-bottom: 0.75rem;
}

.podcast-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .podcast-title {
    flex-direction: row;
    align-items: center;
  }
}

/* Patched Podcast Live Episode Badge (Patch 5) */
.badge-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
}

.badge-coral {
  background: rgba(223, 121, 107, 0.15);
  color: var(--color-coral);
  border: 1px solid rgba(223, 121, 107, 0.3);
}

.podcast-desc {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.podcast-guests {
  font-size: 0.85rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--color-gold);
  padding-left: 1rem;
}

.podcast-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 600px) {
  .podcast-links {
    flex-direction: row;
    align-items: center;
  }
}

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

.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.4rem 1rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.platform-btn .icon {
  width: 14px;
  height: 14px;
}

/* 8. Section 5: Start a Conversation (Contact Block) */
.contact-section {
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, #030406 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .stat-item:nth-child(2) .stat-number {
    margin-top: 1.25em;
  }
}

.contact-header {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.contact-intro-text {
  font-size: 1rem;
  line-height: 1.6;
}

.contact-action-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 2rem;
}

.engagement-types {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Friction Reducer styling (Patch 4) */
.friction-reducer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
  line-height: 1.5;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.75rem;
}

.arrow-icon {
  transition: transform 0.3s ease;
}

.btn:hover .arrow-icon {
  transform: translateX(4px);
}

.form-subtext {
  font-size: 0.7rem;
  text-align: center;
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

/* 9. Site Footer Styling */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #030406;
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .footer-container {
    flex-direction: row;
  }
}

.footer p {
  font-size: 0.8rem;
}

.footer-geo {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* Patched Footer Chinese Language Hover Transition (Patch 7) */
.chinese-link {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Custom editorial text link for LinkedIn */
.linkedin-text-link {
  display: inline-block;
  color: var(--color-teal);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

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