/* AppLoop — apploop.pincc.dev
   Obsidian Titanium Studio aesthetic grounded in AppLoopLogo.png & AppLoopTheme dark mode */

:root {
  --bg: #08090c;
  --bg-elevated: #0f1116;
  --surface: #14171e;
  --surface-hover: #191d26;
  --hud: rgba(24, 27, 34, 0.82);
  --hud-solid: #1a1d24;

  --ink: #f3f5f9;
  --ink-secondary: #a1a9b8;
  --ink-quiet: #838c9c;

  --accent: #76a9ff;
  --accent-solid: #2d6be4;
  --accent-soft: rgba(118, 169, 255, 0.14);
  --accent-border: rgba(118, 169, 255, 0.34);

  --mint: #40e09e;
  --mint-soft: rgba(64, 224, 158, 0.14);
  --mint-border: rgba(64, 224, 158, 0.42);

  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.15);
  --rim-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-stage: 0 40px 120px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.11);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.38);
  --shadow-hud: 0 18px 48px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle top studio ambient light */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 100%);
  height: 760px;
  background:
    radial-gradient(ellipse 56% 44% at 50% 0%, rgba(92, 146, 255, 0.16) 0%, rgba(45, 107, 228, 0.04) 48%, transparent 74%),
    radial-gradient(ellipse 36% 24% at 50% 6%, rgba(255, 255, 255, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer {
  position: relative;
  z-index: 1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.16s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px;
  font-size: 12px;
  font-weight: 600;
}

.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-secondary);
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease-out), background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

/* Flagship titanium-white primary button */
.btn-primary {
  background: linear-gradient(180deg, #ffffff 0%, #e7ecf5 100%);
  color: #0b0d12;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(118, 169, 255, 0.22);
}

.btn-primary:hover {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(118, 169, 255, 0.34);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: var(--hairline-strong);
  box-shadow: var(--rim-top);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-accent {
  background: linear-gradient(180deg, #3c7cff 0%, #2762d9 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px rgba(45, 107, 228, 0.36);
}

.btn-accent:hover {
  background: linear-gradient(180deg, #4b87ff 0%, #2d6be4 100%);
}

.btn-lg {
  font-size: 15px;
  padding: 13px 26px;
}

.btn-compact {
  font-size: 13px;
  padding: 7px 14px;
}

/* Hero */
.hero {
  padding: 58px 0 56px;
}

.hero-top {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-icon-emblem {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border-radius: 17px;
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 44px rgba(118, 169, 255, 0.2);
}

.hero-icon-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.8vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.042em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 18%, #b9c3d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 610px;
  font-size: clamp(16.5px, 1.9vw, 19px);
  line-height: 1.58;
  color: var(--ink-secondary);
  font-weight: 420;
}

.hero-cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.hero-specs {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--ink-quiet);
}

.hero-specs span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

/* Studio Display macOS Interactive Stage */
.stage-section {
  margin-top: 52px;
}

.studio-bezel {
  position: relative;
  border-radius: 26px;
  padding: 9px;
  background: linear-gradient(180deg, #272b34 0%, #14171d 100%);
  box-shadow: var(--shadow-stage);
}

.mac-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  min-height: 480px;
  max-height: 640px;
  border-radius: 19px;
  overflow: hidden;
  background:
    url("assets/studio-wallpaper.jpg") center / cover no-repeat,
    radial-gradient(circle at 20% 25%, #1c2e54 0%, #0d121d 60%, #090b10 100%);
  user-select: none;
  isolation: isolate;
}

/* Authentic Dark macOS Menu Bar */
.mac-menubar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 18, 24, 0.56);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 550;
  color: rgba(244, 247, 252, 0.92);
  z-index: 35;
}

.menubar-left, .menubar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menubar-app {
  font-weight: 700;
}

.menubar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(118, 169, 255, 0.18);
  border: 1px solid rgba(118, 169, 255, 0.3);
  color: #b7d2ff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.stage-toast {
  position: absolute;
  top: 42px;
  right: 16px;
  z-index: 44;
  background: rgba(22, 25, 33, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-hud);
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ease-out);
}

