/* =================================================================
   System Sense Thailand — junni-inspired homepage
   Loaded ONLY on the front page (see functions.php).
   Dark, kinetic, experiential. Brand: orange var(--brand) / blue #28A4FF.
   ================================================================= */

:root {
  --h-bg: #06070d;
  --h-bg-2: #0b0d18;
  --h-fg: #ffffff;
  --h-muted: #b3b6c6;
  --h-line: rgba(255, 255, 255, 0.12);
  --h-orange: var(--brand);
  --h-blue: var(--color-accent-blue);
  --ease-out: var(--ease);   /* shared easing, defined in style.css :root */
  --jp-scale: 1;             /* big vw-based headings shrink on Japanese, see body.lang-ja */
}
/* full-width CJK glyphs read much bigger than Latin letters at the same
   font-size, so the same clamp() values look oversized once translated */
body.lang-ja { --jp-scale: .78; }

/* ---- base page shell ---- */
body.home {
  background: var(--h-bg);
  color: var(--h-fg);
  overflow-x: clip;   /* clip, not hidden — hidden would break the hero sticky pin */
}
/* body height (set by JS) drives the native scrollbar; the wrap is fixed
   and translated to follow it, producing the inertia feel. */
html.smooth-on body.home { overflow-x: clip; }

html.smooth-on #smooth-wrap {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  will-change: transform;
}
#smooth-wrap { background: var(--h-bg); }

::selection { background: var(--h-orange); color: #000; }

body.home a { -webkit-tap-highlight-color: transparent; }

/* hide native cursor when custom one is active */
body.home.has-custom-cursor,
body.home.has-custom-cursor a,
body.home.has-custom-cursor button,
body.home.has-custom-cursor .service-row { cursor: none; }

/* =================================================================
   Custom cursor
   ================================================================= */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  margin: -4px 0 0 -4px;
}
.cursor-dot { width: 8px; height: 8px; background: var(--h-orange); }
.cursor-ring {
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              margin .25s var(--ease-out), background-color .25s, border-color .25s;
}
body.cursor-active .cursor-ring {
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(var(--brand-rgb), 0.15);
  border-color: var(--h-orange);
}

/* =================================================================
   Header (overlay, transparent → solid on scroll)
   ================================================================= */
body.home #site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 0 40px;
  z-index: 1000;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
