/* XUSOI scrollytelling — white / XUPLUS-light */

body.is-xusoi-story {
  background: #fafafa;
  color: #0a0a0a;
}

/*
  Hero-only intro: first-scene 3D wall + brand chrome.
  Layer-2 (showcase / webdesign) and deferred story panels stay hidden while redesigning.
  Restore showcase: data-xusoi-layer2="showcase" + unhide #xusoi-showcase + reload showcase JS.
  Restore five-act: data-xusoi-layer2="webdesign-story" + unhide #xusoi-webdesign.
  Restore full story: data-xstory-mode="full" + unhide #xusoi-story-deferred.
*/
body.is-xusoi-story[data-xusoi-layer2="showcase"] #xusoi-webdesign[data-xwd-deferred],
body.is-xusoi-story[data-xusoi-layer2="showcase"] #xusoi-webdesign[hidden] {
  display: none !important;
}
body.is-xusoi-story[data-xusoi-layer2="webdesign-story"] #xusoi-showcase {
  display: none !important;
}
body.is-xusoi-story[data-xusoi-layer2="none"] #xusoi-showcase,
body.is-xusoi-story[data-xusoi-layer2="none"] #xusoi-webdesign,
body.is-xusoi-story #xusoi-showcase[data-xsc-deferred][hidden],
body.is-xusoi-story #xusoi-webdesign[data-xwd-deferred][hidden] {
  display: none !important;
}
body.is-xusoi-story[data-xstory-mode="hero-only"] .xstory__progress,
body.is-xusoi-story[data-xstory-mode="hero-only"] .xstory-hero__scroll,
body.is-xusoi-story[data-xstory-mode="hero-only"] #xusoi-story-deferred {
  display: none !important;
}

/* Redesign mode: park legacy showcase/webdesign; Layer1+Layer2 (commerce) scroll. */
body.is-xusoi-story[data-xstory-mode="hero-only"][data-xusoi-layer2="none"] .footer {
  display: none !important;
}
body.is-xusoi-story[data-xusoi-layer2="commerce"] #xusoi-showcase,
body.is-xusoi-story[data-xusoi-layer2="commerce"] #xusoi-webdesign {
  display: none !important;
}

/* Layer 01 — Aceternity HeroParallax under the 3D wall */
.xusoi-layer1 {
  position: relative;
  isolation: isolate;
  background: #ffffff;
  color: #0a0a0a;
  overflow: visible;
  padding: 0;
}

.xusoi-layer1__parallax {
  width: 100%;
}

body.is-xusoi-story[data-xstory-mode="hero-only"] .xstory {
  padding-bottom: 0;
}

body.is-xusoi-story[data-xstory-mode="hero-only"] .xstory__panel.xstory-hero {
  min-height: 100svh;
}

.xstory {
  position: relative;
  padding-top: 0;
  overflow-x: clip;
}

.xstory__progress {
  position: fixed;
  top: 50%;
  right: max(0.85rem, calc((100vw - 72rem) / 2 - 1.2rem));
  transform: translateY(-50%);
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 0.55rem;
}

@media (min-width: 980px) {
  .xstory__progress {
    display: flex;
  }
}

.xstory__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), background 0.35s, border-color 0.35s;
}

.xstory__dot.is-active {
  background: #0a0a0a;
  border-color: #0a0a0a;
  transform: scale(1.35);
}

.xstory__panel {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding:
    calc(var(--nav-island-top, 0.9rem) + var(--nav-h, 3.85rem) + 1.6rem)
    clamp(1.25rem, 4vw, 3rem)
    4rem;
  overflow: hidden;
  background: #fafafa;
  color: #0a0a0a;
}

/* 3D lives inside .xwall which owns perspective+overflow together (Safari-safe) */
.xstory__panel.xstory-hero {
  overflow: visible;
}

.xstory__panel--light {
  background: #fafafa;
  color: #0a0a0a;
}

.xstory__panel--soft {
  background: #f3f4f6;
}

.xstory__inner {
  width: min(72rem, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.xstory__kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.xstory__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: #0a0a0a;
}

.xstory__lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  line-height: 1.75;
  color: #6b6b6b;
}

.xstory__body {
  margin: 1.2rem 0 0;
  max-width: 36rem;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.85;
  color: #3a3a3a;
}