.stage-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.mac-desktop {
  position: absolute;
  inset: 30px 0 0 0;
  overflow: hidden;
}

/* Realistic Dark macOS Windows */
.sim-win {
  position: absolute;
  background: rgba(22, 25, 31, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition:
    left 0.48s var(--ease-out),
    top 0.48s var(--ease-out),
    width 0.48s var(--ease-out),
    height 0.48s var(--ease-out),
    opacity 0.28s ease,
    transform 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.sim-win.is-focused {
  z-index: 16;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 76px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(118, 169, 255, 0.26);
}

.sim-win.is-hidden-in-group {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.sim-win-bar {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(31, 35, 44, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sim-lights {
  display: flex;
  gap: 6px;
}

.sim-lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.sim-lights i:nth-child(1) { background: #ff5f57; }
.sim-lights i:nth-child(2) { background: #febc2e; }
.sim-lights i:nth-child(3) { background: #28c840; }

.sim-win-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd3e0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Realistic IDE Layout */
.ide-body {
  flex: 1;
  display: grid;
  grid-template-columns: 142px 1fr;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.ide-sidebar {
  background: rgba(16, 18, 24, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: #8f98a8;
}

.ide-file {
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ide-file.active {
  background: rgba(118, 169, 255, 0.16);
  color: #e9f1ff;
  font-weight: 600;
}

.ide-code {
  padding: 12px 14px;
  line-height: 1.65;
  color: #e3eaf4;
  overflow: hidden;
}

.code-line { display: flex; gap: 12px; white-space: nowrap; }
.code-num { color: #677389; width: 16px; text-align: right; flex-shrink: 0; }
.code-kw { color: #7cb2ff; }
.code-fn { color: #5ce0a8; }
.code-str { color: #f6c478; }
.code-cmt { color: #8c98ae; }

/* Realistic Browser Window */
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(28, 31, 39, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.browser-url {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  color: #c2cad8;
  text-align: center;
}

.browser-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.browser-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.browser-doc-title {
  font-size: 13.5px;
  font-weight: 650;
  color: #f0f4fa;
}

.browser-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
}

.browser-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.browser-metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  padding: 10px;
}

.browser-metric span {
  display: block;
  font-size: 11px;
  color: #939cad;
}

.browser-metric strong {
  font-size: 15px;
  font-weight: 700;
  color: #f3f5f9;
  font-variant-numeric: tabular-nums;
}

.browser-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
  color: #b7c0cf;
}

.browser-list-item {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Realistic Notes Window */
.notes-body {
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #d6dde8;
  font-size: 12.5px;
}

.notes-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bfc8d6;
}

.notes-check .chk {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent-solid);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* Sculpted Vector macOS App Icons */
.mac-app-icon {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

.mac-app-icon.sm {
  width: 24px;
  height: 24px;
}

/* Interactive Overlays */
.overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease;
  z-index: 26;
}

.overlay-layer.active {
  opacity: 1;
  pointer-events: auto;
}

/* 1. Sculpted Dark Launcher Ring (echoing dark-ring.png) */
.ring-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.launcher-ring-hud {
  position: relative;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.09) 0%, rgba(28, 31, 38, 0.88) 46%, rgba(16, 18, 24, 0.94) 100%);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 32px 84px rgba(0, 0, 0, 0.68),
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -10px 24px rgba(0, 0, 0, 0.4);
  transform: scale(0.92);
  transition: transform 0.34s var(--ease-out);
}

.overlay-layer.active .launcher-ring-hud {
  transform: scale(1);
}

.ring-groove {
  position: absolute;
  inset: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: radial-gradient(circle, rgba(12, 14, 18, 0.72) 0%, rgba(26, 29, 36, 0.56) 100%);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.45);
}

.ring-center-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 25%, #2a2e38 0%, #171a21 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
}

.ring-center-hub strong {
  font-size: 12px;
  font-weight: 650;
  color: #ffffff;
  line-height: 1.2;
}

.ring-center-hub span {
  font-size: 11px;
  color: #9ba5b7;
  margin-top: 2px;
}

.ring-node {
  position: absolute;
  width: 50px;
  height: 50px;
  margin-left: -25px;
  margin-top: -25px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease-out), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ring-node:hover,
.ring-node.selected {
  background: radial-gradient(circle at 35% 25%, rgba(154, 196, 255, 0.34), rgba(45, 107, 228, 0.24));
  border-color: rgba(154, 196, 255, 0.56);
  transform: scale(1.14);
  box-shadow: 0 0 24px rgba(118, 169, 255, 0.36), inset 0 1px 1px rgba(255, 255, 255, 0.34);
}

/* 2. Authentic 34pt Flush Dark Frosted Window Group Rail */
.group-rail-hud {
  position: absolute;
  background: rgba(28, 31, 39, 0.82);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-hud);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  transition: all 0.38s var(--ease-out);
  z-index: 28;
}

.group-rail-hud.dock-left {
  left: 3.2%;
  top: 7%;
  width: 40px;
  height: 85%;
  flex-direction: column;
}

.group-rail-hud.dock-top {
  left: 8%;
  top: 5.5%;
  width: 56%;
  height: 40px;
  flex-direction: row;
}

.rail-members, .rail-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.group-rail-hud.dock-left .rail-members,
.group-rail-hud.dock-left .rail-actions {
  flex-direction: column;
}

.rail-drag-grip {
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.group-rail-hud.dock-top .rail-drag-grip {
  width: 30px;
  height: 4px;
}

.rail-member-btn, .rail-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(235, 240, 248, 0.78);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.rail-member-btn:hover, .rail-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.rail-member-btn.active {
  background: rgba(118, 169, 255, 0.22);
  border-color: rgba(118, 169, 255, 0.44);
}

/* 3. Layouts HUD + Crystalline Mint Group Drop */
.layout-picker-hud {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hud);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-hud);
  border-radius: 14px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.layout-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.16s ease;
}

.layout-choice:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.layout-choice.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #c2daff;
}

.layout-mini {
  width: 46px;
  height: 28px;
  border-radius: 5px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 2px;
}

.layout-mini span {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2.5px;
}

.layout-choice.active .layout-mini span {
  background: rgba(118, 169, 255, 0.65);
}

.layout-mini.split { grid-template-columns: 1fr 1fr; }
.layout-mini.main-side { grid-template-columns: 2.4fr 1fr; }
.layout-mini.thirds { grid-template-columns: 1fr 1fr 1fr; }
.layout-mini.mint-drop { grid-template-columns: 1fr; background: var(--mint-soft); }
.layout-mini.mint-drop span { background: rgba(64, 224, 158, 0.45); border: 1px dashed var(--mint); }

.mint-drop-capsule {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  background: rgba(16, 48, 38, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1.5px solid var(--mint);
  color: #b8ffe2;
  font-weight: 650;
  font-size: 13.5px;
  padding: 14px 22px;
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55), 0 0 36px rgba(64, 224, 158, 0.24);
  display: none;
  align-items: center;
  gap: 10px;
}

.mint-drop-capsule.visible {
  display: inline-flex;
}

/* 4. Authentic Dark Scene Drawer (matching after-dark-multi.png) */
.scene-drawer-hud {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: 280px;
  background: rgba(26, 29, 36, 0.88);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: var(--shadow-hud);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-16px);
  transition: transform 0.36s var(--ease-out);
}

.overlay-layer.active .scene-drawer-hud {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head strong {
  font-size: 13.5px;
  font-weight: 650;
}

.drawer-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: 9px;
}

.drawer-seg button {
  border: 0;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--ink-secondary);
}

.drawer-seg button.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.scene-card-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.scene-card-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(118, 169, 255, 0.45);
}

.scene-card-btn.active {
  background: rgba(118, 169, 255, 0.12);
  border-color: var(--accent);
}

.scene-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}

.scene-key {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink-secondary);
}

.scene-card-btn.active .scene-key {
  background: var(--accent-solid);
  color: #ffffff;
}

.scene-topo {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.topo-screen {
  border-radius: 6px;
  background: rgba(14, 16, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  display: grid;
  gap: 3px;
}

.topo-screen.wide { flex: 1.5; height: 42px; grid-template-columns: 1.4fr 1fr; }
.topo-screen.tall { flex: 0.7; height: 50px; grid-template-rows: 1fr 1fr; }
.topo-screen.single { flex: 1; height: 44px; grid-template-columns: 1fr 1fr 1fr; }

.topo-pane {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #dbe3f0;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.drawer-undo-btn {
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
}

.drawer-undo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 5. Focus Curtain */
.focus-curtain-veil {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.34s ease;
  background: rgba(6, 7, 10, 0.78);
}

.focus-curtain-veil.active {
  opacity: 1;
}

.focus-controls-hud {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: var(--hud);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-hud);
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  padding: 0;
}

.swatch-btn.active {
  box-shadow: 0 0 0 2px var(--accent);
}

.focus-slider {
  width: 92px;
  accent-color: var(--accent);
}

/* Sleek Floating Dock Mode Bar Below Stage */
.stage-dock-wrap {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stage-dock-top {
  margin-top: 0;
  margin-bottom: 18px;
}

.stage-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--rim-top);
}

.stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 560;
  transition: background 0.18s ease, color 0.18s ease;
}

.stage-tab:hover {
  color: var(--ink);
}

.stage-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stage-tab .key-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-quiet);
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 999px;
}

