/* ============================
   ABOUT PAGE — Second Iteration
   
   Section order (7 sections):
   1. Hero (primary bg) — asymmetric split
   2. Values (warm bg) — Matas focus-state unlock
   3. Story (primary bg) — image-led gallery
   4. Personality (warmest bg) — organized mosaic clusters
   5. Highlights (band bg, full-bleed) — teal accent
   6. Why (primary bg) — full-width typographic moment
   7. CTA (primary bg) — warm close, no full story
   ============================ */

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

/* ============================
   SECTION DIVIDERS — Jagged SVG edges
   ============================ */
.section-divider {
  position: relative;
  width: 100%;
  line-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.section-divider__svg {
  display: block;
  width: 100%;
  height: clamp(30px, 4vw, 60px);
}

.section-divider__svg--hero {
  background-color: var(--color-bg-primary);
}

.section-divider__svg--story {
  background-color: var(--color-bg-primary);
}

.section-divider__svg--highlights {
  background-color: var(--color-bg-band);
}

/* ============================
   1. HERO — Asymmetric split (desktop)
   Framed spotlight (mobile)
   Background: primary (#0f0f0f)
   ============================ */
.about-hero {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-xl);
  background-color: var(--color-bg-primary);
}

.about-hero__inner {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Video — left side */
.about-hero__media {
  width: 100%;
}

.about-hero__video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--color-accent-warm);
  background-color: var(--color-bg-secondary);
  aspect-ratio: 16 / 9;
  box-shadow: 0 8px 40px var(--color-accent-warm-muted),
              0 0 0 1px rgba(194, 132, 90, 0.08);
}

.about-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content — right side */
.about-hero__content {
  max-width: 520px;
}

.about-hero__title {
  font-size: var(--text-3xl);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

/* Accent word in headline */
.about-hero__accent {
  color: var(--color-accent-gold);
}

.about-hero__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* CTA */
.about-hero__ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.about-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.about-hero__btn--primary {
  border: 1px solid var(--color-accent-warm);
  color: var(--color-accent-warm);
}

.about-hero__btn--primary:hover {
  background-color: var(--color-accent-warm);
  color: var(--color-bg-primary);
}

/* ============================
   2. VALUES — Depth-stack carousel
   Background: warm (#141312)
   ============================ */
.values {
  background-color: var(--color-bg-warm);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}

.values__heading {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.values__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

/* ── Carousel container ── */
.values-carousel {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Viewport: fixed-height window for cards ── */
.values-carousel__viewport {
  position: relative;
  height: 200px;
  perspective: 1200px;
  overflow: visible;
}

/* ── Track: holds positioned cards ── */
.values-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── Individual carousel card ── */
.values-carousel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  padding: var(--space-lg) var(--space-xl);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transform: translate(-50%, -50%)
             translateX(var(--card-tx, 0px))
             scale(var(--card-scale, 0.72));
  opacity: var(--card-opacity, 0.44);
  z-index: var(--card-z, 1);
  transition: transform var(--duration-normal) var(--ease-out-expo),
              opacity var(--duration-normal) var(--ease-out-expo),
              border-color var(--duration-normal) ease,
              background-color var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease;
  will-change: transform, opacity;
  pointer-events: auto;
}

.values-carousel__card.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.values-carousel__card.is-dragging {
  transition: none;
}

.values-carousel__card:focus-visible {
  outline: 2px solid var(--color-accent-warm);
  outline-offset: 2px;
}

/* Active (center) card */
.values-carousel__card.is-center {
  border-left-color: var(--color-accent-warm);
  background-color: var(--color-bg-elevated);
  box-shadow: 0 8px 32px rgba(194, 132, 90, 0.12),
              0 0 0 1px rgba(194, 132, 90, 0.06);
}

/* Card inner elements */
.values-carousel__number {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  margin-bottom: var(--space-xs);
  display: block;
  transition: color var(--duration-normal) ease;
}

.values-carousel__card.is-center .values-carousel__number {
  color: var(--color-accent-warm);
}

.values-carousel__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.values-carousel__card.is-center .values-carousel__title {
  font-size: var(--text-xl);
}

.values-carousel__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0;
  opacity: var(--card-tagline-opacity, 0);
  max-height: var(--card-tagline-height, 0);
  overflow: hidden;
  transition: opacity var(--duration-normal) var(--ease-out-expo),
              max-height var(--duration-normal) var(--ease-out-expo);
}

/* ── Navigation arrows ── */
.values-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-fast) ease;
}

