/* ===== BWL Technology — AI Studio · base theme ===== */
:root {
  --ink: #0a0a0b;
  --ink-soft: #4b4b52;
  --line: rgba(10, 10, 11, 0.10);
  --bg: #ffffff;
  --accent: #1a52ff;            /* electric blue */
  --face-bg: #ffffff;
  --face-shadow: 0 30px 80px -30px rgba(10, 10, 11, 0.28);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;                /* the box owns the scroll */
}

/* particle canvas sits behind everything, fills viewport */
#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Brand mark ===== */
.brand {
  position: fixed;
  top: clamp(16px, 3vw, 34px);
  left: clamp(16px, 3vw, 40px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { display: block; }
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.brand-name em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.brand-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 4px rgba(10, 10, 11, 0.05),
    0 4px 14px -8px rgba(10, 10, 11, 0.25);
}

/* ===== Stage / the rolling box ===== */
.stage {
  position: relative;
  z-index: 10;
  height: 100dvh;
  display: grid;
  place-items: center;
}

.mainCube {
  width: 70vw;
  height: 62vh;
  max-width: 1080px;
  overflow: visible;               /* let the cube rotate outside bounds */
}

/* one face of the box */
.face {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--face-bg);
  border-radius: var(--radius);
  box-shadow: var(--face-shadow);
  border: 1px solid var(--line);
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  clip-path: inset(0 round var(--radius));
}

/* Faded geometric texture behind each face — gives the glass something to
   refract. Each card carries a DIFFERENT whisper-light pattern, masked so it
   fades in from one corner (--cx/--cy, set per face below). */
