/* ===== Design Tokens ===== */
:root {
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f7;
  --fg: #1d1d1f;
  --fg-secondary: #6e6e73;
  --fg-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --code-bg: #f5f5f7;
  --green: #2da44e;
  --yellow: #bf8700;
  --blue: #0071e3;
  --gray: #6e6e73;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --nav-blur: saturate(180%) blur(20px);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-apple: cubic-bezier(0.42, 0, 0.58, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 800ms;
  --duration-slower: 1200ms;
  --max-width: 1200px;
  --content-width: 720px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--fg); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; }

/* ===== Typography ===== */
h1, h2, h3, h4 { color: var(--fg); line-height: 1.15; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; margin-bottom: var(--space-sm); }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-xs); }
h4 { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-xs); }
code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
  border: 1px solid var(--border-light);
}
pre { margin-bottom: 1rem; }
pre code {
  display: block;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.content-narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--space-md); }
main { flex: 1; }
.section { padding: var(--space-xl) 0; }
.section-title { text-align: center; margin-bottom: var(--space-lg); }
.section-title h2 { margin-bottom: var(--space-xs); }
.section-title p { color: var(--fg-secondary); font-size: 1.2rem; }
.bg-secondary { background: var(--bg-secondary); }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  padding: 0.875rem 0;
  transition: background var(--duration-normal) var(--ease-apple), box-shadow var(--duration-normal) var(--ease-apple);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.08);
}
@supports not (backdrop-filter: blur(1px)) {
  .nav.scrolled { background: rgba(255, 255, 255, 0.97); }
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.nav-logo:hover { color: var(--fg); opacity: 0.7; }
.nav-links { display: flex; gap: 2rem; list-style: none; padding: 0; margin: 0; }
.nav-links a {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color var(--duration-fast) var(--ease-out);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}
#hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s var(--ease-apple);
}
#hero-mesh.visible { opacity: 1; }
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-decoration {
  position: absolute;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s var(--ease-apple);
}
.hero-decoration.visible { opacity: 0.1; }
.hero-decoration--circle {
  width: 500px;
  height: 500px;
  top: 5%;
  right: -8%;
  animation: float-rotate 40s infinite linear;
}
.hero-decoration--grid {
  width: 350px;
  height: 350px;
  bottom: 10%;
  left: -5%;
  animation: float-rotate 50s infinite linear reverse;
}
.hero-decoration--lines {
  width: 250px;
  height: 250px;
  top: 15%;
  left: 8%;
  animation: float-gentle 25s infinite ease-in-out;
}

/* SVG Line Drawing Animation */
.svg-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-line 3s var(--ease-apple) forwards;
}
.svg-draw--delay-1 { animation-delay: 0.5s; }
.svg-draw--delay-2 { animation-delay: 1s; }

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@keyframes float-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float-gentle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(3deg); }
}

/* Hero Gradient — animated subtle pulse */
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse at 50% 40%, rgba(0, 113, 227, 0.05) 0%, transparent 60%);
  pointer-events: none;
  animation: gradient-pulse 8s ease-in-out infinite alternate;
}
@keyframes gradient-pulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  max-width: 900px;
  padding: var(--space-2xl) var(--space-md);
  will-change: transform, opacity;
}

/* Hero Title — Text Reveal */
.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: var(--space-sm);
  line-height: 1;
  overflow: hidden;
}

/* Word reveal animation */
.hero-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform var(--duration-slower) cubic-bezier(0.16, 1, 0.3, 1),
              opacity var(--duration-slow) var(--ease-apple);
}
.hero-word--stagger {
  transform: translateY(40px);
  opacity: 0;
  filter: blur(8px);
  transition: transform var(--duration-slow) cubic-bezier(0.16, 1, 0.3, 1),
              opacity var(--duration-slow) var(--ease-apple),
              filter var(--duration-slow) var(--ease-apple);
}
.hero-word--visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
  filter: blur(0) !important;
}

.hero .tagline {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--fg-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  line-height: 1.5;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.35em;
}

/* Hero CTA — Fade up */
.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-apple),
              transform var(--duration-slow) cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-cta--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  opacity: 0.4;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.hero-scroll-indicator span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--fg-secondary);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scroll-bounce 2s var(--ease-apple) infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.2; }
}

