/* Pulse Fitness - Complete Standalone Stylesheet
   Demo template: SaaS / app landing page
   Hand-coded. No frameworks, no build step, no external assets.
   Every visual is CSS or inline SVG so the page works under a strict CSP
   (img-src 'self' data:; font-src 'self'). */

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

/* ========== Self-Hosted Fonts ========== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/anton.woff2') format('woff2');
}

/* ========== Design Tokens ========== */
:root {
  --pf-bg: #fbfbfe;
  --pf-surface: #ffffff;
  --pf-surface-alt: #f2f3fb;
  --pf-text: #14142b;
  --pf-muted: #4c4c68;
  --pf-border: #e2e3f0;
  --pf-border-strong: #c6c8de;

  --pf-primary: #4f46e5;
  --pf-primary-strong: #3730a3;
  --pf-primary-soft: #ecebfd;
  --pf-accent: #be185d;
  --pf-accent-soft: #fdeef5;
  --pf-success: #047857;
  --pf-on-primary: #ffffff;

  --pf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pf-font-display: 'Anton', 'Inter', Impact, sans-serif;

  --pf-space-xs: 0.5rem;
  --pf-space-sm: 1rem;
  --pf-space-md: 1.5rem;
  --pf-space-lg: 2rem;
  --pf-space-xl: 3rem;
  --pf-space-2xl: 4.5rem;

  --pf-radius-sm: 8px;
  --pf-radius: 14px;
  --pf-radius-lg: 24px;

  --pf-shadow: 0 1px 2px rgba(20, 20, 43, 0.06), 0 8px 24px rgba(20, 20, 43, 0.07);
  --pf-shadow-lg: 0 24px 60px rgba(20, 20, 43, 0.14);

  --pf-max: 1160px;
}

/* Dark mode - explicit toggle */
[data-theme="dark"] .pulse {
  --pf-bg: #0b0b18;
  --pf-surface: #14142a;
  --pf-surface-alt: #1b1b34;
  --pf-text: #e8e9f5;
  --pf-muted: #a5a7c4;
  --pf-border: #2a2a48;
  --pf-border-strong: #3d3d63;

  --pf-primary: #a5b4fc;
  --pf-primary-strong: #c7d2fe;
  --pf-primary-soft: #1c1d3d;
  --pf-accent: #f9a8d4;
  --pf-accent-soft: #2b1526;
  --pf-success: #6ee7b7;
  --pf-on-primary: #0b0b18;

  --pf-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.45);
  --pf-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* Dark mode - system preference (when no explicit theme set) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pulse {
    --pf-bg: #0b0b18;
    --pf-surface: #14142a;
    --pf-surface-alt: #1b1b34;
    --pf-text: #e8e9f5;
    --pf-muted: #a5a7c4;
    --pf-border: #2a2a48;
    --pf-border-strong: #3d3d63;

    --pf-primary: #a5b4fc;
    --pf-primary-strong: #c7d2fe;
    --pf-primary-soft: #1c1d3d;
    --pf-accent: #f9a8d4;
    --pf-accent-soft: #2b1526;
    --pf-success: #6ee7b7;
    --pf-on-primary: #0b0b18;

    --pf-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.45);
    --pf-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
}