.xstory [data-x-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(5px);
  transition:
    opacity 0.75s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform 0.75s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    filter 0.75s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.xstory [data-x-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* —— 01 Hero —— */
.xstory-hero {
  text-align: center;
  justify-items: center;
  background: #050505 !important;
  color: #fff;
  /* Do not overflow:hidden here — it flattens the wall's preserve-3d on iOS.
     Clipping is owned by .xwall (perspective + overflow together). */
  overflow: visible;
}

/* ElectricLogo overlay — sits above the 3D wall, below hero copy */
.xhero-electric {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.xhero-electric__stage {
  width: min(48vw, 360px);
  height: min(48vw, 360px);
  max-height: min(48vh, 360px);
  position: relative;
  /* Never steal hover from CTAs / wall tiles — animation is visual-only. */
  pointer-events: none;
  /* Isolate canvas so white strands don't composite into white wall tiles. */
  isolation: isolate;
  background: transparent;
}

/* Soft dark pocket behind the mark — keeps white lightning readable on bright tiles. */
.xhero-electric__stage::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 58% 54% at 50% 50%,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.42) 38%,
    rgba(0, 0, 0, 0.14) 62%,
    rgba(0, 0, 0, 0) 78%
  );
}

.xhero-electric__stage .electric-logo,
.xhero-electric__stage canvas {
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .xhero-electric__stage {
    width: min(58vw, 280px);
    height: min(58vw, 280px);
    max-height: min(40vh, 280px);
  }
}

/* Logo-only hero review: no copy overlay wash / brand chrome */
.xstory-hero.is-logo-only .xstory-hero__copy {
  display: none !important;
}

/* Brand row — TextPressure + TextType, bottom left over the 3D wall */
.xhero-brand {
  position: absolute;
  left: clamp(1.2rem, 3.4vw, 2.5rem);
  right: clamp(1.2rem, 4vw, 3rem);
  bottom: clamp(1.6rem, 4.5vh, 2.8rem);
  z-index: 4;
  display: flex;
  /* XUSOI glyphs sit near the top of their tall box — center the intro with them. */
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.4rem);
  pointer-events: none;
}

.xhero-pressure {
  flex: 0 0 auto;
  width: min(42vw, 420px);
  height: clamp(72px, 12vw, 128px);
  pointer-events: auto;
  overflow: visible;
}

.xhero-pressure__stage {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.xhero-type {
  flex: 1 1 auto;
  align-self: center;
  min-width: 0;
  max-width: min(36rem, 52vw);
  /* Nudge up so the line optically matches the XUSOI letter band. */
  padding: 0 0.55em 0 0.2em;
  margin: 0 0 0.55em -0.15em;
  transform: translateY(-0.55em);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", sans-serif;
  font-size: clamp(0.78rem, 1.35vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.35;
  /* Soft pocket so wall logos don't bleed through the typing line. */
  background: radial-gradient(
    ellipse 90% 120% at 20% 50%,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.28) 55%,
    rgba(0, 0, 0, 0) 100%
  );
}

.xhero-type__stage {
  width: 100%;
}

.xhero-type .text-type {
  max-width: 100%;
  display: block;
}

@media (max-width: 720px) {
  .xhero-brand {
    left: 1rem;
    right: 1rem;
    bottom: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .xhero-pressure {
    width: min(78vw, 340px);
    height: clamp(56px, 16vw, 88px);
  }

  .xhero-type {
    max-width: 100%;
    font-size: clamp(0.72rem, 3.4vw, 0.92rem);
    margin: 0;
    padding: 0.15em 0.35em 0.2em;
    transform: none;
  }
}

.xstory-hero .xstory__inner,
.xstory-hero__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 3;
  max-width: min(40rem, 92vw);
  overflow: visible;
  /* No container filter — that silhouettes the whole block as a soft box. */
  filter: none;
}

/*
  Soft editorial legibility wash: wider, stronger (~0.5 center), still
  fades to 0 well inside oversized bounds — no hard edge.
*/
.xstory-hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  /* Bounds >> fade radius — gradient dies out well inside the box. */
  inset: -75% -95%;
  background: radial-gradient(
    ellipse 72% 66% at 50% 44%,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.34) 28%,
    rgba(0, 0, 0, 0.14) 52%,
    rgba(0, 0, 0, 0.04) 70%,
    rgba(0, 0, 0, 0) 80%
  );
}

