/* ==========================================================================
   About Page — Content section styles (loaded only on /about)
   All classes prefixed with `abt-`
   ========================================================================== */

/* ── Anchor Offset ── */
.sticky-tab-section[id] {
  scroll-margin-top: var(--nav-height, 72px);
}

/* ── Alternating section backgrounds (dark mode) ── */
html:not([data-theme="light"]) .sticky-tab-section#origin,
html:not([data-theme="light"]) .sticky-tab-section#global-reach,
html:not([data-theme="light"]) .sticky-tab-section#delivery {
  background: #1B2F2B;
}

/* ==========================================================================
   S1: HERO
   ========================================================================== */
.abt-hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.abt-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.abt-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 18, 18, 0.7) 0%,
    rgba(0, 18, 18, 0.5) 50%,
    rgba(0, 18, 18, 0.85) 100%
  );
  z-index: 1;
}

html[data-theme="light"] .abt-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 18, 18, 0.35) 0%,
    rgba(0, 18, 18, 0.15) 50%,
    rgba(0, 18, 18, 0.55) 100%
  );
}

/* Keep hero text white in light mode since overlay is dark */
html[data-theme="light"] .abt-hero-headline,
html[data-theme="light"] .abt-hero-sub {
  color: #FFFFFF;
}

html[data-theme="light"] .abt-hero-headline .headline-gradient {
  color: #025EC4;
}

.abt-hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 700px;
  padding: 0 3rem;
}

.abt-hero .eyebrow {
  margin-bottom: 16px;
}

.abt-hero-headline {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text-bright);
  margin-bottom: 20px;
}

.abt-hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.abt-hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.abt-hero .scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* ==========================================================================
   SHARED CONTENT INNER
   ========================================================================== */
.abt-content-inner {
  max-width: var(--section-max-width, 1400px);
  margin: 0 auto;
}

.abt-section-desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 48px;
}

/* ==========================================================================
   S3: ORIGIN STORY
   ========================================================================== */
.abt-prose {
  max-width: 700px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.abt-prose p + p {
  margin-top: 1.5em;
}

.abt-prose strong {
  color: var(--text-bright);
  font-weight: 600;
}

/* Ishoni grid */
.abt-ishoni-grid {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  background: var(--bg-secondary);
  transition: var(--theme-transition);
}

.abt-ishoni-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 28px;
}

.abt-ishoni-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.abt-ishoni-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
  transition: var(--theme-transition);
  text-align: center;
}

/* Logo image container — fixed height band for consistent alignment */
.abt-ishoni-img-wrap {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.abt-ishoni-img {
  max-height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Theme-swapped logos: show dark variant by default, light on light theme */
.abt-ishoni-img--light { display: none; }
.abt-ishoni-img--dark { display: block; }
[data-theme="light"] .abt-ishoni-img--light { display: block; }
[data-theme="light"] .abt-ishoni-img--dark { display: none; }

.abt-ishoni-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.abt-ishoni-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.abt-ishoni-acquired {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.abt-ishoni-philips-logo {
  height: 22px;
  width: auto;
  vertical-align: middle;
}

/* ==========================================================================
   S4: NETWORKING DNA
   ========================================================================== */
.abt-dna-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.abt-dna-card {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-secondary);
  transition: var(--theme-transition), transform 0.3s ease, box-shadow 0.3s ease;
}

.abt-dna-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.abt-dna-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gradient-primary);
  margin-bottom: 20px;
  color: #fff;
}

.abt-dna-icon svg,
.abt-dna-icon i {
  width: 24px;
  height: 24px;
}

.abt-dna-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.abt-dna-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   S5: GLOBAL REACH — COBE GLOBE
   ========================================================================== */
.abt-globe-section {
  position: relative;
  max-width: 790px;
  margin: 0 auto;
  padding: 60px 0;
  text-align: center;
}

.abt-globe-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, rgba(120, 175, 46, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .abt-globe-glow {
  background: radial-gradient(circle, rgba(2, 94, 196, 0.06) 0%, transparent 70%);
}

/* Globe + labels container */
.abt-globe-container {
  position: relative;
}

.abt-globe-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  cursor: grab;
  opacity: 0;
  transition: opacity 1s ease;
  touch-action: none;
}

