/* =========================================================================
   INSP ANIMATIONS — additive styles (namespaced with insp-).
   These do not override or affect any existing CLID selectors.
========================================================================= */

/* 01 — Magnetic CTA buttons (Osmo §2.2)
   GSAP drives the transform; hint the compositor so movement stays smooth. */
.insp-magnetic {
  will-change: transform;
}

/* 02 — Velocity-reactive marquee (Jeton §1.7 + Osmo §2.7) */
.insp-marquee {
  width: 100%;
  overflow: hidden;
  padding: 2.5rem 0;
  margin-bottom: 3rem;
  border-top: 1px solid rgba(128, 128, 128, 0.18);
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
  user-select: none;
  /* Soft fade at both edges so items enter/exit gracefully. */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.insp-marquee__track {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.insp-marquee__item {
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  padding: 0 1.5rem;
}

.insp-marquee__sep {
  display: inline-block;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Reduced motion: keep the band readable and static (JS never animates it). */
@media (prefers-reduced-motion: reduce) {
  .insp-marquee {
    text-align: center;
  }
  .insp-marquee__track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 03 — Count-up stats (Jeton §1.4)
   Standalone section — deliberately NOT a .story-panel, so the page's
   story/snap/reveal logic never touches it. */
.insp-stats {
  width: 100%;
  padding: 7rem 6vw;
  background: var(--panel-bg);
}

.insp-stats__inner {
  width: min(100%, 1200px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* 10 — Glowing dot grid canvas: sits behind the section content. */
.insp-dotgrid-host {
  position: relative;
  overflow: hidden;
}

.insp-dotgrid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.insp-stats__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e8e8e;
  margin-bottom: 1rem;
}

.insp-stats__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.insp-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2.5rem 2rem;
}

.insp-stat__num {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.insp-stat__label {
  margin-top: 0.85rem;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .insp-stats {
    padding: 5rem 1.5rem;
  }
  .insp-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.25rem;
  }
}

/* 04 — FAQ accordion (Phamily §3.3)
   Standalone section — NOT a .story-panel. */
.insp-faq {
  width: 100%;
  padding: 7rem 6vw;
  background: var(--panel-bg);
}

.insp-faq__inner {
  width: min(100%, 820px);
  margin: 0 auto;
}

.insp-faq__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e8e8e;
  margin-bottom: 1rem;
}

.insp-faq__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.insp-faq__item {
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.insp-faq__item:last-child {
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
}

.insp-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.4;
}

.insp-faq__icon {
  flex: 0 0 auto;
  display: inline-block;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-secondary);
  transform-origin: center;
  will-change: transform;
}

/* Answer wrapper is height-animated by GSAP; inner holds the padding so the
   collapse math stays clean. */
.insp-faq__a {
  height: 0;
  overflow: hidden;
}

.insp-faq__a-inner {
  padding: 0 0 1.75rem;
}

.insp-faq__a-inner p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.75;
  max-width: 680px;
}

@media (max-width: 640px) {
  .insp-faq {
    padding: 5rem 1.5rem;
  }
}

/* 05 — Numbered step list with drawing connector line (Phamily §3.2)
   Standalone section — NOT a .story-panel. */
.insp-steps {
  width: 100%;
  padding: 7rem 6vw;
  background: var(--panel-bg);
}

.insp-steps__inner {
  width: min(100%, 900px);
  margin: 0 auto;
}

.insp-steps__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e8e8e;
  margin-bottom: 1rem;
}

.insp-steps__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 3rem;
}

.insp-steps__list {
  position: relative;
}

/* Track + fill run through the centre of the number circles (48px / 2 = 24px). */
.insp-steps__line {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23px;
  width: 2px;
  background: rgba(128, 128, 128, 0.22);
  overflow: hidden;
}

.insp-steps__line-fill {
  position: absolute;
  inset: 0;
  background: var(--text-primary);
  transform: scaleY(0);
  transform-origin: top center;
  will-change: transform;
}