body.home #site-header.is-scrolled {
  background: rgba(6, 7, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--h-line);
}
body.home .header-inner { height: 84px; max-width: 1280px; }
body.home .primary-menu a,
body.home .header-logo a { color: var(--h-fg); }
body.home .primary-menu a {
  font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  position: relative; opacity: .85; transition: opacity .3s;
}
body.home .primary-menu a:hover { opacity: 1; }
body.home .lang-switch { color: var(--h-fg); }
body.home .header-logo { color: var(--h-fg); }   /* white wordmark, pink "S" accent */
body.home .btn-consultation {
  background: var(--h-fg); color: #000; font-weight: 600;
  padding: 12px 22px; letter-spacing: .02em;
  transition: transform .3s var(--ease-out), background-color .3s;
}
body.home .btn-consultation:hover { background: var(--h-orange); color: #000; }
body.home .primary-menu .sub-menu { background: var(--h-bg-2); }
body.home .primary-menu .sub-menu li a { color: var(--h-fg); }
body.home .primary-menu .sub-menu li a:hover { background: rgba(255,255,255,.06); }
body.home .nav-chevron { filter: brightness(0) invert(1); }

/* =================================================================
   Generic motion primitives (reveals)
   ================================================================= */
[data-reveal] { will-change: transform, opacity; }

/* fade/slide up */
[data-reveal="up"] { opacity: 0; transform: translateY(60px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
[data-reveal="up"].is-in { opacity: 1; transform: none; }

[data-reveal="fade"] { opacity: 0; transition: opacity 1.2s var(--ease-out); }
[data-reveal="fade"].is-in { opacity: 1; }

/* whole-section reveal — the background block eases in as it enters */
[data-reveal="section"] { opacity: 0; transition: opacity 1.1s var(--ease-out); }
[data-reveal="section"].is-in { opacity: 1; }

/* word-by-word kinetic reveal */
[data-reveal="words"] .word { display: inline-block; overflow: hidden; vertical-align: top; }
[data-reveal="words"] .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .9s var(--ease-out);
}
[data-reveal="words"].is-in .word-inner { transform: translateY(0); }
/* stagger */
[data-reveal="words"] .word:nth-child(1) .word-inner { transition-delay: .02s; }
[data-reveal="words"] .word:nth-child(2) .word-inner { transition-delay: .07s; }
[data-reveal="words"] .word:nth-child(3) .word-inner { transition-delay: .12s; }
[data-reveal="words"] .word:nth-child(4) .word-inner { transition-delay: .17s; }
[data-reveal="words"] .word:nth-child(5) .word-inner { transition-delay: .22s; }
[data-reveal="words"] .word:nth-child(6) .word-inner { transition-delay: .27s; }
[data-reveal="words"] .word:nth-child(7) .word-inner { transition-delay: .32s; }
[data-reveal="words"] .word:nth-child(8) .word-inner { transition-delay: .37s; }
[data-reveal="words"] .word:nth-child(n+9) .word-inner { transition-delay: .42s; }

/* =================================================================
   HERO — junni-style flip-panel grid (pinned, scroll-driven)
   ================================================================= */
:root { --h-lime: var(--brand); }   /* flip-reveal colour (brand orange) */

/* tall outer = scroll room for the pin; JS sets exact height */
.j-hero {
  position: relative;
  background: var(--h-bg);
}
/* the visual layer — JS translates this to keep it screen-fixed while pinned */
.j-hero-sticky {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  will-change: transform;
  background: var(--h-bg);
}
/* Touch devices: pin natively so the hero stays frozen while the panels flip
   (junni-style), compositor-driven so it can't drift/tremble like the JS pin.
   Only works because the overflow-x guards use `clip`, not `hidden`. The JS
   counter-translate is skipped on touch (same media query, in home.js). */
@media (hover: none), (pointer: coarse) {
  .j-hero-sticky { position: sticky; top: 0; will-change: auto; }
}

/* ---------- the flip grid ---------- */
.j-grid {
  position: absolute; inset: 0; z-index: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), 1fr);
  grid-template-rows: repeat(var(--rows, 4), 1fr);
}
.j-tile { position: relative; perspective: 900px; }
.j-tile-inner {
  position: absolute; inset: 3px;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  will-change: transform;
}
.j-tile-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--tile-r, 10px);
}
.j-tile-face--front {
  background: linear-gradient(155deg, #0d0f1a 0%, var(--h-bg) 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.j-tile-face--back {
  background: var(--h-lime);
  transform: rotateY(180deg);
}

/* one-shot hover flip (flash green, return to black) */
.j-tile.is-hover .j-tile-inner { animation: tileHoverFlip 0.8s var(--ease-out); }
@keyframes tileHoverFlip {
  0%   { transform: rotateY(0deg); }
  50%  { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

/* ---------- content states ---------- */
.j-hero-state {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px 0;   /* top pad nudges the centered content down a bit */
  pointer-events: none;
}
.j-hero-state--2 { pointer-events: none; }

.j-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--h-muted); margin-bottom: 26px;
}
.j-eyebrow::before, .j-eyebrow::after {
  content: ""; width: 26px; height: 1px; background: var(--h-orange);
}
.j-eyebrow--dark { color: rgba(6,7,13,0.7); }
.j-eyebrow--dark::before, .j-eyebrow--dark::after { background: #06070d; }

/* STATE 1 wordmark */
.j-wordmark {
  font-weight: 800;
  font-size: clamp(3rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--h-fg);
}
.j-hero-tagline {
  margin-top: 22px;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: .15em;
  color: var(--h-muted);
}

/* STATE 2 message (on green) */
.j-state2-title {
  font-weight: 800;
  font-size: calc(clamp(2rem, 5.5vw, 5rem) * var(--jp-scale));
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: #06070d;
}
.j-state2-sub {
  max-width: 620px;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.7;
  color: rgba(6, 7, 13, 0.78);
  margin-bottom: 38px;
}
.j-hero-state--2 .j-hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  pointer-events: auto;
}
.j-hero-state--2 .j-btn--solid { background: #06070d; color: #fff; }
.j-hero-state--2 .j-btn--solid::before { background: #fff; }
.j-hero-state--2 .j-btn--solid:hover { color: #000; }
.j-hero-state--2 .j-btn--ghost { border-color: rgba(6,7,13,0.35); color: #06070d; }
.j-hero-state--2 .j-btn--ghost::before { background: #06070d; }
.j-hero-state--2 .j-btn--ghost:hover { color: #fff; border-color: #06070d; }

/* ---------- rotating scroll badge ---------- */
.j-scroll-badge {
  position: absolute; bottom: 40px; right: 56px; z-index: 3;
  width: 96px; height: 96px;
}
.j-scroll-badge svg {
  width: 100%; height: 100%;
  animation: badge-spin 14s linear infinite;
}
.j-scroll-badge text {
  font-size: 11px; letter-spacing: 0.12em; fill: var(--h-muted);
  text-transform: uppercase;
}
.j-scroll-badge-dot {
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--h-orange); transform: translate(-50%, -50%);
}
@keyframes badge-spin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
  .j-scroll-badge { width: 72px; height: 72px; right: 24px; bottom: 24px; }
}

.j-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 34px;
  border-radius: 100px;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  text-decoration: none;
  overflow: hidden;
  transition: transform .35s var(--ease-out);
}
.j-btn span { position: relative; z-index: 1; }
.j-btn--solid { background: var(--h-orange); color: #000; }
.j-btn--solid::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--h-fg); transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.j-btn--solid:hover::before { transform: translateY(0); }
.j-btn--ghost { border: 1px solid var(--h-line); color: var(--h-fg); }
.j-btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--h-fg); transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.j-btn--ghost:hover { color: #000; border-color: var(--h-fg); }
.j-btn--ghost:hover::before { transform: translateY(0); }
.j-btn--dark { background: #0d0f1a; color: #fff; border: 2px solid #0d0f1a; }
.j-btn--dark::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: #fff; transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.j-btn--dark:hover { color: #0d0f1a; }
.j-btn--dark:hover::before { transform: translateY(0); }

/* scroll-down marquee at hero bottom */
.j-hero-scroll {
  position: absolute; bottom: 0; left: 0; z-index: 2;
  width: 100%; padding: 18px 0;
  border-top: 1px solid var(--h-line);
  overflow: hidden;
}

/* =================================================================
   Marquee
   ================================================================= */
.j-marquee { overflow: hidden; white-space: nowrap; display: flex; }
.j-marquee-track {
  display: inline-flex; flex-shrink: 0; align-items: center;
  animation: j-scroll 28s linear infinite;
  will-change: transform;
}
.j-marquee--reverse .j-marquee-track { animation-direction: reverse; }
.j-marquee:hover .j-marquee-track { animation-play-state: paused; }
.j-marquee-track > span {
  display: inline-flex; align-items: center;
  padding: 0 28px;
  font-size: 13px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--h-muted);
}
.j-marquee-track > span::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--h-orange); margin-left: 28px;
}
@keyframes j-scroll { to { transform: translateX(-50%); } }

/* big band marquee (section divider) */
.j-band {
  padding: 60px 0; border-top: 1px solid var(--h-line); border-bottom: 1px solid var(--h-line);
  background: var(--h-bg);
}
.j-band .j-marquee-track > span {
  font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 700; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.35);
  text-transform: none; padding: 0 40px;
}
.j-band .j-marquee-track > span::after { display: none; }
.j-band .j-marquee-track > span.fill { color: var(--h-orange); -webkit-text-stroke: 0; }

/* =================================================================
   Section scaffold
   ================================================================= */
.j-section { position: relative; padding: 140px 0; }
.j-container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.j-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--h-orange); margin-bottom: 26px;
}
.j-label::before { content: "("; color: var(--h-muted); }
.j-label::after { content: ")"; color: var(--h-muted); }
.j-h2 {
  font-weight: 700; line-height: 1.02; letter-spacing: -.02em;
  font-size: calc(clamp(2rem, 4.6vw, 4.2rem) * var(--jp-scale));
  margin: 0 0 28px;
  color: var(--h-fg);
}
.j-lead { color: var(--h-muted); font-size: clamp(1rem,1.3vw,1.18rem); line-height: 1.8; max-width: 560px; }

