/* ==========================================================================
   Ion Exchange — Milestones · interactive droplet timeline
   Shared by the Home page (#journey) and the About Us page (#journey).

   Every selector is namespaced `.iexms*` and every design token is scoped to
   `.iexms` rather than `:root`, because both host pages already define
   `.container`, `.section`, `.h2`, `.lead` and `.eyebrow` for other sections.
   Nothing here leaks out, and nothing from the host pages leaks in — the
   element resets below re-declare anything Tailwind preflight or
   about-us/styles.css would otherwise inherit into this markup.
   ========================================================================== */

.iexms {
  /* brand */
  --iexms-primary: #007cc3;
  --iexms-accent: #06b6d4;
  --iexms-secondary: #0284c7;

  /* surface + ink */
  --iexms-card: #ffffff;
  --iexms-border-light: #e2e8f0;
  --iexms-text-primary: #0f172a;
  --iexms-text-secondary: #64748b;
  --iexms-text-tertiary: #94a3b8;

  /* type */
  --iexms-font-display: 'Plus Jakarta Sans', sans-serif;
  --iexms-font-body: 'Inter', sans-serif;
  --iexms-font-mono: 'Plus Jakarta Sans', sans-serif;
  --iexms-type-h2: clamp(30px, 3.6vw, 44px);
  --iexms-type-lead: clamp(15px, 1.4vw, 17px);
  --iexms-type-eyebrow: 11px;
  --iexms-track-display: -0.025em;
  --iexms-track-eyebrow: 0.22em;

  /* motion */
  --iexms-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --iexms-ease-organic: cubic-bezier(0.16, 1, 0.3, 1);
  --iexms-slide-ms: 600ms;

  /* layout */
  --iexms-max-width: 1280px;
  --iexms-gutter: clamp(16px, 4vw, 32px);
  --iexms-section-pad: clamp(40px, 4.5vw, 64px);

  /* timeline window */
  --iexms-pv: 5; /* droplets per view — read back by assets/milestones.js */
  --iexms-drop: clamp(120px, 13vw, 176px);

  --iexms-grad-headline: linear-gradient(90deg, #0284c7 0%, #007cc3 55%, #06b6d4 100%);
  --iexms-grad-progress: linear-gradient(90deg, var(--iexms-accent), var(--iexms-primary));

  position: relative;
  box-sizing: border-box;
  padding: var(--iexms-section-pad) 0;
  scroll-margin-top: 6rem;
  background: linear-gradient(180deg, #f6fafd 0%, #eff6fb 100%);
  border-top: 1px solid var(--iexms-border-light);
  border-bottom: 1px solid var(--iexms-border-light);
  color: var(--iexms-text-primary);
  font-family: var(--iexms-font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.iexms *,
.iexms *::before,
.iexms *::after { box-sizing: border-box; }

/* the blueprint whisper over the band */
.iexms::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 124, 195, 0.03) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(0, 124, 195, 0.03) 0 1px, transparent 1px 40px);
}

.iexms__container {
  position: relative;
  z-index: 1;
  max-width: var(--iexms-max-width);
  margin: 0 auto;
  padding-left: var(--iexms-gutter);
  padding-right: var(--iexms-gutter);
}

/* the shared <defs> carrier — present in the flow but zero-sized */
.iexms__defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- intro row: headline left, navigation right ---------- */
.iexms__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 48px;
}

.iexms__eyebrow {
  display: block;
  margin: 0 0 24px;
  font-family: var(--iexms-font-display);
  font-size: var(--iexms-type-eyebrow);
  font-weight: 700;
  letter-spacing: var(--iexms-track-eyebrow);
  text-transform: uppercase;
  color: rgba(2, 132, 199, 0.9);
}

.iexms__h2 {
  margin: 0 0 24px;
  max-width: 780px;
  font-family: var(--iexms-font-display);
  font-size: var(--iexms-type-h2);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: var(--iexms-track-display);
  color: var(--iexms-text-primary);
  text-wrap: balance;
}

