/*
Theme Name: Plan Docente Blog
Theme URI: https://plandocente.com/blog/
Description: Child theme of Hello Elementor that mirrors the plandocente.com landing page design system — tokens, typography, header and footer — so the blog reads as one continuous product. Mobile-first; shares the FR-060 `pd-theme` cookie with the SPA so light/dark carries across.
Author: Plan Docente
Template: hello-elementor
Version: 1.2.2
Text Domain: plandocente-blog
*/

/* ─────────────────────────────────────────────────────────────
   Design tokens — ported verbatim from apps/web/src/index.css.
   Keep in sync with that file; it is the source of truth.
   ───────────────────────────────────────────────────────────── */

:root,
html.light {
  color-scheme: light;

  --primary: #C2410C;
  --primary-light: #EA580C;
  --secondary: #A16207;
  --accent: #166534;
  --success: #15803D;
  --warning: #B45309;
  --error: #B91C1C;
  --background: #FFFBF5;
  --surface: #FFF7ED;
  --surface-elevated: #FFFFFF;
  --surface-warm: #FEF3C7;
  --surface-green: #DCFCE7;
  --border: #E7DDD1;
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #78706A;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 8px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 12px 20px rgba(28, 25, 23, 0.08);
  --shadow-xl: 0 20px 30px rgba(28, 25, 23, 0.12);

  --pd-container: 64rem;   /* max-w-5xl */
  --pd-radius: 12px;       /* rounded-lg */
}

html.dark {
  color-scheme: dark;

  --primary: #F06820;
  --primary-light: #F97316;
  --secondary: #CA8A04;
  --accent: #22C55E;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --background: #1C1412;
  --surface: #292018;
  --surface-elevated: #352A20;
  --surface-warm: #533010;
  --surface-green: #0A3A1E;
  --border: #524438;
  --text-primary: #F5F0EB;
  --text-secondary: #BEB0A0;
  --text-muted: #A09286;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 20px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.35);
}

/* ─────────────────────────────────────────────────────────────
   Elementor bridge.

   The Kit stores global colors as static hex (see bin/align-elementor-kit.php),
   so Elementor-built content would stay light-palette even in dark mode.
   Remapping --e-global-color-* onto the live tokens makes that content follow
   the theme instead.

   `body[class*="elementor-kit-"]` (0-1-1) outranks Elementor's own
   `.elementor-kit-N` (0-1-0), so this wins regardless of stylesheet order and
   survives the kit ID changing.
   ───────────────────────────────────────────────────────────── */

body[class*="elementor-kit-"] {
  --e-global-color-primary: var(--primary);
  --e-global-color-secondary: var(--secondary);
  --e-global-color-text: var(--text-primary);
  --e-global-color-accent: var(--accent);

  --e-global-color-pdprimlt: var(--primary-light);
  --e-global-color-pdbg: var(--background);
  --e-global-color-pdsurf: var(--surface);
  --e-global-color-pdsurfel: var(--surface-elevated);
  --e-global-color-pdsurfwm: var(--surface-warm);
  --e-global-color-pdsurfgr: var(--surface-green);
  --e-global-color-pdborder: var(--border);
  --e-global-color-pdtxtsec: var(--text-secondary);
  --e-global-color-pdtxtmut: var(--text-muted);
  --e-global-color-pdsucc: var(--success);
  --e-global-color-pdwarn: var(--warning);
  --e-global-color-pderr: var(--error);
}

/* ── Base ── */

html {
  font-size: 100%; /* respect user browser settings */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--text-primary);
  margin: 0;
}

/* Type scale — clamp values lifted from tailwind.config.ts */
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(1.875rem, 1.25rem + 2.5vw, 2.25rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
h3 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
h4 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
h5 { font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; }
h6 { font-size: 1.125rem; line-height: 1.5; font-weight: 600; }

a { color: var(--primary); text-decoration: none; transition: color 150ms; }
a:hover { color: var(--primary-light); }

img, svg, video { max-width: 100%; height: auto; }

/* Accessible focus ring — matches the SPA's focus-visible:ring-2 ring-primary */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.pd-container {
  width: 100%;
  max-width: var(--pd-container);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) { .pd-container { padding-inline: 1.5rem; } }

.pd-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;
}