/* =================================================================
   About — clean white statement
   ================================================================= */
.j-about { background: #ffffff; }
.j-about-inner { text-align: center; }
.j-about-inner .j-label { justify-content: center; }

/* big statement that lights up word-by-word as you scroll */
.j-about-reveal {
  max-width: 16ch; max-width: min(640px, 92%); margin: 0 auto;
  text-align: center;
  font-weight: 300; letter-spacing: -.01em;
  font-size: calc(clamp(1.7rem, 3.6vw, 2.7rem) * var(--jp-scale)); line-height: 1.4;
  color: var(--h-fg);
}
.j-about-reveal .word { display: inline-block; }
.j-about-reveal .word-inner {
  display: inline-block;
  opacity: .14;                         /* dim until the scroll "read head" reaches it */
  transition: opacity .15s linear;
}
.j-about-link { margin-top: 38px; display: inline-flex; }

/* pill tag (e.g. "WHO WE ARE") */
.j-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand);
  padding: 7px 16px 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 34%, transparent);
  margin-bottom: 26px;
}
.j-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
.j-about-headline {
  font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(2.3rem, 6vw, 5.4rem); margin: 0 0 26px; color: var(--h-fg);
}
.j-about-lead {
  color: var(--h-muted); max-width: 560px; margin: 0 auto 30px;
  font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.8;
}
.j-about-inner .j-link { color: var(--h-fg); }
.j-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  color: var(--h-fg); text-decoration: none; font-weight: 600; letter-spacing: .02em;
}
.j-link .arrow { transition: transform .4s var(--ease-out); }
.j-link:hover .arrow { transform: translateX(8px); }
.j-link::after { content: ""; }

