/* ============================================================
   GALMAVECA — About page stylesheet
   Loaded after styles.css. Sections:
     1. About hero (sharp map right, gradient band left)
     2. Our history (horizontal timeline + photo row)
     3. What sets us apart (cards on soft gray)
     4. Mission (full-bleed office photo under a navy wash)

   Motion is driven by assets/js/about.js, which adds
   .is-revealed / .is-in and writes the hero parallax transform.
   Every animated element has a readable resting state under
   prefers-reduced-motion.
   ============================================================ */


/* ============================================================
   1. ABOUT HERO — the map reads sharp; only the left band is
   darkened, so the text sits on navy and the map stays clean.
   ============================================================ */
.about-hero {
  position: relative;
  height: 100vh;
  max-height: 900px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary-deep);
  color: var(--color-on-emphasis);
  padding-block: var(--space-12);
}

/* Map layer — 70% of the width, hanging off the right and bottom
   edges so it crops instead of fitting. JS writes the transform. */
.about-hero__bg {
  position: absolute;
  top: 0;
  right: -12%;
  width: 72%;
  height: 100%;
  z-index: 0;
  will-change: transform;
}

/* `contain` rather than `cover`: the three markers (Houston at
   404,301 — Monagas at 535,388 — Argentina at 554,577 on the
   980x700 viewBox) must all stay inside the frame, and cover
   cropped Argentina off the bottom. */
/* Dimmed and slightly desaturated so the pale landmass sits inside
   the navy instead of fighting the copy. The effect is on the image
   only — the scrim and the text keep their own contrast. */
.about-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.6;
  filter: brightness(0.9) saturate(0.9);
}

/* Legibility band — left side only */
.about-hero__scrim {
  position: absolute;
  inset: 0 auto 0 0;
  width: 65%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    #0a1f33 0%,
    #0a1f33 38%,
    transparent 62%);
}

.about-hero__inner {
  position: relative;
  z-index: 2;
}

.about-hero__copy {
  max-width: 45%;
}

/* --- Staggered intro: pills, title, paragraph, closing --- */
.about-hero__copy > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-hero__copy.is-revealed > * {
  opacity: 1;
  transform: none;
}

.about-hero__copy.is-revealed > *:nth-child(1) { transition-delay: 0ms; }
.about-hero__copy.is-revealed > *:nth-child(2) { transition-delay: 100ms; }
.about-hero__copy.is-revealed > *:nth-child(3) { transition-delay: 200ms; }
.about-hero__copy.is-revealed > *:nth-child(4) { transition-delay: 300ms; }

/* --- Milestones — two dated stops, read as brand data, not buttons --- */
.about-hero__milestones {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0 0 var(--space-8);
  padding: 0;
}

.about-milestone {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.about-milestone__flag {
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-milestone__flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.about-milestone__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.about-milestone__label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-light);
}

.about-milestone__year {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--color-accent);
}

.about-milestone__place {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.about-milestone__arrow {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(217, 122, 27, 0.5);
  transition: transform var(--transition-base);
}

.about-hero__title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
  color: var(--color-white);
  margin: 0;
}

.about-hero__accent {
  color: var(--color-accent);
}

.about-hero__text {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.85);
  max-width: 100%;
  margin: var(--space-6) 0 0;
}

/* Closing line — orange, semibold, one sentence per line */
.about-hero__closing {
  margin: var(--space-8) 0 0;
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-accent);
  max-width: 100%;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  letter-spacing: var(--tracking-snug);
  color: var(--color-accent-light);
}

.about-hero__closing span {
  display: block;
}

/* Tablet — the copy needs more of the width than 45% */
@media (max-width: 1023px) {
  .about-hero__copy {
    max-width: 62%;
  }

  .about-hero__scrim {
    width: 82%;
  }
}

/* Mobile — no parallax, map recedes behind a full-width wash */
@media (max-width: 767px) {
  .about-hero {
    height: auto;
    max-height: none;
    min-height: auto;
    padding-block: var(--space-16) var(--space-20);
  }

  .about-hero__bg {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
  }

  .about-hero__bg img {
    object-fit: cover;
    object-position: center right;
    opacity: 0.4;
  }

  .about-hero__scrim {
    width: 100%;
    background: linear-gradient(90deg,
      rgba(10, 31, 51, 0.96) 0%,
      rgba(10, 31, 51, 0.9) 50%,
      rgba(10, 31, 51, 0.72) 100%);
  }

  .about-hero__copy {
    max-width: 100%;
  }

  .about-hero__milestones {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  /* the same glyph, pointing down */
  .about-milestone__arrow {
    transform: rotate(90deg);
    margin-left: 14px;
  }
}


/* ============================================================
   2. OUR HISTORY — horizontal timeline, then a row of photos
   ============================================================ */
.about-history {
  background-color: var(--color-bg);
}

.about-history__title {
  color: var(--color-heading);
  margin: 0;
}

/* --- Timeline --- */
.about-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
  margin: 0 0 var(--space-16);
  padding: 0;
  list-style: none;
}

/* The rule runs through both markers */
.about-timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent);
}

.about-timeline__item {
  position: relative;
}

.about-timeline__dot {
  display: block;
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.about-timeline__year {
  display: block;
  margin-top: var(--space-6);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1;
  color: var(--color-accent);
}

.about-timeline__place {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-heading);
}

.about-timeline__text {
  margin-top: var(--space-5);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 52ch;
}

