/* ==========================================================================
   小H工作室 — Swiss Drafting-Table & Chinese Editorial Design System
   Inspired by getartcraft.com aesthetic, tailored for Chinese typography
   ========================================================================== */

:root {
  /* Light Theme Tokens (Warm Paper Studio) */
  --bg: #f2f1ee;
  --bg-raised: #faf9f7;
  --bg-sunken: #e9e8e4;
  --ink: #101014;
  --ink-strong: #000000;
  --muted: rgba(16, 16, 20, 0.64);
  --faint: rgba(16, 16, 20, 0.42);
  --line: rgba(16, 16, 20, 0.16);
  --line-strong: rgba(16, 16, 20, 0.4);
  --accent: #2d81ff;
  --accent-ink: #1659c4;
  --invert-bg: #101014;
  --invert-fg: #f2f1ee;
  --glass-bg: rgba(242, 241, 238, 0.78);
  --nav-bg: rgba(242, 241, 238, 0.94);

  /* Curated Chinese + Latin Font Stack */
  --font-artistic: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;
  --font-display: "Archivo", "Noto Sans SC", "PingFang SC", -apple-system, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans SC", ui-monospace, monospace;

  --nav-h: 49px;
  --container-w: 1280px;
}

:root[data-theme="dark"] {
  --bg: #121316;
  --bg-raised: #17181d;
  --bg-sunken: #0a0a0c;
  --ink: #f2f1ee;
  --ink-strong: #ffffff;
  --muted: rgba(242, 241, 238, 0.64);
  --faint: rgba(242, 241, 238, 0.4);
  --line: rgba(242, 241, 238, 0.15);
  --line-strong: rgba(242, 241, 238, 0.42);
  --accent: #2d81ff;
  --accent-ink: #74aaff;
  --invert-bg: #ffffff;
  --invert-fg: #0b0b0c;
  --glass-bg: rgba(18, 19, 22, 0.78);
  --nav-bg: rgba(18, 19, 22, 0.92);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
}

html.is-ruler-dragging {
  scroll-behavior: auto !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

.hud-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}

.accent-word {
  color: var(--accent-ink);
}

/* ==========================================================================
   Sticky Top Navigation
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand-mark-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 18px;
  color: var(--ink-strong);
  transition: transform 0.2s ease;
}

.brand-mark-link:hover {
  transform: scale(1.06);
}

.brand-h-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 5px 10px;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.nav-link.is-active {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.chev {
  display: inline-block;
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-dropdown:hover .chev,
.nav-dropdown.is-open .chev {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 260px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.dropdown-item {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg-sunken);
}

.dropdown-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-strong);
}

.dropdown-desc {
  font-size: 12px;
  color: var(--muted);
}

.nav-icon-btn {
  width: 48px;
  height: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background-color 0.14s linear, color 0.14s linear;
}

.nav-icon-btn:hover {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ==========================================================================
   Right-Edge Floating Jump Rail & Drafting Ruler
   ========================================================================== */

.chrome-rail {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: 68px;
  pointer-events: none;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
}

/* Per-character scroll-scrubbed kinetic section rail */
.kinetic-rail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 44;
  overflow: hidden;
}

.k-rail-group {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

.k-char {
  position: fixed;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-strong);
  transform-origin: center center;
  will-change: transform, opacity;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  white-space: pre;
}

.k-char.is-hero-dock {
  font-family: var(--font-artistic);
  font-weight: 400;
}

.hero-wordmark {
  position: relative;
  z-index: 50;
}

.hero-wordmark .char-unit {
  will-change: transform, opacity, filter;
}

