/* ============================================
   OptoBiologics — Investor homepage CSS (v4)
   Changes from v3:
   ✅ DM Serif Display + DM Sans (replaces Roboto)
   ✅ Hero CTA buttons
   ✅ Stats row in "Why This Matters"
   ✅ Contact form + grid layout
   ✅ Mobile hamburger nav
   ✅ Scroll-triggered fade-in on cards
   ✅ Footer year updated to 2026
   ✅ Duplicate CSS rules removed
============================================ */

:root {
  --primary: #016c9e;
  --secondary: #ff66c5;
  --accent: #00c6a7;

  --text: #121823;
  --muted: #4b5563;

  --page-bg: #f4f6f8;
  --card-bg: rgba(255, 255, 255, 0.94);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

  --radius: 14px;
  --maxw: 1100px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font: 'DM Sans', system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.65;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

section { scroll-margin-top: 92px; }

/* ============================================
   HEADER
============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  isolation: isolate;
}

.logo { height: 64px; width: auto; }

nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  display: inline-block;
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 17px;
  color: var(--primary);
  transition: background 180ms ease, transform 180ms ease;
}

nav a:hover {
  background: rgba(1, 108, 158, 0.10);
  transform: translateY(-1px);
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ============================================
   HERO
============================================ */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("image/Abstract_neural_network_background.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
  transform: scale(1.03);
}

.hero {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 16, 24, 0.55) 0%,
    rgba(1, 40, 60, 0.72) 55%,
    rgba(10, 16, 24, 0.62) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(920px, 92vw);
  padding: 0 16px;
}