/* ===== Pioneer Quote Overlay ===== */
.pioneer-quote {
  position: absolute;
  z-index: 5;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  max-width: 600px;
  width: 90%;
  opacity: 0;
  transition: opacity 1.2s var(--ease-apple);
  pointer-events: none;
}
.pioneer-quote.visible {
  opacity: 1;
}
.pioneer-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.pioneer-years {
  display: block;
  font-size: 0.8rem;
  color: var(--fg-tertiary);
  margin-bottom: 0.5rem;
}
.pioneer-text {
  font-size: 1rem;
  color: var(--fg-secondary);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 768px) {
  .pioneer-quote { bottom: 12%; }
  .pioneer-name { font-size: 0.95rem; }
  .pioneer-text { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pioneer-quote { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0.85rem 1rem;
}
.btn-secondary:hover { color: var(--accent-hover); }
.btn-secondary::after {
  content: ' →';
  transition: transform var(--duration-fast) var(--ease-out);
  display: inline-block;
}
.btn-secondary:hover::after { transform: translateX(4px); }

/* ===== Project Cards ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-md);
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--duration-normal) var(--ease-apple),
              border-color var(--duration-normal) var(--ease-apple);
  box-shadow: var(--shadow-sm);
  will-change: transform;
}
.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-xs);
}
.project-card-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 980px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-active { background: rgba(45, 164, 78, 0.1); color: var(--green); }
.badge-beta { background: rgba(191, 135, 0, 0.1); color: var(--yellow); }
.badge-planned { background: rgba(0, 113, 227, 0.1); color: var(--blue); }
.badge-archived { background: rgba(110, 110, 115, 0.1); color: var(--gray); }
.project-card-tagline {
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}
.project-card-description {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}
.project-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-sm);
}
.project-card-features li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--fg-secondary);
  font-size: 0.85rem;
  line-height: 1.8;
}
.project-card-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.project-card-meta {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--bg-tertiary);
  border-radius: 980px;
  font-size: 0.75rem;
  color: var(--fg-tertiary);
}
.project-card-install {
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
  position: relative;
  margin-bottom: var(--space-sm);
}
.project-card-install:hover { border-color: var(--border); background: var(--bg); }
.project-card-install::after {
  content: 'copy';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--fg-tertiary);
  font-family: var(--font-sans);
  transition: color var(--duration-fast) var(--ease-out);
}
.project-card-install:hover::after { color: var(--accent); }
.project-card-install.copied::after { content: 'copied!'; color: var(--green); }
.project-card-links { display: flex; gap: 1rem; }
.project-card-links a { font-size: 0.85rem; color: var(--accent); font-weight: 500; }

/* ===== Quick Start ===== */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  max-width: 1100px;
  margin: 0 auto;
}
.quickstart {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.quickstart h3 { margin-bottom: var(--space-xs); }
.quickstart p { color: var(--fg-secondary); font-size: 0.95rem; margin-bottom: var(--space-sm); }
.quickstart .code-block {
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast);
  position: relative;
}
.quickstart .code-block:hover { border-color: var(--border); background: var(--bg); }
.quickstart .code-block::after {
  content: 'click to copy';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--fg-tertiary);
}
.quickstart .code-block:hover::after { color: var(--accent); }
.quickstart .code-block.copied::after { content: 'copied!'; color: var(--green); }
.quickstart .code-block--usage {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-secondary);
  text-align: left;
  cursor: default;
  line-height: 1.8;
  margin-top: var(--space-xs);
}
.quickstart .code-block--usage::after { display: none; }

/* ===== Page Content ===== */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-lg);
}
.page-header p { color: var(--fg-secondary); max-width: 600px; margin: var(--space-xs) auto 0; font-size: 1.15rem; }
.page-content { padding: 2rem 0 4rem; }
.page-content h2 { margin-top: 2rem; }
.page-content h2:first-child { margin-top: 0; }

