/* ============================================
   THE MAGAN GROUP — Website Stylesheet
   Brand Book v1.0 — February 2026
   ============================================ */

/* --- CSS Variables (Brand Palette) --- */
:root {
  --navy: #0B1D33;
  --navy-mid: #132B4A;
  --navy-light: #1A3A5C;
  --slate: #3A506B;
  --steel: #6B8299;
  --sand: #C9B99A;
  --sand-light: #E8DCC8;
  --cream: #F5F0E8;
  --white: #FDFBF7;
  --accent: #8B7355;
  --accent-dark: #6E5A3F;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--slate);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  font-weight: 300;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.25;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
  max-width: 720px;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sand);
}

.label-dark { color: var(--steel); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 1px solid rgba(201, 185, 154, 0.12);
  transition: background 0.3s ease;
}

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

.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.nav-logo .the {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sand);
  margin-right: 6px;
}

.nav-logo .name {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cream);
}

.nav-logo .suffix {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sand);
  margin-left: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sand);
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sand);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transition: all 0.3s ease;
}

/* --- Page Hero Sections --- */
.hero-full {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 128px 48px 48px;
  position: relative;
  overflow: hidden;
}

.hero-full::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,185,154,0.05) 0%, transparent 70%);
}

.hero-full::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,185,154,0.03) 0%, transparent 70%);
}

.hero-full .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-logo {
  margin-bottom: 92px;
}

.hero-logo .the,
.hero-logo .suffix {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 12px;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  line-height: 1;
  margin: 0;
}

.hero-logo .name {
  font-family: 'EB Garamond', serif;
  font-size: clamp(60px, 11vw, 96px);
  font-weight: 400;
  letter-spacing: 18px;
  text-transform: uppercase;
  color: var(--cream);
  display: block;
  line-height: 1;
  margin: 4px 0;
}

.hero-full h1 {
  color: var(--cream);
  margin-bottom: 76px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.hero-full p {
  color: var(--steel);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 48px;
}

.hero-full p.hero-sub {
  color: var(--sand);
  font-weight: 600;
  font-style: italic;
  font-size: 1.15rem;
  margin: 0 auto 0;
}

/* Page headers (non-home pages) */
.page-hero {
  background: var(--navy);
  padding: 140px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero.page-hero-compact {
  padding: 120px 48px 48px;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,185,154,0.04) 0%, transparent 70%);
}

.page-hero h1 {
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.page-hero .label {
  margin-bottom: 16px;
  display: block;
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: var(--steel);
  max-width: 600px;
  margin: 20px auto 0;
  position: relative;
  z-index: 1;
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--cream);
  padding: 48px 48px;
  margin-top: -2px;
}

.stats-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .num {
  font-family: 'EB Garamond', serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-item .stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--slate);
}

/* --- Content Sections --- */
.section {
  padding: 100px 48px;
}

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

.section-cream {
  background: var(--cream);
}

.section-navy {
  background: var(--navy);
}

.section-navy h1,
.section-navy h2,
.section-navy h3 {
  color: var(--cream);
}

.section-navy p {
  color: var(--steel);
}

.section-navy .label {
  color: var(--sand);
}

/* --- Pillar Items (Speed, Certainty, etc.) --- */
.pillar {
  margin-bottom: 32px;
  padding-left: 24px;
  border-left: 2px solid var(--sand-light);
}

.pillar-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.pillar p {
  margin-bottom: 0;
}

/* --- Criteria Grid --- */
.criteria-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  margin: 40px 0;
}

.criteria-item {
  display: contents;
}

.criteria-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--cream);
  padding: 16px 24px 16px 0;
  border-bottom: 1px solid rgba(201, 185, 154, 0.1);
  font-size: 0.95rem;
}

.criteria-value {
  color: var(--steel);
  padding: 16px 0;
  border-bottom: 1px solid rgba(201, 185, 154, 0.1);
  font-size: 0.95rem;
}

.criteria-item:last-child .criteria-label,
.criteria-item:last-child .criteria-value {
  border-bottom: none;
}