.iexms__h2-accent {
  font-weight: 700;
  background: var(--iexms-grad-headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .iexms__h2-accent { background: none; color: var(--iexms-primary); }
}

/* Home-only display scale.
   The default above is the typography-PDF scale (clamp 30–44 / 600), which is
   what every About Us section heading uses. The Home page still runs on its
   older pre-PDF scale — every other Home section heading is
   `text-3xl md:text-5xl font-display font-medium tracking-tight leading-[1.12]`
   — so on Home this heading matches its own neighbours instead. The accent
   span is already weight 700 + gradient on both, so it needs no override.
   Remove this block if Home is ever migrated to the PDF scale. */
.iexms--home .iexms__h2 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

@media (min-width: 768px) {
  .iexms--home .iexms__h2 { font-size: 48px; }
}

.iexms__lead {
  margin: 0;
  max-width: 620px;
  font-family: var(--iexms-font-body);
  font-size: var(--iexms-type-lead);
  font-weight: 400;
  line-height: 1.6;
  color: var(--iexms-text-secondary);
  text-wrap: pretty;
}

.iexms__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* The arrows match the site's card sliders (card-rails.css .memrail__btn):
   a dark navy disc with a white arrow, brand blue on hover (3 Nov 2026). */
.iexms__btn {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a2740;
  border: 0;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(10, 39, 64, 0.22);
  transition: background-color 0.25s ease, opacity 0.25s ease;
}

.iexms__btn:hover:not(:disabled) { background: #007cc3; }
.iexms__btn:disabled { opacity: 0.32; cursor: default; }
.iexms__btn svg { display: block; width: 22px; height: 22px; }

.iexms__readout {
  min-width: 150px;
  text-align: center;
  font-family: var(--iexms-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iexms-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   The droplet timeline — five-droplet moving window
   ========================================================================== */
.iexms__viewport {
  position: relative;
  overflow: hidden;
  padding-bottom: 8px;
  /* sideways swipes go to the timeline (milestones.js), vertical to the page */
  touch-action: pan-y;
}

.iexms__viewport:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
  border-radius: 4px;
}

/* the connecting rail, meeting each droplet at its widest point */
.iexms__viewport::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(32px + var(--iexms-drop) * 0.6);
  height: 2.5px;
  border-radius: 2px;
  background: rgba(0, 124, 195, 0.22);
}

/* progress fill — how far through six decades the window has travelled */
.iexms__progress {
  position: absolute;
  left: 0;
  top: calc(32px + var(--iexms-drop) * 0.6);
  height: 2.5px;
  width: 100%;
  border-radius: 2px;
  background: var(--iexms-grad-progress);
  transform-origin: left center;
  transform: scaleX(0.17);
  transition: transform var(--iexms-slide-ms) var(--iexms-ease-organic);
  pointer-events: none;
}

.iexms__track {
  position: relative;
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform var(--iexms-slide-ms) var(--iexms-ease-organic);
  will-change: transform;
}

/* ---------- one milestone column ---------- */
.iexms__item {
  flex: 0 0 calc(100% / var(--iexms-pv));
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  position: relative;
  text-align: center;
  opacity: 1;
  transition: opacity var(--iexms-slide-ms) var(--iexms-ease-organic);
}

.iexms__item[data-outside] { opacity: 0.25; }

.iexms__year {
  display: block;
  margin: 0 0 14px;
  font-family: var(--iexms-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--iexms-text-primary);
  font-variant-numeric: tabular-nums;
}

.iexms__figure { margin: 0; position: relative; }

/* ---------- the water droplet: the image container itself ---------- */
.iexms__dropwrap {
  position: relative;
  z-index: 1;
  width: var(--iexms-drop);
  height: var(--iexms-drop);
  margin: 0 auto;
  transition: transform 300ms var(--iexms-ease-standard);
}

.iexms__item:hover .iexms__dropwrap { transform: translateY(-4px); }

/* the photograph is clipped by the teardrop path; rim and shadow follow it */
.iexms__dropsvg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible; /* the rim stroke straddles the path edge */
  filter: drop-shadow(0 10px 18px rgba(3, 21, 47, 0.18)) drop-shadow(0 2px 5px rgba(3, 21, 47, 0.08));
  transition: filter 300ms var(--iexms-ease-standard);
}

.iexms__item:hover .iexms__dropsvg {
  filter: drop-shadow(0 16px 28px rgba(3, 21, 47, 0.24)) drop-shadow(0 4px 8px rgba(3, 21, 47, 0.1));
}

/* gentle zoom inside the mask on hover */
.iexms__ph {
  transform-origin: 50px 60px;
  transition: transform 700ms var(--iexms-ease-standard);
}

.iexms__item:hover .iexms__ph { transform: scale(1.06); }

/* ---------- the icon badge, docked at the droplet's base ---------- */
.iexms__badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0a2740 0%, #03152f 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 6px 14px rgba(3, 21, 47, 0.28);
  color: #7fc3ff;
}

