/* ================================================================
   SAMAAN MIKHAEL — ABOUT PAGE  |  assets/css/about.css
   All about-specific styles. Inherits CSS vars from main.css.
   ================================================================ */

/* ── HERO ─────────────────────────────────────────────────────── */
.abt-hero {
  background: var(--bg);
  overflow-x: clip; /* prevent any animated element from leaking outside viewport */
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

/* Characters: each span starts clipped below via translateY */
.abt-char {
  display: inline-block;
  transform: translateY(108%) rotateZ(3deg);
  will-change: transform;
}

.abt-portrait-wrap {
  position: relative;
}

/* Thin crimson ground line beneath the portrait — anchors the figure to the page */
.abt-portrait-baseline {
  position: absolute;
  bottom: 0;
  left: -12%;
  right: -12%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(187,38,73,0.18) 25%,
    rgba(187,38,73,0.45) 50%,
    rgba(187,38,73,0.18) 75%,
    transparent 100%
  );
  pointer-events: none;
}

.abt-portrait-mask {
  display: inline-block;
  will-change: clip-path;
}

.abt-portrait-img {
  display: block;
  will-change: transform;
}

/* Portrait ground gradient — mirrors index.html hero fix */
.abt-portrait-ground {
  position: absolute;
  bottom: -2px;
  left: -15%;
  right: -15%;
  height: 120px;
  background: linear-gradient(to top, var(--bg) 0%, var(--bg) 15%, transparent 100%);
  pointer-events: none;
  z-index: 3;
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

/* Generic scroll-reveal anchor state */
.abt-reveal {
  opacity: 0;
  transform: translateY(36px);
}

.abt-mission {
  opacity: 0;
  transform: translateY(30px);
}

/* Scroll indicator */
.abt-scroll-indicator { color: var(--text-muted); }
.scroll-track         { background: var(--border); }
.scroll-pulse-line {
  height: 100%;
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(-100%); opacity: 1; }
  80%  { opacity: 0.6; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* Stat counters */
.stat-count { display: inline; font-variant-numeric: tabular-nums; }

/* ── STORY ────────────────────────────────────────────────────── */
.abt-story {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

/* Video wrapper initial state — no transform so GSAP pin doesn't conflict */
.abt-story-video-wrap {
  opacity: 0;
  will-change: opacity;
  margin-bottom: 20px;
}

/* Desktop: the video is GSAP-pinned (centered) by initStory().
   No CSS `position:sticky` here — sticky + a GSAP pin on the same
   element fight each other (the element would jump between the sticky
   top offset and the centered pin). align-self:start just keeps the
   video at the top of its grid cell before the pin engages. */
@media (min-width: 1024px) {
  .abt-story-video-wrap {
    align-self: start;
  }
}

/* ── WHY CHOOSE SAMAAN — Cinematic Feature Rows ───────────────── */
.abt-why {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.abt-why-showcase { position: relative; }

.abt-why-feat {
  display: grid;
  grid-template-columns: clamp(3.5rem,7vw,7rem) clamp(72px,9vw,100px) 1fr;
  gap: clamp(1.5rem,3vw,3.5rem);
  align-items: center;
  padding: clamp(2rem,4vw,4.5rem) 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  cursor: default;
  /* JS sets x for alternating entrance direction */
}

.abt-why-feat:first-child { border-top: 1px solid var(--border); }

/* Giant outline number */
.abt-why-feat-num {
  font-family: 'BUNDAYCLEAN','Bebas Neue',sans-serif;
  font-size: clamp(3rem,6.5vw,7rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(187,38,73,0.22);
  letter-spacing: -0.02em;
  user-select: none;
  pointer-events: none;
  transition: -webkit-text-stroke-color 0.4s ease;
}

.abt-why-feat:hover .abt-why-feat-num {
  -webkit-text-stroke-color: rgba(187,38,73,0.55);
}

/* Icon container — no background or border; source images are already self-framed */
.abt-why-feat-icon-ring {
  width: clamp(72px,9vw,100px);
  height: clamp(72px,9vw,100px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.23,1,0.32,1);
}

.abt-why-feat-icon-ring img {
  width: clamp(52px,6.5vw,80px);
  height: clamp(52px,6.5vw,80px);
  object-fit: contain;
}

.abt-why-feat:hover .abt-why-feat-icon-ring {
  transform: scale(1.08) rotate(-5deg);
}

/* Content */
.abt-why-feat-title {
  font-family: 'BUNDAYCLEAN','Bebas Neue',sans-serif;
  font-size: clamp(1.8rem,3.2vw,3.5rem);
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  transition: color 0.3s ease;
}

.abt-why-feat:hover .abt-why-feat-title { color: #BB2649; }

.abt-why-feat-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 40ch;
}

/* Animated crimson bar */
.abt-why-feat-bar {
  margin-top: 1rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #BB2649, #DB343B);
  width: 0;
  transition: width 0.55s cubic-bezier(0.76,0,0.24,1);
}

.abt-why-feat.is-visible .abt-why-feat-bar,
.abt-why-feat:hover .abt-why-feat-bar { width: 100%; }

/* Mobile */
@media (max-width: 767px) {
  .abt-why-feat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }
  .abt-why-feat-num { display: none; }
  .abt-why-feat-icon-ring {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  .abt-why-feat-icon-ring img { width: 44px; height: 44px; }
  .abt-why-feat-body { flex: 1; }
  .abt-why-feat-title { font-size: clamp(1.35rem,5.5vw,1.9rem); }
  .abt-why-feat-desc  { font-size: 12px; max-width: none; }
}

/* ── DIFFERENCE SECTION ───────────────────────────────────────── */
.abt-diff {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.abt-diff-with    { opacity: 0; transform: translateX(-30px); }
.abt-diff-without { opacity: 0; transform: translateX( 30px); }

/* Cell */
.abt-diff-cell {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  transition: border-color 0.3s ease;
}

/* Row number badge */
.abt-diff-row-num {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
  gap: 0.5rem;
}

.abt-diff-row-num::before,
.abt-diff-row-num::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Dot indicators */
.abt-diff-dot {
  flex-shrink: 0;
  margin-top: 0.3em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #BB2649;
  box-shadow: 0 0 6px rgba(187,38,73,0.55);
}

.abt-diff-dot--out {
  background: var(--text-muted);
  box-shadow: none;
  opacity: 0.4;
}

/* Primary rows (first 3) — slightly larger text for hierarchy */
.abt-diff-rows .abt-diff-row:nth-child(-n+3) .abt-diff-cell p {
  font-size: clamp(12px, 1.5vw, 14px);
}

.abt-diff-rows .abt-diff-row:nth-child(-n+3) .abt-diff-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 8px rgba(187,38,73,0.7);
}

/* ── ABOUT CINEMATIC FINALE ───────────────────────────────────── */
/* Reuses .finale-* classes from main.css.
   Only overrides needed for the about-page context.             */

/* The "about" finale uses a different word colour for the deco text */
.abt-finale-section .finale-deco-word {
  -webkit-text-stroke: 1px rgba(187,38,73,0.10);
}

[data-theme="dark"] .abt-finale-section .finale-deco-word {
  -webkit-text-stroke: 1px rgba(187,38,73,0.15);
}

/* ── SplitType char reveal helpers ─────────────────────────────
   Line containers overflow-hide so chars slide in cleanly.     */
.abt-story-heading  .line,
.abt-why-heading    .line,
.abt-diff-heading   .line,
.abt-cta-heading    .line {
  overflow: hidden;
  display: block;
}

.abt-story-heading  .char,
.abt-why-heading    .char,
.abt-diff-heading   .char,
.abt-cta-heading    .char {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

/* ── RESPONSIVE TWEAKS ────────────────────────────────────────── */
@media (max-width: 767px) {
  .abt-hero { min-height: 100svh; }

  .abt-portrait-mask { max-width: 240px; }

  .abt-diff-cell { padding: 0.75rem !important; }

  .abt-diff-dot { width: 6px; height: 6px; margin-top: 0.25em; }

  /* On mobile, remove primary-row size boost */
  .abt-diff-rows .abt-diff-row:nth-child(-n+3) .abt-diff-cell p {
    font-size: 11px;
  }
}

@media (min-width: 1024px) {
  /* Portrait tilt 3D perspective */
  .abt-portrait-wrap { perspective: 900px; }
  .abt-portrait-mask { transform-style: preserve-3d; will-change: transform; }
}
