/* Rebirth Station — Design tokens & base styles */

:root {
  /* Neutral / surface */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-sunken: #eef0f3;

  /* Ink (text) */
  --ink: #0b1220;
  --ink-2: #1f2a40;
  --ink-3: #4b5772;
  --muted: #7c869b;
  --faint: #aab2c2;

  /* Line */
  --line: #e6e8ee;
  --line-strong: #d5d9e3;

  /* Brand */
  --primary: #1d3a8a;         /* deep trust navy */
  --primary-press: #15275e;
  --primary-soft: #e8edf8;
  --accent: #3b6df0;          /* electric blue, used sparingly */
  --accent-soft: #dfe8ff;

  /* Cube hues — used as a small ranged palette for cube swatches */
  --c-1: #3b6df0;
  --c-2: #15275e;
  --c-3: #0ea5e9;
  --c-4: #6366f1;
  --c-5: #0f766e;
  --c-6: #b45309;
  --c-7: #be123c;
  --c-8: #4b5563;

  /* Radius / shadow */
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;
  --r-5: 20px;
  --r-6: 28px;

  --sh-1: 0 1px 2px rgba(13,23,46,0.04), 0 1px 1px rgba(13,23,46,0.03);
  --sh-2: 0 2px 4px rgba(13,23,46,0.04), 0 6px 18px rgba(13,23,46,0.06);
  --sh-3: 0 4px 10px rgba(13,23,46,0.06), 0 20px 50px rgba(13,23,46,0.10);
  --sh-glass: 0 0 0 1px rgba(13,23,46,0.04), 0 30px 80px rgba(13,23,46,0.18);

  /* Type */
  --font-sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --maxw: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

::selection { background: var(--accent-soft); color: var(--primary-press); }

/* Layout primitives */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

/* Skip link (a11y) — 2026-05-23 Phase B3.3 */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--primary, #1A237E);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--accent, #E91E63);
  outline-offset: 2px;
}

/* main 포커스 시 outline 제거 (탭 점프 시 시각 노이즈 회피) */
main[tabindex="-1"]:focus {
  outline: none;
}

.section {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
}

/* Typography scale */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 16px 0 20px;
  color: var(--ink);
  text-wrap: balance;
}

.section-lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 62ch;
  text-wrap: pretty;
}

.section-head {
  margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
  user-select: none;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--primary);
}
.btn-arrow:hover { gap: 10px; }

/* Card base */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-5);
}

/* Subtle pinstripe grid background for hero */
.dot-grid {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(13,23,46,0.10) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Top nav (mobile / narrow) — sticky top bar.
   At wide widths it transforms into a fixed left sidebar. */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,246,248,0.78);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background 180ms ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(245,246,248,0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-3);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-section-label { display: none; }

/* Nav dropdown */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.nav-item-dropdown .nav-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
.nav-caret {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
}
.nav-caret:hover {
  background: var(--surface-sunken);
}
.nav-item-dropdown.is-open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateX(0);
}
.nav-item-dropdown.is-open .caret {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-item-dropdown .caret {
  font-size: 10px;
  opacity: 0.65;
  transition: transform 200ms ease;
}
.nav-item-dropdown:hover .caret,
.nav-item-dropdown:focus-within .caret {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 6px 0;
  min-width: 168px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 100;
  list-style: none;
}
.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-submenu a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--ink-3);
}
.nav-submenu a:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

/* Sidebar mode (min-width 880px): submenu flies out to the right */
@media (min-width: 880px) {
  .nav-item-dropdown .nav-submenu {
    top: 0;
    left: calc(100% + 8px);
    transform: translateX(-4px);
  }
  .nav-item-dropdown:hover .nav-submenu,
  .nav-item-dropdown:focus-within .nav-submenu {
    transform: translateX(0);
  }
  /* Avoid the global .nav-links a::before dot inside the submenu */
  .nav-submenu a::before { display: none; }
  .nav-submenu a { padding: 8px 14px; }
}

