/* ==========================================================================
   Our Story page
   Alcodex Technologies

   Page-specific styles only — tokens from variables.css, primitives
   (.container, .btn, .sr-only) from main.css. Self-contained, matching
   the pattern used for Solutions / Habitat / IoT Platform.
   ========================================================================== */

.section-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.section-intro {
  max-width: var(--container-max-narrow);
  margin-inline: auto;
  text-align: center;
}

.section-intro p {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------
   Shared reveal (see js/main.js — shared .aq-reveal observer)
   -------------------------------------------------------------------- */

.aq-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-standard), transform 0.7s var(--ease-standard);
}

.aq-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .aq-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------
   Shared genuine-hardware/photo shot card
   -------------------------------------------------------------------- */

.story-shot-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background-color: var(--color-bg);
}

.story-shot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.story-text-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-link);
}

.story-text-link:hover,
.story-text-link:focus-visible {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* --------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------- */

.story-hero {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section-sm);
  background-color: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
}

.story-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-10);
}

@media (min-width: 64rem) {
  .story-hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(var(--space-12), 4vw, var(--space-16));
  }
}

.story-hero-content h1 {
  max-width: 34rem;
}

.story-hero-content p {
  max-width: 36rem;
  margin-top: var(--space-5);
  font-size: var(--text-lg);
}

.story-mvg-item a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.story-mvg-item a:hover,
.story-mvg-item a:focus-visible {
  color: var(--color-link-hover);
}

.story-hero-media {
  max-width: 24rem;
  margin-inline: auto;
}

.story-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 64rem) {
  .story-hero-media {
    max-width: none;
  }
}

/* --------------------------------------------------------------------
   2. Mission / Vision / Goal — premium three-part layout, not cards
   -------------------------------------------------------------------- */

.story-mvg {
  padding-block: var(--space-section-sm);
}

.story-mvg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  max-width: var(--container-max);
  margin-inline: auto;
}

@media (min-width: 56rem) {
  .story-mvg-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .story-mvg-item {
    padding-inline: var(--space-10);
    border-left: 1px solid var(--color-border);
  }

  .story-mvg-item:first-child {
    padding-left: 0;
    border-left: none;
  }

  .story-mvg-item:last-child {
    padding-right: 0;
  }
}

.story-mvg-label {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-brand);
}

.story-mvg-item p {
  font-size: var(--text-lg);
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------
   3. Values
   -------------------------------------------------------------------- */

.story-values {
  padding-block: var(--space-section);
  background-color: var(--color-bg-subtle);
}

.story-values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: var(--container-max-narrow);
  margin: var(--space-12) auto 0;
}

@media (min-width: 40rem) {
  .story-values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

.story-value-card {
  padding: var(--space-6);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.story-value-card:nth-child(2) { transition-delay: 0.06s; }
.story-value-card:nth-child(3) { transition-delay: 0.12s; }
.story-value-card:nth-child(4) { transition-delay: 0.18s; }

.story-value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-brand);
}

.story-value-card h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.story-value-card p {
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------
   4. Our IoT Stack — concise (full Technology Stack lives on the
   homepage; this is a single-image summary with a link out)
   -------------------------------------------------------------------- */

.story-stack {
  padding-block: var(--space-section);
}

.story-stack-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-10);
}

@media (min-width: 56rem) {
  .story-stack-inner {
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(var(--space-12), 4vw, var(--space-16));
  }
}

.story-stack-body p {
  margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------
   5. Trusted By (Key Customers + Partners, compact/static)
   -------------------------------------------------------------------- */

.story-trusted {
  padding-block: var(--space-section);
  background-color: var(--color-bg-subtle);
}

.story-trusted-row {
  margin-top: var(--space-10);
}

.story-trusted-row:first-of-type {
  margin-top: var(--space-12);
}

.story-trusted-label {
  display: block;
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
}

.story-trusted-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-6) var(--space-8);
}

.story-trusted-logos img {
  max-width: 6rem;
  max-height: 2.25rem;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
}