/* =================================================================
   Services — 3D rolling drum of work cards (junni-style)
   ================================================================= */
.j-services { background: var(--h-bg); overflow: hidden; }
.svc-roll {
  margin-top: 56px;
  display: flex; flex-direction: column; gap: 28px;
}
/* The <a> is a FLAT, untransformed click box — this keeps the whole card
   clickable. The 3D drum rotation is applied to .svc-card-inner instead
   (JS), which foreshortens inward so the visual always stays within the
   link's hit box. Don't move the transform back onto the <a>. */
.svc-card {
  position: relative; display: block;
  text-decoration: none; color: #fff;
  /* reset the generic .svc-card card styling from style.css so the <a> is a
     bare, transparent click box (the gradient/padding live on .svc-card-inner) */
  background: transparent; padding: 0; border: 0; border-radius: 0; gap: 0;
}
.svc-card-inner {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 220px; padding: 44px clamp(28px, 5vw, 56px);
  border-radius: 20px;
  transform-origin: center center; backface-visibility: hidden;
  will-change: transform, opacity;
  box-shadow: 0 36px 70px -34px rgba(0, 0, 0, 0.7);
  transition: filter .35s ease;
}
.svc-card:hover .svc-card-inner { filter: brightness(1.08); }
.svc-card--1 .svc-card-inner { background: linear-gradient(120deg, var(--brand) 0%, #ff4d6d 100%); }
.svc-card--2 .svc-card-inner { background: linear-gradient(120deg, var(--color-accent-blue) 0%, #2b5cff 100%); }
.svc-card--3 .svc-card-inner { background: linear-gradient(120deg, #10c8a8 0%, #1188b8 100%); }
.svc-card--4 .svc-card-inner { background: linear-gradient(120deg, #b15eff 0%, #6d28d9 100%); }
.svc-card--5 .svc-card-inner { background: linear-gradient(120deg, #34d399 0%, #059669 100%); }
.svc-num {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px; letter-spacing: .2em; opacity: .82; margin-bottom: 12px;
}
.svc-title { font-size: calc(clamp(1.8rem, 4vw, 3.2rem) * var(--jp-scale)); font-weight: 800; letter-spacing: -.02em; line-height: 1.04; }
.svc-desc { margin-top: 14px; max-width: 46ch; font-size: 1rem; line-height: 1.6; opacity: .92; }
.svc-go {
  position: absolute; top: 34px; right: clamp(28px, 5vw, 56px);
  font-size: 1.7rem; transition: transform .4s var(--ease-out);
}
.svc-card:hover .svc-go { transform: translate(6px, -6px); }

/* =================================================================
   Company history — scroll-driven timeline (elephant rides the line)
   ================================================================= */
.j-history { background: var(--h-bg); overflow: hidden; }

.hist-head { text-align: center; margin-bottom: clamp(60px, 9vh, 120px); }
.hist-kicker {
  display: inline-block; font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: 22px;
}
.hist-title {
  margin: 0; font-weight: 800; line-height: 0.98; letter-spacing: -.02em;
  font-size: calc(clamp(2.4rem, 7vw, 5.6rem) * var(--jp-scale)); text-transform: uppercase;
}
.hist-title span { display: block; }
.hist-title-solid { color: var(--h-fg); }
.hist-title-outline {
  color: var(--h-fg);
}

/* ---- the timeline ---- */
.hist-timeline { position: relative; max-width: 1000px; margin: 0 auto; }

/* center spine */
.hist-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  transform: translateX(-50%); background: rgba(255, 255, 255, 0.1);
}
.hist-line-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 40%, transparent), var(--brand));
  box-shadow: 0 0 14px rgba(var(--brand-rgb), 0.6);
  border-radius: 2px;
}

/* the elephant that descends the line */
.hist-rider {
  position: absolute; left: 50%; top: 0; width: clamp(56px, 6vw, 78px);
  transform: translate(-50%, 0); z-index: 6; will-change: transform; pointer-events: none;
}
.hist-rider::before {
  content: ""; position: absolute; inset: -40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), 0.35), transparent 65%);
  filter: blur(4px); z-index: -1;
}
.hist-rider-inner { animation: hist-bob 3s ease-in-out infinite; }
.hist-el { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,.5)); }
.hist-el .el-ear, .hist-el .el-tail-tip { fill: var(--brand); }
@keyframes hist-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
/* Mobile: hide the rider elephant — its scroll-driven transform wobbles on touch
   (compositor vs JS frame lag). The fill line and node lighting still animate. */
@media (hover: none), (pointer: coarse) {
  .hist-rider { display: none; }
}

/* ---- items ---- */
.hist-item {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: clamp(56px, 9vh, 120px);
}
.hist-item:last-child { margin-bottom: 0; }

.hist-node {
  position: absolute; left: 50%; top: 36px; width: 16px; height: 16px;
  transform: translate(-50%, -50%); border-radius: 50%; z-index: 4;
  background: #1b1d2b; border: 2px solid rgba(255, 255, 255, 0.25);
  transition: background-color .4s var(--ease-out), border-color .4s, box-shadow .4s;
}
.hist-node.is-active {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 6px rgba(var(--brand-rgb), 0.14), 0 0 22px rgba(var(--brand-rgb), 0.7);
}

.hist-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px; padding: 30px 34px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .5s var(--ease-out), border-color .4s, background-color .4s;
}
.hist-item--left .hist-card  { grid-column: 1; margin-right: clamp(36px, 5vw, 70px); text-align: right; align-items: flex-end; }
.hist-item--right .hist-card { grid-column: 2; margin-left: clamp(36px, 5vw, 70px); }
.hist-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-rgb), 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.hist-year {
  font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 800; line-height: 1;
  color: var(--brand); letter-spacing: -.02em; margin-bottom: 6px;
}
.hist-co { margin: 0; font-size: 1.18rem; font-weight: 700; color: var(--h-fg); }
.hist-loc {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--h-muted); font-weight: 600;
}
.hist-desc { margin: 8px 0 0; font-size: 1rem; line-height: 1.7; color: var(--h-muted); max-width: 42ch; }