.stage-tab[aria-selected="true"] .key-badge {
  background: rgba(118, 169, 255, 0.24);
  color: #cfe0ff;
}

.stage-caption {
  font-size: 14px;
  color: var(--ink-secondary);
  text-align: center;
  max-width: 680px;
}

/* Section Layout */
.section {
  padding: 108px 0;
}

.section-header {
  max-width: 660px;
  margin-bottom: 52px;
}

.section-kicker {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.036em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 25%, #b9c3d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header p {
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--ink-secondary);
  line-height: 1.62;
}

/* Asymmetric 12-Col Apple Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.018) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--rim-top), var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.22s ease, transform 0.28s var(--ease-out);
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-12 { grid-column: span 12; }

.bento-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.bento-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: var(--ink);
}

.bento-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.62;
}

.bento-visual {
  border-radius: 14px;
  background: #0b0d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.bento-wide-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 32px;
  align-items: center;
}

/* Bento Focus Interactive Spotlight */
.bento-spotlight-stage {
  cursor: crosshair;
  background:
    url("assets/studio-wallpaper.jpg") center / cover no-repeat,
    #0b0d12;
}

.bento-spotlight-veil {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.78);
  transition: background 0.1s linear;
  pointer-events: none;
}

.bento-focused-card {
  position: relative;
  z-index: 2;
  width: 210px;
  border-radius: 11px;
  background: rgba(24, 27, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72);
  padding: 14px;
}