/* Criteria Grid — Light background */
.criteria-grid-light {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  margin: 40px 0;
}

.criteria-item-light {
  display: contents;
}

.criteria-label-light {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--navy);
  padding: 18px 24px 18px 0;
  border-bottom: 1px solid var(--sand-light);
  font-size: 1.1rem;
}

.criteria-value-light {
  color: var(--slate);
  padding: 18px 0;
  border-bottom: 1px solid var(--sand-light);
  font-size: 1.1rem;
}

.criteria-item-light:last-child .criteria-label-light,
.criteria-item-light:last-child .criteria-value-light {
  border-bottom: none;
}

/* Industries Tags — Light background */
.industries-grid-light {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.industry-tag-light {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--navy);
  padding: 8px 20px;
  border: 1px solid var(--sand);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.industry-tag-light:hover {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* Industries Tags */
.industries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.industry-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--cream);
  padding: 8px 20px;
  border: 1px solid rgba(201, 185, 154, 0.25);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.industry-tag:hover {
  border-color: var(--sand);
  color: var(--sand);
}

/* --- Investment Cards --- */
.investments-heading {
  margin-bottom: 12px;
  margin-top: -24px;
}

.investments-intro {
  margin-bottom: 40px;
  color: var(--slate);
  max-width: 100%;
}

.investment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-bottom: 0;
}

.investment-card {
  background: var(--white);
  border: 1px solid var(--sand-light);
  padding: 32px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.investment-card:hover {
  border-color: var(--sand);
  box-shadow: 0 4px 20px rgba(11, 29, 51, 0.06);
}

/* Logo area — fixed height so rows align */
.card-logo-link {
  display: inline-flex;
  align-items: center;
  height: 52px;
  margin-bottom: 16px;
  transition: opacity 0.25s ease;
}

img.card-logo {
  display: block;
  max-height: 38px;
  height: 52px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 16px;
}

.card-logo-link .card-logo {
  max-height: 38px;
  margin-bottom: 0;
  height: auto;
}

.card-logo-link:hover {
  opacity: 0.7;
}

.card-logo-dark {
  background: #1a1a2e;
  padding: 0 14px;
  border-radius: 4px;
  display: inline-flex !important;
  width: auto !important;
  max-width: fit-content;
  height: 40px;
  box-sizing: border-box;
}

.investment-card h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--navy);
}

.investment-card .card-industry {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000000;
  margin-bottom: 12px;
}

.investment-card .card-desc {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.7;
  margin-bottom: 8px;
}

.investment-card .card-seller {
  font-size: 0.8rem;
  color: var(--steel);
  font-style: italic;
}

/* Residual cards — muted */
.investment-card.residual {
  background: var(--cream);
  border-color: var(--sand-light);
  opacity: 0.9;
}

.residual-section {
  margin-top: -64px;
}

.residual-section .investments-intro {
  font-size: 0.95rem;
}

/* --- Philanthropy --- */
.philanthropy-block {
  margin-bottom: 48px;
}

.philanthropy-block h3 {
  margin-bottom: 16px;
  color: var(--navy);
}

.program-item {
  margin-bottom: 24px;
}

.program-item strong {
  color: var(--navy);
  font-weight: 600;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 48px;
}

.contact-block h3 {
  color: var(--cream);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.contact-block a {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  color: var(--sand);
  transition: color 0.25s ease;
}

.contact-block a:hover {
  color: var(--cream);
}

.contact-block p {
  color: var(--steel);
  font-size: 1rem;
}

.contact-divider {
  width: 40px;
  height: 1px;
  background: rgba(201, 185, 154, 0.3);
  margin: 24px 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(201, 185, 154, 0.1);
  padding: 32px 48px;
  text-align: center;
}

.site-footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(107, 130, 153, 0.75);
  max-width: none;
  margin: 0;
}

