/* PLEASE REFER TO THE 'AI AGENT GUIDE.md' IN THE PARENT FOLDER BEFORE MAKING CHANGES */
/* =====================================================
   INNER TRIBE - Core Stylesheet
   Inspired by cococure.com aesthetic
   ===================================================== */

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
  /* Primary Colors */
  --color-gold: #BF8F02;
  --color-gold-light: #D4A82C;
  --color-gold-dark: #9A7302;

  --color-burgundy: #420F13;
  --color-burgundy-light: #5C1519;
  --color-burgundy-dark: #2D0A0D;

  /* Backgrounds */
  --bg-dark: #0A0A0A;
  --bg-darker: #050505;
  --bg-card: #141414;
  --bg-card-hover: #1A1A1A;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #CCCCCC;
  --text-muted: #888888;

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  --gradient-burgundy: linear-gradient(135deg, var(--color-burgundy-light) 0%, var(--color-burgundy) 100%);
  --gradient-dark: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.9) 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Typography */
  --font-primary: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Theme variations */
[data-theme="gold"] {
  --color-accent: var(--color-gold);
  --color-accent-light: var(--color-gold-light);
  --color-accent-dark: var(--color-gold-dark);
  --gradient-accent: var(--gradient-gold);
}

[data-theme="burgundy"] {
  --color-accent: var(--color-gold);
  --color-accent-light: var(--color-gold-light);
  --color-accent-dark: var(--color-gold-dark);
  --gradient-accent: var(--gradient-gold);
}

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

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--text-muted);
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: all var(--transition-medium);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  height: 50px;
  width: auto;
  transition: transform var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--spacing-xs) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-medium);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--color-accent);
}

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

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

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

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-md);
    gap: var(--spacing-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 2000;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: var(--spacing-sm);
  }

  /* Slimmer button for mobile nav */
  .nav-links .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    width: fit-content;
    margin: var(--spacing-sm) auto 0;
  }
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: var(--bg-darker);
}

.hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%);
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg,
      rgba(191, 143, 2, 0.1) 0%,
      transparent 50%,
      rgba(66, 15, 19, 0.1) 100%);
  animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: var(--spacing-md);
}

.hero-logo {
  width: 350px;
  max-width: 80vw;
  height: auto;
  margin: 0 auto var(--spacing-md);
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  margin-bottom: var(--spacing-sm);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator span {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 1rem 2rem;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(191, 143, 2, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(191, 143, 2, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
  padding: var(--spacing-xl) var(--spacing-md);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}

.section-title {
  margin-bottom: var(--spacing-sm);
}

.section-description {
  color: var(--text-secondary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* =====================================================
   CARDS
   ===================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-medium);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(191, 143, 2, 0.2);
}

.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.card-title {
  margin-bottom: var(--spacing-xs);
}

.card-description {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Service Cards */
.service-card {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
}

.service-card .card-icon {
  margin: 0 auto var(--spacing-sm);
}

/* Client Cards */
.client-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 1024px) {
  .client-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .client-grid {
    grid-template-columns: 1fr;
  }
}

.client-card {
  text-align: center;
}

.client-card h4 {
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
}

.client-list {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* =====================================================
   TEAM GRID (BIOS PAGE)
   ===================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-md);
}

.team-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

/* Base styles for team card image */
.team-card-image {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-slow);
}

.team-card:hover .team-card-image {
  transform: scale(1.1);
}

.team-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(10, 10, 10, 0.95) 0%,
      rgba(10, 10, 10, 0.7) 40%,
      transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-md);
  transition: all var(--transition-medium);
}

.team-card:hover .team-card-overlay {
  background: linear-gradient(to top,
      rgba(10, 10, 10, 0.98) 0%,
      rgba(10, 10, 10, 0.95) 60%,
      rgba(10, 10, 10, 0.85) 100%);
}

.team-card-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  transition: color var(--transition-fast);
}

.team-card:hover .team-card-name {
  color: var(--color-gold);
}

.team-card-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 0;
  overflow-y: auto;
  opacity: 0;
  transition: all var(--transition-medium);
}