.iexms__badge svg { display: block; width: 18px; height: 18px; }

.iexms__title {
  margin: 32px auto 6px;
  max-width: 210px;
  font-family: var(--iexms-font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--iexms-text-primary);
}

.iexms__desc {
  margin: 0 auto;
  max-width: 220px;
  font-family: var(--iexms-font-body);
  /* 14px, the footer link size (user, 3 Nov 2026; was 12.5px). */
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--iexms-text-secondary);
  text-wrap: pretty;
}

/* ---------- responsive window: 5 → 3 → 1 droplets ---------- */
@media (max-width: 980px) {
  .iexms {
    --iexms-pv: 3;
    --iexms-drop: clamp(120px, 18vw, 176px);
  }
}

@media (max-width: 720px) {
  .iexms__head { flex-direction: column; align-items: flex-start; }
}

/* phones: two droplets to a screen (4 Nov 2026, Home first, then every page) */
@media (max-width: 640px) {
  .iexms {
    --iexms-pv: 2;
    --iexms-drop: 124px;
  }
  .iexms__title { font-size: 15px; }
  .iexms__desc { max-width: none; padding-inline: 4px; }
  .iexms__btn { width: 44px; height: 44px; }
}

/* phones: the arrows and a plain step count (01 / 15, milestones.js) below the
   timeline, centred, as on the other carousels (user, 4 Nov 2026), instead of
   between the heading and the droplets */
@media (max-width: 767px) {
  .iexms__container { display: flex; flex-direction: column; }
  .iexms__head { display: contents; }
  .iexms__head > div:first-child { order: 1; margin-bottom: 28px; }
  .iexms__viewport { order: 2; }
  .iexms__nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
  }
  .iexms__btn { width: 44px; height: 44px; }
  .iexms__readout {
    min-width: 72px;
    font-size: 12px;
    letter-spacing: 0.14em;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .iexms *,
  .iexms *::before,
  .iexms *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Design-system atoms these pages' markup uses but content.css defines only
   scoped under .handoff-page, which this template does not carry (found when
   the Knowledge Park form rendered unstyled, 2026-10-08). Values mirror
   assets/content.css; tokens carry literal fallbacks because these pages do
   not load content.css. */
.section-intro{margin-bottom:48px}
.eyebrow-row{display:flex;align-items:center;gap:8px;margin-bottom:24px}
.eyebrow-row--center{justify-content:center}
.btn{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-body,"Inter",ui-sans-serif,system-ui,sans-serif);font-size:var(--type-button,12px);font-weight:600;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;transition:all .15s ease;white-space:nowrap;border:none;background:none;color:inherit;text-decoration:none}
.btn--primary{padding:12px 24px;border-radius:9999px;background:#0F172A;color:#FFFFFF;border:1px solid transparent}
.btn--primary:hover{background:#005A91;transform:translateY(-2px);box-shadow:0 3px 8px rgba(0,0,0,.04),0 2px 12px rgba(0,0,0,.03)}
/* The .btn reset above also cleared the banner's glass button (About Us
   "Investor Relations" read dark on dark until 2 Nov 2026); restated here. */
.btn--glass{padding:12px 24px;border-radius:9999px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.24);color:#FFFFFF}
.btn--glass:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.4);transform:translateY(-2px)}
