
:root {
  --color-bg: #FFFFFF;
  --color-text-main: #0A0A0A;
  --color-text-muted: #555555;
  --color-text-faint: #888888;
  --color-shade: rgba(0, 0, 0, 0.26);
  --font-family: 'Inter', 'Noto Sans CJK SC', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --space-corner-x: clamp(24px, 4.5vw, 64px);
  --space-corner-y: clamp(24px, 4.5vw, 56px);
  --cursor-size: 14px;
  --cursor-color: #0A0A0A;
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Allow text selection on readable content for accessibility */
.nav-links, .bottom-right-hero, .copyright-box, .skip-link {
  user-select: text;
}

/* ==========================================================================
   Accessibility Utilities & Skip Link (WCAG 2.4.1 & 2.4.7)
   ========================================================================== */
.sr-only {
  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;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: var(--space-corner-x);
  z-index: 100000;
  padding: 10px 18px;
  background: var(--color-text-main);
  color: #FFFFFF !important;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: top 0.25s var(--ease-editorial);
  pointer-events: auto;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-corner-y);
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* High-contrast visible focus indicators for all interactive elements (WCAG 2.4.7) */
:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 4px;
}

.logo-square:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 5px;
  border-radius: 6px;
}

.lang-btn:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 4px;
  border-radius: 50%;
}

.nav-link:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Background Image & Tint Layers
   ========================================================================== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: translateY(100%) scale(1.02);
  transition: transform 1.05s var(--ease-editorial), opacity 1.05s var(--ease-editorial);
  will-change: transform, opacity;
}

.bg-slide.is-active {
  opacity: 0.65;
  transform: translateY(0%) scale(1.02);
  z-index: 1;
}

.bg-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.65) 100%);
}

/* ==========================================================================
   Right Interactive Shade Overlay (Seamless Feathering) & Hover Zone
   ========================================================================== */
.right-shade {
  position: fixed;
  right: 0;
  top: 0;
  width: 60vw; /* Generous 60% viewport span so the fade starts infinitely soft */
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.003) 15%,
    rgba(0, 0, 0, 0.015) 32%,
    rgba(0, 0, 0, 0.05) 52%,
    rgba(0, 0, 0, 0.12) 75%,
    var(--color-shade) 100%
  );
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  /* Organic feathering mask to blur and gradient without any hard bounding box seam */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 12%,
    rgba(0, 0, 0, 0.04) 28%,
    rgba(0, 0, 0, 0.20) 48%,
    rgba(0, 0, 0, 0.60) 72%,
    black 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 12%,
    rgba(0, 0, 0, 0.04) 28%,
    rgba(0, 0, 0, 0.20) 48%,
    rgba(0, 0, 0, 0.60) 72%,
    black 100%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease-editorial);
}

.right-hover-zone {
  position: fixed;
  right: 0;
  top: 0;
  width: 30vw;
  height: 100vh;
  z-index: 6;
  pointer-events: none;
}

body.right-zone-active .right-shade,
body.title-hovered .right-shade,
body:has(.hero-title-group:hover) .right-shade {
  opacity: 1;
}

/* ==========================================================================
   Viewport Container & Layout Elements
   ========================================================================== */