.team-card:hover .team-card-bio {
  max-height: 180px;
  opacity: 1;
  margin-top: var(--spacing-sm);
  padding-right: var(--spacing-xs);
}

/* Custom scrollbar for team bio */
.team-card-bio::-webkit-scrollbar {
  width: 4px;
}

.team-card-bio::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.team-card-bio::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 2px;
}

.team-card-funfact {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(191, 143, 2, 0.3);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-gold);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all var(--transition-medium);
  flex-shrink: 0;
}

.team-card:hover .team-card-funfact {
  max-height: 80px;
  opacity: 1;
}

/* =====================================================
   ABOUT PAGE
   ===================================================== */
.about-hero {
  padding: calc(var(--spacing-xl) * 2) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  position: relative;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-text {
  font-size: 1.35rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* =====================================================
   CONTACT SECTION
   ===================================================== */
.contact-hero {
  padding: calc(var(--spacing-xl) * 2) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(191, 143, 2, 0.1) 0%, transparent 70%);
}

.contact-section {
  background: var(--bg-card);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-email {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--color-accent);
  transition: all var(--transition-fast);
}

.contact-email:hover {
  color: var(--color-accent-light);
}

.contact-divider {
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: var(--spacing-md) auto;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 8px;
  /* Slightly increased from xs for better readability */
  letter-spacing: 0.05em;
  text-align: left;
}

.form-control {
  width: 100%;
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(191, 143, 2, 0.2);
}

/* Fix for white background on autofill/valid */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #141414 inset !important;
  /* Matches bg-card approx */
  -webkit-text-fill-color: white !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Ensure valid state doesn't turn white */
.form-control:valid {
  background: rgba(10, 10, 10, 0.5);
}

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

.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
  text-align: left;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-select-trigger:hover {
  border-color: rgba(191, 143, 2, 0.5);
}

.custom-select-trigger.open {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(191, 143, 2, 0.2);
}

.custom-select-trigger .arrow {
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23BF8F02' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s;
}

.custom-select-trigger.open .arrow {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(191, 143, 2, 0.3);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  margin-top: 5px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.custom-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
}

.custom-option:hover {
  background: var(--color-gold);
  color: #000;
}

.custom-option.selected {
  background: rgba(191, 143, 2, 0.2);
  color: var(--color-gold);
}

.submit-btn {
  width: 100%;
  margin-top: var(--spacing-sm);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  text-align: center;
}

.contact-info-item {
  padding: var(--spacing-md);
}

.contact-icon {
  color: var(--color-gold);
  margin-bottom: var(--spacing-sm);
}

.contact-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.contact-value a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.contact-value a:hover {
  color: var(--color-gold);
}

@media (max-width: 600px) {
  .form-container {
    padding: var(--spacing-md);
  }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--bg-darker);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 10;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin: 0 auto var(--spacing-sm);
  display: block;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.footer-text a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* =====================================================
   PAGE HEADER (FOR SUB PAGES)
   ===================================================== */
.page-header {
  padding: calc(var(--spacing-xl) * 2) var(--spacing-md) var(--spacing-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, var(--color-accent-dark) 0%, transparent 60%);
  opacity: 0.2;
}

.page-header-content {
  position: relative;
  z-index: 1;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  .hero-logo {
    width: 150px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

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

  .about-text {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.85rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

/* =====================================================
   MOBILE TEAM CARDS - Tap to Expand
   ===================================================== */
@media (max-width: 768px) {
  .team-card {
    aspect-ratio: 4/5;
    /* Ensure stacking context for absolute children */
    position: relative;
    overflow: hidden;
  }

  .team-card-name {
    font-size: 1.3rem;
  }

  /* Show bio by default on mobile but collapsed */
  .team-card-bio {
    max-height: 0;
    opacity: 0;
    font-size: 0.85rem;
  }

  /* DISABLE DESKTOP HOVER EFFECTS ON MOBILE */
  /* This ensures that when the card is closed, it doesn't get stuck in the :hover state */
  .team-card:hover .team-card-image {
    transform: none;
  }

  .team-card:hover .team-card-overlay {
    background: linear-gradient(to top,
        rgba(10, 10, 10, 0.9) 0%,
        rgba(10, 10, 10, 0.6) 50%,
        transparent 100%);
  }

  .team-card:hover .team-card-bio {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding: 0;
  }

  .team-card:hover .team-card-funfact {
    max-height: 0;
    opacity: 0;
  }

  .team-card:hover .team-card-name {
    color: var(--text-primary);
    /* Revert gold color on hover */
  }

  .team-card:active .team-card-name,
  .team-card:focus .team-card-name {
    color: var(--text-primary);
  }

  /* Default State: View Bio Button */
  .team-card::after {
    content: 'VIEW BIO';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(191, 143, 2, 0.9);
    color: #000;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through to card */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
  }

  /* Hide View Bio button when expanded */
  .team-card.expanded::after {
    opacity: 0;
  }

  /* Overlay: Standard styling adjustments */
  .team-card-overlay {
    background: linear-gradient(to top,
        rgba(10, 10, 10, 0.9) 0%,
        rgba(10, 10, 10, 0.6) 50%,
        transparent 100%);
    padding-bottom: 55px;
    /* Space for View Bio button (reduced from 70px) */
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    transition: all 0.4s ease;
    /* Ensure smooth retraction */
  }

  .team-card-name {
    margin-bottom: 0;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  }

  /* EXPANDED STATE */
  .team-card.expanded {
    transform: none !important;
    z-index: 100 !important;
    /* Bring to front relative to grid siblings */
  }

  .team-card.expanded .team-card-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    /* Solid background */
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 30;
  }

  /* Close Button (via pseudo-element on overlay) */
  .team-card.expanded .team-card-overlay::before {
    content: 'CLOSE BIO';
    display: block;
    order: 10;
    /* Put at bottom */
    margin-top: var(--spacing-md);
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    pointer-events: none;
    flex-shrink: 0;
  }

  .team-card.expanded .team-card-image {
    opacity: 0.1;
  }

  .team-card.expanded .team-card-name {
    color: var(--color-gold);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
    margin-top: 0;
    flex-shrink: 0;
  }

  .team-card.expanded .team-card-bio {
    max-height: 100%;
    flex: 1;
    /* Take available space */
    width: 100%;
    opacity: 1;
    margin-top: var(--spacing-sm);
    padding: 0 var(--spacing-xs);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e0e0e0;
  }

  .team-card.expanded .team-card-funfact {
    max-height: 100px;
    opacity: 1;
    margin: var(--spacing-sm) 0;
    font-size: 0.8rem;
    color: var(--color-gold);
    flex-shrink: 0;
  }

  /* Scroll indicator for bio if needed */
  .scroll-indicator {
    display: none;
  }

  /* Hero adjustments for mobile */
  .hero-logo {
    width: 250px;
    max-width: 70vw;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 var(--spacing-sm);
  }
}

/* Page header hero logos */
.page-hero-logo {
  width: 280px;
  max-width: 60vw;
  height: auto;
  margin: 0 auto var(--spacing-md);
}

@media (max-width: 768px) {
  .page-hero-logo {
    width: 200px;
    max-width: 50vw;
  }
}

/* =====================================================
   CUSTOM VIDEO PLAYER
   ===================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-md);
}

.video-player-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: var(--shadow-elevated);
  border: 1px solid rgba(191, 143, 2, 0.2);
  background: black;
  cursor: pointer;
  transition: transform var(--transition-medium), border-color var(--transition-medium);
}

.video-player-wrapper:hover {
  transform: scale(1.02);
  border-color: var(--color-gold);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-medium);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(191, 143, 2, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2;
  box-shadow: 0 0 20px rgba(191, 143, 2, 0.5);
}

.video-play-btn svg {
  width: 30px;
  height: 30px;
  fill: var(--bg-dark);
  stroke: none;
  margin-left: 4px;
  /* Optical centering */
}

.video-player-wrapper:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--color-gold);
}

.video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 5;
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-gold);
}

@media (max-width: 600px) {
  .form-container {
    padding: var(--spacing-md);
  }
}