/* ========== Base ========== */
body.pulse {
  font-family: var(--pf-font);
  background: var(--pf-bg);
  color: var(--pf-text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pf-display {
  font-family: var(--pf-font-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.02;
  text-transform: uppercase;
}

a {
  color: var(--pf-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* WCAG 1.4.1 -- a link sitting inside a block of body text must not rely on
   colour alone. Anything inside running prose gets a persistent underline;
   navigation lists and buttons, which are not inside a text block, opt out. */
p a,
li a,
td a,
th a,
dd a,
address a,
summary a,
blockquote a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pf-nav-list a,
.pf-footer-links a,
.pf-plan-features a,
.pf-btn,
.pf-logo {
  text-decoration: none;
}

.pf-nav-list a:hover,
.pf-footer-links a:hover,
.pf-btn:hover,
.pf-logo:hover {
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ========== Accessibility helpers ========== */
.pf-skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pf-primary);
  color: var(--pf-on-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--pf-radius-sm);
  z-index: 1200;
  font-weight: 600;
  transition: top 0.2s;
}

.pf-skip-link:focus {
  top: 1rem;
  text-decoration: none;
}

.pf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--pf-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== Layout ========== */
.pf-wrap {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding-left: var(--pf-space-md);
  padding-right: var(--pf-space-md);
  width: 100%;
}

.pf-section {
  padding-top: var(--pf-space-2xl);
  padding-bottom: var(--pf-space-2xl);
}

.pf-section-alt {
  background: var(--pf-surface-alt);
  border-top: 1px solid var(--pf-border);
  border-bottom: 1px solid var(--pf-border);
}

.pf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pf-primary);
  background: var(--pf-primary-soft);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.9rem;
}

[data-theme="dark"] .pf-eyebrow { color: var(--pf-primary-strong); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-eyebrow { color: var(--pf-primary-strong); }
}

.pf-section-head {
  max-width: 42rem;
  margin-bottom: var(--pf-space-xl);
}

.pf-section-head.pf-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.pf-section-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.pf-section-sub {
  margin-top: 0.9rem;
  color: var(--pf-muted);
  font-size: 1.05rem;
}

/* ========== Buttons ========== */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.pf-btn:hover {
  text-decoration: none;
}

.pf-btn-primary {
  background: var(--pf-primary);
  color: var(--pf-on-primary);
  border-color: var(--pf-primary);
}

.pf-btn-primary:hover {
  background: var(--pf-primary-strong);
  border-color: var(--pf-primary-strong);
  color: var(--pf-on-primary);
  transform: translateY(-2px);
  box-shadow: var(--pf-shadow);
}

.pf-btn-outline {
  background: transparent;
  color: var(--pf-text);
  border-color: var(--pf-border-strong);
}

.pf-btn-outline:hover {
  border-color: var(--pf-primary);
  color: var(--pf-primary);
}

.pf-btn-full { width: 100%; }

.pf-btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* ========== Header / Nav ========== */
.pf-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--pf-surface);
  border-bottom: 1px solid var(--pf-border);
}

.pf-nav {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding: 0.8rem var(--pf-space-md);
  display: flex;
  align-items: center;
  gap: var(--pf-space-sm);
}

.pf-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--pf-font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pf-text);
  margin-right: auto;
  line-height: 1;
}

.pf-logo:hover {
  text-decoration: none;
  color: var(--pf-primary);
}

.pf-logo-mark {
  color: var(--pf-primary);
  flex: none;
}

.pf-nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pf-nav-list a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--pf-muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.pf-nav-list a:hover {
  color: var(--pf-text);
  background: var(--pf-surface-alt);
  text-decoration: none;
}

.pf-nav-list a[aria-current="page"] {
  color: var(--pf-primary);
  font-weight: 600;
}

.pf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  background: transparent;
  border: 1px solid var(--pf-border);
  border-radius: 999px;
  color: var(--pf-text);
  cursor: pointer;
}

.pf-icon-btn:hover {
  border-color: var(--pf-border-strong);
  background: var(--pf-surface-alt);
}

.pf-nav-toggle { display: none; }

.pf-icon-moon { display: none; }
[data-theme="dark"] .pf-icon-sun { display: none; }
[data-theme="dark"] .pf-icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-icon-sun { display: none; }
  html:not([data-theme="light"]) .pf-icon-moon { display: block; }
}

[data-theme="light"] .pf-icon-sun { display: block; }
[data-theme="light"] .pf-icon-moon { display: none; }

/* ========== Animated hero ========== */
.pf-hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--pf-space-2xl);
  padding-bottom: var(--pf-space-2xl);
  background: var(--pf-bg);
}

/* Animated colour field. Decorative only, sits behind everything. */
.pf-hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(28rem 22rem at 18% 22%, rgba(79, 70, 229, 0.22), transparent 65%),
    radial-gradient(26rem 20rem at 82% 12%, rgba(190, 24, 93, 0.16), transparent 62%),
    radial-gradient(30rem 24rem at 62% 78%, rgba(4, 120, 87, 0.14), transparent 66%);
  animation: pf-drift 18s ease-in-out infinite alternate;
}