.abt-globe-canvas:active {
  cursor: grabbing;
}

/* Location labels — CSS Anchor Positioning (COBE sets anchors per marker id) */
.abt-globe-label {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.35rem 0.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  min-width: 60px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  transition: opacity 0.4s, filter 0.4s;
  /* Positioned by CSS Anchor Positioning — anchor set by COBE */
  bottom: anchor(top);
  left: anchor(center);
  translate: -50% 0;
  margin-bottom: 8px;
}

/* Labels positioned below their pin */
.abt-globe-label--below {
  bottom: auto;
  top: anchor(bottom);
  margin-bottom: 0;
  margin-top: 8px;
}

/* Labels positioned to the right of their pin */
.abt-globe-label--right {
  bottom: auto;
  top: anchor(center);
  left: anchor(right);
  translate: 0 -50%;
  margin-bottom: 0;
  margin-left: 8px;
}

/* Labels positioned to the left of their pin */
.abt-globe-label--left {
  bottom: auto;
  top: anchor(center);
  left: auto;
  right: anchor(left);
  translate: 0 -50%;
  margin-bottom: 0;
  margin-right: 8px;
}

/* Per-marker CSS Anchor Positioning + steep visibility fade
   Labels only fully visible when marker is very near front-center (>0.85),
   invisible below 0.7. This keeps ~3-4 visible at a time. */
.abt-globe-label[data-marker="northwest"]  { position-anchor: --cobe-northwest;  opacity: clamp(0, calc((var(--cobe-visible-northwest, 0) - 0.7) * 6), 1);  filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-northwest, 0) - 0.7) * 6), 1) * 5px)); }
.abt-globe-label[data-marker="houston"]    { position-anchor: --cobe-houston;    opacity: clamp(0, calc((var(--cobe-visible-houston, 0) - 0.7) * 6), 1);    filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-houston, 0) - 0.7) * 6), 1) * 5px)); }
.abt-globe-label[data-marker="peninsula"]  { position-anchor: --cobe-peninsula;  opacity: clamp(0, calc((var(--cobe-visible-peninsula, 0) - 0.7) * 6), 1);  filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-peninsula, 0) - 0.7) * 6), 1) * 5px)); }
.abt-globe-label[data-marker="paris"]      { position-anchor: --cobe-paris;      opacity: clamp(0, calc((var(--cobe-visible-paris, 0) - 0.8) * 8), 1);      filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-paris, 0) - 0.8) * 8), 1) * 5px)); }
.abt-globe-label[data-marker="germany"]    { position-anchor: --cobe-germany;    opacity: clamp(0, calc((var(--cobe-visible-germany, 0) - 0.8) * 8), 1);    filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-germany, 0) - 0.8) * 8), 1) * 5px)); }
.abt-globe-label[data-marker="rome"]       { position-anchor: --cobe-rome;       opacity: clamp(0, calc((var(--cobe-visible-rome, 0) - 0.8) * 8), 1);       filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-rome, 0) - 0.8) * 8), 1) * 5px)); }
.abt-globe-label[data-marker="beijing"]    { position-anchor: --cobe-beijing;    opacity: clamp(0, calc((var(--cobe-visible-beijing, 0) - 0.7) * 6), 1);    filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-beijing, 0) - 0.7) * 6), 1) * 5px)); }
.abt-globe-label[data-marker="taipei"]     { position-anchor: --cobe-taipei;     opacity: clamp(0, calc((var(--cobe-visible-taipei, 0) - 0.7) * 6), 1);     filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-taipei, 0) - 0.7) * 6), 1) * 5px)); }
.abt-globe-label[data-marker="amritsar"]   { position-anchor: --cobe-amritsar;   opacity: clamp(0, calc((var(--cobe-visible-amritsar, 0) - 0.7) * 6), 1);   filter: blur(calc(clamp(0, calc(1 - (var(--cobe-visible-amritsar, 0) - 0.7) * 6), 1) * 5px)); }

