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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
}

/* ========================
   Scroll Progress Bar
   ======================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #2563eb;
  z-index: 100;
  width: 0%;

  /* Native CSS scroll-driven animation — Chrome/Edge/Firefox */
  animation: grow-width linear both;
  animation-timeline: scroll();
}

@keyframes grow-width {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ========================
   Nav
   ======================== */
nav {
  padding: 16px 40px;
  border-bottom: 1px solid #e5e5e5;
}

nav a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
}

nav a:hover { text-decoration: underline; }

/* ========================
   Layout
   ======================== */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 40px 120px;
}

.page-header {
  margin-bottom: 56px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-desc {
  color: #444;
  font-size: 1rem;
}

/* ========================
   Effect Cards
   ======================== */
.effect-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 32px;
}

.effect-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.effect-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.effect-desc {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 24px;
}

.effect-desc code {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.85em;
  background: #f0f0f0;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Demo areas */
.demo-area {
  background: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  padding: 32px 24px;
}

.demo-area--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.demo-area--code {
  padding: 20px 24px;
}

.demo-area--code pre {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.78rem;
  color: #444;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.demo-area--code code {
  font-family: inherit;
}

.demo-area--reveal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* ========================
   1. Pulse Circle
   ======================== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

.pulse-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2563eb;
  animation: pulse 2s ease-in-out infinite;
}

.demo-label {
  font-size: 0.75rem;
  color: #888;
  font-family: 'Menlo', 'Monaco', monospace;
}

/* ========================
   3. Clip-path Reveal
   ======================== */
.reveal-wrapper {
  overflow: hidden;
  border-radius: 4px;
}

.reveal-text {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.is-revealed {
  clip-path: inset(0 0% 0 0);
}

.play-btn {
  padding: 10px 20px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.play-btn:hover {
  background: #2563eb;
}

/* ========================
   4. Glass Morphism
   ======================== */
.demo-area--glass {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 48px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 320px;
  width: 100%;
}

.glass-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.glass-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.glass-body {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* ========================
   5. Shimmer Button
   ======================== */
@keyframes shimmer-sweep {
  from { left: -100%; }
  to   { left: 100%; }
}

.shimmer-btn {
  position: relative;
  overflow: hidden;
  padding: 14px 32px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
}

.shimmer-btn:hover::after {
  animation: shimmer-sweep 0.5s ease-in-out;
}

.shimmer-btn:hover {
  background: #2563eb;
}

/* ========================
   Mobile
   ======================== */
@media (max-width: 640px) {
  main {
    padding: 24px 20px 80px;
  }

  .effect-card {
    padding: 20px 20px;
  }
}