/*
  Glyph glow: very soft, large, low-opacity — no tight halo / outline.
*/
.xstory-hero .xstory__kicker {
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.xstory-hero .xstory__lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 28rem;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.32),
    0 6px 48px rgba(0, 0, 0, 0.16);
}

.xstory-hero__tag {
  font-size: clamp(1.2rem, 3vw, 1.75rem) !important;
  font-weight: 400 !important;
  max-width: 18em;
  color: #fff !important;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.35),
    0 6px 48px rgba(0, 0, 0, 0.16);
}

.xstory-hero__brand {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 8.5vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: #fff;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.35),
    0 6px 56px rgba(0, 0, 0, 0.18);
}

.xstory-hero__brand--tech {
  display: block;
  width: min(94vw, 52rem);
  height: clamp(6.5rem, 18vw, 10.5rem);
  margin: 0 auto 0.85rem;
  text-shadow: none;
  pointer-events: auto;
  overflow: visible;
}

.xstory-hero__tech,
.xstory-hero__brand--tech .tech-text {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  color: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.xstory-hero__brand span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
}

.xstory-hero.is-ready .xstory-hero__brand:not(.xstory-hero__brand--tech) span {
  animation: xstory-char 0.7s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

@keyframes xstory-char {
  to {
    opacity: 1;
    transform: none;
  }
}

.xstory-hero__ctas {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
  pointer-events: auto;
}

.xstory-hero__cta {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  background: #fff !important;
  color: #0a0a0a !important;
  border: 1px solid #fff !important;
  min-height: 2.7rem;
  padding: 0.65rem 1.25rem;
}

.xstory-hero__cta:hover,
.xstory-hero__cta:focus-visible {
  opacity: 1;
  visibility: visible;
  background: #fff !important;
  color: #0a0a0a !important;
}

.xstory-hero__cta--ghost {
  /* Subtle dark fill so the outline CTA still reads on bright tiles. */
  background: rgba(0, 0, 0, 0.38) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.62) !important;
}

.xstory-hero__cta--ghost:hover {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
}

.xstory-hero__scroll {
  margin-top: 2.4rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.xstory-hero__scroll i {
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(#fff, transparent);
  animation: xstory-scroll-line 1.6s ease-in-out infinite;
}

/* —— Product wall (WebGL curved screens + CSS fallback) —— */
.xwall {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --xwall-px: 0;
  --xwall-py: 0;
  --xwall-spin: 0deg;
  --tile-w: 26vw;
  --radius: 86vw;
  --persp: 1100px;
  background: #050505;
}

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

.xwall__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: default;
  /* Allow vertical page scroll on mobile; wall still receives taps/clicks. */
  touch-action: pan-y;
}

.xwall.is-gl .xwall__canvas {
  pointer-events: auto;
}

@media (max-width: 900px) {
  /* Coarse touch: never trap the page — pan-y only, no pinch-zoom capture. */
  .xwall__canvas,
  .xwall.is-gl .xwall__canvas {
    touch-action: pan-y;
  }

  /* CSS fallback tiles also must not steal vertical scroll. */
  .xwall__tile {
    touch-action: pan-y;
  }
}

.xwall__a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  z-index: 2;
}

.xwall__a11y-link {
  position: absolute;
  left: 0;
  top: 0;
}

.xwall__a11y-link:focus {
  position: fixed;
  left: 0.75rem;
  top: calc(var(--nav-island-top, 0.9rem) + var(--nav-h, 3.85rem) + 0.5rem);
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: nowrap;
  z-index: 40;
  background: #fff;
  color: #0a0a0a;
  padding: 0.45rem 0.75rem;
  border-radius: 0.35rem;
  text-decoration: none;
  font-size: 0.85rem;
}