.values-carousel__nav:hover:not(:disabled) {
  border-color: var(--color-accent-warm);
  color: var(--color-accent-warm);
  background-color: var(--color-bg-elevated);
}

.values-carousel__nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.values-carousel__nav--prev {
  left: -60px;
}

.values-carousel__nav--next {
  right: -60px;
}

/* ── Dot indicators ── */
.values-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.values-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--duration-fast) ease;
}

.values-carousel__dot:hover {
  border-color: var(--color-text-muted);
}

.values-carousel__dot--active {
  background-color: var(--color-accent-warm);
  border-color: var(--color-accent-warm);
  transform: scale(1.3);
}

/* ── Reading region: detail panels below carousel ── */
.values__reading-region {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--duration-slow) var(--ease-out-expo),
              opacity var(--duration-normal) var(--ease-out-expo);
}

.values__reading-region.is-open {
  max-height: 500px;
  opacity: 1;
  margin-top: var(--space-xl);
}

/* Individual detail panel */
.values__detail {
  display: none;
}

.values__detail--active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-lg);
  background-color: var(--color-bg-elevated);
  border-left: 3px solid var(--color-accent-warm);
  border-radius: 8px;
  animation: detailFadeIn var(--duration-normal) var(--ease-out-expo);
}

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

.values__detail-media {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.values__detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.values__detail-quote {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  color: var(--color-accent-gold);
  line-height: 1.4;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent-warm);
}

.values__detail-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Reduced motion: instant transitions */
@media (prefers-reduced-motion: reduce) {
  .values-carousel__card,
  .values-carousel__tagline,
  .values__reading-region {
    transition-duration: 0ms;
  }

  .values__detail--active {
    animation: none;
  }
}

/* ============================
   3. STORY — Image-led gallery narrative
   Background: primary (#0f0f0f)
   ============================ */
.story {
  background-color: var(--color-bg-primary);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-2xl);
}