[data-theme="dark"] .pf-hero-glow {
  background:
    radial-gradient(28rem 22rem at 18% 22%, rgba(129, 140, 248, 0.28), transparent 65%),
    radial-gradient(26rem 20rem at 82% 12%, rgba(244, 114, 182, 0.20), transparent 62%),
    radial-gradient(30rem 24rem at 62% 78%, rgba(45, 212, 191, 0.16), transparent 66%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-hero-glow {
    background:
      radial-gradient(28rem 22rem at 18% 22%, rgba(129, 140, 248, 0.28), transparent 65%),
      radial-gradient(26rem 20rem at 82% 12%, rgba(244, 114, 182, 0.20), transparent 62%),
      radial-gradient(30rem 24rem at 62% 78%, rgba(45, 212, 191, 0.16), transparent 66%);
  }
}

@keyframes pf-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2.5%, 1.5%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.02); }
}

.pf-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--pf-space-xl);
  align-items: center;
}

.pf-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
}

/* Entrance animations use animation-fill-mode: backwards and a VISIBLE base
   state. If animations are suppressed -- by prefers-reduced-motion, by an
   audit tool injecting `animation: none`, or by an old browser -- the element
   simply renders in its final, readable state. Nothing is ever left at
   opacity 0. */
.pf-hero h1 .pf-hero-line {
  display: block;
  animation: pf-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

.pf-hero h1 .pf-hero-line:nth-child(1) { animation-delay: 0.05s; }
.pf-hero h1 .pf-hero-line:nth-child(2) { animation-delay: 0.16s; }
.pf-hero h1 .pf-hero-line:nth-child(3) { animation-delay: 0.27s; }

.pf-hero-accent {
  color: var(--pf-primary);
}

.pf-hero-lede,
.pf-hero-actions,
.pf-hero-stats {
  animation: pf-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

.pf-hero-lede    { animation-delay: 0.38s; }
.pf-hero-actions { animation-delay: 0.46s; }
.pf-hero-stats   { animation-delay: 0.54s; }

@keyframes pf-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pf-hero-lede {
  margin-top: var(--pf-space-md);
  font-size: 1.12rem;
  color: var(--pf-muted);
  max-width: 34rem;
}

.pf-hero-actions {
  margin-top: var(--pf-space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pf-hero-note {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--pf-muted);
}

.pf-hero-stats {
  margin-top: var(--pf-space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--pf-space-lg);
}

.pf-hero-stat strong {
  display: block;
  font-family: var(--pf-font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.05;
  color: var(--pf-text);
}

.pf-hero-stat span {
  font-size: 0.83rem;
  color: var(--pf-muted);
}

/* ---- phone mock ---- */
.pf-hero-art {
  position: relative;
  display: grid;
  place-items: center;
}

.pf-phone {
  position: relative;
  width: min(100%, 310px);
  aspect-ratio: 310 / 620;
  border-radius: 42px;
  background: var(--pf-surface);
  border: 3px solid var(--pf-border-strong);
  box-shadow: var(--pf-shadow-lg);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  animation: pf-float 7s ease-in-out infinite alternate;
}

@keyframes pf-float {
  from { transform: translateY(-6px); }
  to   { transform: translateY(10px); }
}

.pf-phone::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  background: var(--pf-border-strong);
}

.pf-phone-top {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--pf-muted);
}

.pf-phone-title {
  font-family: var(--pf-font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--pf-text);
  line-height: 1.1;
}

.pf-ring-wrap {
  display: grid;
  place-items: center;
  position: relative;
  padding: 0.3rem 0;
}

.pf-ring {
  width: 152px;
  height: 152px;
  transform: rotate(-90deg);
}

.pf-ring-track {
  fill: none;
  stroke: var(--pf-surface-alt);
  stroke-width: 13;
}

.pf-ring-fill {
  fill: none;
  stroke: var(--pf-primary);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 396;
  stroke-dashoffset: 87;
  animation: pf-ring-fill 2s cubic-bezier(0.3, 0.8, 0.3, 1) 0.5s backwards;
}

@keyframes pf-ring-fill {
  from { stroke-dashoffset: 396; }
  to   { stroke-dashoffset: 87; }
}

.pf-ring-label {
  position: absolute;
  text-align: center;
  line-height: 1.15;
}

.pf-ring-label strong {
  display: block;
  font-family: var(--pf-font-display);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--pf-text);
}

.pf-ring-label span {
  font-size: 0.72rem;
  color: var(--pf-muted);
}

.pf-pulse-card {
  background: var(--pf-surface-alt);
  border-radius: var(--pf-radius);
  padding: 0.7rem 0.8rem;
}

.pf-pulse-card p {
  font-size: 0.72rem;
  color: var(--pf-muted);
  margin-bottom: 0.15rem;
}

.pf-pulse-line {
  width: 100%;
  height: 44px;
  display: block;
}

.pf-pulse-line path {
  fill: none;
  stroke: var(--pf-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 0;
  animation: pf-trace 3.2s linear 0.6s infinite backwards;
}

@keyframes pf-trace {
  0%   { stroke-dashoffset: 460; }
  70%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.pf-phone-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 74px;
  padding: 0 0.2rem;
}

.pf-phone-bars span {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: var(--pf-primary);
  transform-origin: bottom;
  transform: scaleY(1);
  animation: pf-grow 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}

.pf-phone-bars span:nth-child(1) { height: 38%; animation-delay: 0.55s; }
.pf-phone-bars span:nth-child(2) { height: 62%; animation-delay: 0.63s; }
.pf-phone-bars span:nth-child(3) { height: 46%; animation-delay: 0.71s; }
.pf-phone-bars span:nth-child(4) { height: 84%; animation-delay: 0.79s; }
.pf-phone-bars span:nth-child(5) { height: 58%; animation-delay: 0.87s; }
.pf-phone-bars span:nth-child(6) { height: 100%; animation-delay: 0.95s; background: var(--pf-accent); }
.pf-phone-bars span:nth-child(7) { height: 72%; animation-delay: 1.03s; }

@keyframes pf-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.pf-phone-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--pf-muted);
  border-top: 1px solid var(--pf-border);
  padding-top: 0.55rem;
}