/* ===== About Values ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.value-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--duration-normal) var(--ease-apple);
}
.value-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.value-card h3 { font-size: 1rem; margin-bottom: var(--space-xs); }
.value-card p { color: var(--fg-secondary); font-size: 0.9rem; margin-bottom: 0; }

/* ===== Blog ===== */
.blog-list { list-style: none; padding: 0; }
.blog-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}
.blog-item:last-child { border-bottom: none; }
.blog-item h3 { margin-bottom: var(--space-xs); }
.blog-item h3 a { color: var(--fg); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
.blog-item h3 a:hover { color: var(--accent); }
.blog-meta { font-size: 0.85rem; color: var(--fg-tertiary); margin-bottom: var(--space-xs); }
.blog-excerpt { font-size: 0.95rem; color: var(--fg-secondary); margin-bottom: 0; }
.blog-tags { display: flex; gap: var(--space-xs); margin-top: var(--space-xs); }
.empty-state { text-align: center; padding: var(--space-xl); color: var(--fg-tertiary); }

/* ===== Post ===== */
.post-header { margin-bottom: var(--space-lg); }
.post-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: var(--space-xs); }
.post-meta { color: var(--fg-tertiary); font-size: 0.9rem; }
.post-content { line-height: 1.8; font-size: 1.0625rem; }
.post-content h2 { margin-top: var(--space-lg); margin-bottom: var(--space-sm); font-size: 1.5rem; }
.post-content h3 { margin-top: var(--space-md); font-size: 1.25rem; }
.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: var(--space-md);
  color: var(--fg-secondary);
  margin: var(--space-md) 0;
}
.post-content pre code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-size: 0.9rem;
}
.post-content code {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--border-light);
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.post-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-light);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
  background: var(--bg-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-tertiary);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}
.footer p { color: var(--fg-secondary); font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--space-xs); }
.footer-links a { color: var(--fg-secondary); font-size: 0.9rem; transition: color var(--duration-fast) var(--ease-out); }
.footer-links a:hover { color: var(--fg); }
.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  color: var(--fg-tertiary);
  font-size: 0.85rem;
}

/* ===== 404 ===== */
.not-found { text-align: center; padding: var(--space-2xl) var(--space-md); }
.not-found h1 { font-size: 8rem; font-weight: 700; color: var(--fg); margin-bottom: var(--space-xs); line-height: 1; letter-spacing: -0.04em; }
.not-found p { color: var(--fg-secondary); margin-bottom: var(--space-lg); font-size: 1.15rem; }

/* ===== Scroll Reveal — Apple-style with blur ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(6px);
  transition: opacity var(--duration-slow) var(--ease-apple),
              transform var(--duration-slower) cubic-bezier(0.16, 1, 0.3, 1),
              filter var(--duration-slow) var(--ease-apple);
}
.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
/* Staggered delays for children */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }
.reveal:nth-child(7) { transition-delay: 480ms; }
.reveal:nth-child(8) { transition-delay: 560ms; }

/* Scroll-linked scale sections */
.scroll-scale {
  transform: scale(0.95);
  opacity: 0.4;
  transition: transform 0.1s linear, opacity 0.1s linear;
}

/* ===== Responsive — Mobile Nav ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg);
    flex-direction: column;
    padding: var(--space-xl) var(--space-md);
    gap: var(--space-xs);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 101;
  }
  .nav-links.open { display: flex; transform: translateX(0); }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-apple);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .nav-backdrop.visible { opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .nav-links a {
    font-size: 1.1rem;
    padding: var(--space-xs) 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ===== Responsive — Breakpoints ===== */
@media (max-width: 768px) {
  .hero { min-height: 90vh; }
  .hero-title { font-size: clamp(2.8rem, 9vw, 4rem); }
  .hero .tagline { font-size: 1rem; }
  .hero-decoration { display: none; }
  .hero-scroll-indicator { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }
  .page-header { padding: var(--space-lg) 0 var(--space-md); }
}
@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .hero { min-height: 80vh; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.2rem); }
  .container { padding: 0 var(--space-sm); }
  .content-narrow { padding: 0 var(--space-sm); }
  .quickstart { padding: var(--space-md); }
  .btn { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
}
@media (min-width: 1440px) {
  .container { max-width: var(--max-width); }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .hero-decoration { animation: none; opacity: 0.1; }
  .hero-word, .hero-word--stagger { opacity: 1; transform: none; filter: none; }
  .hero-cta { opacity: 1; transform: none; }
  .hero-scroll-indicator span { animation: none; }
  .svg-draw { stroke-dashoffset: 0; animation: none; }
  .scroll-scale { transform: none; opacity: 1; }
}