.insp-step {
  position: relative;
  display: flex;
  gap: 1.75rem;
  padding-bottom: 3rem;
}

.insp-step:last-child {
  padding-bottom: 0;
}

.insp-step__num {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-bg);
  border: 1px solid rgba(128, 128, 128, 0.4);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.insp-step__body {
  padding-top: 0.35rem;
}

.insp-step__body h3 {
  color: var(--text-primary);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.insp-step__body p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  max-width: 620px;
}

@media (max-width: 640px) {
  .insp-steps {
    padding: 5rem 1.5rem;
  }
}

/* 06 — Card grid + 3D tilt hover (Osmo §2.8)
   Gives the (previously unstyled) feature cards a card surface and the
   `.insp-tilt` hook drives the perspective hover. */
.insp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.insp-tilt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem;
  border-radius: 16px;
  background: rgba(128, 128, 128, 0.06);
  border: 1px solid rgba(128, 128, 128, 0.18);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.insp-tilt-card:hover {
  border-color: rgba(128, 128, 128, 0.42);
  background: rgba(128, 128, 128, 0.1);
}

.insp-tilt-card h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.25;
}

.insp-tilt-card p {
  margin: 0;
}

/* Lift the CTA slightly on the Z axis so it reads above the tilting card. */
.insp-tilt-card .cta-button {
  margin-top: auto;
  transform: translateZ(28px);
}

/* Updates page — intro + photo gallery (reuses reveal #7 + tilt #6) */
.insp-updates {
  width: 100%;
  padding: 8rem 6vw;
  background: var(--panel-bg);
}

.insp-updates__inner {
  width: min(100%, 1200px);
  margin: 0 auto;
}

.insp-updates__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e8e8e;
  margin-bottom: 1rem;
}

.insp-updates__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1.5rem;
}

.insp-updates__lead {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  line-height: 1.8;
  max-width: 760px;
}

.insp-updates__meta {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #8e8e8e;
}

/* 12 — Two-row photo scroller with counter-motion + gradual edge shadow */
.insp-photorows {
  position: relative;
  margin-top: 3rem;
  overflow: hidden;
}

.insp-photorow {
  overflow: hidden;
}

.insp-photorow + .insp-photorow {
  margin-top: 1rem;
}

.insp-photorow__track {
  display: flex;
  gap: 1rem;
  will-change: transform;
}

.insp-photorow__item {
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 340px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(128, 128, 128, 0.08);
}

.insp-photorow__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Gradual dark overlays: edges fade into the page background, center stays clear. */
.insp-photorows::before,
.insp-photorows::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  z-index: 3;
  pointer-events: none;
}

.insp-photorows::before {
  left: 0;
  background: linear-gradient(to right, var(--panel-bg) 8%, rgba(18, 18, 18, 0) 100%);
}

.insp-photorows::after {
  right: 0;
  background: linear-gradient(to left, var(--panel-bg) 8%, rgba(18, 18, 18, 0) 100%);
}

.insp-photorows__nav {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  /* Sit above the edge-shadow gradients so the arrows stay fully visible. */
  position: relative;
  z-index: 4;
}

.insp-photorows__arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.4);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.insp-photorows__arrow:hover {
  background: rgba(128, 128, 128, 0.12);
  border-color: rgba(128, 128, 128, 0.7);
}

.insp-photorows__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 640px) {
  .insp-updates {
    padding: 6rem 1.5rem;
  }
  .insp-photorow__item {
    width: 62vw;
  }
  .insp-photorows::before,
  .insp-photorows::after {
    width: 18%;
  }
}

/* 11 — Draggable card carousel (Jeton §1.5) */
.insp-carousel-section {
  width: 100%;
  padding: 7rem 0;
  background: var(--panel-bg);
  overflow: hidden;
}

.insp-carousel-section__head {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 0 6vw;
}

.insp-carousel-section__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e8e8e;
  margin-bottom: 1rem;
}

.insp-carousel-section__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
}

