/* ==========================================================================
   ThesisML - styles.css (optimized + de-duplicated)
   - Fixes "white background" by using hard-coded fallbacks + var() fallbacks
   - Consolidates duplicate Live Models blocks into a single canonical set
   - Keeps your existing class names to avoid breaking HTML
   ========================================================================== */

/* ------------------------------ TOKENS ---------------------------------- */

:root {
  /* Core palette */
  --navy-bg: #0b1321;
  --navy-bg-alt: #121a2c;
  --panel-bg: #1a253d;
  --border-color: #23324f;

  --text-main: #ffffff;
  --text-dim: #cbd5e1;
  --text-muted: #64748b;

  --accent: #0ea5e9;
  --accent-hover: #36b9f4;

  /* Radii */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.30);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.40);
  --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.80);

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ------------------------------ RESET ----------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* IMPORTANT: hard-coded fallbacks + var() fallbacks
     This prevents the "white page" if variables fail to load for any reason. */
  background-color: #0b1321 !important;
  background: linear-gradient(135deg, #0b1321 0%, #121a2c 100%) !important;

  /* Preferred (when vars exist) */
  background-color: var(--navy-bg, #0b1321) !important;
  background: linear-gradient(
      135deg,
      var(--navy-bg, #0b1321) 0%,
      var(--navy-bg-alt, #121a2c) 100%
    ) !important;

  color: var(--text-main, #ffffff);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------ TYPOGRAPHY ------------------------------ */

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-main, #ffffff);
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

h2.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent, #0ea5e9);
  margin-bottom: 1.5rem;
  line-height: 1.25;
  text-align: center;
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.2rem;
  font-size: 1rem;
  color: var(--text-dim, #cbd5e1);
}

strong {
  color: var(--text-main, #ffffff);
  font-weight: 600;
}

.process-head {
  color: var(--text-main, #ffffff);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* ------------------------------ LAYOUT ---------------------------------- */

.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 780px;
}

/* Some templates wrap content in containers that may default to white.
   Make them transparent so the global background shows through. */
main,
#app,
#root,
.page,
.container {
  background: transparent !important;
}

/* ------------------------------ HEADER / NAV ---------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 19, 33, 0.90);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-color, #23324f);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-name {
  color: var(--text-main, #ffffff);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-dim, #cbd5e1);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent, #0ea5e9);
}

/* ------------------------------ HERO ------------------------------------ */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;

  /* Force hero to be dark even if a template sets it to white */
  background:
    radial-gradient(circle at 20% 20%, rgba(14,165,233,0.22) 0%, rgba(11,19,33,0) 60%),
    #0b1321 !important;

  background:
    radial-gradient(circle at 20% 20%, rgba(14,165,233,0.22) 0%, rgba(11,19,33,0) 60%),
    var(--navy-bg, #0b1321) !important;
}

.hero-content {
  max-width: 780px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-wrap: balance;
}

.hero-subtext {
  font-size: 1.15rem;
  color: var(--text-dim, #cbd5e1);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ------------------------------ BUTTONS --------------------------------- */

.btn-primary,
.btn-secondary,
.btn-full {
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: 0.25s ease;
  display: inline-block;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent, #0ea5e9);
  color: #fff;
  border-color: var(--accent, #0ea5e9);
}

.btn-primary:hover {
  background-color: var(--accent-hover, #36b9f4);
  border-color: var(--accent-hover, #36b9f4);
}

.btn-secondary {
  background: transparent;
  color: var(--accent, #0ea5e9);
  border: 1px solid var(--accent, #0ea5e9);
}

.btn-secondary:hover {
  background-color: var(--accent, #0ea5e9);
  color: #fff;
  border-color: var(--accent, #0ea5e9);
}

.btn-full {
  width: 100%;
}

/* Accessible focus */
.btn-primary:focus,
.btn-secondary:focus,
.btn-full:focus,
.nav-link:focus,
.form-input:focus,
#emailInput:focus,
.btn-back:focus,
.email-modal-close:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ------------------------------ PROBLEM --------------------------------- */

.problem {
  background-color: transparent;
  text-align: center;
}

.problem p {
  font-size: 1rem;
  color: var(--text-dim, #cbd5e1);
  line-height: 1.5;
}

/* ------------------------------ FEATURES -------------------------------- */

.features-section {
  background-color: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 1.35rem 1.35rem 1.1rem;
  min-height: 150px;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-dim, #cbd5e1);
  line-height: 1.4;
}

/* ------------------------------ PROCESS --------------------------------- */

.process-section {
  background-color: rgba(18, 26, 44, 0.35);
  border-top: 1px solid var(--border-color, #23324f);
  border-bottom: 1px solid var(--border-color, #23324f);
  text-align: center;
}

.process-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.process-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  text-align: left;
  position: relative;
  color: var(--text-dim, #cbd5e1);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 220px;
}

.process-num {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: var(--accent, #0ea5e9);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.25);
}

.process-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim, #cbd5e1);
  line-height: 1.5;
}

/* ------------------------------ HELPING YOU LEAD ------------------------ */

.helping-section {
  background-color: transparent;
  border-top: 1px solid var(--border-color, #23324f);
}

.content-block {
  margin-bottom: 3rem;
}

.content-subtitle {
  font-size: 1.4rem;
  color: var(--accent, #0ea5e9);
  margin-bottom: 1rem;
  font-weight: 600;
}

.principle-item,
.partnership-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-soft);
}

.principle-title,
.partnership-title {
  font-size: 1.1rem;
  color: var(--accent, #0ea5e9);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.principle-item p,
.partnership-item p {
  margin: 0;
  color: var(--text-dim, #cbd5e1);
  line-height: 1.6;
}

.closing-statement {
  text-align: center;
  font-size: 1.1rem;
  padding: 2rem;
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
}

.closing-statement p {
  margin: 0;
  color: var(--text-main, #ffffff);
}

/* ------------------------------ CASE STUDIES ---------------------------- */

.case-studies-section {
  background-color: rgba(18, 26, 44, 0.35);
  border-top: 1px solid var(--border-color, #23324f);
}

/* Modern responsive grid */
.case-studies-grid,
.case-studies-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 2rem;
}

/* Canonical case-study card */
.case-study-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.case-study-card:hover:not(.coming-soon) {
  transform: translateY(-4px);
  border-color: var(--accent, #0ea5e9);
  box-shadow: 0 20px 60px rgba(14, 165, 233, 0.18);
}

.case-study-card.coming-soon {
  opacity: 0.7;
}

.case-study-card .card-header {
  background-color: rgba(14, 165, 233, 0.10);
  border-bottom: 1px solid var(--border-color, #23324f);
  padding: 16px;
}

.case-study-card .card-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--accent, #0ea5e9);
  font-weight: 600;
}

.case-study-card .card-body {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.case-study-card .card-body p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  color: var(--text-dim, #cbd5e1);
  flex-grow: 1;
}

.case-study-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
  height: 100%;
  min-height: 200px;
}

/* Keeps your existing "button inside case-study card is filled" behavior */
.case-study-card .btn-secondary {
  padding: 8px 16px;
  background-color: var(--accent, #0ea5e9);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
  border: 1px solid var(--accent, #0ea5e9);
  display: inline-block;
}

.case-study-card .btn-secondary:hover {
  background-color: var(--accent-hover, #36b9f4);
  border-color: var(--accent-hover, #36b9f4);
  transform: translateY(-1px);
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  background-color: rgba(100, 116, 139, 0.35);
  color: var(--text-dim, #cbd5e1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

/* ------------------------------ COMING SOON ----------------------------- */

.coming-soon-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.coming-soon-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
  padding: 3rem 2rem;
  max-width: 500px;
  text-align: center;
}

.coming-soon-title {
  font-size: 2rem;
  color: var(--accent, #0ea5e9);
  margin-bottom: 1rem;
  font-weight: 600;
}

.coming-soon-text {
  font-size: 1rem;
  color: var(--text-dim, #cbd5e1);
  line-height: 1.6;
  margin: 0;
}

/* ------------------------------ CONTACT --------------------------------- */

.contact-section {
  background-color: transparent;
  border-top: 1px solid var(--border-color, #23324f);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  max-width: 1100px;
  align-items: start;
}

.contact-copy .contact-blurb {
  color: var(--text-dim, #cbd5e1);
  font-size: 1rem;
  line-height: 1.5;
}

.email-inline {
  color: var(--accent, #0ea5e9);
  text-decoration: none;
  font-weight: 500;
}

.email-inline:hover {
  color: var(--accent-hover, #36b9f4);
  text-decoration: underline;
}

.contact-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-deep);
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  margin-left: auto;
}

.form-outer {
  display: block;
}

.form-label {
  display: block;
  color: var(--text-main, #ffffff);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  background-color: var(--navy-bg, #0b1321);
  color: var(--text-main, #ffffff);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-sm, 6px);
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: inset 0 16px 32px rgba(0, 0, 0, 0.55);
  margin-top: 0.4rem;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ------------------------------ FOOTER ---------------------------------- */

.site-footer {
  background-color: transparent;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border-color, #23324f);
  color: var(--text-dim, #cbd5e1);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-legal p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-dim, #cbd5e1);
}

/* ------------------------------ DISCLOSURES ----------------------------- */

.disclosures-section {
  border-top: 1px solid var(--border-color, #23324f);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.disclosures-list {
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
}

.disclosures-list li {
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   LIVE MODELS (Canonical, single source of truth)
   Keeps your existing class names:
   - .live-models-section
   - .model-cards-grid / .model-card
   - .detail-view / .btn-back / .model-detail-title
   - .chart-container
   - .key-stats-section / .key-stats-grid / .stat-item
   - .methodology-section / .pdf-placeholder
   - .email-modal + form ids
   ========================================================================== */

.live-models-section {
  background-color: transparent;
  border-top: 1px solid var(--border-color, #23324f);
  padding: 3rem 1.5rem;
}

/* 2x2 desktop, 1-col mobile */
.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.model-card {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  padding: 1.75rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.model-card h3 {
  font-size: 1.2rem;
  color: var(--text-main, #ffffff);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.model-card p {
  font-size: 0.95rem;
  color: var(--text-dim, #cbd5e1);
  margin: 0;
  line-height: 1.5;
}

/* Active card (clickable) */
.model-card.active {
  cursor: pointer;
  border-color: rgba(14, 165, 233, 0.35);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.10) 0%, rgba(14, 165, 233, 0.05) 100%),
    var(--panel-bg, #1a253d);
}

.model-card.active:hover {
  border-color: rgba(14, 165, 233, 0.80);
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.20);
}

/* Coming soon card (disabled) */
.model-card.coming-soon {
  opacity: 0.60;
  cursor: not-allowed;
}

.coming-soon-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(100, 116, 139, 0.35);
  color: rgba(203, 213, 225, 0.85);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Detail view */
.detail-view {
  background-color: transparent;
  padding: 2rem 1.5rem;
  min-height: 80vh;
}

.detail-view.hidden {
  display: none;
}

/* Back button (supports <button> or <a>) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  background-color: transparent;
  color: var(--accent, #0ea5e9);
  border: 1px solid var(--accent, #0ea5e9);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md, 10px);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-bottom: 1.5rem;
  font-family: inherit;
  text-decoration: none;
}

.btn-back:hover {
  background-color: var(--accent, #0ea5e9);
  color: #fff;
}

.model-detail-title {
  font-size: 2rem;
  color: var(--accent, #0ea5e9);
  margin: 0 0 2rem 0;
  text-align: center;
}

/* Chart container */
.chart-container {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-soft);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container canvas {
  width: 100% !important;
  max-height: 420px;
}

/* Key stats */
.key-stats-section {
  margin-bottom: 3rem;
}

.key-stats-section h3 {
  font-size: 1.4rem;
  color: var(--text-main, #ffffff);
  margin-bottom: 1.5rem;
}

.key-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.stat-item {
  background-color: var(--panel-bg, #1a253d);
  border: 1px solid var(--border-color, #23324f);
  border-radius: var(--radius-md, 10px);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  color: var(--accent, #0ea5e9);
  font-weight: 700;
  line-height: 1.2;
}

/* Methodology */
.methodology-section {
  margin-top: 3rem;
}

.methodology-section h3 {
  font-size: 1.4rem;
  color: var(--text-main, #ffffff);
  margin-bottom: 1.5rem;
}

.pdf-placeholder {
  background-color: var(--panel-bg, #1a253d);
  border: 2px dashed var(--border-color, #23324f);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.pdf-placeholder p {
  color: var(--text-dim, #cbd5e1);
}

/* Email modal */
.email-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-modal.hidden {
  display: none;
}

.email-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(4px);
}

.email-modal-content {
  position: relative;
  z-index: 1001;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(15, 23, 42, 0.95) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 2rem;
  max-width: 450px;
  width: 92%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.80);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-modal-content h3 {
  color: #fff;
  margin-top: 0;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.email-modal-content p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.email-modal-content strong {
  color: #fff;
}

.email-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-modal-close:hover {
  color: rgba(255, 255, 255, 0.95);
}

#emailForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#emailForm label {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

#emailInput {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#emailInput::placeholder {
  color: rgba(255, 255, 255, 0.40);
}

#emailInput:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: var(--focus-ring);
}

.btn-primary-modal {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95) 0%, rgba(14, 165, 233, 0.75) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary-modal:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(14, 165, 233, 0.25);
  filter: brightness(1.05);
}

.btn-primary-modal:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.email-modal-content > p:last-child {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

/* ------------------------------ RESPONSIVE ------------------------------ */

@media (max-width: 1200px) {
  .case-studies-grid,
  .case-studies-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .key-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-inner {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .nav-links {
    margin-left: auto;
    gap: 1rem;
  }

  .hero {
    min-height: 80vh;
  }

  h1 {
    font-size: 2rem;
  }

  h2.section-title {
    font-size: 1.5rem;
  }

  .hero-subtext {
    font-size: 1rem;
  }

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

  .process-cards {
    grid-template-columns: 1fr;
  }

  .process-card {
    min-height: 0;
  }

  .content-subtitle {
    font-size: 1.2rem;
  }

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

  .contact-card {
    margin-left: 0;
  }

  .model-cards-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 1rem;
    min-height: 280px;
  }
}

@media (max-width: 600px) {
  .live-models-section {
    padding: 2rem 1rem;
  }

  .model-detail-title {
    font-size: 1.5rem;
  }

  .model-card {
    padding: 1.25rem;
  }

  .key-stats-section h3,
  .methodology-section h3 {
    font-size: 1.2rem;
  }

  .key-stats-grid {
    grid-template-columns: 1fr;
  }

  .email-modal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .case-studies-grid,
  .case-studies-gallery {
    grid-template-columns: 1fr;
  }
}