/* floating badge next to the phone */
.pf-float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--pf-surface);
  border: 1px solid var(--pf-border-strong);
  box-shadow: var(--pf-shadow);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pf-text);
  animation: pf-float 6s ease-in-out infinite alternate-reverse;
}

.pf-float-chip svg { color: var(--pf-success); flex: none; }

.pf-float-chip-a { top: 12%; left: 0; }
.pf-float-chip-b { bottom: 14%; right: 0; animation-duration: 8s; }

/* ========== Feature cards ========== */
.pf-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  gap: var(--pf-space-md);
}

.pf-feature {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-lg);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.pf-feature:hover {
  transform: translateY(-4px);
  border-color: var(--pf-border-strong);
  box-shadow: var(--pf-shadow);
}

.pf-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--pf-radius);
  display: grid;
  place-items: center;
  background: var(--pf-primary-soft);
  color: var(--pf-primary-strong);
  margin-bottom: var(--pf-space-md);
}

[data-theme="dark"] .pf-feature-icon { color: var(--pf-primary); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-feature-icon { color: var(--pf-primary); }
}

.pf-feature h3 {
  font-size: 1.14rem;
  margin-bottom: 0.45rem;
}

.pf-feature p {
  font-size: 0.95rem;
  color: var(--pf-muted);
}

/* ========== Pricing toggle ========== */
.pf-billing {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--pf-space-xl);
}

.pf-billing-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pf-muted);
}

.pf-billing-label.is-on {
  color: var(--pf-text);
}

.pf-switch {
  position: relative;
  width: 62px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--pf-border-strong);
  background: var(--pf-surface-alt);
  cursor: pointer;
  padding: 0;
  flex: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.pf-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pf-text);
  transition: transform 0.2s ease, background-color 0.2s;
}

.pf-switch[aria-checked="true"] {
  background: var(--pf-primary);
  border-color: var(--pf-primary);
}

.pf-switch[aria-checked="true"]::after {
  transform: translateX(28px);
  background: var(--pf-on-primary);
}

.pf-save-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  border: 1px solid var(--pf-border);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========== Pricing cards ========== */
.pf-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: var(--pf-space-md);
  /* stretch (the default) so every card is the height of the tallest and the
     call-to-action buttons line up across the row */
  align-items: stretch;
}

.pf-plan {
  position: relative;
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pf-plan-featured {
  border-color: var(--pf-primary);
  border-width: 2px;
  box-shadow: var(--pf-shadow);
}

.pf-plan-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--pf-primary);
  color: var(--pf-on-primary);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.pf-plan h3 {
  font-size: 1.1rem;
}

.pf-plan-tagline {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--pf-muted);
  min-height: 2.6em;
}

.pf-price {
  margin-top: var(--pf-space-md);
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.pf-price-amount {
  font-family: var(--pf-font-display);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: 0.005em;
}

.pf-price-unit {
  font-size: 0.88rem;
  color: var(--pf-muted);
}

.pf-price-note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--pf-muted);
  min-height: 1.3em;
}