/* Architectural Comparison Strip */
.compare-wrap {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.compare-table th, .compare-table td {
  text-align: left;
  padding: 18px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
}

.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table th {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-quiet);
}

.compare-table td.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-secondary);
}

.compare-table tr.total-row {
  background: rgba(118, 169, 255, 0.07);
}

.compare-table tr.total-row td {
  font-weight: 700;
  color: var(--ink);
}

.tag-included {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
  background: var(--mint-soft);
  border: 1px solid rgba(64, 224, 158, 0.24);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
}

/* Privacy & Native Architecture */
.metric-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 44px;
}

.metric-cell {
  padding: 28px 24px;
  border-right: 1px solid var(--hairline);
}

.metric-cell:last-child {
  border-right: 0;
}

.metric-val {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric-label {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.permission-ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.perm-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--rim-top);
}

.perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.perm-head strong {
  font-size: 15.5px;
  font-weight: 650;
}

.perm-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-secondary);
}

.perm-badge.local {
  background: var(--mint-soft);
  color: var(--mint);
}

.perm-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.62;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 20px;
  align-items: stretch;
}

.price-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--rim-top);
}

.price-card.featured {
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(118, 169, 255, 0.14) 0%, transparent 65%),
    rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(118, 169, 255, 0.42);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(196, 220, 255, 0.25);
}