.site-footer .footer-disclaimer {
  margin-top: 12px;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: none;
  color: rgba(107, 130, 153, 0.6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* --- Team Section Title --- */
.team-section-title {
  margin-bottom: 48px;
  margin-top: -24px;
}

/* --- Interactive Team Grid (Team Page) --- */
.team-grid-interactive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
  margin-bottom: 20px;
}

.team-card-interactive {
  text-align: center;
  cursor: pointer;
}

.team-grid-131 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 20px;
  margin-bottom: 20px;
}

.team-grid-131 .team-card-interactive {
  flex: 0 0 calc(33.333% - 22px);
}

.team-grid-131 .team-card-interactive:first-child,
.team-grid-131 .team-card-interactive:last-child {
  flex: 0 0 100%;
}

.team-photo-wrap {
  width: clamp(200px, 18vw, 360px);
  height: clamp(200px, 18vw, 360px);
  border-radius: 4px;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 3px solid var(--sand-light);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.team-photo-interactive {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) brightness(0.95);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.team-card-interactive:hover .team-photo-interactive {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.04);
}

.team-card-interactive:hover .team-photo-wrap {
  border-color: var(--sand);
  box-shadow: 0 4px 20px rgba(11, 29, 51, 0.1);
}

.team-card-interactive h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--navy);
}

.team-card-interactive .team-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0;
  display: block;
}

.team-bio-reveal {
  display: none;
}

.team-bio-reveal p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--slate);
  max-width: none;
  text-align: left;
  margin-bottom: 0;
}

/* --- Bio Modal --- */
.bio-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 29, 51, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bio-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.bio-modal {
  background: var(--white);
  border-radius: 6px;
  max-width: 580px;
  width: 100%;
  padding: 40px 40px 36px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(11, 29, 51, 0.3);
  animation: modalSlideIn 0.3s ease;
}

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

.bio-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--steel);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.bio-modal-close:hover {
  color: var(--navy);
}

.bio-modal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.bio-modal-photo {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  border: 2px solid var(--sand-light);
  flex-shrink: 0;
}

.bio-modal-header h3 {
  font-size: 1.4rem;
  margin-bottom: 2px;
  color: var(--navy);
}

.bio-modal-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.bio-modal-divider {
  width: 36px;
  height: 1px;
  background: var(--sand-light);
  margin-bottom: 20px;
}

.bio-modal p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--slate);
  max-width: none;
  margin-bottom: 0;
}

.bio-modal-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: #0A66C2;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.bio-modal-linkedin:hover {
  opacity: 0.75;
}

.bio-modal-linkedin svg {
  flex-shrink: 0;
}

/* --- Dividers --- */
.section-divider {
  width: 40px;
  height: 1px;
  background: var(--sand);
  margin: 32px 0;
}

.section-divider-light {
  width: 40px;
  height: 1px;
  background: rgba(201, 185, 154, 0.3);
  margin: 32px 0;
}

/* --- Responsive: nav breakpoint --- */
@media (max-width: 1024px) {
  .nav-inner { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(201, 185, 154, 0.12);
  }
  .nav-toggle { display: flex; }
}

/* --- Responsive: layout breakpoint --- */
@media (max-width: 768px) {
  .hero-full { padding: 120px 24px 60px; }
  .page-hero { padding: 120px 24px 60px; }
  .section { padding: 60px 24px; }
  .stats-bar { padding: 40px 24px; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }

  .criteria-grid { grid-template-columns: 1fr; }
  .criteria-label { padding: 12px 0 4px; border-bottom: none; }
  .criteria-value { padding: 0 0 16px; }

  .investment-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .team-grid-interactive { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .team-grid-131 .team-card-interactive { flex: 0 0 calc(50% - 12px); }
  .team-grid-131 .team-card-interactive:first-child,
  .team-grid-131 .team-card-interactive:last-child { flex: 0 0 100%; }
  .team-photo-wrap { width: clamp(140px, 28vw, 220px); height: clamp(140px, 28vw, 220px); border-radius: 4px; }
  .bio-modal { padding: 28px 24px 24px; }
  .bio-modal-photo { width: 56px; height: 56px; }
  .bio-modal-header { gap: 14px; }
  .bio-modal-header h3 { font-size: 1.2rem; }
}