@media (max-width: 760px) {
  .hist-line { left: 22px; }
  .hist-rider { left: 22px; }
  .hist-node { left: 22px; top: 30px; }
  .hist-item { grid-template-columns: 1fr; }
  .hist-item--left .hist-card,
  .hist-item--right .hist-card {
    grid-column: 1; margin: 0 0 0 56px; text-align: left; align-items: flex-start;
  }
}

/* =================================================================
   Why choose us — stats + features
   ================================================================= */
.j-why { background: var(--h-bg-2); }
.j-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 70px 0 90px; }
.j-stat { border-top: 1px solid var(--h-line); padding-top: 24px; }
.j-stat .num {
  font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; letter-spacing: -.03em;
  color: var(--h-fg); line-height: 1;
  background: linear-gradient(120deg, var(--h-orange), var(--h-blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.j-stat .label { color: var(--h-muted); margin-top: 14px; font-size: .95rem; letter-spacing: .02em; }

.j-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.j-feature {
  border: 1px solid var(--h-line); border-radius: 14px; padding: 32px 26px;
  background: rgba(255,255,255,.02);
  transition: transform .5s var(--ease-out), background-color .5s, border-color .5s;
}
.j-feature:hover { transform: translateY(-8px); background: rgba(var(--brand-rgb),.06); border-color: rgba(var(--brand-rgb),.4); }
.j-feature .f-icon {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 22px;
  display: grid; place-items: center; background: rgba(255,255,255,.06);
}
.j-feature .f-icon img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.j-feature .f-icon .f-ic {
  display: block; width: 24px; height: 24px; background: var(--brand);
  -webkit-mask: var(--ic) center / contain no-repeat;
          mask: var(--ic) center / contain no-repeat;
}
.j-feature h3 { color: var(--h-fg); font-size: 1.05rem; margin-bottom: 10px; transition: color .3s; }
.j-feature p { color: var(--h-muted); font-size: 1rem; line-height: 1.7; }

/* ---- interactive polish: tilt + spotlight + lively icon ---- */
.j-feature { position: relative; isolation: isolate; overflow: hidden; will-change: transform; }
.j-feat-spot {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  opacity: 0; transition: opacity .4s var(--ease-out);
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              rgba(var(--brand-rgb), .18), transparent 60%);
}
.j-feature:hover .j-feat-spot { opacity: 1; }
.j-feature:hover h3 { color: var(--brand); }
.j-feature .f-icon { transition: transform .45s var(--ease-out), background-color .4s; }
.j-feature:hover .f-icon {
  transform: translateY(-4px) rotate(-8deg) scale(1.06);
  background: rgba(var(--brand-rgb), .18);
}
.j-feature .f-ic { transition: transform .45s var(--ease-out); }
.j-feature:hover .f-ic { transform: scale(1.1); }

/* stats react a touch on hover */
.j-stat { transition: transform .4s var(--ease-out), border-color .4s; }
.j-stat:hover { transform: translateY(-4px); border-top-color: rgba(var(--brand-rgb), .55); }

/* =================================================================
   Footer (dark on home)
   ================================================================= */
body.home .site-footer { background: var(--h-bg); border-top: 1px solid var(--h-line); padding-top: 80px; }
body.home .footer-inner { max-width: 1400px; margin: 0 auto; padding: 0 40px 60px; }
body.home .footer-tagline,
body.home .footer-links a { color: var(--h-muted); }
body.home .footer-col-title { color: var(--h-fg); }
body.home .footer-links a:hover { color: var(--h-orange); }
body.home .footer-logo { color: var(--h-fg); }   /* white wordmark, pink "S" accent stays fixed */
body.home .footer-bottom { border-top: 1px solid var(--h-line); }
body.home .footer-bottom p { color: var(--h-muted); }

/* =================================================================
   Section themes (light / orange) — override the colour variables so
   every var()-driven element inside adapts automatically.
   ================================================================= */
.j-theme-light {
  --h-bg: #ffffff;
  --h-fg: #0b0d16;
  --h-muted: #5c5f6e;
  --h-line: rgba(0, 0, 0, 0.12);
  background: var(--h-bg);
  color: var(--h-fg);
}
.j-theme-orange {
  --h-bg: var(--brand);
  --h-fg: #1c0f00;
  --h-muted: rgba(28, 15, 0, 0.74);
  --h-line: rgba(0, 0, 0, 0.22);
  background: var(--h-bg);
  color: var(--h-fg);
}

/* feature cards on a light background */
.j-theme-light .j-feature { background: #f6f7f9; }
.j-theme-light .j-feature:hover {
  background: #fff; border-color: rgba(var(--brand-rgb), 0.45);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
}
.j-theme-light .j-feature .f-icon { background: rgba(var(--brand-rgb), 0.12); }
/* icons are forced white for dark sections — make them dark on light/orange */
.j-theme-light .j-feature .f-icon img,
.j-theme-orange .j-feature .f-icon img { filter: brightness(0); }

/* outlined band text on orange */
.j-theme-orange.j-band .j-marquee-track > span { -webkit-text-stroke-color: rgba(0, 0, 0, 0.45); }
.j-theme-orange.j-band .j-marquee-track > span.fill { color: #1c0f00; -webkit-text-stroke: 0; }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 1024px) {
  .j-about-grid, .j-ceo-grid { grid-template-columns: 1fr; gap: 48px; }
  .j-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .j-stats { grid-template-columns: 1fr; gap: 24px; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-row .s-desc { display: none; }
}
@media (max-width: 768px) {
  body.home #site-header, .j-hero-inner, .j-container,
  body.home .footer-inner, body.home .contact { padding-left: 22px; padding-right: 22px; }
  .j-section { padding: 90px 0; }
  .j-feature-grid { grid-template-columns: 1fr; }
  .service-row .s-go { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .j-marquee-track { animation: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-reveal="words"] .word-inner { transform: none !important; }
}

/* =================================================================
   Mascot — walking elephant with speech bubble
   ================================================================= */
.mascot-band {
  position: relative; overflow: hidden;
  height: 250px;
  margin-top: 15px;
  background-color: transparent;
}
.mascot {
  position: absolute; left: 0; bottom: 44px;
  display: flex; flex-direction: column; align-items: center;
  transform: translateX(-220px); will-change: transform;
}
/* touch fallback: auto-walk loop (no cursor to follow) */
.mascot-band.is-autowalk .mascot { animation: mascot-walk 17s linear infinite; }
@keyframes mascot-walk {
  from { transform: translateX(-220px); }
  to   { transform: translateX(calc(100vw + 80px)); }
}

/* overflow: visible — the ear rides right at the top edge of the viewBox,
   and el-bob's upward translate would otherwise get clipped by the SVG */
.mascot-el { width: clamp(112px, 16vw, 150px); height: auto; display: block; position: relative; z-index: 1; transform-origin: center bottom; overflow: visible; }
.mascot-shadow {
  position: absolute; bottom: 2px; left: 50%; z-index: 0;
  width: 116px; height: 15px; border-radius: 50%;
  background: rgba(21, 41, 75, 0.13); filter: blur(2px);
  transform: translateX(-50%);
}

/* elephant colours — legs keep the SVG's own grey shading; brand on ear + tail tip */
.el-eye { fill: #15294b; }
.el-tail-tip, .el-ear { fill: var(--brand); }

/* walk cycle */
.el-leg { transform-box: fill-box; transform-origin: 50% 8%; }
.el-up  { transform-box: fill-box; transform-origin: center; }
.mascot.is-moving .el-leg--bn,
.mascot.is-moving .el-leg--ff { animation: el-step-a .5s linear infinite; }
.mascot.is-moving .el-leg--fn,
.mascot.is-moving .el-leg--bf { animation: el-step-b .5s linear infinite; }
.mascot.is-moving .el-up      { animation: el-bob .5s ease-in-out infinite; }
@keyframes el-step-a { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(-16deg); } }
@keyframes el-step-b { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
@keyframes el-bob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* speech bubble */
.mascot-bubble {
  position: relative; margin-bottom: 11px; max-width: 230px; text-align: center;
  background: #fff; color: #15294b;
  font-weight: 600; font-size: 0.95rem; line-height: 1.4;
  padding: 12px 18px; border-radius: 16px;
  box-shadow: 0 12px 26px -12px rgba(21, 41, 75, 0.35);
}
.mascot-bubble::after {               /* downward pointer */
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 14px; height: 14px; background: #fff; border-radius: 0 0 3px 0;
  transform: translateX(-50%) rotate(45deg);
}

@media (max-width: 768px) {
  .mascot-band { height: 210px; }
  .mascot-bubble { font-size: 0.85rem; max-width: 200px; }
}

/* reduced motion: no walk, rest the mascot in view */
@media (prefers-reduced-motion: reduce) {
  .mascot { transform: translateX(40vw); }
}

/* The rig.ai-style CTA now lives in the shared template part, so its styles
   moved to the global style.css (used on every page, not just the home page). */

/* =================================================================
   Playground — click anywhere to drop brand-colored balls (Huge-style)
   ================================================================= */
.play-band {
  position: relative;
  height: clamp(440px, 72vh, 780px);
  background: var(--h-bg);
  border-top: 1px solid var(--h-line);
  overflow: hidden;
}
.play-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  /* canvas lets touches scroll the page; only the square captures the tap */
}
/* brand centerpiece tile — 3D tilt-on-hover */
.play-logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(190px, 24vw, 310px);
  aspect-ratio: 1 / 1;
  background: var(--brand);
  border-radius: clamp(12px, 1.4vw, 20px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 18px;
  z-index: 2; cursor: pointer;
  touch-action: none;   /* tapping the square spawns instead of scrolling */
  box-shadow:
    0 30px 80px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.28),   /* top edge highlight */
    inset 0 -2px 0 rgba(0,0,0,.15);        /* bottom edge shadow */
  transform-style: preserve-3d;
  transition: box-shadow .3s ease;
  will-change: transform;
}
/* sheen overlay */
.play-logo::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.22) 0%, transparent 60%);
  pointer-events: none;
}
.play-logo span {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  color: var(--h-bg);
  position: relative; z-index: 1;
  transform: translateZ(18px);             /* text floats forward */
}
.play-hint {
  position: absolute; left: 0; right: 0; bottom: clamp(28px, 8%, 64px);
  text-align: center; pointer-events: none;
  z-index: 2;
  transition: opacity .6s ease;
}
.play-hint span {
  display: inline-block;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--h-muted);
}
.play-band.is-dirtied .play-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .play-band { display: none; }
}