/* CSS fallback inherits 3D when WebGL is off */
.xwall.is-css-wall {
  perspective: var(--persp);
  perspective-origin: 50% 50%;
  -webkit-perspective: var(--persp);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.xwall__space {
  position: absolute;
  inset: 0;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  pointer-events: none;
}

.xwall.is-gl .xwall__space {
  display: none !important;
}

.xwall__belt {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transform:
    scale(1.18)
    rotateX(calc(var(--xwall-py) * 5deg))
    rotateY(calc(var(--xwall-spin) + var(--xwall-px) * 10deg));
  will-change: transform;
  pointer-events: none;
}

@media (max-width: 900px) {
  .xwall {
    perspective-origin: 50% 50%;
  }
  .xwall__belt {
    /* No extra scale on mobile — it shoved the wall off-center */
    transform:
      scale(1)
      rotateX(calc(var(--xwall-py) * 4deg))
      rotateY(calc(var(--xwall-spin) + var(--xwall-px) * 8deg));
  }
}

.xwall__tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tile-w);
  aspect-ratio: 16 / 10;
  margin-left: calc(var(--tile-w) / -2);
  margin-top: calc(var(--tile-w) * 0.625 / -2);
  border-radius: clamp(0.45rem, 0.9vw, 0.85rem);
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.4);
  text-decoration: none;
  color: #fff;
  --theta: 0deg;
  --phi: 0deg;
  --edge: 0;
  /*
    Sphere-section / concave wall facing the viewer:
    rotateY (column) → rotateX (row tilt) → translateZ(+R).
    No extra translateY — that broke the regular grid into a cluster.
  */
  transform:
    rotateY(var(--theta))
    rotateX(var(--phi))
    translateZ(var(--radius));
  -webkit-transform:
    rotateY(var(--theta))
    rotateX(var(--phi))
    translateZ(var(--radius));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: auto;
  outline: none;
  /* blur ONLY on the tile — never on belt/space ancestors */
  filter:
    blur(calc(var(--edge) * 3.2px))
    brightness(calc(1 - var(--edge) * 0.62));
  opacity: calc(1 - var(--edge) * 0.18);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.xwall__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* No captions under tiles — aria-label on the anchor is enough. */
.xwall__tile span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.xwall__tile:hover,
.xwall__tile:focus-visible {
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.55);
  filter: blur(0) brightness(1.06);
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 1.2rem 2.6rem rgba(0, 0, 0, 0.5);
}

.xwall__tile:hover img,
.xwall__tile:focus-visible img {
  filter: grayscale(0.1) contrast(1.08);
  transform: scale(1.03);
}

.xwall__tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.xwall__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 68% at 50% 50%, transparent 0%, rgba(5, 5, 5, 0.12) 48%, rgba(5, 5, 5, 0.72) 82%, #050505 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, transparent 12%, transparent 88%, rgba(5, 5, 5, 0.4) 100%);
}