.pf-plan-features {
  margin: var(--pf-space-md) 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  flex: 1;
}

.pf-plan-features li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--pf-muted);
}

.pf-plan-features svg {
  color: var(--pf-primary);
  flex: none;
  margin-top: 0.3rem;
}

/* ========== Feature comparison table ========== */
.pf-table-scroll {
  /* position:relative so absolutely-positioned descendants -- the visually
     hidden "Included"/"Not included" spans in the right-hand cells -- take
     THIS box as their containing block. Without it their containing block is
     the initial one, they escape the scroll container, and the document gains
     ~214px of phantom horizontal scroll at 390px. */
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  background: var(--pf-surface);
}

.pf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
  font-size: 0.92rem;
}

.pf-table caption {
  text-align: left;
  padding: var(--pf-space-md);
  color: var(--pf-muted);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--pf-border);
}

.pf-table th,
.pf-table td {
  position: relative;
  padding: 0.8rem var(--pf-space-md);
  border-bottom: 1px solid var(--pf-border);
  text-align: left;
  vertical-align: middle;
}

.pf-table thead th {
  background: var(--pf-surface-alt);
  font-size: 0.85rem;
  font-weight: 600;
}

.pf-table thead th:not(:first-child),
.pf-table tbody td {
  text-align: center;
}

.pf-table tbody th {
  font-weight: 500;
  color: var(--pf-text);
}

.pf-table tbody tr:last-child th,
.pf-table tbody tr:last-child td {
  border-bottom: none;
}

.pf-table tbody td {
  color: var(--pf-muted);
}

.pf-yes { color: var(--pf-success); }
.pf-no  { color: var(--pf-muted); }

.pf-row-group th {
  background: var(--pf-surface-alt);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-muted);
  font-weight: 600;
}

/* ========== Newsletter ========== */
.pf-newsletter {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-xl);
  box-shadow: var(--pf-shadow);
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.pf-newsletter h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.pf-newsletter > p {
  margin-top: 0.75rem;
  color: var(--pf-muted);
}

.pf-news-form {
  margin-top: var(--pf-space-lg);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}

.pf-news-field {
  flex: 1 1 17rem;
  min-width: 0;
}

.pf-news-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.pf-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--pf-text);
  background: var(--pf-bg);
  border: 1px solid var(--pf-border-strong);
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
}

.pf-input::placeholder {
  color: var(--pf-muted);
  opacity: 1;
}

.pf-input:focus-visible {
  outline: 2px solid var(--pf-primary);
  outline-offset: 1px;
  border-color: var(--pf-primary);
}

.pf-news-submit {
  align-self: flex-end;
  flex: 0 0 auto;
}

.pf-news-form .pf-form-status {
  flex: 1 1 100%;
  text-align: center;
  margin-top: 0.35rem;
}

.pf-form-status {
  margin-top: var(--pf-space-sm);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.4em;
}

.pf-form-status.is-ok  { color: var(--pf-success); }
.pf-form-status.is-err { color: #b91c1c; }

[data-theme="dark"] .pf-form-status.is-err { color: #fca5a5; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-form-status.is-err { color: #fca5a5; }
}

.pf-demo-notice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  text-align: left;
  margin-top: var(--pf-space-md);
  padding: 0.75rem 0.9rem;
  border-radius: var(--pf-radius-sm);
  background: var(--pf-surface-alt);
  border: 1px solid var(--pf-border);
  color: var(--pf-text);
  font-size: 0.86rem;
}

.pf-demo-notice svg {
  color: var(--pf-accent);
  flex: none;
  margin-top: 0.15rem;
}

/* ========== Generic form fields (contact page) ========== */
.pf-field {
  margin-bottom: var(--pf-space-md);
}

.pf-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pf-field input,
.pf-field select,
.pf-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--pf-text);
  background: var(--pf-bg);
  border: 1px solid var(--pf-border-strong);
  border-radius: var(--pf-radius-sm);
  padding: 0.7rem 0.85rem;
}

.pf-field textarea {
  resize: vertical;
  min-height: 7rem;
}

.pf-field input:focus-visible,
.pf-field select:focus-visible,
.pf-field textarea:focus-visible {
  outline: 2px solid var(--pf-primary);
  outline-offset: 1px;
  border-color: var(--pf-primary);
}

.pf-field input::placeholder,
.pf-field textarea::placeholder {
  color: var(--pf-muted);
  opacity: 1;
}

