/* ===============================================================
   JP EXPRESS — OUR-STORY PAGE STYLES
   File: css/pages/our-story.css
   Page isolation: html.page-our-story
   =============================================================== */

/* ============================================================
   01. PAGE FOUNDATION
   ============================================================ */
.page-our-story .our-story-page {
  --story-navy: #1b286b;
  --story-blue: #2b3990;
  --story-orange: #f26323;
  --story-ink: #182653;
  --story-muted: #65748d;
  --story-line: #e4eaf3;
  --story-surface: #f6f8fc;
  --story-white: #ffffff;

  color: var(--story-ink);
  background: var(--story-white);
  overflow: clip;
}

.page-our-story .story-section {
  position: relative;
  padding: 80px 0;
}

.page-our-story .story-section:nth-child(even) {
  background: var(--story-surface);
}

.page-our-story .story-label {
  display: block;
  margin-bottom: 10px;
  color: var(--story-orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-our-story .story-section h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.75rem, 3.3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--story-ink);
  margin: 0 0 16px;
}

.page-our-story .story-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--story-muted);
  margin: 0 0 1em;
}

.page-our-story .story-center-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px;
}

/* ============================================================
   02. SPLIT LAYOUT (Intro, Promise)
   ============================================================ */
.page-our-story .story-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.page-our-story .story-split.reverse .story-media {
  order: -1;
}

.page-our-story .story-media {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(27, 40, 107, 0.15);
}

.page-our-story .story-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.page-our-story .story-media:hover .story-img {
  transform: scale(1.03);
}

@media (min-width: 992px) {
  .page-our-story .story-split {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

/* ============================================================
   03. TIMELINE
   ============================================================ */
.page-our-story .story-timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.page-our-story .timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 30px;
}

.page-our-story .timeline-item:last-child {
  padding-bottom: 0;
}

.page-our-story .timeline-dot {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--story-white);
  border: 4px solid var(--story-orange);
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.page-our-story .timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--story-line);
}

.page-our-story .timeline-date {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--story-orange);
  margin-bottom: 4px;
}

.page-our-story .timeline-content h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--story-ink);
  margin: 0 0 6px;
}

.page-our-story .timeline-content p {
  margin: 0;
}

/* ============================================================
   04. MISSION / VISION / VALUES
   ============================================================ */
.page-our-story .mv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.page-our-story .mv-card {
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--story-line);
  background: var(--story-white);
  text-align: center;
}

.page-our-story .mv-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(242, 99, 35, 0.1);
  color: var(--story-orange);
  font-size: 24px;
}

.page-our-story .mv-card h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.page-our-story .values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.page-our-story .value-item {
  padding: 24px 16px;
  border-radius: 12px;
  background: var(--story-white);
  border: 1px solid var(--story-line);
  text-align: center;
}

.page-our-story .value-item i {
  font-size: 24px;
  color: var(--story-orange);
  margin-bottom: 12px;
}

.page-our-story .value-item h4 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-our-story .value-item p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .page-our-story .mv-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-our-story .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   05. PROCESS (How it works)
   ============================================================ */
.page-our-story .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.page-our-story .process-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--story-white);
  border: 1px solid var(--story-line);
  border-radius: 14px;
}

.page-our-story .process-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--story-orange);
  color: var(--story-white);
  font-size: 20px;
}

.page-our-story .process-content h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-our-story .process-content p {
  margin: 0;
}

/* ============================================================
   06. PEOPLE & CAPABILITIES
   ============================================================ */
.page-our-story .people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.page-our-story .person-card {
  padding: 24px 16px;
  border-radius: 12px;
  background: var(--story-white);
  border: 1px solid var(--story-line);
  text-align: center;
}

.page-our-story .person-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--story-surface);
  color: var(--story-blue);
  font-size: 18px;
}

.page-our-story .person-card h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-our-story .person-card p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .page-our-story .people-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   07. CLOSING CTA
   ============================================================ */
.page-our-story .story-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 50px);
  border-radius: 20px;
  color: var(--story-white);
  background: linear-gradient(135deg, var(--story-navy), var(--story-blue));
  box-shadow: 0 25px 60px rgba(27, 40, 107, 0.2);
  text-align: center;
}