.story__heading {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.story__aside {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
}

/* ── Pillar: image + text pair ── */
.story__pillar {
  margin-bottom: var(--space-2xl);
}

.story__pillar:last-child {
  margin-bottom: 0;
}

/* Pillar A: image left, text right */
.story__pillar--left {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Pillar C: image right, text left (mirror) */
.story__pillar--right {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Pillar B: full-width center */
.story__pillar--center {
  text-align: center;
}

/* Image treatment */
.story__pillar-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.story__pillar-media--full {
  width: 100%;
  aspect-ratio: 21 / 9;
}

.story__pillar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(194, 132, 90, 0.08);
}

/* Pull quote overlay on center pillar image */
.story__pillar-overlay-quote {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(to top, rgba(15, 15, 15, 0.9) 0%, transparent 100%);
  border-radius: 0 0 8px 8px;
}

.story__pillar-overlay-quote p {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-accent-gold);
  font-style: italic;
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
}

/* Text content */
.story__pillar-content {
  max-width: none;
}

.story__pillar-content--center {
  max-width: 680px;
  margin: var(--space-lg) auto 0;
  text-align: left;
}

.story__lead-line {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.story__pillar-content p:not(.story__lead-line) {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.85;
}

/* Right-aligned pillar text */
.story__pillar--right .story__pillar-content {
  text-align: right;
}

/* ============================
   4. PERSONALITY — Organized mosaic clusters
   Background: warmest (#181614)
   ============================ */
.personality {
  background-color: var(--color-bg-warmest);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.personality__heading {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

/* Cluster grouping */
.personality__cluster {
  margin-bottom: var(--space-xl);
}

.personality__cluster:last-child {
  margin-bottom: 0;
}

.personality__cluster-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}

.personality__cluster-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Individual items */
.personality__item {
  flex: 1 1 220px;
  max-width: 340px;
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--color-border);
  transition: border-color var(--duration-fast) ease;
}

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

/* Project items get accent border */
.personality__item--project {
  border-left-color: var(--color-accent-warm);
  position: relative;
}

.personality__item--project:hover {
  border-left-color: var(--color-accent-warm);
}

.personality__item--project .status-badge {
  margin-top: var(--space-xs);
}

/* Accent items */
.personality__item--accent {
  border-left-color: var(--color-accent-warm);
}

.personality__item--accent:hover {
  border-left-color: var(--color-accent-warm);
}

.personality__label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.personality__value {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================
   5. HIGHLIGHTS — Full-bleed stat band
   Background: band (#1c1917) + teal accent
   ============================ */
.highlights {
  background-color: var(--color-bg-band);
  padding: var(--space-3xl) var(--section-padding-x);
  border-top: 3px solid var(--color-accent-teal);
}

.highlights__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.highlights__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.highlights__stat {
  text-align: center;
  padding: var(--space-sm) 0;
}

.highlights__number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 2rem + 5vw, 7rem);
  font-weight: 700;
  color: var(--color-accent-warm);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.highlights__label {
  font-size: var(--text-sm);
  color: var(--color-accent-teal);
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto;
}

/* ============================
   6. WHY — Full-width typographic moment
   Background: primary (#0f0f0f)
   ============================ */
.why {
  background-color: var(--color-bg-primary);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.why__inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.why__quote {
  margin-bottom: var(--space-xl);
  position: relative;
}

/* Decorative accent quotation marks */
.why__quote-mark {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 2rem + 4vw, 6rem);
  font-weight: 700;
  color: var(--color-accent-gold);
  line-height: 0.5;
  opacity: 0.5;
  user-select: none;
}

.why__quote-mark--close {
  text-align: right;
  margin-top: var(--space-md);
}

.why__quote p {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.2rem + 4vw, 5rem);
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding: var(--space-md) 0;
}

.why__coda {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  font-style: italic;
}

/* ============================
   7. CTA — Warm closing (no full story)
   Background: primary (#0f0f0f)
   ============================ */
.about-cta {
  background-color: var(--color-bg-primary);
  text-align: center;
  padding-top: var(--space-3xl);
}

.about-cta__title {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.about-cta__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.about-cta__actions {
  margin-bottom: var(--space-2xl);
}

/* Say hi — warm accent link */
.about-cta__sayhi {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-accent-warm);
  border-bottom: 2px solid var(--color-accent-warm);
  transition: border-color var(--duration-fast) ease,
              color var(--duration-fast) ease;
  padding-bottom: 4px;
}

.about-cta__sayhi:hover {
  color: var(--color-accent-gold);
  border-bottom-color: var(--color-accent-gold);
}

/* ============================
   RESPONSIVE
   ============================ */

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {

  /* Hero: switch to framed spotlight (vertical stack) */
  .about-hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-hero__content {
    order: -1;
    max-width: 100%;
  }

  .about-hero__title {
    font-size: var(--text-2xl);
  }

  .about-hero__subtitle {
    font-size: var(--text-sm);
  }

  .about-hero__ctas {
    justify-content: center;
  }

  /* Values carousel: mobile */
  .values-carousel__viewport {
    height: 175px;
  }

  .values-carousel__card {
    width: 220px;
    padding: var(--space-md) var(--space-lg);
  }

  .values-carousel__card.is-center .values-carousel__title {
    font-size: var(--text-lg);
  }

  .values-carousel__nav {
    display: none;
  }

  .values__detail--active {
    grid-template-columns: 1fr;
  }

  .values__detail-media {
    max-height: 200px;
  }

  /* Story: all pillars stack to single column */
  .story__pillar--left,
  .story__pillar--right {
    grid-template-columns: 1fr;
  }

  .story__pillar--right .story__pillar-content {
    text-align: left;
    order: 2;
  }

  .story__pillar--right .story__pillar-media {
    order: 1;
  }

  .story__lead-line {
    font-size: var(--text-lg);
  }

  /* Personality: items stack more */
  .personality__item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* Highlights: 2 col */
  .highlights__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .highlights__number {
    font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  }

  /* Why: smaller quote */
  .why__quote p {
    font-size: var(--text-2xl);
  }

  .why__quote-mark {
    font-size: clamp(2rem, 1.5rem + 3vw, 4rem);
  }

  /* CTA */
  .about-cta__title {
    font-size: var(--text-xl);
  }

  /* Dividers: shorter */
  .section-divider__svg {
    height: 24px;
  }
}

/* Tablets (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {

  /* Hero: 50/50 split */
  .about-hero__inner {
    grid-template-columns: 1fr 1fr;
  }

  /* Personality: 2-col items */
  .personality__item {
    flex: 1 1 calc(50% - var(--space-md));
    max-width: calc(50% - var(--space-md));
  }

  /* Highlights: 2 col */
  .highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Story: slightly reduced image proportion */
  .story__pillar--left {
    grid-template-columns: 1fr 1fr;
  }

  .story__pillar--right {
    grid-template-columns: 1fr 1fr;
  }
}
