/* ══════════════════════════════════════════════════
   SPELL THERAPEUTICS — Global Stylesheet
   Bold & Modern | Investor-Facing
   ══════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0B2545;
  --navy-light: #122E57;
  --teal: #13808C;
  --teal-light: #19A0AE;
  --teal-dark: #0E6069;
  --accent: #E8792B;
  --accent-light: #F09A56;
  --white: #FFFFFF;
  --off-white: #F4F7FA;
  --light-gray: #E2E8F0;
  --med-gray: #94A3B8;
  --dark-gray: #334155;
  --text: #1E293B;
  --gradient-hero: linear-gradient(135deg, #0B2545 0%, #13808C 100%);
  --gradient-section: linear-gradient(135deg, #0E1B2E 0%, #0B2545 100%);
  --gradient-card: linear-gradient(145deg, rgba(19,128,140,0.08) 0%, rgba(11,37,69,0.04) 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--teal-light); }

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

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { font-size: 1.05rem; margin-bottom: 1rem; color: var(--dark-gray); }

.section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11, 37, 69, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 24px;
  transition: all 0.3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.3); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1px;
}
.nav-logo span { color: var(--teal-light); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--teal-light);
  border-radius: 2px;
}

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.3s, transform 0.2s;
}
.nav-cta:hover { background: var(--teal-light); transform: translateY(-1px); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ── Hero Sections ── */
.hero {
  background: var(--gradient-hero);
  padding: 160px 24px 100px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(19,128,140,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,121,43,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 20px; max-width: 800px; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.85); max-width: 650px; margin-bottom: 32px; }

.hero-page {
  background: var(--gradient-hero);
  padding: 140px 24px 60px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-page::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(19,128,140,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-page .container { position: relative; z-index: 1; }
.hero-page h1 { margin-bottom: 12px; }
.hero-page p { color: rgba(255,255,255,0.8); font-size: 1.15rem; max-width: 600px; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); color: var(--white); }

.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Stats Bar ── */
.stats-bar {
  background: var(--gradient-section);
  padding: 60px 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item .stat-number {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--teal-light);
  margin-bottom: 8px;
}
.stat-item .stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

/* ── Section Styling ── */
.section { padding: 80px 24px; }
.section-dark { background: var(--gradient-section); color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.8); }
.section-dark h2 { color: var(--white); }
.section-alt { background: var(--off-white); }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}
.section-header h2 { margin-bottom: 16px; }

/* ── Cards ── */
.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-dark {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.card-dark:hover { background: rgba(255,255,255,0.08); border-color: rgba(19,128,140,0.3); }
.card-dark h3, .card-dark .card-number { color: var(--white); }
.card-dark p { color: rgba(255,255,255,0.7); }

.card-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--white);
}

.card h3 { margin-bottom: 12px; }

/* ── Pipeline Table ── */
.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pipeline-table thead { background: var(--navy); }
.pipeline-table th {
  padding: 16px 20px;
  text-align: left;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pipeline-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.95rem;
}
.pipeline-table tbody tr:nth-child(even) { background: var(--off-white); }
.pipeline-table tbody tr:hover { background: rgba(19,128,140,0.05); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-teal { background: rgba(19,128,140,0.12); color: var(--teal-dark); }
.badge-accent { background: rgba(232,121,43,0.12); color: var(--accent); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--teal-dark));
}
.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-left: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px; top: 6px;
  width: 12px; height: 12px;
  background: var(--teal);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--teal);
}
.timeline-item h4 { color: var(--navy); margin-bottom: 6px; font-size: 1rem; }
.timeline-item p { margin-bottom: 0; font-size: 0.95rem; }

/* ── Team ── */
.team-card {
  text-align: center;
  padding: 40px 24px;
}
.team-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--white);
  font-weight: 700;
}
.team-card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.team-card .team-title {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.team-card p { font-size: 0.9rem; color: var(--dark-gray); }

/* ── Contact Form ── */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
  background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--teal);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer h4 { color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer p { font-size: 0.9rem; margin-bottom: 8px; }
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--teal-light); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer-bottom .disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-top: 12px;
  line-height: 1.5;
  max-width: 800px;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — iPad & Tablet (max-width: 1024px)
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.4rem; }
  .section { padding: 64px 20px; }
  .stats-bar { padding: 48px 20px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Small Tablet / Large Phone (max-width: 768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Navigation — mobile menu */
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.show { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links a.active::after { display: none; }
  .nav-cta {
    margin-top: 8px;
    text-align: center !important;
    display: block !important;
  }
  .hamburger { display: block; }

  /* Hero */
  .hero { padding: 120px 20px 60px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }
  .hero-page { padding: 120px 20px 48px; }
  .hero-page h1 { font-size: 1.8rem; }

  /* Grids */
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  /* Cards */
  .card { padding: 24px; }

  /* Tables */
  .pipeline-table { font-size: 0.85rem; }
  .pipeline-table th, .pipeline-table td { padding: 12px 10px; }

  /* Footer */
  .footer { padding: 48px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-bottom .disclaimer { text-align: center; }

  /* Buttons */
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }

  /* Section headers */
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 1.6rem; }

  /* Timeline */
  .timeline { padding-left: 32px; }

  /* Contact form full width */
  .contact-form { max-width: 100%; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile Phone (max-width: 480px)
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 16px; }
  .stats-bar { padding: 40px 16px; }

  /* Hero — tighter on small screens */
  .hero { padding: 110px 16px 48px; }
  .hero h1 { font-size: 1.65rem; line-height: 1.3; }
  .hero p { font-size: 0.95rem; }
  .hero-page { padding: 110px 16px 36px; }
  .hero-page h1 { font-size: 1.5rem; }
  .hero-page p { font-size: 0.95rem; }

  /* Stats — single column on very small screens */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stat-item .stat-number { font-size: 1.8rem; }
  .stat-item .stat-label { font-size: 0.8rem; }

  /* Typography */
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
  p { font-size: 0.95rem; }
  .section-label { font-size: 0.75rem; letter-spacing: 2px; }

  /* Cards */
  .card { padding: 20px; }
  .card-icon { width: 44px; height: 44px; font-size: 1.2rem; margin-bottom: 14px; }

  /* Pipeline table — horizontal scroll */
  .pipeline-table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Footer */
  .footer { padding: 40px 16px 20px; }
  .footer-grid { gap: 24px; }

  /* Form */
  .form-group input, .form-group textarea, .form-group select {
    padding: 12px 14px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Nav */
  .nav-inner { height: 60px; }
  .nav-logo { font-size: 1.1rem; }
  .nav-links { top: 60px; }

  /* Timeline */
  .timeline-item { padding-left: 16px; }
  .timeline-item::before { left: -26px; width: 10px; height: 10px; }
}

/* ══════════════════════════════════════════════════
   Touch & Accessibility Improvements
   ══════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets on touch devices */
  .nav-links a { padding: 16px 0; min-height: 48px; display: flex; align-items: center; }
  .btn { min-height: 48px; padding: 14px 28px; }
  .footer-links a { padding: 8px 0; display: inline-block; min-height: 44px; line-height: 44px; }

  /* Remove hover effects that don't work well on touch */
  .card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .card-dark:hover { background: rgba(255,255,255,0.05); }
}

/* ══════════════════════════════════════════════════
   iPad Landscape specific (1024px-1180px)
   ══════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1180px) {
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ══════════════════════════════════════════════════
   Safe areas for notched phones (iPhone etc.)
   ══════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
  .navbar { padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
  .footer { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .hero, .hero-page { padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
}