.xwall.is-gl .xwall__vignette {
  /* Lighter overlay — shader already handles edge fade on bowed screens */
  background:
    radial-gradient(ellipse 70% 72% at 50% 48%, transparent 0%, rgba(5, 5, 5, 0.08) 55%, rgba(5, 5, 5, 0.55) 88%, #050505 100%);
}

/* Logo-only review: darker field so the white electric mark reads clearly */
.xstory-hero.is-logo-only {
  background: #000 !important;
}

.xstory-hero.is-logo-only .xwall {
  background: #000;
}

.xstory-hero.is-logo-only .xwall__gl,
.xstory-hero.is-logo-only .xwall__canvas,
.xstory-hero.is-logo-only .xwall__space {
  filter: brightness(0.58) contrast(1.04);
}

.xstory-hero.is-logo-only .xwall__vignette,
.xstory-hero.is-logo-only .xwall.is-gl .xwall__vignette {
  background:
    radial-gradient(
      ellipse 62% 64% at 50% 48%,
      rgba(0, 0, 0, 0.16) 0%,
      rgba(0, 0, 0, 0.38) 44%,
      rgba(0, 0, 0, 0.68) 74%,
      #000 100%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.45) 100%);
}

/* Keep the electric pocket a bit deeper too */
.xstory-hero.is-logo-only .xhero-electric__stage::before {
  background: radial-gradient(
    ellipse 58% 54% at 50% 50%,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 38%,
    rgba(0, 0, 0, 0.14) 62%,
    rgba(0, 0, 0, 0) 78%
  );
}

.xwall__fallback {
  position: absolute;
  inset: auto 1rem 1rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.xwall__fallback a {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.4rem 0.7rem;
  border-radius: 0.35rem;
  text-decoration: none;
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .xwall {
    perspective-origin: 50% 42%;
  }

  .xstory-hero__copy {
    max-width: min(22rem, 90vw);
    filter: none;
  }

  .xstory-hero__copy::before {
    inset: -70% -85%;
  }

  .xstory-hero .xstory__lead {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .xstory-hero__ctas {
    width: 100%;
  }

  .xstory-hero__cta {
    flex: 1 1 auto;
  }
}

@keyframes xstory-scroll-line {
  0%,
  100% {
    transform: scaleY(0.45);
    opacity: 0.35;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* —— 02 What —— */
.xstory-what {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

@media (max-width: 820px) {
  .xstory-what {
    grid-template-columns: 1fr;
  }
}

.xstory-keys {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.xstory-key {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0.35;
  transform: translateX(18px);
  transition: opacity 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), transform 0.55s, border-color 0.4s, background 0.4s;
}

.xstory-key.is-on {
  opacity: 1;
  transform: none;
  border-color: rgba(0, 0, 0, 0.22);
  background: #fff;
}

.xstory-key__no {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #6b6b6b;
}

.xstory-key__word {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #0a0a0a;
}

.xstory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.xstory-chips span {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #3a3a3a;
  background: #fff;
}

/* —— 03 Domains —— */
.xstory-domains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.2rem;
}

@media (max-width: 820px) {
  .xstory-domains {
    grid-template-columns: 1fr;
  }
}

.xstory-domain {
  position: relative;
  min-height: 16rem;
  padding: 1.4rem 1.25rem 1.5rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  overflow: hidden;
  transition: transform 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), border-color 0.35s;
}

.xstory-domain:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 0, 0, 0.22);
}

.xstory-domain__no {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #6b6b6b;
}

.xstory-domain h3 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.xstory-domain p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
  color: #6b6b6b;
}

.xstory-domain__viz {
  position: absolute;
  right: -10%;
  bottom: -18%;
  width: 70%;
  height: 55%;
  opacity: 0.14;
  pointer-events: none;
}

.xstory-domain__viz--code {
  background:
    repeating-linear-gradient(180deg, #0a0a0a 0 2px, transparent 2px 10px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(10, 10, 10, 0.25) 18px 19px);
  mask-image: linear-gradient(135deg, transparent, #000 40%);
}

.xstory-domain__viz--nodes {
  background:
    radial-gradient(circle at 20% 40%, #0a0a0a 0 4px, transparent 5px),
    radial-gradient(circle at 55% 30%, #0a0a0a 0 3px, transparent 4px),
    radial-gradient(circle at 70% 65%, #0a0a0a 0 5px, transparent 6px),
    radial-gradient(circle at 35% 75%, #0a0a0a 0 3px, transparent 4px);
}

.xstory-domain__viz--wire {
  border: 1px solid #0a0a0a;
  border-radius: 0.6rem;
  background:
    linear-gradient(#0a0a0a, #0a0a0a) 12% 18% / 40% 6% no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) 12% 38% / 70% 4% no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) 12% 52% / 55% 4% no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) 12% 72% / 48% 18% no-repeat;
}

/* —— 04 Teams —— */
.xstory-teams {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: stretch;
  margin-top: 1.8rem;
}

@media (max-width: 820px) {
  .xstory-teams {
    grid-template-columns: 1fr;
  }
}

.xstory-team-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.xstory-team-tab {
  text-align: left;
  padding: 1.05rem 1.15rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #6b6b6b;
  cursor: pointer;
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}

.xstory-team-tab.is-active {
  color: #0a0a0a;
  border-color: rgba(0, 0, 0, 0.28);
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.xstory-team-tab strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.xstory-team-tab span {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.xstory-team-stage {
  position: relative;
  min-height: 18rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background:
    radial-gradient(80% 70% at 20% 10%, rgba(255, 255, 255, 0.9), transparent 55%),
    #f3f4f6;
  padding: 1.7rem 1.5rem;
  overflow: hidden;
}

.xstory-team-card {
  position: absolute;
  inset: 0;
  padding: 1.7rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.5s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), transform 0.5s, visibility 0s linear 0.5s;
}

.xstory-team-card.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), transform 0.5s, visibility 0s;
}

.xstory-team-card h3 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #0a0a0a;
}

.xstory-team-card p {
  margin: 0 0 1.2rem;
  max-width: 28rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: #6b6b6b;
}

.xstory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.xstory-tags span {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #3a3a3a;
  background: #fff;
}

.xstory-note {
  margin-top: 1.6rem;
  max-width: 40rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: #6b6b6b;
}

/* —— 05 Products —— */
.xstory-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 2rem;
}

@media (max-width: 820px) {
  .xstory-products {
    grid-template-columns: 1fr;
  }
}

.xstory-product {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.xstory-product:hover {
  transform: translateY(-4px);
}

.xstory-product__screen {
  position: relative;
  flex: 1;
  min-height: 11rem;
  background: #f0f1f3;
  overflow: hidden;
}

.xstory-product__screen--miss {
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.06), transparent 40%),
    linear-gradient(160deg, #f7f7f7, #e9eaee);
}

.xstory-product__screen--thui {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 40%),
    linear-gradient(140deg, #f4f5f7, #e6e8ec);
}

.xstory-mock {
  position: absolute;
  inset: 18% 12% 10%;
  border-radius: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.78);
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.xstory-mock i {
  display: block;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.xstory-mock i:nth-child(1) {
  width: 42%;
}
.xstory-mock i:nth-child(2) {
  width: 70%;
}
.xstory-mock i:nth-child(3) {
  width: 58%;
}
.xstory-mock i:nth-child(4) {
  height: 3.2rem;
  width: 100%;
  border-radius: 0.45rem;
  margin-top: 0.35rem;
  background: rgba(0, 0, 0, 0.06);
}

.xstory-product__copy {
  padding: 1.35rem 1.3rem 1.5rem;
}

.xstory-product__copy h3 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.xstory-product__copy p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
  color: #6b6b6b;
}

/* —— 06 Web service —— */
.xstory-build {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-top: 1.8rem;
}

@media (max-width: 820px) {
  .xstory-build {
    grid-template-columns: 1fr;
  }
}

.xstory-build__demo {
  aspect-ratio: 16 / 11;
  border-radius: 1.35rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 1rem;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.05);
}

.xstory-site {
  height: 100%;
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f7f7f7;
  color: #0a0a0a;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.xstory-site__bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  background: #ececec;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.xstory-site__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfcfcf;
}

.xstory-site__canvas {
  position: relative;
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.xstory-site__piece {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), transform 0.55s;
}

.xstory-build__demo.is-step-1 .xstory-site__piece--nav,
.xstory-build__demo.is-step-2 .xstory-site__piece--nav,
.xstory-build__demo.is-step-3 .xstory-site__piece--nav,
.xstory-build__demo.is-step-4 .xstory-site__piece--nav,
.xstory-build__demo.is-step-2 .xstory-site__piece--hero,
.xstory-build__demo.is-step-3 .xstory-site__piece--hero,
.xstory-build__demo.is-step-4 .xstory-site__piece--hero,
.xstory-build__demo.is-step-3 .xstory-site__piece--text,
.xstory-build__demo.is-step-4 .xstory-site__piece--text,
.xstory-build__demo.is-step-4 .xstory-site__piece--media {
  opacity: 1;
  transform: none;
}

.xstory-site__piece--nav {
  height: 1.6rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.xstory-site__piece--hero {
  height: 3.4rem;
  border-radius: 0.7rem;
  background: linear-gradient(90deg, #111, #333);
}

.xstory-site__piece--text {
  height: 0.55rem;
  width: 70%;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.xstory-site__piece--text:nth-of-type(4) {
  width: 52%;
}

.xstory-site__piece--media {
  height: 4.2rem;
  border-radius: 0.7rem;
  background: rgba(0, 0, 0, 0.08);
}

.xstory-points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.xstory-points li {
  font-size: 0.92rem;
  font-weight: 300;
  color: #3a3a3a;
  padding-left: 1rem;
  position: relative;
}

.xstory-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0a0a;
}

/* —— 07 CTA —— */
.xstory-cta {
  text-align: center;
  justify-items: center;
  background: #fff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.xstory-cta .xstory__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.xstory-cta .xstory__lead,
.xstory-cta .xstory__body {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.xstory-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
}

.xstory-cta .btn {
  color: #0a0a0a !important;
  border-color: #0a0a0a !important;
}

.xstory-cta .btn .btn__fill {
  background: #0a0a0a !important;
}

.xstory-cta .btn:hover {
  color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
  .xstory-hero__scroll i,
  .xstory-hero.is-ready .xstory-hero__brand span {
    animation: none !important;
  }

  .xstory-hero__brand span,
  .xstory [data-x-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .xwall__belt {
    transform: none !important;
  }

  .xwall__tile {
    filter: brightness(0.92) !important;
    opacity: 1 !important;
  }
}