.viewport-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  padding: var(--space-corner-y) var(--space-corner-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  pointer-events: auto;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.logo-square {
  display: block;
  color: var(--color-text-main);
  text-decoration: none;
  line-height: 0;
  transition: transform 0.4s var(--ease-editorial);
}

.logo-square:hover {
  transform: scale(1.06);
}

.logo-square rect,
.logo-img {
  width: 52px;
  height: 52px;
  display: block;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.a11y-btn {
  background: none;
  border: none;
  padding: 8px;
  margin: -8px;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.4s var(--ease-editorial), background-color 0.2s ease;
  user-select: none;
}

.a11y-btn:hover {
  transform: scale(1.1);
  background-color: rgba(10, 10, 10, 0.06);
}

.a11y-btn:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 4px;
  border-radius: 50%;
}

.a11y-btn[aria-expanded="true"] {
  background-color: rgba(10, 10, 10, 0.12);
  transform: scale(1.05);
}

.lang-btn {
  background: none;
  border: none;
  padding: 8px;
  margin: -8px;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.5s var(--ease-editorial);
}

.lang-btn:hover {
  transform: rotate(25deg) scale(1.1);
}

.planet-icon {
  display: block;
  width: 32px;
  height: 32px;
}

/* ==========================================================================
   Accessibility & Controls Dropdown Panel
   Fixed to top-right actions container, zero jumping
   ========================================================================== */
.a11y-panel {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 290px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.26s var(--ease-editorial), transform 0.26s var(--ease-editorial), visibility 0.26s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a11y-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}

.a11y-panel-title {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.a11y-panel-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  padding: 0;
}

.a11y-panel-close-btn:hover {
  background-color: rgba(10, 10, 10, 0.08);
  color: var(--color-text-main);
}

.a11y-panel-close-btn:focus-visible {
  outline: 2px solid var(--color-text-main);
  outline-offset: 2px;
}

.a11y-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.a11y-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

/* Accessibility Toggle Switch (Pill) */
.a11y-toggle-switch {
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 9999px;
  color: var(--color-text-main);
  transition: background-color 0.2s;
}

.a11y-toggle-switch:hover {
  background-color: rgba(10, 10, 10, 0.05);
}

.a11y-toggle-switch:focus-visible {
  outline: 2px solid var(--color-text-main);
  outline-offset: 2px;
}

.a11y-switch-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  background-color: rgba(10, 10, 10, 0.18);
  border-radius: 10px;
  position: relative;
  transition: background-color 0.22s ease;
}

.a11y-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s var(--ease-editorial);
}

.a11y-toggle-switch[aria-pressed="true"] .a11y-switch-track {
  background-color: var(--color-text-main);
}

.a11y-toggle-switch[aria-pressed="true"] .a11y-switch-thumb {
  transform: translateX(16px);
}

.a11y-switch-status {
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
  color: var(--color-text-muted);
}

/* Slide Navigation Row in Panel */
.a11y-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(10, 10, 10, 0.04);
  padding: 6px 8px;
  border-radius: 10px;
}

.a11y-nav-btn {
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text-main);
  transition: background-color 0.2s, transform 0.15s;
  padding: 0;
}

.a11y-nav-btn:hover {
  background-color: rgba(10, 10, 10, 0.1);
  transform: scale(1.05);
}

.a11y-nav-btn:focus-visible {
  outline: 2px solid var(--color-text-main);
  outline-offset: 2px;
}