/* =================================================================
   HOLOGRAPHIC SENZO FINALE — iridescent elephant floating & tumbling
   (stylised CSS approximation of a 3D chrome object)
   ================================================================= */
.j-finale {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 82vh; padding: clamp(80px, 14vh, 170px) 24px;
  background: radial-gradient(120% 95% at 50% 0%, #0c0e1a 0%, #050609 70%);
}
.j-finale-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 50% at 50% 46%, rgba(122, 64, 240, .28), transparent 70%),
    radial-gradient(34% 42% at 64% 60%, rgba(255, 0, 223, .20), transparent 70%),
    radial-gradient(30% 40% at 36% 58%, rgba(40, 164, 255, .16), transparent 70%);
}
.j-orb { position: relative; z-index: 2; perspective: 1000px; }
.j-orb-ele {
  display: block; width: clamp(260px, 42vw, 580px); aspect-ratio: 301 / 203;
  background: conic-gradient(from 200deg,
    #ff4ad0, #ffd24d, #30fee9, #28a4ff, #7a40f0, #ff4ad0);
  -webkit-mask: var(--ele) center / contain no-repeat;
          mask: var(--ele) center / contain no-repeat;
  transform-style: preserve-3d;
  animation: j-orb-float 9s ease-in-out infinite, j-orb-hue 7s linear infinite;
  will-change: transform, filter;
}
@keyframes j-orb-float {
  0%, 100% { transform: rotateX(6deg) rotateY(-17deg) rotateZ(-3deg) translateY(0); }
  50%      { transform: rotateX(11deg) rotateY(17deg) rotateZ(4deg) translateY(-30px); }
}
@keyframes j-orb-hue {
  from { filter: hue-rotate(0deg) saturate(1.25) drop-shadow(0 34px 56px rgba(122, 64, 240, .5)); }
  to   { filter: hue-rotate(360deg) saturate(1.25) drop-shadow(0 34px 56px rgba(122, 64, 240, .5)); }
}
.j-finale-cap {
  position: relative; z-index: 2; margin: clamp(34px, 5vh, 60px) 0 0; text-align: center;
  color: rgba(255, 255, 255, .58); font-size: clamp(.82rem, 1.4vw, 1.02rem);
  letter-spacing: .22em; text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  .j-orb-ele { animation: none; filter: saturate(1.2) drop-shadow(0 24px 44px rgba(122, 64, 240, .45)); }
}