.story-trusted-logos img.story-logo-dark {
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------
   6. Awards & Recognition — stronger visual treatment than the source
   -------------------------------------------------------------------- */

.story-awards {
  padding-block: var(--space-section);
}

.story-awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: var(--container-max);
  margin: var(--space-12) auto 0;
}

@media (min-width: 40rem) {
  .story-awards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 64rem) {
  .story-awards-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.story-award-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: var(--space-6);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-standard), box-shadow 200ms var(--ease-standard);
}

.story-award-card img {
  display: block;
  width: 100%;
  height: auto;
}

.story-award-card:nth-child(2) { transition-delay: 0.05s; }
.story-award-card:nth-child(3) { transition-delay: 0.1s; }
.story-award-card:nth-child(4) { transition-delay: 0.15s; }
.story-award-card:nth-child(5) { transition-delay: 0.2s; }
.story-award-card:nth-child(6) { transition-delay: 0.25s; }

@media (hover: hover) and (pointer: fine) {
  .story-award-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-award-card {
    transition: none;
  }
}

/* --------------------------------------------------------------------
   7. Alliances
   -------------------------------------------------------------------- */

.story-alliances {
  padding-block: var(--space-section);
  background-color: var(--color-bg-subtle);
}

.story-alliances-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  max-width: var(--container-max);
  margin: var(--space-12) auto 0;
}

@media (min-width: 40rem) {
  .story-alliances-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 64rem) {
  .story-alliances-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.story-alliance-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: var(--space-4);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.story-alliance-card:nth-child(2) { transition-delay: 0.04s; }
.story-alliance-card:nth-child(3) { transition-delay: 0.08s; }
.story-alliance-card:nth-child(4) { transition-delay: 0.12s; }
.story-alliance-card:nth-child(5) { transition-delay: 0.16s; }
.story-alliance-card:nth-child(6) { transition-delay: 0.2s; }
.story-alliance-card:nth-child(7) { transition-delay: 0.24s; }

.story-alliance-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------
   8. Media (Videos)
   -------------------------------------------------------------------- */

.story-media {
  padding-block: var(--space-section);
}

.story-media-group {
  margin-top: var(--space-12);
}

.story-media-group:first-of-type {
  margin-top: var(--space-12);
}

.story-media-group + .story-media-group {
  margin-top: var(--space-16);
}

.story-media-group-title {
  margin-bottom: var(--space-6);
  font-size: var(--text-xl);
}

.story-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 40rem) {
  .story-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .story-video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.story-video-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background-color: var(--color-neutral-950);
}

.story-video-play {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.story-video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  transition: transform var(--transition-fast);
}

.story-video-play:hover .story-video-play-icon,
.story-video-play:focus-visible .story-video-play-icon {
  transform: translate(-50%, -50%) scale(1.08);
}

.story-video-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.story-video-title {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .story-video-play-icon {
    transition: none;
  }
}

/* --------------------------------------------------------------------
   9. Gallery
   -------------------------------------------------------------------- */

.story-gallery {
  padding-block: var(--space-section);
  background-color: var(--color-bg-subtle);
}

.story-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-12);
}

@media (min-width: 40rem) {
  .story-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.story-gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.story-gallery-item:nth-child(2) { transition-delay: 0.08s; }
.story-gallery-item:nth-child(3) { transition-delay: 0.16s; }

.story-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 300ms var(--ease-standard);
}

@media (hover: hover) and (pointer: fine) {
  .story-gallery-item:hover img {
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-gallery-item img {
    transition: none;
  }
}

/* --------------------------------------------------------------------
   10. Final CTA
   -------------------------------------------------------------------- */

.story-final-cta {
  padding-block: var(--space-section);
  text-align: center;
  background-color: var(--color-bg-inverse);
}

.story-final-cta h2 {
  color: var(--color-text-inverse);
}

.story-final-cta p {
  max-width: 40rem;
  margin-inline: auto;
  margin-top: var(--space-4);
  margin-bottom: var(--space-8);
  color: var(--color-neutral-400);
  font-size: var(--text-lg);
}
