/* =========================================================================
   Pavo Demo — Stylesheet for learning purposes
   Sections:
     1.  Theme variables
     2.  Reset & base typography
     3.  Utilities (container, button, section)
     4.  Top banner & navigation
     5.  Hero (with the pure-CSS "app window" illustration)
     6.  Logo wall
     7.  Features
     8.  Workflow / Steps
     9.  Testimonials
    10.  Pricing
    11.  FAQ
    12.  CTA band & Footer
    13.  Reveal-on-scroll animation
    14.  Responsive (<=960, <=640)
   ========================================================================= */

/* ---------- 1. Theme variables ---------- */
:root {
  --c-bg:        #ffffff;
  --c-bg-alt:    #f7f8fb;
  --c-surface:   #ffffff;
  --c-text:      #0f172a;
  --c-text-mute: #64748b;
  --c-border:    #e5e7eb;
  --c-primary:   #4f46e5;
  --c-primary-2: #7c3aed;
  --c-accent:    #06b6d4;
  --c-ring:      rgba(79, 70, 229, .25);

  --radius:   12px;
  --radius-lg:18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);

  --container: 1120px;
  --gap: 24px;

  --t-fast: .15s ease;
  --t-base: .25s ease;
}

html[data-theme="dark"] {
  --c-bg:        #0b1020;
  --c-bg-alt:    #0f152b;
  --c-surface:   #121a33;
  --c-text:      #e6e9f5;
  --c-text-mute: #97a0bd;
  --c-border:    #1f2747;
  --c-primary:   #818cf8;
  --c-primary-2: #a78bfa;
  --c-accent:    #22d3ee;
  --c-ring:      rgba(129, 140, 248, .35);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-base), color var(--t-base);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--c-text-mute); }

/* Keyboard-friendly focus ring */
:focus-visible {
  outline: 3px solid var(--c-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 3. Utilities ---------- */
.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}
.container.narrow { max-width: 760px; }

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section.alt { background: var(--c-bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-sub { color: var(--c-text-mute); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 12px;
}

.muted { color: var(--c-text-mute); font-weight: 400; }
.grad {
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 6px 14px var(--c-ring);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--c-primary-2); }
.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-link {
  background: transparent;
  color: var(--c-primary);
  padding: 10px 4px;
}
.btn-link:hover { text-decoration: underline; }

/* ---------- 4. Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
          backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-primary);
  font-weight: 700;
}
.brand-name { color: var(--c-text); font-size: 1.05rem; }
.nav-links {
  display: flex;
  gap: 20px;
  margin-left: 16px;
}
.nav-links a {
  color: var(--c-text-mute);
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 4px;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--c-text); }
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.icon-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.icon-btn .icon-moon { display: none; }
html[data-theme="dark"] .icon-btn .icon-sun  { display: none; }
html[data-theme="dark"] .icon-btn .icon-moon { display: block; }

/* Mobile hamburger button (hidden on desktop, shown via media query) */
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--c-border); border-radius: 8px;
  cursor: pointer;
}
.menu-btn span {
  width: 18px; height: 2px; background: var(--c-text); border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

/* ---------- 5. Hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 80px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy .lead {
  font-size: 1.1rem;
  max-width: 520px;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 24px 0 28px;
}
.trust-list {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: .9rem; color: var(--c-text-mute);
}
.trust-list li::before {
  content: "✓ ";
  color: var(--c-primary);
  font-weight: 700;
}

/* Hero illustration: an app-window mockup composed of pure CSS elements */
.hero-visual {
  position: relative;
  aspect-ratio: 5 / 4;
}
.window {
  position: relative; z-index: 2;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Window chrome: title bar with traffic lights + url pill */
.window-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-alt);
}
.dots { display: flex; gap: 6px; }
.dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d1d5db;
}
.dots span:nth-child(1) { background: #f87171; }
.dots span:nth-child(2) { background: #fbbf24; }
.dots span:nth-child(3) { background: #34d399; }
.url-bar {
  margin: 0 auto;
  max-width: 70%;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-mute);
  font: 500 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.window-body {
  display: grid;
  grid-template-columns: 56px 1fr;
  height: calc(100% - 40px);
}

/* Sidebar with icon-only nav */
.sidebar {
  background: var(--c-bg-alt);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-right: 1px solid var(--c-border);
}
.sb-logo {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-primary);
  margin-bottom: 6px;
}
.sb-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--c-text-mute);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.sb-icon:hover { background: color-mix(in srgb, var(--c-text-mute) 10%, transparent); color: var(--c-text); }
.sb-icon.active {
  background: color-mix(in srgb, var(--c-primary) 14%, transparent);
  color: var(--c-primary);
}

/* Board area */
.board {
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.board-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 8px;
  margin-bottom: 2px;
}
.board-crumb {
  font-size: 10px;
  color: var(--c-text-mute);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600;
}
.board-title {
  font-size: 14px; font-weight: 700;
  color: var(--c-text);
  margin: 2px 0 0;
}
.board-btn {
  font-size: 11px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--c-primary); color: #fff;
  border: 0; cursor: pointer;
  white-space: nowrap;
}