/* --- Photo row — four equal verticals --- */
.about-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-gallery__item {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-soft-surface);
  aspect-ratio: 3 / 4;

  /* Resting state for the scroll-in; JS adds .is-in with a stagger */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-gallery__item.is-in {
  opacity: 1;
  transform: none;
}

.about-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.about-gallery__item:hover img {
  transform: scale(1.04);
}

/* Mobile — timeline stacks under a vertical rule, photos scroll.
   The negative margin ends exactly at the viewport edge (it cancels
   the container padding), so the page never scrolls sideways. */
@media (max-width: 767px) {
  .about-timeline {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
  }

  .about-timeline::before {
    top: 6px;
    bottom: 6px;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .about-timeline__item {
    padding-left: var(--space-10);
  }

  .about-timeline__dot {
    position: absolute;
    top: 6px;
    left: 0;
  }

  .about-timeline__year {
    margin-top: 0;
  }

  .about-gallery {
    display: flex;
    grid-template-columns: none;
    gap: var(--space-4);
    margin-inline: calc(var(--space-5) * -1);
    padding-inline: var(--space-5);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .about-gallery::-webkit-scrollbar { display: none; }

  .about-gallery__item {
    flex: 0 0 64%;
    max-width: 260px;
    scroll-snap-align: start;
  }
}


/* ============================================================
   3. WHAT SETS US APART — soft gray band, three cards
   ============================================================ */
.about-diff {
  background-color: var(--color-bg-soft-surface);
}

.about-diff__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.about-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-8);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);

  /* Top stripe via inset shadow — no layout shift when hover thickens it */
  box-shadow: inset 0 3px 0 var(--color-card-stripe);
  transition: transform 300ms ease, border-color 400ms ease-out, box-shadow 400ms ease-out;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--shadow-rgb), 0.12);
  box-shadow: inset 0 4px 0 var(--color-card-stripe),
              0 12px 28px rgba(var(--shadow-rgb), 0.10);
}

.about-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  background-color: var(--color-accent-tint);
  border-radius: var(--radius-md);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 400ms ease;
}

.about-card:hover .about-card__icon {
  transform: scale(1.05);
  background-color: var(--color-accent-tint-strong);
}

.about-card__icon svg {
  width: 24px;
  height: 24px;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-card:hover .about-card__icon svg {
  transform: rotate(-5deg);
}

.about-card__title {
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  line-height: 1.25;
  color: var(--color-heading);
  margin: 0;
}

.about-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin: 0;
  max-width: none;
}

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


/* ============================================================
   4. MISSION — full-width office photo under a navy wash
   ============================================================ */
.about-mission {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 640px;
  padding-block: var(--space-20);
  background-image: url('assets/img/about-office.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-primary-deep);
  color: var(--color-on-emphasis);
}

.about-mission::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(10, 31, 51, 0.95) 0%,
    rgba(10, 31, 51, 0.75) 40%,
    rgba(10, 31, 51, 0.15) 100%);
}

/* Warm hairline that keeps this band from merging into the navy CTA */
.about-mission::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg,
    var(--color-accent) 0%,
    var(--color-accent-light) 50%,
    var(--color-accent) 100%);
}

.about-mission__inner {
  position: relative;
  z-index: 1;
}

.about-mission__statement {
  position: relative;
  max-width: 620px;
  margin: 0;
  padding-top: var(--space-6);
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  font-weight: var(--weight-semibold);
  font-style: normal;
  letter-spacing: var(--tracking-tight);
  line-height: 1.3;
  color: var(--color-white);
}

/* Orange rule above the statement */
.about-mission__statement::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
}

/* --- Location card --- */
.about-location {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  max-width: 420px;
  margin-top: var(--space-8);
  padding: var(--space-5);
  background-color: var(--color-bg-soft-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

/* Fixed box, so the card keeps its shape whatever the image does */
.about-location__thumb {
  display: block;
  width: 110px;
  height: 110px;
  overflow: hidden;
  border-radius: 10px;
  background-color: #e6e9ee;
}

.about-location__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.about-location__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.about-location__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}

.about-location__address {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.about-location__address span {
  display: block;
}

.about-location__link {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.about-location__link:hover,
.about-location__link:focus-visible {
  color: #b86413;
}

@media (max-width: 767px) {
  .about-mission {
    min-height: 420px;
    padding-block: var(--space-16);
  }

  /* Full width, still two columns — 110px + text fits from ~330px up */
  .about-location {
    max-width: 100%;
  }
}

/* Only when the two columns genuinely stop fitting: image on top */
@media (max-width: 359px) {
  .about-location {
    grid-template-columns: 1fr;
  }

  .about-location__thumb {
    width: 100%;
    height: 140px;
  }

  .about-mission::before {
    background: linear-gradient(90deg,
      rgba(10, 31, 51, 0.97) 0%,
      rgba(10, 31, 51, 0.92) 50%,
      rgba(10, 31, 51, 0.78) 100%);
  }
}


/* ============================================================
   5. REDUCED MOTION — everything at rest, nothing hidden
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .about-hero__bg {
    transform: none !important;
    transition: none !important;
  }

  .about-hero__copy > *,
  .about-gallery__item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
  }

  .about-card,
  .about-card__icon,
  .about-card__icon svg,
  .about-gallery__item img {
    transition: none !important;
  }

  .about-card:hover,
  .about-card:hover .about-card__icon,
  .about-card:hover .about-card__icon svg,
  .about-gallery__item:hover img {
    transform: none;
  }
}