.pf-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pf-space-sm);
}

.pf-req { color: var(--pf-accent); }

.pf-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--pf-muted);
}

.pf-error {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b91c1c;
  min-height: 1.1em;
}

[data-theme="dark"] .pf-error { color: #fca5a5; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-error { color: #fca5a5; }
}

.pf-field input[aria-invalid="true"],
.pf-field select[aria-invalid="true"],
.pf-field textarea[aria-invalid="true"] {
  border-color: #b91c1c;
}

[data-theme="dark"] .pf-field input[aria-invalid="true"],
[data-theme="dark"] .pf-field select[aria-invalid="true"],
[data-theme="dark"] .pf-field textarea[aria-invalid="true"] {
  border-color: #fca5a5;
}

.pf-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-lg);
  box-shadow: var(--pf-shadow);
}

.pf-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--pf-space-xl);
  align-items: start;
}

.pf-info-stack {
  display: grid;
  gap: var(--pf-space-md);
}

.pf-info-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  padding: var(--pf-space-md);
}

.pf-info-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.pf-info-card h3 svg { color: var(--pf-primary); flex: none; }

.pf-info-card p {
  font-size: 0.92rem;
  color: var(--pf-muted);
}

/* ========== Page header (interior pages) ========== */
.pf-page-header {
  position: relative;
  overflow: hidden;
  padding: var(--pf-space-2xl) 0 var(--pf-space-xl);
  border-bottom: 1px solid var(--pf-border);
  background: var(--pf-bg);
}

.pf-page-header .pf-wrap { position: relative; z-index: 1; }

.pf-page-header h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.pf-page-header > .pf-wrap > p {
  margin-top: var(--pf-space-sm);
  color: var(--pf-muted);
  max-width: 44rem;
  font-size: 1.05rem;
}

.pf-breadcrumb {
  font-size: 0.85rem;
  color: var(--pf-muted);
  margin-bottom: var(--pf-space-sm);
}

.pf-breadcrumb a { color: var(--pf-muted); }
.pf-breadcrumb a:hover { color: var(--pf-primary); }

/* ========== FAQ ========== */
.pf-faq {
  max-width: 46rem;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.pf-faq-item {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  padding: 0 var(--pf-space-md);
}

.pf-faq-item summary {
  cursor: pointer;
  padding: var(--pf-space-md) 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pf-space-sm);
}

.pf-faq-item summary::-webkit-details-marker { display: none; }

.pf-faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--pf-primary);
  line-height: 1;
  flex: none;
}

.pf-faq-item[open] summary::after { content: "\2212"; }

.pf-faq-item > p {
  padding-bottom: var(--pf-space-md);
  color: var(--pf-muted);
  font-size: 0.95rem;
}

/* ========== Quote strip ========== */
.pf-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--pf-space-md);
}

.pf-quote {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-lg);
}

.pf-quote p {
  font-size: 0.98rem;
}

.pf-quote footer {
  margin-top: var(--pf-space-md);
  padding-top: var(--pf-space-sm);
  border-top: 1px solid var(--pf-border);
  font-size: 0.85rem;
  color: var(--pf-muted);
}

.pf-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--pf-text);
}

.pf-placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border: 1px dashed var(--pf-border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--pf-muted);
  background: var(--pf-surface);
  margin-bottom: var(--pf-space-md);
}

/* ========== CTA ========== */
.pf-cta {
  background: var(--pf-primary-strong);
  color: #ffffff;
  border-radius: var(--pf-radius-lg);
  padding: var(--pf-space-xl);
  text-align: center;
}

.pf-cta h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }

.pf-cta p {
  margin: var(--pf-space-sm) auto var(--pf-space-lg);
  max-width: 36rem;
  color: #e5e4fb;
}

.pf-cta .pf-btn-primary {
  background: #ffffff;
  color: var(--pf-primary-strong);
  border-color: #ffffff;
}

.pf-cta .pf-btn-primary:hover {
  background: #e5e4fb;
  border-color: #e5e4fb;
  color: var(--pf-primary-strong);
}

[data-theme="dark"] .pf-cta {
  background: var(--pf-surface-alt);
  color: var(--pf-text);
  border: 1px solid var(--pf-border-strong);
}

[data-theme="dark"] .pf-cta p { color: var(--pf-muted); }