/* ===== Teams Page ===== */
.teams-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}
.teams-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}
.teams-hero-sub {
  font-size: 1.25rem;
  color: var(--fg-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}
.teams-hero-cta { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }

/* Terminal Preview */
.terminal-preview {
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.terminal-bar {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dot--red { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green { background: #28c840; }
.terminal-title {
  font-size: 0.75rem;
  color: var(--fg-tertiary);
  margin-left: auto;
  margin-right: auto;
}
.terminal-body {
  background: #1d1d1f;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.terminal-body code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e0e0e0;
  background: none;
  border: none;
  padding: 0;
  display: block;
  line-height: 1.7;
}
.terminal-prompt { color: #28c840; }
.terminal-output { color: #86868b; }

/* Feature Blocks */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.feature-block {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}
.feature-icon {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.feature-block h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}
.feature-block p {
  color: var(--fg-secondary);
  font-size: 0.95rem;
}
.feature-block code {
  font-size: 0.85em;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}
.step-item { text-align: center; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.step-item h3 { margin-bottom: var(--space-xs); }
.step-item p { color: var(--fg-secondary); font-size: 0.9rem; }
.step-item code { font-size: 0.85em; }

/* Privacy Block */
.privacy-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-lg) 0;
}
.privacy-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}
.privacy-block p {
  color: var(--fg-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* FAQ */
.faq-list {
  max-width: 640px;
  margin: 0 auto;
}
.faq-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; margin-bottom: var(--space-xs); }
.faq-item p { color: var(--fg-secondary); font-size: 0.95rem; margin-bottom: 0; }

/* CTA Block */
.cta-block {
  text-align: center;
  padding: var(--space-lg) 0;
}
.cta-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-xs);
}
.cta-block p {
  color: var(--fg-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

/* ===== Tier Comparison (Homepage) ===== */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto var(--space-md);
}
.tier-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--duration-normal) var(--ease-apple);
}
.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tier-card--premium {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.02) 0%, var(--bg) 100%);
}
.tier-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.8rem;
  border-radius: 980px;
  white-space: nowrap;
}
.tier-header { margin-bottom: var(--space-sm); }
.tier-label {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 980px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}
.tier-label--free { background: rgba(45, 164, 78, 0.1); color: var(--green); }
.tier-label--premium { background: rgba(0, 113, 227, 0.1); color: var(--accent); }
.tier-header h3 { font-size: 1.3rem; margin-bottom: var(--space-xs); }
.tier-price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: var(--space-xs);
}
.tier-desc {
  font-size: 0.9rem;
  color: var(--fg-secondary);
  margin-bottom: 0;
}
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  flex: 1;
}
.tier-features li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border-light);
  padding-left: 1.5rem;
  position: relative;
}
.tier-features li:last-child { border-bottom: none; }
.tier-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}
.tier-feature--highlight { font-weight: 500; }
.tier-cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.tier-cta p {
  color: var(--fg-secondary);
  font-size: 0.95rem;
}

/* Premium Benefits Grid */
.premium-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}
.premium-benefit {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--duration-normal) var(--ease-apple);
}
.premium-benefit:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.premium-benefit-icon {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.premium-benefit h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}
.premium-benefit p {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .tier-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto var(--space-md); }
  .premium-benefits-grid { grid-template-columns: 1fr; }
}

/* ===== Pricing Page ===== */
.pricing-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}
.pricing-hero h1 { margin-bottom: var(--space-xs); }
.pricing-hero-sub {
  font-size: 1.2rem;
  color: var(--fg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  align-items: start;
}
.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--duration-normal) cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow var(--duration-normal) var(--ease-apple);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.pricing-card--popular {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}
.pricing-card--highlighted {
  border-color: var(--border);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.8rem;
  border-radius: 980px;
  white-space: nowrap;
}
.pricing-badge--team {
  background: var(--green);
}
.pricing-card-header {
  margin-bottom: var(--space-md);
}
.pricing-card-header h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: var(--space-xs);
}
.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.pricing-period {
  font-size: 0.9rem;
  color: var(--fg-tertiary);
}
.pricing-desc {
  font-size: 0.9rem;
  color: var(--fg-secondary);
  margin-bottom: 0;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  flex: 1;
}
.pricing-feature {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border-light);
  padding-left: 1.5rem;
  position: relative;
}
.pricing-feature:last-child { border-bottom: none; }
.pricing-feature::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}
.pricing-feature.included {
  color: var(--fg-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding-left: 0;
}
.pricing-feature.included::before { display: none; }
.pricing-card .btn {
  width: 100%;
  text-align: center;
}
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
  padding: 0.85rem 2.25rem;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
}
.btn-outline:hover {
  border-color: var(--fg);
  color: var(--fg);
}

/* Comparison Table */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}
.comparison-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
}
.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.comparison-table tr:last-child td { border-bottom: none; }
.check { color: var(--green); font-weight: 700; }
.dash { color: var(--fg-tertiary); }

/* ===== Pricing Responsive ===== */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .teams-hero h1 { font-size: 2rem; }
}