.page-our-story .story-cta h2 {
  color: var(--story-white);
  margin-bottom: 12px;
}

.page-our-story .story-cta p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto 24px;
}

.page-our-story .story-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.page-our-story .story-cta .btn-main {
  min-height: 48px;
  padding: 0 24px;
  font-size: 15.5px;
  border-radius: 8px;
}

.page-our-story .story-cta .btn-main.btn-dark-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--story-white);
  background: rgba(0, 0, 0, 0.1);
}

.page-our-story .story-cta .btn-main.btn-dark-outline:hover {
  background: var(--story-white);
  color: var(--story-blue);
}

/* ============================================================
   08. REVEAL ANIMATION
   ============================================================ */
.page-our-story .js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}

.page-our-story .js [data-reveal="right"] {
  transform: translateX(30px);
}

.page-our-story .js [data-reveal="left"] {
  transform: translateX(-30px);
}

.page-our-story .js [data-reveal="zoom"] {
  transform: scale(0.95);
}

.page-our-story .js [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ============================================================
   09. MOBILE (<= 767px)
   ============================================================ */
@media (max-width: 767px) {

  .page-our-story .story-section {
    padding: 48px 0;
  }

  .page-our-story .story-section:nth-child(even) {
    background: var(--story-surface);
  }

  .page-our-story .story-center-head {
    margin-bottom: 32px;
  }

  .page-our-story .story-section h2 {
    font-size: clamp(1.4rem, 6vw, 1.75rem);
    margin-bottom: 12px;
  }

  .page-our-story .story-section p {
    font-size: 14px;
    line-height: 1.7;
  }

  .page-our-story .story-split,
  .page-our-story .story-split.reverse {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-our-story .story-split.reverse .story-media {
    order: 0;
  }

  .page-our-story .timeline-item {
    gap: 16px;
    padding-bottom: 24px;
  }

  .page-our-story .timeline-content h3 {
    font-size: 1.05rem;
  }

  .page-our-story .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .page-our-story .value-item {
    padding: 16px 12px;
  }

  .page-our-story .value-item i {
    font-size: 20px;
  }

  .page-our-story .value-item h4 {
    font-size: 0.95rem;
  }

  .page-our-story .value-item p {
    font-size: 12px;
  }

  .page-our-story .process-list li {
    padding: 16px;
  }

  .page-our-story .process-content h3 {
    font-size: 1rem;
  }

  .page-our-story .people-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-our-story .story-cta {
    padding: 24px;
    border-radius: 16px;
  }

  .page-our-story .story-cta p {
    font-size: 14px;
  }

  .page-our-story .story-cta .btn-main {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .page-our-story .story-section h2 {
    font-size: clamp(1.25rem, 5.5vw, 1.5rem);
  }

  .page-our-story .story-section p {
    font-size: 13.5px;
  }

  .page-our-story .values-grid,
  .page-our-story .people-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   10. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .page-our-story .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}



/* ============================================================
   11. COMPACT SPACING OVERRIDE
   Smaller type, tighter padding and gaps in every section.
   Keep this block LAST in the file.
   ============================================================ */

/* ---------- hero (styles come from style.css, kept tight here) ---------- */
.page-our-story main>.page-hero {
  min-height: 0;
  padding-top: 26px;
  padding-bottom: 30px;
}

.page-our-story main>.page-hero .page-crumb {
  margin-bottom: 12px;
}

.page-our-story main>.page-hero h1 {
  margin-bottom: 8px;
}

.page-our-story main>.page-hero p {
  margin-top: 0;
  margin-bottom: 0;
}

/* ---------- shared section layout ---------- */
.page-our-story .story-section {
  padding: 44px 0;
}

.page-our-story .story-label {
  margin-bottom: 6px;
  font-size: 10px;
}

.page-our-story .story-section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.page-our-story .story-section p {
  margin: 0 0 0.8em;
  font-size: 13.5px;
  line-height: 1.7;
}

.page-our-story .story-center-head {
  max-width: 720px;
  margin: 0 auto 24px;
}

.page-our-story .story-section .story-center-head p {
  margin-bottom: 0;
}

/* ---------- split layout (intro, promise) ---------- */
.page-our-story .story-split {
  gap: 22px;
}

.page-our-story .story-media {
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(27, 40, 107, 0.12);
}

.page-our-story .story-img {
  aspect-ratio: 16 / 10;
}

.page-our-story .story-media:hover .story-img {
  transform: scale(1.025);
}

.page-our-story .promise-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.page-our-story .promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--story-muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-our-story .promise-list li i {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--story-orange);
  font-size: 14px;
}

@media (min-width: 992px) {
  .page-our-story .story-split {
    gap: 34px;
  }
}

/* ---------- timeline ---------- */
.page-our-story .story-timeline {
  max-width: 680px;
}

.page-our-story .timeline-item {
  gap: 14px;
  padding-bottom: 18px;
}

.page-our-story .timeline-dot {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-width: 3px;
}

.page-our-story .timeline-item:not(:last-child)::before {
  left: 7px;
  top: 22px;
}

.page-our-story .timeline-content {
  min-width: 0;
}

.page-our-story .timeline-date {
  margin-bottom: 2px;
  font-size: 11px;
}

.page-our-story .timeline-content h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.35;
}

.page-our-story .timeline-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- mission / vision / values ---------- */
.page-our-story .mv-grid {
  gap: 12px;
  margin-bottom: 12px;
}

.page-our-story .mv-card {
  padding: 18px 18px 16px;
  border-top: 3px solid var(--story-orange);
  border-radius: 14px;
}

.page-our-story .mv-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border-radius: 12px;
  font-size: 18px;
}