/* Hamburger button (mobile only) */
.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  border-radius: 8px;
  transition: background 150ms;
}
.nav-hamburger:hover { background: var(--surface-2); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav.is-mobile-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-mobile-open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav.is-mobile-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile: stack nav-links into fullscreen panel */
@media (max-width: 879px) {
  .nav-hamburger { display: inline-flex; }
  .site-search-btn { display: none; }
}
@media (min-width: 880px) {
  .site-search-btn { display: inline-flex; }
}
@media (max-width: 879px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 24px 20px;
    background: var(--surface);
    z-index: 90;
    overflow-y: auto;
  }
  .nav.is-mobile-open .nav-links { display: flex; }
  .nav-links a,
  .nav-links .nav-toggle {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    color: var(--ink);
    width: 100%;
  }
  .nav-links a:hover,
  .nav-links .nav-toggle:hover { background: var(--surface-2); }
  .nav-item-dropdown .nav-submenu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--surface-2);
    margin: 4px 0 8px;
    padding: 6px 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    display: none;
  }
  .nav-item-dropdown.is-open .nav-submenu { display: block; }
}

/* ─── Wide-viewport: left sidebar ─── */
@media (min-width: 880px) {
  :root { --sidebar-w: 240px; }
  body { padding-left: var(--sidebar-w); }
  .nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 0 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav.is-scrolled { background: var(--surface); }
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
    max-width: none;
    padding: 28px 18px 24px;
    gap: 28px;
  }
  /* Logo inside sidebar */
  .nav .logo { padding: 0 4px; }
  .nav-section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--faint);
    padding: 0 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    font-size: 14px;
  }
  .nav-links a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 120ms ease, color 120ms ease;
  }
  .nav-links a::before { display: none; }
  .nav-links a { gap: 0; }
  .nav-links a:hover {
    background: var(--surface-sunken);
    color: var(--ink);
  }
  /* .nav-toggle (button) 도 a와 동일 정렬·스타일 적용 */
  .nav-links .nav-toggle {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-3);
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
    transition: background 120ms ease, color 120ms ease;
  }
  .nav-links .nav-toggle:hover {
    background: var(--surface-sunken);
    color: var(--ink);
  }
  .nav-item-dropdown.is-open > .nav-toggle {
    background: var(--surface-sunken);
    color: var(--ink);
  }
  .nav-cta {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
  .nav-cta .lang-toggle {
    align-self: flex-start;
  }
  .nav-cta .btn-primary {
    justify-content: center;
    padding: 11px 16px !important;
  }
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-wordmark {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: inherit;
}
.logo-invert { color: #fff; }
.logo-invert .logo-wordmark { color: #fff; }

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.lang-toggle button {
  padding: 5px 11px;
  border-radius: 999px;
  transition: background 140ms ease, color 140ms ease;
}
.lang-toggle button.active {
  background: var(--ink);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  padding: 88px 0 120px;
  overflow: visible;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 60% at 80% 10%, rgba(59,109,240,0.10), transparent 60%),
    radial-gradient(ellipse 80% 70% at 0% 100%, rgba(29,58,138,0.08), transparent 60%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-title {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 16px 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.hero-title .accent {
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-meta {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px;
  font-size: 13px; color: var(--muted);
}
.hero-meta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }

@media (max-width: 1060px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .stage-wrap { max-width: 480px; margin: 0 auto; }
}

/* Layout variants for tweak */
.hero[data-layout="centered"] .hero-inner {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 64px;
}
.hero[data-layout="centered"] .hero-sub { margin-left: auto; margin-right: auto; }
.hero[data-layout="centered"] .hero-ctas { justify-content: center; }
.hero[data-layout="centered"] .hero-meta { justify-content: center; }
.hero[data-layout="fullbleed"] .hero-inner {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 56px;
}
.hero[data-layout="fullbleed"] .hero-sub { margin-left: auto; margin-right: auto; }
.hero[data-layout="fullbleed"] .hero-ctas { justify-content: center; }
.hero[data-layout="fullbleed"] .hero-meta { justify-content: center; }
.hero[data-layout="fullbleed"] .stage-wrap { max-width: 1100px; margin: 0 auto; }

/* 3D Phone stage */
.stage-wrap {
  position: relative;
  perspective: 1600px;
  aspect-ratio: 0.62 / 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Phone */
.phone {
  position: absolute;
  left: 50%;
  top: 5%;
  width: clamp(260px, 32vw, 320px);
  /* Height reduced 16% from original 9/19.5 (top fixed, shrinks upward) */
  aspect-ratio: 9 / 16.38;
  transform: translateX(-50%) rotateY(-14deg) rotateX(5deg) rotateZ(-1.5deg);
  transform-style: preserve-3d;
  border-radius: 38px;
  background: linear-gradient(160deg, #1a2030 0%, #0b1220 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 -2px 0 rgba(255,255,255,0.04),
    0 60px 100px rgba(13,23,46,0.30),
    0 20px 40px rgba(13,23,46,0.20);
  z-index: 2;
}
.phone::before {
  /* side bevel */
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 32px;
  background: linear-gradient(160deg, #0f1626 0%, #06090f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.phone-screen {
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  background: linear-gradient(180deg, #0a0f1c 0%, #0e1424 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  padding: 0 8px 8px;
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 18px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9px; color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 14px 16px 10px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.phone-status .dots { display: inline-flex; gap: 2px; }
.phone-status .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.5); }

/* Cube grid — 5 rows packed at top; row 6 slot intentionally empty so the popup can sit there */
.phone-cubes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-content: start;
  gap: 6px;
  flex: 1;
  min-height: 0;
  padding: 4px 0 0;
}

.phone-dock {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
}
.dock-pill {
  width: 96px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.55);
}

.cube {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  cursor: pointer;
  user-select: none;
  color: rgba(255,255,255,0.95);
  text-align: center;
  background: var(--c, #3b6df0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 1px 2px rgba(0,0,0,0.25);
  transition: filter 140ms ease, transform 140ms cubic-bezier(.4,0,.2,1);
  will-change: transform, filter;
  overflow: hidden;
  border: 0;
  padding: 9px 6px 4px;
}
.cube::before {
  /* Subtle glossy highlight on top half */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.06) 60%);
  pointer-events: none;
  border-radius: inherit;
}
.cube-icon-wrap {
  width: 62%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.cube-icon-wrap > svg { width: 100%; height: 100%; }
.cube-label {
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

/* Ghost cubes — row 5 placeholders that look like dimmed apps */
.cube-ghost {
  background: #1a2030 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  cursor: pointer;
}
.cube-ghost::before { display: none; }
.cube-ghost .cube-icon-wrap { opacity: 0.22; filter: grayscale(0.9); }
.cube-ghost .cube-label { color: rgba(255,255,255,0.32); }
.cube-ghost:hover .cube-icon-wrap { opacity: 0.35; }
.cube:not(.cube-off):hover {
  filter: brightness(1.08);
  z-index: 2;
}
.cube.is-pressed,
.cube:not(.cube-off):active {
  filter: brightness(0.85);
  transform: scale(0.94);
}
.cube.is-pressed::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.18);
  pointer-events: none;
  z-index: 1;
  animation: cube-flash 380ms ease-out;
  border-radius: inherit;
}
@keyframes cube-flash {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Floating cube — appears around the phone */
.float-cube {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    0 14px 30px rgba(13,23,46,0.18),
    0 4px 10px rgba(13,23,46,0.10);
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
  z-index: 3;
  overflow: hidden;
}
.float-cube-inner {
  width: 60%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.float-cube-inner > svg { width: 100%; height: 100%; }
.float-cube.fc-1 { top: 6%;    left: -12%;  animation-delay: 0s;   transform: rotate(-8deg); }
.float-cube.fc-2 { top: 14%;   right: -12%; animation-delay: 0.8s; transform: rotate(6deg); width: 96px; height: 96px; border-radius: 22px; }
.float-cube.fc-3 { bottom: 24%; left: -12%;  animation-delay: 1.6s; transform: rotate(-4deg); width: 80px; height: 80px; border-radius: 18px; }
.float-cube.fc-4 { bottom: 30%; right: -12%; animation-delay: 2.2s; transform: rotate(10deg); }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
  50% { transform: translate3d(0, -14px, 0) rotate(var(--rot, 0deg)); }
}
.float-cube.fc-1 { --rot: -8deg; }
.float-cube.fc-2 { --rot: 6deg; }
.float-cube.fc-3 { --rot: -4deg; }
.float-cube.fc-4 { --rot: 10deg; }

/* PC effect popup */
.pc-popup {
  position: absolute;
  bottom: calc(18% - 64px);
  left: 50%;
  /* Width = phone-screen content width − 3% (left side trimmed) */
  width: clamp(221px, calc(32vw - 40px), 280px);
  /* Height = single cube row height = (content width − 12 gaps) ÷ 3 */
  height: clamp(72px, calc((32vw - 44px) / 3), 92px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--sh-glass);
  padding: 0 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  transform: translateX(calc(-50% + 4px));
  pointer-events: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.pc-popup-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 44px;
  overflow: hidden;
}
.pc-popup-icon-inner {
  width: 70%;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.pc-popup-icon-inner > svg { width: 100%; height: 100%; }
.pc-popup-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.pc-popup-label {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-popup-action {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 820px) {
  .pc-popup {
    bottom: 16%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Sections — Three-tier */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }

.tier-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-5);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 380px;
}
.tier-card-visual {
  height: 160px;
  margin: 28px -10px 24px;
  border-radius: var(--r-4);
  background: var(--surface-sunken);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.tier-num {
  position: absolute; top: 16px; right: 18px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.04em;
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  line-height: 1.4;
}
.tier-name {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 12px;
}
.tier-name h3 {
  font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.02em;
}
.tier-name .kr { font-size: 14px; color: var(--muted); }
.tier-name .ext {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--surface-sunken);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
  letter-spacing: 0.02em;
}

/* === Pages: shared form & UI utilities === */
.cube-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--surface-sunken);
  color: var(--ink-3);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.form-section { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.placeholder-box {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-3);
}

.action-type-btn {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
}
.action-type-btn:hover {
  border-color: var(--accent);
}
.action-type-btn.is-active {
  border-color: var(--accent);
  background: rgba(233, 30, 99, 0.05);
}

/* Cube preview */
.cube-preview-wrap {
  padding: 32px;
  background: var(--surface-2);
  border-radius: var(--r-4);
  display: flex;
  justify-content: center;
}
.cube-preview-cell {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.15);
}
.cube-preview-icon {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cube-preview-label {
  font-size: 12px;
  text-align: center;
  padding: 0 8px;
  opacity: 0.9;
}

/* Cube counter */
.cube-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-2);
  border-radius: var(--r-3);
  flex-wrap: wrap;
  gap: 8px;
}
.badge-warning {
  padding: 4px 10px;
  background: rgba(255, 152, 0, 0.12);
  color: #b45309;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge-status {
  padding: 3px 10px;
  background: var(--surface-sunken);
  color: var(--ink-3);
  border-radius: 999px;
  font-size: 12px;
}

/* List builder grid */
.list-builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 24px;
  background: var(--surface-2);
  border: 2px dashed var(--line);
  border-radius: var(--r-4);
}
.builder-cube {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  color: #fff;
  cursor: grab;
}
.builder-cube-pos {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.7;
}
.builder-cube-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.builder-cube-name {
  font-size: 12px;
  font-weight: 500;
}
.builder-cube-add {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 2px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: all 150ms;
}
.builder-cube-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Dropzone */
.dropzone {
  padding: 60px 24px;
  background: var(--surface-2);
  border: 2px dashed var(--line);
  border-radius: var(--r-4);
  text-align: center;
  transition: all 150ms;
}
.dropzone.is-hover {
  border-color: var(--accent);
  background: rgba(233, 30, 99, 0.04);
}

/* Manage stats */
.manage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.manage-stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.manage-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.manage-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.manage-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
}
.btn-mini:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive: stack form + preview */
@media (max-width: 768px) {
  div[style*="grid-template-columns: 1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
}
.tier-card p {
  color: var(--ink-3);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.tier-card .meta {
  margin-top: auto;
  padding-top: 24px;
  display: flex; gap: 16px;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono);
}

/* Tier visuals */
.viz-cube-single {
  width: 84px; height: 84px; border-radius: 18px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--primary) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 18px 40px rgba(29,58,138,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px;
}
.viz-list {
  display: grid; grid-template-columns: repeat(3, 36px); gap: 6px;
}
.viz-list .vc {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--c, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.viz-pack {
  display: flex; gap: -8px; position: relative;
}
.viz-pack .vl {
  width: 78px; height: 100px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, 28px); gap: 4px;
  padding: 8px;
  align-content: center; justify-content: center;
  box-shadow: var(--sh-2);
}
.viz-pack .vl .vc { width: 28px; height: 28px; border-radius: 6px; }
.viz-pack .vl:nth-child(1) { transform: translateX(20px) rotate(-6deg); z-index: 1; }
.viz-pack .vl:nth-child(2) { transform: rotate(0deg); z-index: 3; }
.viz-pack .vl:nth-child(3) { transform: translateX(-20px) rotate(6deg); z-index: 1; }

/* 4-Layer ecosystem */
.eco-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}
.eco-layer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 24px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.eco-layer:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.eco-layer .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.eco-layer .name {
  font-size: 18px; font-weight: 500; letter-spacing: -0.015em;
  display: flex; flex-direction: column; gap: 2px;
}
.eco-layer .name .desc {
  font-size: 13.5px; color: var(--ink-3); font-weight: 400;
}
.eco-layer .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-sunken);
  padding: 4px 10px;
  border-radius: 999px;
}
.eco-layer[data-tier="1"] { border-left: 3px solid var(--primary); }
.eco-layer[data-tier="2"] { border-left: 3px solid var(--accent); }
.eco-layer[data-tier="3"] { border-left: 3px solid #0ea5e9; }
.eco-layer[data-tier="4"] { border-left: 3px solid #6366f1; }

@media (max-width: 720px) {
  .eco-layer { grid-template-columns: 1fr; gap: 8px; padding: 18px 20px; }
  .eco-layer .tag { justify-self: start; }
}

/* Partner gallery */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-card {
  aspect-ratio: 3 / 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.partner-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.partner-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.partner-tag {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Marketplace */
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .market-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .market-grid { grid-template-columns: 1fr; } }

.market-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.market-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.market-card-link { text-decoration: none; color: inherit; display: block; }
.pack-cube {
  background: var(--pack-color, #1A237E);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 6px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pack-cube::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
  pointer-events: none;
}
.pack-cube-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.pack-cube-label {
  font-size: 9px;
  font-weight: 500;
  text-align: center;
  opacity: 0.92;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.pack-cube-more {
  background: rgba(0,0,0,0.18);
}
.pack-cube-more::before { background: none; }
.pack-cube-more .pack-cube-icon {
  font-size: 16px;
  font-weight: 700;
}
.market-cover {
  aspect-ratio: 16/10;
  background: var(--surface-sunken);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 16px;
  position: relative;
}
.market-cover .mc {
  border-radius: 6px;
  background: var(--c, var(--primary));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  aspect-ratio: 1/1;
}
.market-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.market-cat {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-transform: uppercase;
}
.market-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.market-author { font-size: 13px; color: var(--muted); }
.market-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}
.step h3 {
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em;
  margin: 0;
}
.step p {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0;
}
.step-visual {
  height: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Download CTA */
.download {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-6);
  padding: 80px 64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.download::before {
  content: "";
  position: absolute;
  right: -20%;
  top: -50%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,109,240,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.download h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 20px;
  text-wrap: balance;
}
.download p { color: rgba(255,255,255,0.7); font-size: 16px; margin: 0; }
.download-buttons {
  display: flex; flex-direction: column; gap: 12px;
}
.dl-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-3);
  transition: background 160ms ease;
}
.dl-btn:hover { background: rgba(255,255,255,0.14); }
.dl-btn-icon {
  width: 40px; height: 40px; border-radius: 9px;
  background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.dl-btn-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dl-btn-text .small { font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; text-transform: uppercase; }
.dl-btn-text .big { font-size: 15px; font-weight: 500; color: #fff; }
.dl-btn-arrow { color: rgba(255,255,255,0.4); font-size: 18px; }

@media (max-width: 900px) {
  .download { grid-template-columns: 1fr; padding: 56px 32px; gap: 40px; }
}

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 4px;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.faq-q .plus {
  width: 22px; height: 22px; flex-shrink: 0;
  position: relative;
  color: var(--muted);
  transition: transform 200ms ease;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: currentColor;
  transition: transform 220ms ease;
}
.faq-q .plus::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-q .plus::after  { width: 1.5px; height: 12px; transform: translate(-50%, -50%); }
.faq-item.is-open .faq-q .plus::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms ease;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.6;
}
.faq-a > div { overflow: hidden; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a > div { padding-top: 14px; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--surface-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer-col h4 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-3); font-size: 14px; }
.footer-col a:hover { color: var(--ink); }
.footer-tag { color: var(--muted); font-size: 13px; margin-top: 12px; max-width: 32ch; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* Row category labels — vertical strip on left of phone */
.row-labels {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 4;
  pointer-events: none;
}
.row-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 8px 12px;
  border-left: 2px solid var(--line-strong);
  transition: border-color 200ms ease;
}
.row-label[data-row="0"] { border-left-color: var(--accent); }
.row-label[data-row="1"] { border-left-color: var(--primary); }
.row-label[data-row="2"] { border-left-color: #6366f1; }
.row-label-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.row-label-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
@media (max-width: 880px) {
  .row-labels { display: none; }
}
/* Row labels currently restored — positioned to the left of the phone */
.row-labels { display: flex !important; }

/* Phone dock / home indicator */
.phone-dock {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}
.dock-pill {
  width: 86px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.55);
}

/* Hero phone responsive cube text */
@media (max-width: 720px) {
  .cube-icon { font-size: 12px; }
  .cube-label { font-size: 5.5px; }
}

/* ─── Philosophy section ─── */
.philosophy {
  background: var(--surface-2);
}
.philosophy-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) {
  .philosophy-inner { grid-template-columns: 1fr; gap: 56px; }
}
.philosophy-title {
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 16px 0 24px;
  color: var(--ink);
  white-space: pre-line;
  text-wrap: balance;
}
.stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.stat {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  gap: 32px;
  padding: 28px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.stat-num {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.stat-label {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ─── Programs section ─── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .programs-grid { grid-template-columns: 1fr; } }
.program-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-5);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 320px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.program-card.is-featured {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.program-card.is-featured .program-status .status-dot { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.program-card.is-featured .program-status-label { color: rgba(255,255,255,0.7); }
.program-card.is-featured .program-name-en { color: rgba(255,255,255,0.55); }
.program-card.is-featured .program-tag {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
}
.program-card.is-featured .program-desc { color: rgba(255,255,255,0.75); }
.program-card.is-featured .program-cta { color: #fff; }
.program-card.is-featured .program-footer { border-top-color: rgba(255,255,255,0.12); }
.program-card:not(.is-featured):hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
}
.program-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.program-status .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.program-status[data-status="IN_DEV"] .status-dot { background: #f59e0b; }
.program-status[data-status="RESEARCH"] .status-dot { background: #94a3b8; }
.program-status-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.program-name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 4px;
}
.program-name-en {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.program-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.program-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.program-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-sunken);
  padding: 4px 10px;
  border-radius: 999px;
}
.program-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: gap 160ms ease;
}
.program-cta:hover { gap: 10px; }

/* Reveal-on-scroll — initial state hidden, becomes visible via is-in.
   Default-visible if prefers-reduced-motion or no JS. */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}
.reveal {
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