.insp-carousel {
  margin-top: 2.5rem;
  overflow: hidden;
  cursor: grab;
}

.insp-carousel.is-dragging {
  cursor: grabbing;
}

/* Padding lives on the track so scrollWidth vs clientWidth math stays exact. */
.insp-carousel__track {
  display: flex;
  gap: 1.5rem;
  padding: 0 6vw;
  will-change: transform;
  user-select: none;
}

.insp-carousel__card {
  flex: 0 0 auto;
  width: min(340px, 78vw);
  padding: 2rem;
  border-radius: 16px;
  background: rgba(128, 128, 128, 0.06);
  border: 1px solid rgba(128, 128, 128, 0.18);
}

.insp-carousel__card h3 {
  color: var(--text-primary);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin-bottom: 0.85rem;
}

.insp-carousel__card p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
}

/* Prevent the browser's native image/text drag while swiping cards. */
.insp-carousel__card * {
  -webkit-user-drag: none;
  user-select: none;
}

/* 09 — Number odometer (Osmo §2.6)
   Inherits font-size/weight from .insp-stat__num; the masked columns roll. */
.insp-odometer {
  display: inline-flex;
  align-items: flex-start;
  line-height: 1;
}

.insp-odometer__col {
  display: inline-block;
  overflow: hidden;
  height: 1em;
}