.pd-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff;
  padding: 0.75rem 1rem; border-radius: 0 0 var(--pd-radius) 0;
}
.pd-skip-link:focus { left: 0; color: #fff; }

/* ─────────────────────────────────────────────────────────────
   Buttons — mirror packages/shared-ui button.tsx variants
   ───────────────────────────────────────────────────────────── */

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--pd-radius);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: all 100ms;
  position: relative;
  overflow: hidden;
}
.pd-btn:active { transform: scale(0.97); }

.pd-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.pd-btn--primary:hover { filter: brightness(1.1); box-shadow: var(--shadow-md); color: #fff; }
.pd-btn--primary:active { filter: brightness(0.9); }

.pd-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.pd-btn--ghost:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.pd-btn--ghost:active { background: color-mix(in srgb, var(--primary) 15%, transparent); }

.pd-btn--sm { height: 2rem; padding-inline: 0.75rem; font-size: 0.75rem; }
.pd-btn--lg { height: 3rem; padding-inline: 2rem; font-size: 1rem; }
.pd-btn--block { width: 100%; }

/* ─────────────────────────────────────────────────────────────
   Header — mirrors layouts/LandingLayout.tsx
   ───────────────────────────────────────────────────────────── */

.pd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms, box-shadow 200ms;
}
@media (min-width: 640px) { .pd-header { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .pd-header { height: 64px; } }

.pd-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.pd-header__inner {
  width: 100%;
  max-width: var(--pd-container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — text variant (h-7) on mobile, horizontal (h-10) from lg up */
.pd-logo { display: flex; align-items: center; flex-shrink: 0; }
.pd-logo img { display: block; width: auto; }
.pd-logo--compact img { height: 28px; }
.pd-logo--full img { height: 40px; }

.pd-logo--compact { display: flex; }
.pd-logo--full { display: none; }
@media (min-width: 1024px) {
  .pd-logo--compact { display: none; }
  .pd-logo--full { display: flex; }
}

/* Light/dark logo swap — mirrors components/BrandLogo.tsx */
html.dark .pd-logo__light { display: none; }
html:not(.dark) .pd-logo__dark { display: none; }

/* Desktop nav */
.pd-nav { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 1024px) { .pd-nav { display: flex; } }

.pd-nav__link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--pd-radius);
  color: var(--text-secondary);
  transition: color 150ms, background-color 150ms;
}
.pd-nav__link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.pd-nav__link.is-active { color: var(--primary); }
.pd-nav__link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--primary);
  border-radius: 9999px;
}

.pd-header__right { display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 640px) { .pd-header__right { gap: 0.75rem; } }

.pd-header__auth { display: none; align-items: center; gap: 0.5rem; }
@media (min-width: 1024px) { .pd-header__auth { display: flex; } }

/* Theme toggle — mirrors components/ThemeToggle.tsx */
.pd-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  border-radius: var(--pd-radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms, background-color 150ms;
}
.pd-theme-toggle:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.pd-theme-toggle svg { width: 1rem; height: 1rem; }
html.dark .pd-theme-toggle .pd-icon-sun { display: none; }
html:not(.dark) .pd-theme-toggle .pd-icon-moon { display: none; }

/* Hamburger — hidden from lg up */
.pd-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-right: -0.5rem;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms;
}
.pd-hamburger:hover { color: var(--text-primary); }
.pd-hamburger svg { width: 1.5rem; height: 1.5rem; }
@media (min-width: 1024px) { .pd-hamburger { display: none; } }