[data-theme="dark"] .pf-cta .pf-btn-primary,
[data-theme="dark"] .pf-cta .pf-btn-primary:hover {
  background: var(--pf-primary);
  border-color: var(--pf-primary);
  color: var(--pf-on-primary);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pf-cta {
    background: var(--pf-surface-alt);
    color: var(--pf-text);
    border: 1px solid var(--pf-border-strong);
  }
  html:not([data-theme="light"]) .pf-cta p { color: var(--pf-muted); }
  html:not([data-theme="light"]) .pf-cta .pf-btn-primary,
  html:not([data-theme="light"]) .pf-cta .pf-btn-primary:hover {
    background: var(--pf-primary);
    border-color: var(--pf-primary);
    color: var(--pf-on-primary);
  }
}

/* ========== Footer ========== */
.pf-footer {
  background: var(--pf-surface);
  border-top: 1px solid var(--pf-border);
  padding: var(--pf-space-xl) 0 var(--pf-space-lg);
  margin-top: var(--pf-space-2xl);
}

.pf-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--pf-space-lg);
}

.pf-footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--pf-muted);
  max-width: 22rem;
}

.pf-footer h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pf-muted);
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.pf-footer-links {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.pf-footer-links a { color: var(--pf-muted); }
.pf-footer-links a:hover { color: var(--pf-primary); }

.pf-footer-bottom {
  margin-top: var(--pf-space-xl);
  padding-top: var(--pf-space-md);
  border-top: 1px solid var(--pf-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem var(--pf-space-md);
  justify-content: space-between;
  font-size: 0.83rem;
  color: var(--pf-muted);
}

/* ========== Demo badge ========== */
.demo-badge {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--pf-surface);
  border: 1px solid var(--pf-border-strong);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  box-shadow: var(--pf-shadow);
  z-index: 1000;
}

.demo-badge a { color: var(--pf-muted); }
.demo-badge a:hover { color: var(--pf-primary); }

/* ========== Responsive ========== */
@media (max-width: 940px) {
  .pf-hero-grid,
  .pf-two-col {
    grid-template-columns: 1fr;
  }

  .pf-hero-art { order: -1; }

  .pf-float-chip-a { left: 2%; }
  .pf-float-chip-b { right: 2%; }

  .pf-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .pf-nav-toggle { display: inline-flex; }

  .pf-nav { flex-wrap: wrap; }

  .pf-nav-list {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid var(--pf-border);
    margin-top: 0.6rem;
  }

  .pf-nav-list.is-open { display: flex; }

  .pf-nav-list a { padding: 0.7rem 0.75rem; border-radius: var(--pf-radius-sm); }
}

@media (max-width: 620px) {
  :root {
    --pf-space-2xl: 3rem;
    --pf-space-xl: 2rem;
  }

  .pf-wrap {
    padding-left: var(--pf-space-sm);
    padding-right: var(--pf-space-sm);
  }

  .pf-field-row { grid-template-columns: 1fr; }

  .pf-newsletter { padding: var(--pf-space-lg) var(--pf-space-md); }

  .pf-news-form { flex-direction: column; }

  .pf-news-submit { align-self: stretch; }

  .pf-float-chip { font-size: 0.72rem; padding: 0.4rem 0.7rem; }

  .pf-float-chip-a { top: 3%; left: -0.25rem; }
  .pf-float-chip-b { bottom: -0.6rem; right: -0.25rem; }

  .pf-footer-grid { grid-template-columns: 1fr; }

  .pf-cta { padding: var(--pf-space-lg) var(--pf-space-md); }

  .demo-badge {
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
  }
}

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

  /* Base states are already the finished states, so simply removing the
     animation leaves everything readable. */
  .pf-hero h1 .pf-hero-line,
  .pf-hero-lede,
  .pf-hero-actions,
  .pf-hero-stats {
    animation: none;
  }

  .pf-phone-bars span,
  .pf-ring-fill,
  .pf-pulse-line path,
  .pf-hero-glow,
  .pf-phone,
  .pf-float-chip {
    animation: none;
  }
}

/* ========== Print ========== */
@media print {
  .pf-header,
  .pf-hero-glow,
  .demo-badge,
  .pf-icon-btn {
    display: none;
  }

  body.pulse {
    background: #fff;
    color: #000;
  }

  .pf-hero h1 .pf-hero-line,
  .pf-hero-lede,
  .pf-hero-actions,
  .pf-hero-stats {
    animation: none;
  }
}