.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Task card */
.task-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.task-card.priority-high { border-top-color: #ef4444; }
.task-card.priority-mid  { border-top-color: #f59e0b; }
.task-card.priority-low  { border-top-color: var(--c-primary); }

.task-top {
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-text-mute);
  flex-shrink: 0;
}
.priority-high .dot { background: #ef4444; }
.priority-mid  .dot { background: #f59e0b; }
.priority-low  .dot { background: var(--c-primary); }
.task-title {
  font-size: 12px; font-weight: 600;
  color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.task-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
}
.chip {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-text-mute) 12%, transparent);
  color: var(--c-text-mute);
  font-weight: 600;
  white-space: nowrap;
}

/* Stacked avatars */
.avatars { display: flex; }
.ava {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
  margin-left: -5px;
  border: 1.5px solid var(--c-surface);
  letter-spacing: 0;
}
.ava:first-child { margin-left: 0; }
.ava.a1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.ava.a2 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ava.a3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ava.a4 { background: linear-gradient(135deg, #ec4899, #f43f5e); }

/* Progress footer */
.board-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding-top: 4px;
}
.board-foot .progress { flex: 1; }
.prog-label {
  font-size: 10px; font-weight: 600;
  color: var(--c-text-mute);
  white-space: nowrap;
}
.progress {
  height: 6px; border-radius: 3px;
  background: color-mix(in srgb, var(--c-text-mute) 15%, transparent);
  overflow: hidden;
}
.progress .bar {
  width: 68%; height: 100%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .75; }
}

/* Decorative background blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: .35;
  z-index: 1;
}
.blob-1 {
  width: 240px; height: 240px;
  background: var(--c-primary);
  top: -40px; left: -40px;
}
.blob-2 {
  width: 200px; height: 200px;
  background: var(--c-accent);
  bottom: -30px; right: -20px;
}

/* ---------- 6. Logo wall ---------- */
.logos { padding: 32px 0; border-block: 1px solid var(--c-border); background: var(--c-bg-alt); }
.logos-title { text-align: center; color: var(--c-text-mute); margin-bottom: 16px; font-size: .95rem; }
.logos-title strong { color: var(--c-text); }
.logos-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 32px;
  color: var(--c-text-mute);
  font-weight: 600;
  letter-spacing: .05em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95rem;
  opacity: .8;
}

/* ---------- 7. Features ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.feature {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
}
.feature-ico {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-primary) 12%, transparent);
  color: var(--c-primary);
  margin-bottom: 14px;
}
.feature p { margin: 0; }

/* ---------- 8. Workflow ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  counter-reset: step;
}
.step {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  position: relative;
}
.step-num {
  display: inline-block;
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.step p { margin: 0; }

/* ---------- 9. Testimonials ---------- */
.quote {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  position: relative;
}
.quote::before {
  content: "“";
  position: absolute;
  top: -8px; left: 14px;
  font-size: 4rem; line-height: 1;
  color: color-mix(in srgb, var(--c-primary) 30%, transparent);
  font-family: Georgia, serif;
}
.quote p { color: var(--c-text); font-size: 1rem; margin: 8px 0 16px; }
.quote cite { color: var(--c-text-mute); font-style: normal; font-size: .9rem; }

/* ---------- 10. Pricing ---------- */
.plan {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  position: relative;
}
.plan h3 { font-size: 1.05rem; color: var(--c-text-mute); font-weight: 600; }
.plan .price {
  margin: 4px 0 8px;
  color: var(--c-text);
}
.plan .amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.plan .period { color: var(--c-text-mute); margin-left: 4px; }
.plan-desc { font-size: .95rem; }
.plan-features {
  display: flex; flex-direction: column; gap: 8px;
  margin: 12px 0 24px;
  font-size: .95rem;
  color: var(--c-text);
}
.plan-features li::before {
  content: "✓";
  color: var(--c-primary);
  font-weight: 700;
  margin-right: 8px;
}
.plan .btn { margin-top: auto; align-self: stretch; }

.plan-featured {
  border-color: transparent;
  background: linear-gradient(var(--c-surface), var(--c-surface)) padding-box,
              linear-gradient(135deg, var(--c-primary), var(--c-accent)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-md);
}
.ribbon {
  position: absolute; top: -12px; right: 20px;
  background: var(--c-primary); color: #fff;
  font-size: .75rem; font-weight: 700; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- 11. FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-base);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border)); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
  color: var(--c-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.chev {
  width: 10px; height: 10px;
  border-right: 2px solid var(--c-text-mute);
  border-bottom: 2px solid var(--c-text-mute);
  transform: rotate(45deg);
  transition: transform var(--t-base);
}
.faq-item[open] .chev { transform: rotate(-135deg); }
.faq-item p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--c-text-mute);
}

/* ---------- 12. CTA & Footer ---------- */
.cta-band {
  padding: clamp(56px, 8vw, 96px) 0;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff;
}
.cta-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(255, 255, 255, .85); margin-bottom: 24px; }
.cta-inner .btn-primary { background: #fff; color: var(--c-primary); box-shadow: none; }
.cta-inner .btn-primary:hover { background: #f3f4f6; }

.site-footer {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  padding: 48px 0 24px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--c-border);
}
.footer-tag { color: var(--c-text-mute); margin-top: 8px; font-size: .9rem; }
.site-footer h4 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-text); }
.site-footer ul { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--c-text-mute); transition: color var(--t-fast); }
.site-footer a:hover { color: var(--c-primary); }
.footer-bottom { padding-top: 20px; text-align: center; color: var(--c-text-mute); font-size: .85rem; }

/* ---------- 13. Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Respect the user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 14. Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-btn  { display: inline-flex; }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 16px;
    margin: 0;
  }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-actions .btn-ghost { display: none; }
}