/* ── Mobile menu overlay ── */
.pd-mobile-menu { position: fixed; inset: 0; z-index: 60; }
.pd-mobile-menu[hidden] { display: none; }
@media (min-width: 1024px) { .pd-mobile-menu { display: none; } }

.pd-mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); border: 0; width: 100%; cursor: default; }

.pd-mobile-menu__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 320px;
  background: var(--background);
  display: flex;
  flex-direction: column;
  animation: pd-slide-in-right 300ms ease-out;
}
@keyframes pd-slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pd-mobile-menu__panel { animation: none; }
  .pd-btn:active { transform: none; }
}

.pd-mobile-menu__head { height: 56px; display: flex; align-items: center; justify-content: flex-end; padding-inline: 1rem; }
.pd-mobile-menu__nav { flex: 1; padding-inline: 1rem; }
.pd-mobile-menu__link {
  display: flex;
  align-items: center;
  height: 56px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: color 150ms;
}
.pd-mobile-menu__link:hover { color: var(--primary); }
.pd-mobile-menu__link.is-active { color: var(--primary); }
.pd-mobile-menu__foot {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────
   Content
   ───────────────────────────────────────────────────────────── */

.pd-main { flex: 1; }

.pd-page-head { padding-block: 3rem 2rem; }
@media (min-width: 640px) { .pd-page-head { padding-block: 4rem 2.5rem; } }
.pd-page-head__title { margin-bottom: 0.75rem; }
.pd-page-head__sub { color: var(--text-secondary); font-size: 1.125rem; max-width: 42rem; margin: 0; }

/* Post list */
.pd-posts { display: grid; gap: 1.5rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .pd-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pd-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 200ms, transform 200ms, border-color 200ms;
}
.pd-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
@media (prefers-reduced-motion: reduce) { .pd-card:hover { transform: none; } }

.pd-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-warm); }
.pd-card__media img { width: 100%; height: 100%; object-fit: cover; }
.pd-card__body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.pd-card__title { font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; margin-bottom: 0.5rem; }
.pd-card__title a { color: var(--text-primary); }
.pd-card__title a:hover { color: var(--primary); }
.pd-card__excerpt { color: var(--text-secondary); font-size: 0.9375rem; margin: 0 0 1rem; flex: 1; }
.pd-card__meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }

.pd-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Single post */
.pd-article { padding-block: 2.5rem 4rem; }
.pd-article__head { max-width: 46rem; margin-inline: auto; margin-bottom: 2rem; }
.pd-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.875rem; color: var(--text-muted); }
.pd-article__title { margin-bottom: 1rem; }
.pd-article__hero { border-radius: 16px; overflow: hidden; margin-bottom: 2.5rem; border: 1px solid var(--border); }
.pd-article__hero img { width: 100%; display: block; }

.pd-prose { max-width: 46rem; margin-inline: auto; font-size: 1.0625rem; color: var(--text-primary); }
.pd-prose > * + * { margin-top: 1.25rem; }
.pd-prose h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.pd-prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.pd-prose p { line-height: 1.75; }
.pd-prose ul, .pd-prose ol { padding-left: 1.5rem; }
.pd-prose li + li { margin-top: 0.5rem; }
.pd-prose img, .pd-prose figure { border-radius: var(--pd-radius); }
.pd-prose blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--primary);
  color: var(--text-secondary);
  font-style: italic;
}
.pd-prose code {
  background: var(--surface-warm);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
}
.pd-prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--pd-radius);
  overflow-x: auto;
}
.pd-prose pre code { background: transparent; padding: 0; }
/* Horizontal rules only, and deliberately NOT border-collapse.
 *
 * With collapse, the header row's top border sits on the table's outer edge and
 * the UA's grey wins that resolution — no author border-color on the cell can
 * take it back (a td, whose top edge is shared with the cell above, renders
 * correctly; only th stays grey). Separate borders sidestep the resolution
 * entirely, and a bottom-rule table reads better in prose anyway. */