.insp-odometer__strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.insp-odometer__cell {
  height: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insp-odometer__affix {
  display: inline-block;
}

/* Decorative accents (Tabler Icons, MIT) — rendered as theme-colored masks.
   Because the fill is `var(--text-primary)`, they change color with the home
   page's scroll inversion and match each page's theme automatically. */
/* Host holds decorations behind its content via an isolated stacking context. */
.insp-decor-host {
  position: relative;
  isolation: isolate;
}

.insp-decor {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: var(--insp-decor-size, 120px);
  height: var(--insp-decor-size, 120px);
  transform: rotate(var(--insp-decor-rot, 0deg));
  background-color: var(--text-primary);
  opacity: var(--insp-decor-opacity, 0.1);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.1s linear;
}

.insp-decor--flower { -webkit-mask-image: url(assets/decor/flower.svg); mask-image: url(assets/decor/flower.svg); }
.insp-decor--leaf { -webkit-mask-image: url(assets/decor/leaf.svg); mask-image: url(assets/decor/leaf.svg); }
.insp-decor--plant { -webkit-mask-image: url(assets/decor/plant.svg); mask-image: url(assets/decor/plant.svg); }
.insp-decor--plant2 { -webkit-mask-image: url(assets/decor/plant-2.svg); mask-image: url(assets/decor/plant-2.svg); }
.insp-decor--butterfly { -webkit-mask-image: url(assets/decor/butterfly.svg); mask-image: url(assets/decor/butterfly.svg); }
.insp-decor--spiral { -webkit-mask-image: url(assets/decor/spiral.svg); mask-image: url(assets/decor/spiral.svg); }
.insp-decor--sparkles { -webkit-mask-image: url(assets/decor/sparkles.svg); mask-image: url(assets/decor/sparkles.svg); }
.insp-decor--clover { -webkit-mask-image: url(assets/decor/clover.svg); mask-image: url(assets/decor/clover.svg); }
.insp-decor--tree { -webkit-mask-image: url(assets/decor/tree.svg); mask-image: url(assets/decor/tree.svg); }
.insp-decor--users { -webkit-mask-image: url(assets/decor/users.svg); mask-image: url(assets/decor/users.svg); }
.insp-decor--users-group { -webkit-mask-image: url(assets/decor/users-group.svg); mask-image: url(assets/decor/users-group.svg); }
.insp-decor--friends { -webkit-mask-image: url(assets/decor/friends.svg); mask-image: url(assets/decor/friends.svg); }
.insp-decor--heart { -webkit-mask-image: url(assets/decor/heart.svg); mask-image: url(assets/decor/heart.svg); }
.insp-decor--heart-handshake { -webkit-mask-image: url(assets/decor/heart-handshake.svg); mask-image: url(assets/decor/heart-handshake.svg); }
.insp-decor--scale { -webkit-mask-image: url(assets/decor/scale.svg); mask-image: url(assets/decor/scale.svg); }
.insp-decor--world { -webkit-mask-image: url(assets/decor/world.svg); mask-image: url(assets/decor/world.svg); }
.insp-decor--bulb { -webkit-mask-image: url(assets/decor/bulb.svg); mask-image: url(assets/decor/bulb.svg); }
.insp-decor--school { -webkit-mask-image: url(assets/decor/school.svg); mask-image: url(assets/decor/school.svg); }
.insp-decor--book { -webkit-mask-image: url(assets/decor/book-2.svg); mask-image: url(assets/decor/book-2.svg); }
.insp-decor--accessible { -webkit-mask-image: url(assets/decor/accessible.svg); mask-image: url(assets/decor/accessible.svg); }
.insp-decor--speakerphone { -webkit-mask-image: url(assets/decor/speakerphone.svg); mask-image: url(assets/decor/speakerphone.svg); }
.insp-decor--puzzle { -webkit-mask-image: url(assets/decor/puzzle.svg); mask-image: url(assets/decor/puzzle.svg); }
.insp-decor--star { -webkit-mask-image: url(assets/decor/star.svg); mask-image: url(assets/decor/star.svg); }
.insp-decor--sun { -webkit-mask-image: url(assets/decor/sun.svg); mask-image: url(assets/decor/sun.svg); }
.insp-decor--shield { -webkit-mask-image: url(assets/decor/shield-heart.svg); mask-image: url(assets/decor/shield-heart.svg); }
.insp-decor--message { -webkit-mask-image: url(assets/decor/message-circle.svg); mask-image: url(assets/decor/message-circle.svg); }
.insp-decor--ripple { -webkit-mask-image: url(assets/decor/ripple.svg); mask-image: url(assets/decor/ripple.svg); }
.insp-decor--infinity { -webkit-mask-image: url(assets/decor/infinity.svg); mask-image: url(assets/decor/infinity.svg); }
.insp-decor--mountain { -webkit-mask-image: url(assets/decor/mountain.svg); mask-image: url(assets/decor/mountain.svg); }
.insp-decor--sunrise { -webkit-mask-image: url(assets/decor/sunrise.svg); mask-image: url(assets/decor/sunrise.svg); }
.insp-decor--plant-2 { -webkit-mask-image: url(assets/decor/plant-2.svg); mask-image: url(assets/decor/plant-2.svg); }

/* On small screens keep the accents visible but smaller and fainter so they
   stay subtle behind the (now full-width) content. */
@media (max-width: 760px) {
  .insp-decor {
    width: 64px;
    height: 64px;
    opacity: 0.06;
  }
}

/* 08 — Masked split-text heading reveal (Jeton §1.1 / Osmo §2.4) */
.insp-split__mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* Give descenders (g, y, p) room so they aren't clipped at rest. */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.insp-split__word {
  display: inline-block;
  will-change: transform;
}

/* 07 — Row list: staggered scroll reveal (JS) + subtle CSS hover */
.insp-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.insp-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.4;
  color: var(--text-primary);
  transition: padding-left 0.3s ease, background 0.3s ease, color 0.3s ease;
}

/* Rich-content rows wrap their text in a single <span>; let it shrink/wrap. */
.insp-list-item > span {
  min-width: 0;
}

/* Leading accent line that grows on hover. */
.insp-list-item::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transition: width 0.3s ease;
}

.insp-list-item:hover {
  padding-left: 1.75rem;
  background: rgba(128, 128, 128, 0.06);
}

.insp-list-item:hover::before {
  width: 18px;
}

/* Links inside a row list inherit the row color and underline on hover. */
.insp-list-item a {
  color: inherit;
  text-decoration: none;
}

.insp-list-item a:hover {
  text-decoration: underline;
}