.a11y-slide-indicators {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.a11y-indicator-btn {
  background: transparent;
  border: 1px solid rgba(10, 10, 10, 0.15);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.a11y-indicator-btn:hover {
  background-color: rgba(10, 10, 10, 0.08);
}

.a11y-indicator-btn.is-active {
  background-color: var(--color-text-main);
  color: #FFFFFF;
  border-color: var(--color-text-main);
}

.a11y-indicator-btn:focus-visible {
  outline: 2px solid var(--color-text-main);
  outline-offset: 2px;
}

/* Force Reduced Motion class (toggled from panel) */
body.force-reduced-motion *,
body.force-reduced-motion *::before,
body.force-reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  cursor: auto !important;
}

body.force-reduced-motion .custom-cursor {
  display: none !important;
}

/* ==========================================================================
   Bottom Left Navigation
   ========================================================================== */
.bottom-left-nav {
  position: absolute;
  bottom: var(--space-corner-y);
  left: var(--space-corner-x);
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  z-index: 12;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.nav-item {
  line-height: 1.35;
}

.nav-link {
  font-size: clamp(1.2rem, 1.55vw, 1.5rem);
  font-weight: 450;
  color: var(--color-text-main);
  text-decoration: none;
  display: inline-block;
  letter-spacing: -0.015em;
  position: relative;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 4px;
  transition: color 0.3s ease, transform 0.35s var(--ease-editorial);
}

.nav-link:hover {
  color: #000000;
  transform: translateX(4px);
}

.copyright-box {
  margin-top: 0.5rem;
}

.copyright-text {
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  display: inline-block;
}

/* ==========================================================================
   Bottom Right Hero Section (Headline & Subtitle)
   ========================================================================== */
.bottom-right-hero {
  position: absolute;
  bottom: var(--space-corner-y);
  right: var(--space-corner-x);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  z-index: 12;
  max-width: 75vw;
}

.hero-slide {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: 75vw;
}

.hero-slide.is-active {
  position: relative;
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.hero-slide.is-transitioning {
  position: absolute;
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}

.hero-title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  margin-bottom: 0.65rem;
  position: relative;
  transition: transform 0.22s var(--ease-editorial);
  border-radius: 6px;
}

.hero-title-group:focus:not(:focus-visible) {
  outline: none;
}

.hero-title-group:focus-visible {
  outline: 2.5px solid var(--color-text-main);
  outline-offset: 6px;
}



/* Clickable tactile press feedback */
.hero-title-group:active {
  transform: scale(0.985);
}

.hero-title-group:hover .hero-line {
  color: #000000;
}

.hero-line {
  font-size: clamp(2.4rem, 4.5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--color-text-main);
  white-space: nowrap;
  text-align: right;
  transition: color 0.25s ease;
}

/* Line 2 Row */
.hero-line-2-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

/* Mask Frame: Container for Line 2 (Per-letter frames handle the text mask clipping) */
.hero-line-2-mask-frame {
  position: relative;
  overflow: visible;
  display: inline-block;
  will-change: transform;
}

.hero-line-2 {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  text-align: right;
}

/* The Enter Arrow Slot */
.hero-enter-arrow-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  color: var(--color-text-main);
  vertical-align: middle;
  will-change: width, opacity, transform;
}

.hero-enter-arrow-slot svg {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.hero-subtitle-box {
  margin-top: 0.35rem;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 1.8vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--color-text-main);
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   Text Mask Splitting Hierarchy
   ========================================================================== */
.split-char-mask {
  display: inline-block;
  overflow: hidden; /* Per-letter frame clipping boundary */
  vertical-align: top;
  line-height: inherit;
}

/* Base intro reveal */
.split-char-reveal {
  display: inline-block;
  will-change: transform;
  line-height: inherit;
  vertical-align: top;
  transition: transform 0.65s var(--ease-editorial);
}

/* Left side items: text frames come out from the LEFT side */
[data-split-mask="left"] .split-char-reveal {
  transform: translateX(-125%);
}

[data-split-mask="left"] .split-char-reveal.is-revealed {
  transform: translateX(0%);
}

/* Right side items: text frames come out from the RIGHT side */
[data-split-mask="right"] .split-char-reveal {
  transform: translateX(125%);
}

[data-split-mask="right"] .split-char-reveal.is-revealed {
  transform: translateX(0%);
}

/* Horizontal kinetic chasing transform */
.split-char-inner {
  display: inline-block;
  will-change: transform;
  line-height: inherit;
  vertical-align: top;
  transform: translateX(0);
}

.split-space {
  display: inline-block;
  width: 0.28em;
  line-height: inherit;
  vertical-align: top;
}

/* ==========================================================================
   Physics-Based Custom Mouse Cursor (Lucide Icons)
   ========================================================================== */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease-editorial), visibility 0.22s var(--ease-editorial);
  will-change: transform, opacity;
}

.custom-cursor.is-visible {
  opacity: 1;
  visibility: visible;
}

.cursor-rotator {
  position: relative;
  display: block;
  transform-origin: 4px 4px; /* Default rotation pivots around the pointer tip! */
  will-change: transform;
}

body.cursor-hovering:not(.right-zone-active) .cursor-rotator {
  transform-origin: 9px 2px; /* Index fingertip for pointer */
}

body.right-zone-active .cursor-rotator {
  transform-origin: 0px 0px; /* Centered for scroll badges */
}