.early-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #cfe0ff;
  background: rgba(118, 169, 255, 0.18);
  border: 1px solid rgba(118, 169, 255, 0.34);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
  width: fit-content;
}

.price-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.price-desc {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

.price-amount {
  margin: 26px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.price-now {
  font-size: 52px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
}

.price-old {
  font-size: 22px;
  color: var(--ink-quiet);
  text-decoration: line-through;
  font-weight: 500;
}

.price-note {
  font-size: 13.5px;
  color: var(--ink-quiet);
  margin: 0 0 26px;
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: #dce2ec;
}

.price-features svg {
  color: var(--accent);
  flex-shrink: 0;
}

.price-card .btn {
  width: 100%;
}

.price-foot-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-quiet);
}

/* FAQ */
.faq-list {
  max-width: 780px;
  border-top: 1px solid var(--hairline);
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.faq-trigger svg {
  flex-shrink: 0;
  color: var(--ink-quiet);
  transition: transform 0.22s var(--ease-out), color 0.16s ease;
}

.faq-trigger[aria-expanded="true"] svg {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-panel {
  display: none;
  padding: 0 0 22px;
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.68;
}

.faq-panel.open {
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 46px 0;
  font-size: 13.5px;
  color: var(--ink-quiet);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

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

/* Legal Pages */
.legal-main {
  padding: 68px 0 96px;
}

.legal-article {
  max-width: 740px;
  margin: 0 auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 550;
  color: var(--accent);
  margin-bottom: 24px;
}

.legal-article h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.legal-updated {
  font-size: 14px;
  color: var(--ink-quiet);
  margin: 0 0 34px;
}

.legal-article h2 {
  margin: 34px 0 12px;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--ink);
}

.legal-article p, .legal-article li {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.legal-article code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  color: #e4eaf4;
}

.legal-article ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-callout {
  background: rgba(118, 169, 255, 0.08);
  border: 1px solid rgba(118, 169, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--ink);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: #14171e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.75);
  padding: 28px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.modal-close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-secondary);
}

.modal-card p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--ink-secondary);
}

.modal-meta {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .col-7, .col-5, .col-12 { grid-column: span 12; }
  .bento-wide-row,
  .metric-bar,
  .permission-ledger,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .metric-cell {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .metric-cell:last-child { border-bottom: 0; }
  .mac-stage {
    aspect-ratio: auto;
    height: 450px;
    min-height: 450px;
  }
  .ide-body { grid-template-columns: 1fr; }
  .ide-sidebar { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero { padding: 38px 0 32px; }
  .section { padding: 72px 0; }
  .header-actions .btn-compact { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .studio-bezel { padding: 6px; border-radius: 20px; }
  .mac-stage { height: 390px; min-height: 390px; border-radius: 15px; }
  .launcher-ring-hud { transform: scale(0.8); }
  .overlay-layer.active .launcher-ring-hud { transform: scale(0.84); }
  .scene-drawer-hud { width: calc(100% - 20px); }
  .stage-tabs {
    width: 100%;
    border-radius: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .stage-tab { flex-shrink: 0; padding: 7px 12px; font-size: 13px; }
  .focus-controls-hud {
    width: calc(100% - 20px);
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
  }
  .focus-slider { width: 66px; }
  .bento-card { padding: 22px; }
  .price-card { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