.face::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  -webkit-mask: radial-gradient(135% 135% at var(--cx, 0%) var(--cy, 100%),
                #000 0%, #0000 60%);
          mask: radial-gradient(135% 135% at var(--cx, 0%) var(--cy, 100%),
                #000 0%, #0000 60%);
}

/* keep face content above the texture */
.face > * { position: relative; z-index: 1; }

/* ---- per-face texture: a different soft pattern + corner per card ---- */

/* 1 · Hero — isometric cubes, from bottom-left (sits behind the button) */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(1) .face::before {
  --cx: 0%; --cy: 100%;
  --s: 92px;
  background:
    repeating-conic-gradient(from 30deg, #0000 0 120deg, #ededed 0 180deg)
      calc(0.5 * var(--s)) calc(0.5 * var(--s) * 0.5774),
    repeating-conic-gradient(from 30deg, #fafafa 0 60deg, #f4f4f4 0 120deg, #ededed 0 180deg);
  background-size: var(--s) calc(var(--s) * 0.5774);
}

/* 2 · Software — dot grid, from top-right */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(2) .face::before {
  --cx: 100%; --cy: 0%;
  background-image: radial-gradient(#e4e4e4 1.7px, #0000 1.8px);
  background-size: 26px 26px;
}

/* 3 · Consulting — graph grid, from bottom-right */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(3) .face::before {
  --cx: 100%; --cy: 100%;
  background-image:
    linear-gradient(#ededed 1px, #0000 1px),
    linear-gradient(90deg, #ededed 1px, #0000 1px);
  background-size: 30px 30px;
}

/* 4 · Training — diagonal stripes, from top-left */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(4) .face::before {
  --cx: 0%; --cy: 0%;
  background: repeating-linear-gradient(45deg, #f0f0f0 0 2px, #0000 2px 15px);
}

/* 5 · Proof — crosshatch, from top-right */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(5) .face::before {
  --cx: 100%; --cy: 0%;
  background:
    repeating-linear-gradient(45deg, #f1f1f1 0 1px, #0000 1px 16px),
    repeating-linear-gradient(-45deg, #f1f1f1 0 1px, #0000 1px 16px);
}

/* 6 · Contact — isometric cubes (3D), from bottom-left (behind the button) */
.mainCube > .swiper-wrapper > .swiper-slide:nth-child(6) .face::before {
  --cx: 0%; --cy: 100%;
  --s: 92px;
  background:
    repeating-conic-gradient(from 30deg, #0000 0 120deg, #ededed 0 180deg)
      calc(0.5 * var(--s)) calc(0.5 * var(--s) * 0.5774),
    repeating-conic-gradient(from 30deg, #fafafa 0 60deg, #f4f4f4 0 120deg, #ededed 0 180deg);
  background-size: var(--s) calc(var(--s) * 0.5774);
}

/* ===== Typography in faces ===== */
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.face h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.face h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.lede { margin: 20px 0 0; font-size: clamp(16px, 1.5vw, 21px); color: var(--ink-soft); max-width: 46ch; }


.actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Glass / transparency buttons (Apple-ish) ===== */
.glass-btn {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  /* liquid glass: glossy top sheen fading down over a translucent body */
  background-image: linear-gradient(180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.30) 42%,
    rgba(255, 255, 255, 0.12) 100%);
  background-color: rgba(255, 255, 255, 0.30);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  backdrop-filter: blur(20px) saturate(185%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),       /* crisp top specular */
    inset 0 3px 10px rgba(255, 255, 255, 0.55),    /* upper inner glow */
    inset 0 -7px 14px rgba(255, 255, 255, 0.25),   /* bottom inner light */
    inset 0 -1px 2px rgba(10, 10, 11, 0.10),       /* bottom inner edge */
    0 8px 22px -8px rgba(10, 10, 11, 0.28),         /* soft drop */
    0 2px 6px -2px rgba(10, 10, 11, 0.14);          /* contact shadow */
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.glass-btn:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    inset 0 3px 12px rgba(255, 255, 255, 0.6),
    inset 0 -7px 14px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(10, 10, 11, 0.10),
    0 14px 34px -12px rgba(10, 10, 11, 0.38);
}
.glass-btn:active { transform: translateY(0); }
.glass-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* primary = vibrant glass (tinted), not a solid fill */
.glass-btn--primary {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.55);
  /* see-through liquid glass: faint top sheen, near-clear body, blur does the work */
  background-image: linear-gradient(180deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(26, 82, 255, 0.05) 100%);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.85),   /* thin top specular line */
    inset 0 -1px 1px rgba(26, 82, 255, 0.10),     /* faint bottom edge */
    0 8px 22px -8px rgba(10, 10, 11, 0.20),        /* soft drop */
    0 2px 6px -2px rgba(10, 10, 11, 0.10);         /* contact shadow */
}
.glass-btn--primary:hover {
  background-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(26, 82, 255, 0.12),
    0 14px 32px -12px rgba(10, 10, 11, 0.28),
    0 2px 6px -2px rgba(10, 10, 11, 0.12);
}

/* ===== Pillar = a single static face ===== */
.face--pillar h2 { font-size: clamp(28px, 4vw, 56px); }
.face--pillar .lede { max-width: 52ch; }

/* ===== Proof / Contact ===== */
.proof-list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; max-width: 52ch; }
.proof-list li { font-size: clamp(15px, 1.5vw, 19px); color: var(--ink-soft); line-height: 1.4; }
.proof-list strong { color: var(--ink); font-weight: 700; }
.copyright { margin-top: auto; padding-top: 22px; font-size: 13px; color: var(--ink-soft); }

/* ===== Glass direction indicator (transparency mode) ===== */
.roll-hint {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 3vh, 28px);
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 6px rgba(10, 10, 11, 0.05),
    0 8px 24px -12px rgba(10, 10, 11, 0.30);
  transition: transform 0.4s var(--ease), background 0.3s var(--ease);
}
.roll-hint:hover { background: rgba(255, 255, 255, 0.62); transform: translateX(-50%) translateY(-2px); }
.roll-hint:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.roll-hint__arrow { display: inline-block; animation: bob 1.8s var(--ease) infinite; }
.roll-hint[data-dir="up"] .roll-hint__arrow { animation-name: bobUp; }
.roll-hint[data-dir="right"] .roll-hint__arrow { animation-name: bobRight; }
@keyframes bob      { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes bobUp    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bobRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ===== Edge rubber-band =====
   Runs on .stage (outside swiper) so it never fights the cube's own
   transforms. One-shot; JS removes the class on animationend. */
@keyframes stage-bounce-down {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-14px); }
  70%  { transform: translateY(4px); }
  100% { transform: translateY(0); }
}
@keyframes stage-bounce-up {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(14px); }
  70%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
.stage--bounce-down { animation: stage-bounce-down 0.45s var(--ease); }
.stage--bounce-up   { animation: stage-bounce-up 0.45s var(--ease); }

/* "Back to top" pulse when the user overscrolls on the last section.
   Keep translateX(-50%) — it's the button's centering transform. */
@keyframes hint-pulse {
  0%   { transform: translateX(-50%) scale(1); }
  40%  { transform: translateX(-50%) scale(1.14);
         box-shadow:
           inset 0 1px 0 rgba(255, 255, 255, 0.95),
           0 0 0 6px rgba(26, 82, 255, 0.18),
           0 8px 24px -12px rgba(10, 10, 11, 0.30); }
  100% { transform: translateX(-50%) scale(1); }
}
.roll-hint--pulse { animation: hint-pulse 0.6s var(--ease); }

/* ===== Responsive: portrait box on small screens ===== */
@media (max-width: 899px) {
  .mainCube { width: 90vw; height: 80dvh; max-width: none; }
  
  .brand-tag { display: none; }
}

/* ===== Reduced motion: no 3D roll, calmer everything ===== */
@media (prefers-reduced-motion: reduce) {
  .roll-hint__arrow { animation: none; }
  .stage--bounce-down, .stage--bounce-up, .roll-hint--pulse { animation: none; }
}