.cursor-icon {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.22s var(--ease-editorial), transform 0.22s var(--ease-editorial);
}

/* 1. Normal State: Lucide mouse-pointer-2 */
.cursor-normal {
  opacity: 1;
  transform: scale(1);
  margin-left: -4px;
  margin-top: -4px;
}

.cursor-normal svg {
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

/* 2. Clickable State: Lucide pointer */
.cursor-clickable {
  margin-left: -9px;
  margin-top: -2px;
}

.cursor-clickable svg {
  display: block;
  color: #0A0A0A;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

/* When hovering clickable elements (title, links, buttons):
   pointer hand takes precedence, while the right-side shade stays fully active! */
body.cursor-hovering .cursor-normal {
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

body.cursor-hovering .cursor-clickable {
  opacity: 1 !important;
  transform: scale(1.08) !important;
}

body.cursor-hovering .cursor-scroll-up,
body.cursor-hovering .cursor-scroll-down {
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

/* 3 & 4. Right 30% Zone Scroll Arrows (Lucide arrow-up and arrow-down) */
.cursor-scroll-up,
.cursor-scroll-down {
  margin-left: -14px;
  margin-top: -14px;
}

.cursor-scroll-up svg,
.cursor-scroll-down svg {
  display: block;
  color: #0A0A0A;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

/* In right zone, show scroll arrows ONLY when NOT hovering a clickable title or link, or language switcher */
body.right-zone-active:not(.cursor-hovering):not(.cursor-lang-active) .cursor-normal,
body.right-zone-active:not(.cursor-hovering):not(.cursor-lang-active) .cursor-clickable {
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

body.right-zone-active.scroll-mode-up:not(.cursor-hovering):not(.cursor-lang-active) .cursor-scroll-up {
  opacity: 1 !important;
  transform: scale(1) !important;
}

body.right-zone-active.scroll-mode-down:not(.cursor-hovering):not(.cursor-lang-active) .cursor-scroll-down {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* 5. Language Switcher State: Shows the Next Language Badge (e.g. CN, DE, EN) */
.cursor-lang {
  margin-left: -16px;
  margin-top: -11px;
}

.cursor-lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background: #0A0A0A;
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 4px;
  line-height: 1.1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  user-select: none;
  pointer-events: none;
}

body.cursor-lang-active .cursor-rotator {
  transform-origin: 0px 0px;
}

body.cursor-lang-active .cursor-normal,
body.cursor-lang-active .cursor-clickable,
body.cursor-lang-active .cursor-scroll-up,
body.cursor-lang-active .cursor-scroll-down,
body.right-zone-active.cursor-lang-active .cursor-scroll-up,
body.right-zone-active.cursor-lang-active .cursor-scroll-down {
  opacity: 0 !important;
  transform: scale(0.5) !important;
}

body.cursor-lang-active .cursor-lang {
  opacity: 1 !important;
  transform: scale(1.08) !important;
}

/* Tactile spin feedback on language switch */
.lang-btn.is-switching svg {
  transform: rotate(360deg);
  transition: transform 0.65s var(--ease-editorial);
}

/* ==========================================================================
   Language Swap Animation Grid Stack
   Zero-teleport, zero-shake, seamless typography transition
   ========================================================================== */
.split-swap-stage {
  display: inline-grid;
  grid-template-areas: "swap-stack";
  vertical-align: top;
  line-height: inherit;
  position: relative;
}

/* Left-aligned items (e.g. Nav Links & Copyright) */
.split-swap-stage.is-left {
  justify-items: start;
}

.split-swap-stage.is-left .split-swap-layer {
  justify-self: start;
  text-align: left;
}

/* Right-aligned items (e.g. Hero Titles & Subtitle) */
.split-swap-stage.is-right {
  justify-items: end;
}

.split-swap-stage.is-right .split-swap-layer {
  justify-self: end;
  text-align: right;
}

.split-swap-layer {
  grid-area: swap-stack;
  display: inline-block;
  white-space: nowrap;
  line-height: inherit;
  vertical-align: top;
}

.split-swap-outgoing {
  pointer-events: none;
}

.split-swap-incoming {
  pointer-events: auto;
}

/* ==========================================================================
   Responsive Adaptations (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --space-corner-x: 20px;
    --space-corner-y: 20px;
  }

  .viewport-container {
    height: 100vh;
    padding: var(--space-corner-y) var(--space-corner-x);
  }

  /* Move title and subtitle to below the logo, align left */
  .bottom-right-hero {
    top: calc(var(--space-corner-y) + 64px);
    left: var(--space-corner-x);
    right: auto;
    bottom: auto;
    align-items: flex-start;
    text-align: left;
    width: calc(100vw - (var(--space-corner-x) * 2));
    max-width: calc(100vw - (var(--space-corner-x) * 2));
  }

  .hero-slide {
    left: 0;
    right: auto;
    bottom: auto;
    top: 0;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    max-width: 100%;
  }

  .hero-slide.is-transitioning {
    left: 0;
    right: auto;
    bottom: auto;
    top: 0;
  }

  .hero-title-group {
    align-items: flex-start;
    text-align: left;
    margin-bottom: 0.4rem;
  }

  .hero-line {
    font-size: clamp(1.6rem, 6.4vw, 2.3rem);
    line-height: 1.18;
    text-align: left;
  }

  .hero-line-2-row {
    justify-content: flex-start;
    align-items: center;
    width: 100%;
  }

  .hero-subtitle-box {
    text-align: left;
    width: 100%;
    margin-top: 0.25rem;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3.4vw, 1.2rem);
    text-align: left;
  }

  /* On mobile, titles are placed on the left below logo, so text frames come out from the LEFT side */
  [data-split-mask="right"] {
    text-align: left;
  }

  [data-split-mask="right"] .split-char-reveal {
    transform: translateX(-125%);
  }

  [data-split-mask="right"] .split-char-reveal.is-revealed {
    transform: translateX(0%);
  }

  .split-swap-stage.is-right {
    justify-items: start;
  }

  .split-swap-stage.is-right .split-swap-layer {
    justify-self: start;
    text-align: left;
  }

  /* Bottom nav adaptations */
  .bottom-left-nav {
    bottom: var(--space-corner-y);
    left: var(--space-corner-x);
    gap: 1.2rem;
  }

  .nav-links {
    gap: 0.3rem;
  }

  .nav-link {
    font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  }

  .copyright-box {
    margin-top: 0.25rem;
  }

  .copyright-text {
    font-size: 0.75rem;
  }

  /* Custom cursor hidden on touch/mobile devices */
  .custom-cursor {
    display: none !important;
  }

  *, *::before, *::after {
    cursor: auto !important;
  }

  /* Hide right shade on mobile so background image remains fully visible */
  .right-shade {
    display: none !important;
  }

  .right-hover-zone {
    width: 25vw;
  }

  .a11y-panel {
    right: -10px;
    width: min(290px, calc(100vw - 32px));
  }


}

/* ==========================================================================
   Accessibility Media Queries (WCAG 2.2 AA)
   ========================================================================== */

/* Respect User Reduced Motion Preference (WCAG 2.2.2 & 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    cursor: auto !important;
  }

  .custom-cursor {
    display: none !important;
  }

  .bg-slide {
    transition: none !important;
  }

  .split-char-reveal {
    transform: none !important;
    transition: none !important;
  }

  [data-split-mask="left"] .split-char-reveal,
  [data-split-mask="right"] .split-char-reveal {
    transform: none !important;
  }
}

/* Touch and Coarse Pointer Devices: Always restore native cursor */
@media (pointer: coarse) {
  *, *::before, *::after {
    cursor: auto !important;
  }

  .custom-cursor {
    display: none !important;
  }
}

/* Reflow & Text Zoom: Ensure vertical scrolling if viewport is small or zoomed in (WCAG 1.4.4 & 1.4.10) */
@media (max-height: 600px), (max-width: 480px) {
  html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
  }

  .viewport-container {
    height: auto !important;
    min-height: 100vh;
  }
}