.drafting-ruler {
  position: relative;
  width: 68px;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.drafting-ruler.is-over-thumb {
  cursor: grab;
}

.drafting-ruler.is-dragging {
  cursor: grabbing;
}

.ruler-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

/* Hover / Drag Viewport Mask (Exact Visible Viewport Window) */
.ruler-thumb {
  position: absolute;
  right: 0;
  width: 64px;
  top: 14px;
  height: 96px;
  background: rgba(16, 16, 20, 0.11);
  border-top: 1px solid rgba(16, 16, 20, 0.55);
  border-bottom: 1px solid rgba(16, 16, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease;
}

:root[data-theme="dark"] .ruler-thumb {
  background: rgba(242, 241, 238, 0.12);
  border-top-color: rgba(242, 241, 238, 0.5);
  border-bottom-color: rgba(242, 241, 238, 0.5);
}

.drafting-ruler:hover .ruler-thumb,
.drafting-ruler.is-dragging .ruler-thumb {
  opacity: 1;
}

.drafting-ruler.is-dragging .ruler-thumb {
  background: rgba(16, 16, 20, 0.17);
}

:root[data-theme="dark"] .drafting-ruler.is-dragging .ruler-thumb {
  background: rgba(242, 241, 238, 0.19);
}

/* Bold black pointer bar tracking exact mouse Y on the ruler */
.ruler-hover-line {
  position: absolute;
  right: 0;
  width: 64px;
  height: 3.5px;
  background: var(--ink-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.16s ease;
  z-index: 4;
}

.drafting-ruler:hover .ruler-hover-line,
.drafting-ruler.is-dragging .ruler-hover-line {
  opacity: 1;
}

.ruler-indicator {
  position: absolute;
  right: 0;
  top: 14px;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 3;
}

.ruler-line {
  width: 64px;
  height: 1.5px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(45, 129, 255, 0.45);
}

.ruler-readout {
  position: absolute;
  right: 8px;
  top: 5px;
  padding: 0 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px var(--bg);
}

/* ==========================================================================
   Buttons (Sharp 0px corners, Swiss drafting style)
   ========================================================================== */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  transition: background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-color: var(--invert-bg);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--invert-bg);
  transform: translateY(102%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-secondary:hover {
  color: var(--invert-fg);
  border-color: var(--invert-bg);
}

.btn-secondary:hover::before {
  transform: translateY(0);
}

/* ==========================================================================
   00 / HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 56px 24px 64px;
}

.spiral-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Interactive Orbiting Engraved Icon Layer in Hero */
.hero-orbit-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.hero-orbit-node {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform, opacity;
  z-index: 1;
}

.hero-orbit-node:hover {
  z-index: 10;
}

.hero-orbit-tile {
  width: var(--orbit-size, 62px);
  height: var(--orbit-size, 62px);
  border-radius: 15px;
  overflow: hidden;
  background: var(--orbit-color);
  border: 1px solid rgba(16, 16, 20, 0.14);
  box-shadow: 0 10px 22px rgba(16, 16, 20, 0.18);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease;
}

:root[data-theme="dark"] .hero-orbit-tile {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--orbit-color) 42%, transparent);
}

.hero-orbit-node:hover .hero-orbit-tile {
  transform: scale(1.18) translateY(-5px);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 20px 36px color-mix(in srgb, var(--orbit-color) 48%, rgba(0, 0, 0, 0.25));
}

.hero-orbit-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-orbit-tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  padding: 4px 9px;
  background: var(--invert-bg);
  color: var(--invert-fg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-orbit-node:hover .hero-orbit-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-halo {
  position: absolute;
  width: min(760px, 92vw);
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 28%, transparent 72%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: radial-gradient(circle, #000 38%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle, #000 38%, transparent 72%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-strong);
  margin-bottom: 22px;
}

.wordmark-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.wm-cn {
  font-family: var(--font-artistic);
  font-size: clamp(48px, 7.2vw, 86px);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.hero-h-mark {
  width: clamp(46px, 6.4vw, 72px);
  height: clamp(46px, 6.4vw, 72px);
  flex-shrink: 0;
  margin: 0 2px;
}

.hero-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
}

.hero-sub {
  margin: 0 0 32px;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-meta-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  margin-bottom: 20px;
}

.hero-inline-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}

.hero-inline-link:hover {
  color: var(--ink-strong);
}

.hero-studio-note {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--muted);
}

.hero-studio-note a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-footer-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* ==========================================================================
   Framed Sections & Hairline Crosshairs (.tick)
   ========================================================================== */

.framed-section {
  border-bottom: 1px solid var(--line);
  overflow-x: clip;
}

.frame-shell {
  position: relative;
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.frame-shell::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-strong);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 4;
}