.pd-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  display: block;
  overflow-x: auto;
}
.pd-prose th, .pd-prose td {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.pd-prose thead th {
  background: var(--surface);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.pd-prose tbody tr:last-child td { border-bottom: 0; }

/* Pagination */
.pd-pagination { display: flex; justify-content: center; gap: 0.5rem; padding-bottom: 4rem; flex-wrap: wrap; }
.pd-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding-inline: 0.75rem;
  border: 1px solid var(--border); border-radius: var(--pd-radius);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
}
.pd-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pd-pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Empty / 404 states */
.pd-empty { text-align: center; padding-block: 5rem; }
.pd-empty__title { margin-bottom: 0.75rem; }
.pd-empty p { color: var(--text-secondary); margin: 0 0 1.5rem; }

/* ─────────────────────────────────────────────────────────────
   Footer — mirrors LandingLayout.tsx <Footer />
   ───────────────────────────────────────────────────────────── */

.pd-footer { background: var(--surface); border-top: 1px solid var(--border); }
.pd-footer__inner { padding-block: 2.5rem; }
@media (min-width: 640px) { .pd-footer__inner { padding-block: 3rem; } }

.pd-footer__top { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 640px) { .pd-footer__top { flex-direction: row; align-items: center; justify-content: space-between; } }

.pd-footer__brand { max-width: 28rem; }
.pd-footer__desc { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.625; }

.pd-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
@media (min-width: 640px) { .pd-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }

.pd-footer__links { display: flex; align-items: center; gap: 1.25rem; }
.pd-footer__links a { color: var(--text-muted); }
.pd-footer__links a:hover { color: var(--primary); }

.pd-layout { min-height: 100vh; display: flex; flex-direction: column; }

/* ─────────────────────────────────────────────────────────────
   Lead-magnet form — visual parity with the landing page's
   LeadMagnetForm (apps/web/src/pages/LandingPage.tsx). Values are the
   resolved equivalents of that component's Tailwind classes; tokens do
   the light/dark work, so this follows the theme toggle for free.
   ───────────────────────────────────────────────────────────── */

.pd-lead { margin: 3rem auto 4rem; padding-inline: 1rem; max-width: 44rem; }

.pd-lead__card {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;               /* rounded-xl */
  box-shadow: var(--shadow-md);
  padding: 1.25rem;                  /* p-5 */
}
@media (min-width: 640px) { .pd-lead__card { padding: 1.5rem; } }

.pd-lead__badge-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.pd-lead__badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #fff; background: var(--accent);
  padding: 0.25rem 0.625rem; border-radius: 9999px;
}
.pd-lead__badge svg { width: 0.875rem; height: 0.875rem; }

.pd-lead__title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem; font-weight: 700; line-height: 1.25;
  color: var(--text-primary); margin: 0 0 0.25rem;
}
@media (min-width: 640px) { .pd-lead__title { font-size: 1.5rem; } }

.pd-lead__sub {
  font-size: 0.875rem; line-height: 1.625;
  color: var(--text-secondary); margin: 0 0 1rem;
}

.pd-lead__label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary); margin: 0 0 0.5rem;
}

.pd-lead__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
/*
 * Transition named longhands, never `all`, and set `background-color` rather
 * than the `background` shorthand. With `transition: all` the pill got stuck at
 * its start colour when `.is-selected` was toggled — the selection looked like
 * it had not registered. Shorthands interpolate badly; longhands do not.
 */
.pd-lead__pill {
  font: inherit; font-size: 0.75rem; font-weight: 500;
  /* Explicit, NOT inherited. `font: inherit` copies body's *computed* line-height
     (1.6 × 16px = 25.6px) and the later font-size does not rescale it, which made
     these pills 39.2px tall against the landing page's 31.6px. 1.5 × 12px = 18px
     reproduces the landing exactly. */
  line-height: 1.5;
  padding: 0.375rem 0.75rem; border-radius: 9999px;
  background-color: var(--background); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Own EVERY interactive state. hello-elementor styles bare <button>, and its
   `button:hover` (0-1-1) outranks `.pd-lead__pill` (0-1-0) — so any state we leave
   undeclared falls through to the parent theme's default accent (#CC3366 fuchsia,
   which is not in our palette). Matching the landing: hover changes border + text
   only, never the background. */
