/* ============================================================
   Our Story Page Styles (pages/our-story.css)
   ============================================================ */

.story-page-section {
  position: relative;
  width: 100%;
  background-color: #000000;
  min-height: calc(100vh - 100px);
}

.story-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  padding: 40px var(--page-margin) 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  box-sizing: border-box;
  position: relative;
}

/* Text Content: Starts at the very left edge of Column 1 */
.story-content-col {
  grid-column: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 40px;
  box-sizing: border-box;
  z-index: 2;
}

.story-main-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 1.08;
  color: #ffffff;
  margin: 0 0 32px 0;
  letter-spacing: -0.01em;
}

.story-text-group {
  margin-bottom: 24px;
  max-width: 540px;
}

.story-kicker {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 10px;
}

.story-section-title {
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 10px 0;
}

.story-paragraph {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: #ffffff;
  margin: 0;
  opacity: 0.95;
}

.story-action-area {
  margin-top: 10px;
}

.story-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #4b68ff;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 2px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.story-cta-btn:hover {
  background-color: #3856ea;
  transform: translateY(-1px);
}

.story-cta-btn:active {
  transform: scale(0.98);
}

/* Repeating Pattern Column: Hugging the right edge in Column 3 */
.story-pattern-col {
  grid-column: 3;
  width: 100%;
  height: 100%;
  min-height: 600px;
  background-image: url('/assets/repeating-our-story.png');
  background-repeat: repeat-y;
  background-position: right top;
  background-size: clamp(180px, 18vw, 250px) auto;
  pointer-events: none;
  user-select: none;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .story-grid-container {
    grid-template-columns: 1fr;
    padding: 28px var(--page-margin) 36px;
  }

  .story-content-col {
    grid-column: 1;
    padding-right: 0;
  }

  .story-pattern-col {
    display: none;
  }
}

/* ============================================================
   Team Intro Section (Full Width White Background)
   ============================================================ */
.team-intro-section {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  padding: 48px var(--page-margin) 28px;
  box-sizing: border-box;
}

.team-intro-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.team-intro-card {
  background-color: transparent;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
}

.team-card-header {
  margin-bottom: 20px;
}

.team-main-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.1;
  color: #4b68ff;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.team-subtitle {
  font-family: var(--font-heading), Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.45;
  color: #1e1e1e;
  margin: 0 0 16px 0;
}

.team-header-divider {
  border: none;
  border-top: 1px solid #b8cae6;
  margin: 0;
  width: 100%;
}

.team-card-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
  padding-top: 20px;
}

/* Photo Grid (Always a Complete Square) */
.team-photo-grid {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
  gap: 10px;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  align-self: end;
  transition: all 0.3s ease;
}

.team-photo-item {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f1f5f9;
  border-radius: 2px;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-photo-item:hover .team-photo {
  transform: scale(1.06);
}

/* CAEA brand emblem tile used when filling square slots */
.team-photo-item.is-logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eef3ff;
  border: 1px solid rgba(75, 104, 255, 0.15);
}

.team-photo-item.is-logo-tile .team-photo {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.85;
}

/* Narrative & Quote */
.team-narrative-col {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
}

.team-quote-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.team-quote {
  font-family: var(--font-heading), Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.25;
  color: #4b68ff;
  margin: 0;
}

.team-quote-author {
  font-family: var(--font-heading), Georgia, serif;
  font-style: normal;
  font-size: 15px;
  color: #4b68ff;
  white-space: nowrap;
}

.team-description {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(13.5px, 1.05vw, 15px);
  line-height: 1.55;
  color: #1e1e1e;
  margin: 0;
}

/* Responsive adjustments for team intro */
@media (max-width: 900px) {
  .team-intro-section {
    padding: 32px var(--page-margin) 20px;
  }

  .team-card-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 14px;
  }

  .team-photo-grid {
    max-width: 100%;
  }
}

/* ============================================================
   Core Team Accordion Section (Full Width White Background)
   ============================================================ */
.core-team-section {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  padding: 28px var(--page-margin) 56px;
  box-sizing: border-box;
}

.core-team-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.core-team-card {
  background-color: transparent;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}

.core-team-title-col {
  display: flex;
  flex-direction: column;
}

.core-team-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.1;
  color: #4b68ff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.core-team-accordion-col {
  width: 100%;
}

.team-accordion {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.accordion-item {
  width: 100%;
  border-bottom: 1.5px solid #4b68ff;
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  padding: 16px 0;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s ease;
  outline: none;
}

.accordion-header:hover {
  opacity: 0.8;
}

.accordion-header:focus-visible {
  outline: 2px solid #4b68ff;
  outline-offset: 4px;
}

.accordion-name {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 400;
  color: #4b68ff;
}

.accordion-role-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b68ff;
}

.accordion-role {
  font-family: var(--font-body);
  font-size: clamp(11.5px, 0.9vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4b68ff;
}

.accordion-icon {
  color: #4b68ff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

/* Accordion Drawer */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-item.is-open .accordion-content {
  max-height: 600px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.accordion-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: clamp(20px, 2.5vw, 36px);
  padding: 12px 0 24px;
  align-items: center;
}

.accordion-photo-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #f1f5f9;
  border-radius: 8px;
}

.accordion-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.accordion-photo.pos-top-15 {
  object-position: center 15%;
}

.accordion-photo.pos-top-20 {
  object-position: center 20%;
}

.accordion-photo.pos-top-25 {
  object-position: center 25%;
}

.accordion-photo.is-logo,
.accordion-photo[src*="CAEA-Navbar-Logo"] {
  object-fit: contain;
  padding: clamp(24px, 4vw, 40px);
  background-color: #000000;
  box-sizing: border-box;
}

.accordion-bio {
  font-family: var(--font-body);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  color: #1e1e1e;
}

.accordion-bio p {
  margin: 0;
}

/* Responsive adjustments for Core Team Accordion */
@media (max-width: 900px) {
  .core-team-section {
    padding: 20px var(--page-margin) 40px;
  }

  .core-team-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .accordion-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .accordion-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
  }
}