.frame-shell.is-drawn::before {
  transform: scaleX(1);
}

.tick {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: scale(0.3) rotate(-45deg);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.frame-shell.is-drawn .tick {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.tick::before,
.tick::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.tick::before {
  top: 5px;
  left: 0;
  width: 11px;
  height: 1px;
}

.tick::after {
  left: 5px;
  top: 0;
  width: 1px;
  height: 11px;
}

.tick-tl { top: -6px; left: -6px; }
.tick-tr { top: -6px; right: -6px; }

.sticky-eyebrow {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 72px 12px 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}

/* ==========================================================================
   01 / SERVICES MATRIX
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  padding: 56px 40px 64px;
  align-items: center;
}

.section-h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}

.section-lead {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 540px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.launcher-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.launcher-meta .hud-label {
  color: var(--faint);
}

.recommend-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
}

.recommend-note strong {
  color: var(--ink-strong);
}

.recommend-note a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.share-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line-strong);
}

.share-label {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--faint);
  border-right: 1px solid var(--line);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.share-btn:last-child {
  border-right: none;
}

.share-btn:hover {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

/* Right-Side 11-Icon Showcase Grid */
.icon-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 16px;
}

.showcase-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px;
}

.tile-icon-box {
  width: 78px;
  height: 78px;
  border-radius: 17px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tile-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.1);
  will-change: transform, box-shadow;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.showcase-tile:hover .tile-icon-box {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.tile-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.32s ease;
}

.showcase-tile:hover .tile-label {
  color: var(--tile-ink, var(--ink-strong));
}

/* ==========================================================================
   02 / LINEUP GRID (4-COLUMN HAIRLINE GRID)
   ========================================================================== */

.lineup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.case-card {
  position: relative;
  min-width: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.case-card:hover {
  background: var(--bg-raised);
}

.case-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--app);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
}

.case-card:hover .case-top-bar {
  transform: scaleX(1);
}

.case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.case-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--app);
  color: #101014;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.case-cat {
  color: var(--faint);
  font-size: 10px;
}

/* 16:10 Mini Website UI Mockup Preview */
.case-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #14151a;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-site {
  width: 100%;
  height: 100%;
  padding: 10px 14px 36px;
  background: #14151a;
  color: #f2f1ee;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card:hover .mini-site {
  transform: scale(1.035);
}

.mini-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8px;
  opacity: 0.65;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-dots {
  display: flex;
  gap: 4px;
}

.mini-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.mini-hero-block {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-kicker {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  opacity: 0.72;
}

.mini-headline {
  font-family: var(--font-artistic);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.mini-stat {
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.3;
}

.mini-site.is-light-ui {
  background: #f6f5f1;
  color: #101014;
}

.mini-site.is-light-ui .mini-browser-bar {
  border-bottom-color: rgba(16, 16, 20, 0.14);
}

.mini-site.is-light-ui .mini-stat {
  border-color: rgba(16, 16, 20, 0.14);
  background: rgba(16, 16, 20, 0.04);
}

/* Overlapping Emblem Icon */
.case-body {
  padding: 0 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-icon-overlap {
  width: 58px;
  height: 58px;
  margin-top: -30px;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--app);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 2;
  will-change: transform, box-shadow;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card:hover .case-icon-overlap {
  transform: translateY(-7px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

.case-icon-overlap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
  line-height: 1.2;
}

.case-title-accent {
  color: var(--app-ink);
}

.case-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  flex: 1;
}

.case-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}

.case-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--muted);
}

.case-pill.is-accent {
  color: var(--app-ink);
  border-color: color-mix(in srgb, var(--app) 40%, var(--line));
}