.pd-lead__pill:hover,
.pd-lead__pill:focus,
.pd-lead__pill:active {
  background-color: var(--background); border-color: var(--primary); color: var(--primary);
}
.pd-lead__pill.is-selected,
.pd-lead__pill.is-selected:hover,
.pd-lead__pill.is-selected:focus,
.pd-lead__pill.is-selected:active {
  background-color: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.pd-lead__pill:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.pd-lead__blurb {
  font-size: 0.75rem; line-height: 1.625; color: var(--text-secondary);
  margin: 0 0 1rem; padding-left: 0.25rem;
  animation: pd-lead-fade 200ms ease-out;
}
.pd-lead__blurb[hidden] { display: none; }
@keyframes pd-lead-fade { from { opacity: 0; } to { opacity: 1; } }

.pd-lead__form { display: flex; flex-direction: column; gap: 0.75rem; }
.pd-lead__form[hidden] { display: none; }

/* Honeypot — off-screen but not display:none, which some bots skip. */
.pd-lead__hp { position: absolute; opacity: 0; height: 0; overflow: hidden; }

.pd-lead__row { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .pd-lead__row { grid-template-columns: 1fr 1fr; } }

.pd-lead__field { position: relative; }
.pd-lead__field svg {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 1rem; height: 1rem; color: var(--text-muted); pointer-events: none;
}
.pd-lead__field input {
  width: 100%; height: 2.75rem;                     /* h-11 */
  padding: 0 0.75rem 0 2.25rem;                     /* pl-9 */
  font-family: inherit; font-size: 0.875rem;
  background: var(--background); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 12px;
  transition: box-shadow 0.15s ease;
}
.pd-lead__field input::placeholder { color: var(--text-muted); }
.pd-lead__field input:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--surface-elevated), 0 0 0 3px var(--primary);
}

.pd-lead__submit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; height: 2.75rem; padding-inline: 1.25rem;
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  color: #fff; background: var(--primary);
  border: 0; border-radius: 12px; cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.pd-lead__submit svg { width: 1rem; height: 1rem; }
/* Same reason as the pills: restate background/colour on every state so
   hello-elementor's `button:hover` (0-1-1) can't repaint this fuchsia. */
.pd-lead__submit:hover,
.pd-lead__submit:focus,
.pd-lead__submit:active,
.pd-lead__submit:disabled {
  background-color: var(--primary); color: #fff;
}
.pd-lead__submit:hover:not(:disabled) { filter: brightness(1.1); }
.pd-lead__submit:active:not(:disabled) { transform: scale(0.98); }
.pd-lead__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.pd-lead__error {
  margin: 0; font-size: 0.75rem; font-weight: 500; color: var(--error);
}
.pd-lead__error[hidden] { display: none; }

.pd-lead__privacy { margin: 0; font-size: 0.75rem; color: var(--text-muted); }

.pd-lead__success { text-align: center; padding: 1rem 0; }
.pd-lead__success[hidden] { display: none; }
.pd-lead__success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: 0.75rem;
  border-radius: 9999px; background: var(--surface-green); color: var(--accent);
}
.pd-lead__success-icon svg { width: 1.5rem; height: 1.5rem; }
.pd-lead__success .pd-lead__sub { margin-bottom: 0; }

/* Error shake — mirrors the landing's animate-shake on the same trigger. */
.pd-lead__card.is-shaking { animation: pd-lead-shake 400ms ease-in-out; }
@keyframes pd-lead-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .pd-lead__card.is-shaking { animation: none; }
  .pd-lead__blurb { animation: none; }
  .pd-lead__submit:active:not(:disabled) { transform: none; }
}
