/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Gilgamesh Brand Colors */
  --purple: #3F178E;         /* Gilgamesh Purple */
  --purple-dark: #2E0F6B;
  --lapis: #6666FF;          /* Lapis Lazuli */
  --coast: #4BAA7B;          /* Coast */
  --jade: #81D3A2;           /* Jade */
  --sand: #EBE4D8;           /* Sand */
  --white: #FFFFFF;

  /* Semantic mappings */
  --bg: var(--sand);
  --bg-alt: var(--white);
  --bg-card: var(--white);
  --bg-card-hover: #F7F4EE;
  --primary: var(--purple);
  --primary-light: var(--lapis);
  --accent: var(--coast);
  --accent-light: var(--jade);
  --text: #1C1C2E;
  --text-muted: #5C5C72;
  --border: #D6CFBF;
  --radius: 12px;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

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

/* ===== LAYOUT ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 32px;
  line-height: 1.2;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(235, 228, 216, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

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

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

nav .nav-links { display: flex; gap: 32px; list-style: none; }

nav .nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
nav .nav-links a:hover { color: var(--primary); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-top: 72px;
  background: linear-gradient(rgba(46, 15, 107, 0.75), rgba(46, 15, 107, 0.75)),
              url('images/hero-bg.jpg') center/cover no-repeat;
}

.hero-content { max-width: 700px; }

.hero-content h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-content h1 span { color: var(--jade); }

.hero-content p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-cta {
  display: inline-block;
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}
.hero-cta:hover { background: var(--white); color: var(--primary); }
.hero-cta-secondary {
  margin-left: 12px;
}

/* ===== PORTFOLIO ===== */
#portfolio { background: var(--white); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 24px 20px;
}

.company-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(63, 23, 142, 0.1);
  border-radius: var(--radius);
  aspect-ratio: 1;
  min-width: 0;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(63, 23, 142, 0.04);
}

.company-card:hover {
  border-color: rgba(63, 23, 142, 0.25);
  box-shadow: 0 4px 16px rgba(63, 23, 142, 0.08);
  transform: translateY(-2px);
}

/* Logo area is pinned inside the square card so every browser
   (including iPhone Safari) gives the logo the same fixed space */
.company-card a,
.company-card .company-logo-area {
  position: absolute;
  inset: 15px 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-card a:hover { color: var(--primary); }
/* Tag sits inside the logo area, so offset it back to the card's corner */
.company-card a .status-tag,
.company-card .company-logo-area .status-tag { top: -7px; right: -8px; }

.company-logo {
  width: 100%;
  height: 100%;
  max-height: 96px;
  object-fit: contain;
  border-radius: 8px;
}

/* Wide wordmarks use the card's side padding so they don't look tiny */
.company-logo-wide {
  width: calc(100% + 24px);
  max-width: none;
  flex-shrink: 0;
  margin: 0 -12px;
}

.company-logo-fallback {
  width: 100%;
  height: 100%;
  max-height: 96px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
}

.company-card .company-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.status-tag {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.status-tag.exited {
  background: #FDE8E8;
  color: #C53030;
}

/* ===== TEAM ===== */
#team { background: var(--bg); }

.team-grid {
  display: grid;
  gap: 32px;
}

.team-founders {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
  margin: 0 auto 40px;
}

.team-advisors {
  grid-template-columns: repeat(3, 1fr);
  max-width: 700px;
  margin: 0 auto;
}

.team-card {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  transition: all 0.3s ease;
}
.team-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(63, 23, 142, 0.1);
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.team-card h3 {
  font-size: 18px;
  color: var(--purple-dark);
  margin: 0;
  padding: 14px 16px 2px;
}

.team-card .role {
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  padding: 0 16px 14px;
  margin: 0;
}

/* Photo wrapper for overlay positioning */
.team-photo-wrap {
  position: relative;
  overflow: hidden;
}

/* Hover overlay with bio + social links — covers photo only */
.team-overlay {
  position: absolute;
  inset: 0;
  background: rgba(46, 15, 107, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-photo-wrap:hover .team-overlay {
  opacity: 1;
}

.team-overlay p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: center;
}

.team-overlay .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
}

.team-overlay .social-links a {
  color: var(--jade);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
}

.team-overlay .social-links a:hover {
  color: var(--white);
}

/* Advisor row: 25% smaller */
.team-advisors .team-card h3 {
  font-size: 14px;
  padding: 10px 12px 2px;
}

.team-advisors .team-card .role {
  font-size: 10px;
  padding: 0 12px 10px;
}

.team-advisors .team-overlay {
  padding: 16px 14px;
}

.team-advisors .team-overlay p {
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ===== ADVISORS ===== */
#advisors { background: var(--white); }

.advisors-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 24px 16px;
}

.advisor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  text-align: center;
}

.advisor-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.advisor-card span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.advisor-card:hover {
  transform: translateY(-2px);
}

.advisor-card:hover span {
  color: var(--primary);
}

@media (max-width: 768px) {
  .advisors-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== PODCAST ===== */
.podcast-section {
  background: var(--primary);
  border-bottom-color: var(--purple-dark);
}
.podcast-section .section-label { color: var(--jade); }
.podcast-section .section-title { color: var(--white); }
.podcast-section .podcast-embed {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.podcast-section .podcast-embed iframe { display: block; height: 352px; }

.podcast-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-style: italic;
}

/* ===== NEWSLETTER ===== */
#newsletter {
  background: var(--white);
  padding: 56px 0;
}

.newsletter-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.newsletter-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.newsletter-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}

.newsletter-btn:hover {
  background: var(--purple-dark);
  color: var(--white);
}

/* ===== BLOG & MEDIA ===== */
#articles { background: var(--bg); }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.tab {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.articles-list { display: flex; flex-direction: column; gap: 20px; }

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}
.article-card:hover { border-color: var(--primary); }

.article-card .article-date {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
}

.article-card h3 {
  font-size: 18px;
  color: var(--purple-dark);
  margin-bottom: 8px;
}

.article-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-card .read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.media-source {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.media-date {
  font-size: 12px;
  color: var(--text-muted);
}

.media-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== FOOTER ===== */
footer {
  padding: 44px 0;
  text-align: center;
  background: var(--purple-dark);
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  list-style: none;
}

footer .footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
footer .footer-links a:hover { color: var(--white); }

footer .copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

@supports not (aspect-ratio: 1) {
  .company-card::before { content: ""; display: block; padding-top: 100%; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 44px 0; }
  .section-title { font-size: 28px; }
  /* Slim Spotify player on phones */
  .podcast-section .podcast-embed iframe { height: 152px; }

  nav .nav-links { display: none; }
  nav .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(235, 228, 216, 0.97);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .menu-toggle { display: block; }

  .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .team-founders { grid-template-columns: 1fr; max-width: 320px; }
  .team-advisors { grid-template-columns: 1fr; max-width: 320px; }
}