.case-explore {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.case-explore-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card:hover .case-explore {
  color: var(--ink-strong);
}

.case-card:hover .case-explore-arrow {
  transform: translate(3px, -3px);
}

/* Spanning Custom CTA Card (2 columns) */
.case-card-spanning {
  grid-column: span 2;
  background: var(--bg-raised);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.spanning-kicker {
  color: var(--accent-ink);
}

.spanning-title {
  margin: 10px 0 12px;
  font-family: var(--font-artistic);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
}

.spanning-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 460px;
}

/* ==========================================================================
   03 / PRINCIPLES (3x2 HAIRLINE GRID)
   ========================================================================== */

.principles-header {
  padding: 56px 40px 44px;
  border-bottom: 1px solid var(--line);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.principle-card {
  background: var(--bg);
  padding: 34px 32px 38px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.principle-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.principle-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  background: var(--bg-raised);
}

.principle-num {
  color: var(--faint);
}

.principle-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.3;
}

.principle-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* ==========================================================================
   04 / STUDIO BAND (ARTISTIC TYPOGRAPHY CONTRAST)
   ========================================================================== */

.studio-band {
  background: var(--bg-sunken);
  padding: 96px 32px;
  text-align: center;
}

.studio-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.studio-kicker {
  color: var(--accent-ink);
  margin-bottom: 18px;
}

.studio-h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.24;
  color: var(--ink-strong);
}

.artistic-phrase {
  font-family: var(--font-artistic);
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: 0.08em;
  color: var(--ink-strong);
}

.studio-desc {
  margin: 0 0 34px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   05 / CLOSING CTA
   ========================================================================== */

.start-inner {
  padding: 108px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-kicker {
  color: var(--faint);
  margin-bottom: 18px;
}

.start-h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.16;
  color: var(--ink-strong);
}

.start-desc {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
}

/* ==========================================================================
   FOOTER (5-COLUMN HAIRLINE GRID)
   ========================================================================== */

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-col {
  background: var(--bg);
  padding: 40px 28px;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink-strong);
}

.footer-brand-name {
  font-family: var(--font-artistic);
  font-size: 22px;
  letter-spacing: 0.06em;
}

.footer-tagline {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-heading {
  margin: 0 0 16px;
  color: var(--faint);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-list a:hover {
  color: var(--ink-strong);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  color: var(--faint);
}

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 14, 0.62);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: 100%;
  max-width: 580px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
}

.case-modal-panel {
  max-width: 640px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
}

.modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
}

.modal-close:hover {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.modal-body {
  padding: 28px 26px 30px;
}

.modal-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-strong);
}

.modal-sub {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.case-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 20px 0 24px;
}

.case-spec-cell {
  background: var(--bg-raised);
  padding: 14px 16px;
}

.case-spec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  margin-bottom: 4px;
}

.case-spec-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}

.case-deliverables {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.case-deliverables li {
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-deliverables li::before {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent-ink);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--invert-bg);
  color: var(--invert-fg);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Scroll Reveal, Character Stagger & Optical Blur Mask Motion
   ========================================================================== */

/* Hero character-by-character entrance */
.char-unit,
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  will-change: opacity, transform, filter;
  transition: opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.78s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-unit.is-shown,
.split-char.is-shown {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered hero blocks after title */
[data-hero-step] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-hero-step].is-shown {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Section text & block reveal with clip-mask + blur */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
  clip-path: inset(0 0 14% 0);
  will-change: opacity, transform, filter, clip-path;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              clip-path 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  clip-path: inset(0 0 0% 0);
}

/* Scroll-linked optical focus mask on cards & icon tiles (ArtCraft bottom-edge blur) */
.scroll-focus-item {
  --focus: 1;
  opacity: calc(0.28 + var(--focus) * 0.72);
  filter: blur(calc((1 - var(--focus)) * 10px));
  transform: translateY(calc((1 - var(--focus)) * 22px));
  will-change: opacity, filter, transform;
  transition: opacity 0.18s linear, filter 0.18s linear, transform 0.22s ease-out;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1180px) {
  .lineup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .services-grid {
    grid-template-columns: 1fr;
    padding: 44px 28px 52px;
  }
  .chrome-rail {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .lineup-grid {
    grid-template-columns: 1fr;
  }
  .case-card-spanning {
    grid-column: span 1;
  }
  .icon-showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sticky-eyebrow {
    padding: 10px 16px;
  }
  .eyebrow-right {
    display: none;
  }
  .principles-header {
    padding: 40px 20px 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .br-desktop {
    display: none;
  }
  .case-spec-grid,
  .case-deliverables {
    grid-template-columns: 1fr;
  }
}