.abt-globe-label-city {
  font-family: 'Geist Mono', monospace;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.abt-globe-label-company {
  font-family: 'Geist', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-primary);
}

.abt-globe-caption {
  margin-top: 20px;
  font-family: 'Geist', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.abt-globe-fallback {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   S7: PROVEN DELIVERY
   ========================================================================== */
.abt-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

/* Theme-swapped delivery logos */
.abt-delivery-img--light { display: none; }
.abt-delivery-img--dark { display: block; }
[data-theme="light"] .abt-delivery-img--light { display: block; }
[data-theme="light"] .abt-delivery-img--dark { display: none; }

.abt-delivery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-secondary);
  transition: var(--theme-transition), transform 0.3s ease;
}

.abt-delivery-card:hover {
  transform: translateY(-4px);
}

.abt-delivery-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin-bottom: 16px;
}

.abt-delivery-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.7);
  transition: filter 0.3s ease;
}

.abt-delivery-card:hover .abt-delivery-logo img {
  filter: brightness(0) invert(1) opacity(1);
}

/* Keep SGPC/Heritage logo in full color on both themes */
.abt-delivery-card--color .abt-delivery-logo img {
  filter: none !important;
  opacity: 1;
}

.abt-delivery-industry {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   LIGHT MODE OVERRIDES
   ========================================================================== */

html[data-theme="light"] .sticky-tab-section#origin,
html[data-theme="light"] .sticky-tab-section#global-reach,
html[data-theme="light"] .sticky-tab-section#delivery {
  background: #E8F0EA;
}

html[data-theme="light"] .abt-dna-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .abt-delivery-logo img {
  filter: brightness(0) opacity(0.5);
}

html[data-theme="light"] .abt-delivery-card:hover .abt-delivery-logo img {
  filter: brightness(0) opacity(1);
}

/* ==========================================================================
   RESPONSIVE — TABLET (max-width: 1023px)
   ========================================================================== */
@media (max-width: 1023px) {

  .abt-hero {
    min-height: 70vh;
  }

  .abt-ishoni-logos {
    grid-template-columns: repeat(2, 1fr);
  }

  .abt-dna-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ==========================================================================
   RESPONSIVE — MOBILE (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {

  .abt-hero {
    min-height: 60vh;
  }

  .abt-hero-content {
    padding: 0 1rem;
  }

  .abt-hero-headline {
    letter-spacing: -1px;
  }

  .abt-hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .abt-content-inner {
    padding: 0 1.5rem;
  }

  /* Smaller labels on mobile + tighter visibility */
  .abt-globe-label {
    font-size: 0.8em;
    padding: 0.2rem 0.35rem;
    min-width: 50px;
  }

  /* European labels extra tight on mobile */
  .abt-globe-label[data-marker="paris"],
  .abt-globe-label[data-marker="germany"],
  .abt-globe-label[data-marker="rome"] {
    opacity: clamp(0, calc((var(--cobe-visible-paris, 0) - 0.9) * 10), 1) !important;
  }
  .abt-globe-label[data-marker="germany"] {
    opacity: clamp(0, calc((var(--cobe-visible-germany, 0) - 0.9) * 10), 1) !important;
  }
  .abt-globe-label[data-marker="rome"] {
    opacity: clamp(0, calc((var(--cobe-visible-rome, 0) - 0.9) * 10), 1) !important;
  }

  /* Globe bigger on mobile — fill the screen */
  .abt-globe-section {
    padding: 30px 0;
  }

  .abt-globe-container {
    margin: 0 -1rem;
  }

  .abt-prose {
    font-size: 16px;
  }

  .abt-ishoni-grid {
    padding: 24px 16px;
  }

  .abt-ishoni-logos {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .abt-dna-grid {
    grid-template-columns: 1fr;
  }

  .abt-dna-card {
    padding: 24px 20px;
  }

  .abt-delivery-grid {
    gap: 12px;
  }

  .abt-delivery-card {
    padding: 24px 12px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

  .abt-hero-bg {
    animation: none;
  }

  .abt-dna-card,
  .abt-delivery-card {
    transition: none;
  }
}