.page-our-story .mv-card h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.page-our-story .mv-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.page-our-story .values-grid {
  gap: 10px;
}

.page-our-story .value-item {
  padding: 14px 12px;
  border-radius: 12px;
}

.page-our-story .value-item i {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.page-our-story .value-item h4 {
  margin: 0 0 3px;
  font-size: 0.92rem;
  line-height: 1.3;
}

.page-our-story .value-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- process ---------- */
.page-our-story .process-list {
  gap: 10px;
  max-width: 820px;
}

.page-our-story .process-list li {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
}

.page-our-story .process-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 16px;
}

.page-our-story .process-content h3 {
  margin: 0 0 3px;
  font-size: 0.98rem;
  line-height: 1.3;
}

.page-our-story .process-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- people ---------- */
.page-our-story .people-grid {
  gap: 10px;
}

.page-our-story .person-card {
  padding: 15px 12px;
  border-radius: 12px;
}

.page-our-story .person-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  font-size: 15px;
}

.page-our-story .person-card h3 {
  margin: 0 0 3px;
  font-size: 0.92rem;
  line-height: 1.3;
}

.page-our-story .person-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- closing CTA ---------- */
.page-our-story .story-cta-section {
  padding: 36px 0 44px;
}

.page-our-story .story-cta {
  padding: clamp(22px, 3.6vw, 32px);
  border-radius: 16px;
}

.page-our-story .story-cta h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
}

.page-our-story .story-cta p {
  max-width: 470px;
  margin: 0 auto 14px;
  font-size: 13px;
  line-height: 1.65;
}

.page-our-story .story-cta-actions {
  gap: 8px;
}

.page-our-story .story-cta .btn-main {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13.5px;
}

/* ---------- reveal animation (fixed selector) ----------
   Old rule used ".page-our-story .js" which never matched,
   because the "js" class sits on <html> itself.
   Content stays visible when JavaScript is off. */
.page-our-story.js .our-story-page [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s ease var(--delay, 0ms),
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) var(--delay, 0ms),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.page-our-story.js .our-story-page [data-reveal="right"] {
  transform: translateX(22px);
}

.page-our-story.js .our-story-page [data-reveal="left"] {
  transform: translateX(-22px);
}

.page-our-story.js .our-story-page [data-reveal="zoom"] {
  transform: scale(0.96);
}