.hero h2 {
  margin: 0 0 14px 0;
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.4px;
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

.hero p {
  margin: 0 auto;
  max-width: 820px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-tagline {
  margin: 14px auto 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  max-width: none;
}

/* Hero CTA buttons */
.hero-cta {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 13px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 4px 14px rgba(1, 108, 158, 0.35);
}

.btn-primary:hover {
  background: #015c87;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(1, 108, 158, 0.45);
}

.btn-secondary {
  display: inline-block;
  padding: 13px 28px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  font-weight: 500;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 180ms ease, transform 180ms ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   CARDS
============================================ */
.card {
  width: min(var(--maxw), 92vw);
  margin: 26px auto;
  padding: 60px 48px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  /* Scroll fade-in — starts visible, JS adds the animation class */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 480ms ease, transform 480ms ease;
}

/* JS adds this class to opt into animation */
.card.will-animate {
  opacity: 0;
  transform: translateY(22px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  margin: 0 0 18px 0;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  color: var(--primary);
}

.card p {
  margin: 0 0 14px 0;
  max-width: 72ch;
}

.section-subcopy {
  margin-top: -4px;
  color: var(--muted);
  max-width: 72ch;
}

/* ============================================
   WHY THIS MATTERS — Stats Row
============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.stat {
  background: rgba(1, 108, 158, 0.05);
  border: 1px solid rgba(1, 108, 158, 0.14);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ============================================
   CALLOUT
============================================ */
.callout {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 4px solid rgba(1, 108, 158, 0.55);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  color: var(--muted);
}

.callout strong { color: var(--text); }

/* ============================================
   ENGINE FLYWHEEL
============================================ */
.flywheel-wrap {
  position: relative;
  width: 560px;
  height: 560px;
  margin: 28px auto 8px;
}

.flywheel-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fw-card {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, width 200ms ease;
}

.fw-top    { width: 160px; min-height: 160px; top: 8px;     left: 50%;  transform: translateX(-50%); }
.fw-right  { width: 160px; min-height: 160px; top: 50%;     right: 0;   transform: translateY(-50%); }
.fw-bottom { width: 160px; min-height: 160px; bottom: 8px;  left: 50%;  transform: translateX(-50%); }
.fw-left   { width: 160px; min-height: 160px; top: 50%;     left: 0;    transform: translateY(-50%); }

.fw-top:hover,    .fw-top:focus-within    { width: 200px; transform: translateX(-50%) translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-right:hover,  .fw-right:focus-within  { width: 200px; transform: translateY(-50%); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-bottom:hover, .fw-bottom:focus-within { width: 200px; transform: translateX(-50%) translateY(3px); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-left:hover,   .fw-left:focus-within   { width: 200px; transform: translateY(-50%); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }

.fw-top:hover,    .fw-top:focus-within    { transform: translateX(-50%) translateY(-3px) scale(1.02); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-right:hover,  .fw-right:focus-within  { transform: translateY(-50%) translateX(0px)  scale(1.02); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-bottom:hover, .fw-bottom:focus-within { transform: translateX(-50%) translateY(3px)  scale(1.02); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }
.fw-left:hover,   .fw-left:focus-within   { transform: translateY(-50%) translateX(0px)  scale(1.02); box-shadow: 0 14px 28px rgba(0,0,0,0.10); border-color: rgba(0,198,167,0.5); z-index: 2; }

.fw-center {
  width: 152px;
  height: 152px;
  border-radius: 999px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(1,108,158,0.06);
  border-color: rgba(1,108,158,0.25);
  padding: 12px;
  z-index: 1;
}

.fw-center:hover,
.fw-center:focus-within {
  transform: translate(-50%, -50%) scale(1.05);
  border-color: rgba(0,198,167,0.6);
  box-shadow: 0 0 0 6px rgba(0,198,167,0.08), 0 14px 28px rgba(0,0,0,0.10);
}

.roman {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(1,108,158,0.95);
  background: rgba(1,108,158,0.10);
  border: 1px solid rgba(1,108,158,0.18);
  margin-bottom: 6px;
  flex-shrink: 0;
}

.fw-roman-center {
  width: 36px !important;
  height: 36px !important;
  font-size: 14px !important;
}

.fw-card h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: #014e73;
  line-height: 1.3;
}

.fw-center h4 { font-size: 12px; color: var(--primary); }

.fw-detail {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 200ms ease, max-height 240ms ease;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.fw-card:hover .fw-detail,
.fw-card:focus-within .fw-detail { opacity: 1; max-height: 220px; }

/* Mobile: collapse to stacked list */
@media (max-width: 640px) {
  .flywheel-wrap {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 8px;
  }
  .flywheel-svg { display: none; }
  .fw-card {
    position: static;
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    transform: none !important;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .fw-top:hover, .fw-right:hover, .fw-bottom:hover, .fw-left:hover,
  .fw-top:focus-within, .fw-right:focus-within, .fw-bottom:focus-within, .fw-left:focus-within {
    transform: translateY(-2px) !important;
  }
  .fw-detail { opacity: 1; max-height: none; }
  .fw-center { background: rgba(1,108,158,0.06); order: 5; }
}



/* SAB card — subtle tonal shift to separate from Team */
.sab-card {
  background: rgba(1, 108, 158, 0.04);
  border-color: rgba(1, 108, 158, 0.12);
}

/* ============================================
   WHAT IT ENABLES
============================================ */
.bullets {
  list-style: none;
  padding-left: 0;
  margin-top: 14px;
  max-width: 72ch;
}

.bullets li {
  position: relative;
  padding-left: 30px;
  margin: 12px 0;
  color: var(--muted);
}

.bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.bullets strong { color: var(--text); }

/* ============================================
   TEAM GRID
============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  gap: 22px;
  margin-top: 24px;
  justify-content: center;
}

.team-member {
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.team-member:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 198, 167, 0.45);
}

.team-member img {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 20%;
  margin-bottom: 14px;
  border: 3px solid rgba(1, 108, 158, 0.55);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
}

.team-member img.photo-lower {
  object-position: center 15%;
}

.team-photo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  margin: 0 auto 14px;
  background: rgba(1, 108, 158, 0.08);
  border: 3px dashed rgba(1, 108, 158, 0.25);
}

.team-member h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.team-member p {
  margin: 6px 0 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================
   CONTACT
============================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin-top: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(1, 108, 158, 0.5);
  box-shadow: 0 0 0 3px rgba(1, 108, 158, 0.08);
}

.contact-form .btn-primary {
  align-self: flex-start;
}

/* ============================================
   FOOTER
============================================ */
footer {
  width: 100%;
  margin-top: 26px;
  text-align: center;
  padding: 22px 12px;
  color: var(--muted);
  font-size: 14px;
  background: transparent;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 980px) {
  .logo { height: 56px; }
  .hero h2 { font-size: 38px; }
  .card { padding: 48px 28px; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  nav ul {
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    gap: 4px;
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);

    /* max-height toggle — reliable on all mobile browsers */
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease, padding 280ms ease;
  }

  nav ul.open {
    max-height: 400px;
    padding: 14px 20px;
  }

  nav a { font-size: 16px; width: 100%; }
}

@media (max-width: 560px) {
  header { padding: 12px 16px; }
  .hero { height: 620px; }
  .hero h2 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .card { padding: 36px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .stat-num { font-size: 26px; }
}