/* ============================================================
   Allies Section & Infinite Logo Ticker Tape
   ============================================================ */
.allies-section {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  padding: 48px var(--page-margin) 56px;
  box-sizing: border-box;
  overflow: hidden;
}

.allies-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.allies-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.1;
  color: #4b68ff;
  margin: 0 0 32px 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* Continuous Logo Ticker Tape Ribbon */
.allies-ticker-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  padding: 12px 0;
  /* Feathered edge fade masks */
  mask-image: linear-gradient(to right, transparent 0%, #000000 6%, #000000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000000 6%, #000000 94%, transparent 100%);
}

.allies-ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: alliesTickerScroll 28s linear infinite;
  will-change: transform;
}

/* Smooth pause on hover for easy inspection */
.allies-ticker-wrapper:hover .allies-ticker-track {
  animation-play-state: paused;
}

.allies-ticker-half {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(48px, 5.5vw, 84px);
  padding-right: clamp(48px, 5.5vw, 84px);
}

.ally-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(64px, 6vw, 88px);
  min-width: 130px;
  max-width: 230px;
  background-color: transparent;
  padding: 6px 12px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.ally-card:hover {
  transform: translateY(-3px) scale(1.06);
  opacity: 1;
}

.ally-logo-img {
  max-width: 100%;
  height: clamp(44px, 4.8vw, 62px);
  object-fit: contain;
  display: block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 100% Seamless Infinite Animation */
@keyframes alliesTickerScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .allies-ticker-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
  .allies-ticker-half:last-child {
    display: none;
  }
  .allies-ticker-wrapper {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* ============================================================
   Join The Team Section (Full Width Black Background)
   ============================================================ */
.join-team-section {
  position: relative;
  width: 100%;
  background-color: #000000;
  padding: 56px var(--page-margin) 72px;
  box-sizing: border-box;
  overflow: hidden;
}

.join-team-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.join-team-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-bottom: 14px;
}

.join-team-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.1;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.join-team-pattern {
  flex: 1;
  height: clamp(36px, 3.5vw, 48px);
  background-image: url('/assets/repeating-logo-left.png');
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 100%;
  pointer-events: none;
  user-select: none;
}

.join-team-desc {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  color: #ffffff;
  margin: 0 0 28px 0;
  line-height: 1.5;
}

.join-team-desc em {
  font-style: italic;
}

.join-team-action {
  display: flex;
}

.join-team-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #4b68ff;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 2px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.join-team-btn:hover {
  background-color: #3856ea;
  transform: translateY(-1px);
}

.join-team-btn:active {
  transform: scale(0.98);
}

/* Responsive adjustments for Allies & Join Team */
@media (max-width: 900px) {
  .allies-section {
    padding: 36px var(--page-margin) 44px;
  }

  .join-team-section {
    padding: 40px var(--page-margin) 48px;
  }

  .join-team-header-row {
    flex-wrap: wrap;
  }

  .join-team-heading {
    white-space: normal;
  }

  .join-team-pattern {
    width: 100%;
    flex: none;
    height: 32px;
  }
}

@media (max-width: 768px) {
  .story-grid-container {
    grid-template-columns: 1fr;
    padding: 24px var(--page-margin) 32px;
    min-height: auto;
  }

  .story-content-col {
    grid-column: 1;
    padding-right: 0;
  }

  .story-main-title {
    font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 24px;
    line-height: 1.15;
  }

  .story-pattern-col {
    display: none !important;
  }

  .team-intro-section {
    padding: 32px var(--page-margin) 24px;
  }

  .team-main-heading {
    font-size: clamp(28px, 6vw, 38px);
  }

  .team-card-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 16px;
  }

  .team-photo-grid {
    max-width: 100%;
    gap: 8px;
  }

  .core-team-section {
    padding: 24px var(--page-margin) 44px;
  }

  .core-team-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .core-team-heading {
    font-size: clamp(26px, 6vw, 36px);
  }

  .accordion-header {
    min-height: 48px;
    padding: 14px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .accordion-name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    color: #4b68ff;
    width: 100%;
  }

  .accordion-role-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .accordion-role {
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: #4b68ff;
    line-height: 1.3;
  }

  /* Ticker tape mobile adjustments */
  .allies-section {
    padding: 36px var(--page-margin) 44px;
  }

  .allies-ticker-wrapper {
    mask-image: linear-gradient(to right, transparent 0%, #000000 4%, #000000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000000 4%, #000000 96%, transparent 100%);
  }

  .allies-ticker-track {
    animation-duration: 22s;
  }

  .allies-ticker-half {
    gap: 36px;
    padding-right: 36px;
  }

  .ally-card {
    height: 58px;
    min-width: 105px;
    max-width: 175px;
    padding: 4px 8px;
  }

  .ally-logo-img {
    height: 40px;
  }
}

@media (max-width: 480px) {
  .story-main-title {
    font-size: clamp(24px, 6.5vw, 32px);
  }

  .story-cta-btn,
  .join-team-btn {
    width: 100%;
    min-height: 46px;
  }

  .team-photo-grid {
    gap: 6px;
  }

  .ally-card {
    flex: 0 0 135px;
    width: 135px;
    height: 95px;
    padding: 10px;
  }
}