.page-our-story.js .our-story-page [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* soft hover on desktop only (no stuck hover on touch) */
@media (hover: hover) {

  .page-our-story .mv-card:hover,
  .page-our-story .value-item:hover,
  .page-our-story .person-card:hover,
  .page-our-story .process-list li:hover {
    border-color: rgba(242, 99, 35, 0.4);
    box-shadow: 0 10px 24px rgba(27, 40, 107, 0.08);
  }
}

/* ============ TABLET (max 991.98px) ============ */
@media (max-width: 991.98px) {
  .page-our-story .story-section {
    padding: 38px 0;
  }

  .page-our-story .story-split {
    gap: 20px;
  }

  .page-our-story .story-cta-section {
    padding: 32px 0 38px;
  }
}

/* ============ MOBILE (max 767.98px) ============ */
@media (max-width: 767.98px) {
  .page-our-story main>.page-hero {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .page-our-story .story-section {
    padding: 30px 0;
  }

  .page-our-story .story-center-head {
    margin: 0 auto 16px;
  }

  .page-our-story .story-label {
    font-size: 9.5px;
  }

  .page-our-story .story-section h2 {
    margin-bottom: 8px;
    font-size: clamp(1.2rem, 5.4vw, 1.4rem);
    line-height: 1.28;
  }

  .page-our-story .story-section p {
    font-size: 12.5px;
    line-height: 1.6;
  }

  .page-our-story .story-split,
  .page-our-story .story-split.reverse {
    gap: 14px;
  }

  .page-our-story .promise-list {
    gap: 6px;
    margin-top: 10px;
  }

  .page-our-story .promise-list li {
    font-size: 12.5px;
    line-height: 1.55;
  }

  .page-our-story .timeline-item {
    gap: 12px;
    padding-bottom: 14px;
  }

  .page-our-story .timeline-content h3 {
    font-size: 0.97rem;
  }

  .page-our-story .timeline-content p {
    font-size: 12.5px;
  }

  .page-our-story .mv-grid {
    gap: 10px;
    margin-bottom: 10px;
  }

  .page-our-story .values-grid,
  .page-our-story .people-grid {
    gap: 8px;
  }

  .page-our-story .value-item,
  .page-our-story .person-card {
    padding: 12px 10px;
  }

  .page-our-story .value-item i {
    margin-bottom: 5px;
    font-size: 16px;
  }

  .page-our-story .value-item h4,
  .page-our-story .person-card h3 {
    font-size: 0.88rem;
  }

  .page-our-story .value-item p,
  .page-our-story .person-card p {
    font-size: 11.5px;
    line-height: 1.5;
  }

  .page-our-story .person-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 6px;
    font-size: 14px;
  }

  .page-our-story .process-list {
    gap: 8px;
  }

  .page-our-story .process-list li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .page-our-story .process-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
  }

  .page-our-story .process-content h3 {
    font-size: 0.93rem;
  }

  .page-our-story .process-content p {
    font-size: 12.5px;
    line-height: 1.55;
  }

  .page-our-story .story-cta-section {
    padding: 26px 0 32px;
  }

  .page-our-story .story-cta {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .page-our-story .story-cta p {
    margin-bottom: 12px;
    font-size: 12.5px;
  }

  .page-our-story .story-cta .btn-main {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

/* ============ PHONES (max 575.98px): mission/vision become compact rows ============ */
@media (max-width: 575.98px) {
  .page-our-story .mv-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon text";
    column-gap: 12px;
    align-items: start;
    padding: 14px;
    text-align: left;
  }

  .page-our-story .mv-icon {
    grid-area: icon;
    margin: 0;
  }

  .page-our-story .mv-card h3 {
    grid-area: title;
    margin: 1px 0 3px;
    font-size: 1rem;
  }

  .page-our-story .mv-card p {
    grid-area: text;
  }
}

/* ============ SMALL PHONES (max 380px): keep 2 columns, tighter ============ */
@media (max-width: 380px) {

  .page-our-story .values-grid,
  .page-our-story .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-our-story .value-item,
  .page-our-story .person-card {
    padding: 11px 8px;
  }

  .page-our-story .value-item h4,
  .page-our-story .person-card h3 {
    overflow-wrap: anywhere;
  }

  .page-our-story .value-item p,
  .page-our-story .person-card p {
    font-size: 11px;
  }

  .page-our-story .story-section h2 {
    font-size: 1.15rem;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .page-our-story.js .our-story-page [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .page-our-story .story-img {
    transition: none !important;
  }
}