/* ============================================
   PersoForms Landing Page
   Corporate/polished design for enterprise buyers
   ============================================ */

:root {
  --color-primary: #0f172a;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-success: #059669;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-border: #e2e8f0;
  --color-surface: #ffffff;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --container-max: 1200px;
  --section-padding: 96px 24px;
}

/* --- Reset & Base --- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Focus Indicators (Accessibility) --- */

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Skip Link (Accessibility) --- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: 600;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 16px;
}

/* --- Container --- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease;
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav__logo span {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
}

.nav__mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn--secondary:hover {
  background: var(--color-accent-light);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 12px 16px;
}

.btn--ghost:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.btn--large {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn--white {
  background: var(--color-bg);
  color: var(--color-primary);
}

.btn--white:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* --- Sections --- */

.section {
  padding: var(--section-padding);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.section--dark .section__title {
  color: var(--color-text-inverse);
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.section--dark .section__subtitle {
  color: #94a3b8;
}

/* --- Hero --- */

.hero {
  padding: 160px 24px 96px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
}

.hero__inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.hero__title em {
  font-style: normal;
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__proof {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.hero__proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__proof-icon {
  width: 20px;
  height: 20px;
  color: var(--color-success);
}

/* --- Features --- */

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.feature-card__description {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- How It Works --- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
}

.step__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.step__description {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* --- Comparison Table --- */

.comparison {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 900px;
}

.comparison__table th,
.comparison__table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.comparison__table th {
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg-alt);
  position: sticky;
  top: 72px;
  z-index: 10;
}

.comparison__table th:first-child,
.comparison__table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--color-text);
  position: sticky;
  left: 0;
  background: var(--color-bg);
  z-index: 5;
  min-width: 200px;
}

.comparison__table th:first-child {
  z-index: 15;
  background: var(--color-bg-alt);
}

.comparison__table th:nth-child(2) {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.comparison__table td:nth-child(2) {
  background: var(--color-accent-light);
  font-weight: 600;
}

.comparison__check {
  color: var(--color-success);
  font-weight: 700;
  font-size: 1.125rem;
}

.comparison__cross {
  color: #dc2626;
  font-size: 1.125rem;
}

.comparison__partial {
  color: #f59e0b;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Pricing --- */

.pricing__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.pricing__toggle-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
}

.pricing__toggle-label--active {
  color: var(--color-primary);
  font-weight: 600;
}

.pricing__toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s ease;
}

.pricing__toggle-switch[aria-checked="true"] {
  background: var(--color-accent);
}

.pricing__toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.pricing__toggle-switch[aria-checked="true"]::after {
  transform: translateX(24px);
}

.pricing__save-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-success);
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 999px;
}

.pricing__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
}

.pricing-card {
  padding: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.pricing-card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.pricing-card--featured::before {
  content: "Most Popular";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.pricing-card__description {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.pricing-card__amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.pricing-card__currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.pricing-card__period {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.pricing-card__billing-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.pricing-card__features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.pricing-card__features li::before {
  content: "\2713";
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-success);
  background: #ecfdf5;
  border-radius: 50%;
}

.pricing-card__cta {
  width: 100%;
  text-align: center;
}

/* --- FAQ --- */

.faq__list {
  max-width: 768px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-align: left;
}

.faq__question:hover {
  color: var(--color-accent);
}

.faq__icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item[open] .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  padding: 0 0 24px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Footer --- */

.footer {
  background: var(--color-bg-dark);
  color: #94a3b8;
  padding: 64px 24px 32px;
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-inverse);
}

.footer__brand span {
  color: var(--color-accent);
}

.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer__link {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.footer__link:hover {
  color: var(--color-text-inverse);
}

.footer__bottom {
  max-width: var(--container-max);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}

/* --- Reduced Motion (Accessibility) --- */

@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;
  }
}

/* --- Mobile Responsive --- */

@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 64px 16px;
  }

  .nav__links {
    display: none;
  }

  .nav__mobile-toggle {
    display: block;
  }

  .nav__actions .btn--ghost {
    display: none;
  }

  .hero {
    padding: 120px 16px 64px;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pricing__cards {
    grid-template-columns: 1fr;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- Mobile Navigation Overlay --- */

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 999;
  padding: 24px;
}

.nav__mobile-menu.is-open {
  display: block;
}

.nav__mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* ========================================
   Content Pages (Comparison & Feature)
   ======================================== */

.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.content-page h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--gray-900, #111827);
}

.content-page .subtitle {
  font-size: 1.125rem;
  color: var(--gray-600, #4b5563);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.content-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--gray-900, #111827);
}

.content-page h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray-800, #1f2937);
}

.content-page p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-700, #374151);
  margin-bottom: 1rem;
}

.content-page ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.content-page ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--gray-700, #374151);
}

.content-page ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary, #6366f1);
  font-weight: 700;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.compare-table th {
  background: var(--gray-50, #f9fafb);
  font-weight: 600;
  color: var(--gray-900, #111827);
}

.compare-table td:first-child {
  font-weight: 500;
  color: var(--gray-800, #1f2937);
}

.compare-table .check {
  color: var(--primary, #6366f1);
  font-weight: 700;
}

.compare-table .cross {
  color: var(--gray-400, #9ca3af);
}

.content-cta {
  background: var(--gray-50, #f9fafb);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}

.content-cta h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.content-cta p {
  color: var(--gray-600, #4b5563);
  margin-bottom: 1.5rem;
}

.content-cta .btn {
  display: inline-block;
  background: var(--primary, #6366f1);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.content-cta .btn:hover {
  background: var(--primary-dark, #4f46e5);
}

.content-page .breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-500, #6b7280);
  margin-bottom: 1.5rem;
}

.content-page .breadcrumb a {
  color: var(--primary, #6366f1);
  text-decoration: none;
}

.content-page .breadcrumb a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .content-page {
    padding: 2rem 1rem 3rem;
  }

  .content-page h1 {
    font-size: 1.75rem;
  }

  .compare-table {
    font-size: 0.85rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.5rem;
  }
}

.footer-links {
  display: flex;
  gap: 3rem;
  justify-content: center;
  padding: 2rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.25rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--gray-600, #4b5563);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--primary, #6366f1);
}

@media (max-width: 640px) {
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
  }
}
