/* Proofly Website - Design System v2.0
 * Inspired by Pearl template: Manrope headings, generous whitespace, smooth animations
 * Brand Voice: Calm, infrastructure-grade, clean
 */

/* ============================================================================
   CSS RESET & BASE
   ============================================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */

:root {
  /* Colors - Trust-forward slate/blue foundation */
  --color-primary-900: #0f172a;
  --color-primary-800: #1e293b;
  --color-primary-700: #334155;
  --color-primary-600: #475569;
  --color-primary-500: #64748b;

  /* Neutral backgrounds */
  --color-neutral-0: #ffffff;
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;

  /* Accent - Muted teal-green */
  --color-success-700: #0f766e;
  --color-success-600: #0d9488;
  --color-success-500: #14b8a6;

  /* Semantic states */
  --color-info-600: #2563eb;
  --color-warning-600: #d97706;
  --color-danger-600: #dc2626;
  --color-focus-500: #3b82f6;

  /* Typography - Manrope for headings, Inter for body (Pearl-inspired) */
  --font-heading:
    "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Type scale - Larger, more impactful (Pearl-inspired) */
  --font-size-display: 3.5rem; /* 56px - hero */
  --font-size-h1: 2.75rem; /* 44px */
  --font-size-h2: 2rem; /* 32px */
  --font-size-h3: 1.25rem; /* 20px */
  --font-size-h4: 1.125rem; /* 18px */
  --font-size-body: 1.0625rem; /* 17px */
  --font-size-small: 0.9375rem; /* 15px */
  --font-size-caption: 0.8125rem; /* 13px */

  /* Line heights - More generous */
  --line-height-display: 1.15;
  --line-height-h1: 1.2;
  --line-height-h2: 1.3;
  --line-height-h3: 1.4;
  --line-height-body: 1.7;

  /* Spacing scale - More generous (Pearl-inspired) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-card: 16px;
  --radius-button: 12px;
  --radius-input: 12px;
  --radius-image: 20px;

  /* Shadows - Softer, more elevated feel */
  --shadow-card:
    0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-elevated: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 16px 48px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   WEB FONTS — loaded via <link> in HTML <head> for non-blocking render
   Font stack: Manrope (headings), Inter (body)
   ============================================================================ */

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-primary-600);
  background-color: var(--color-neutral-0);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-900);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-success-600);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-success-700);
  text-decoration: none;
}

strong {
  font-weight: 600;
  color: var(--color-primary-800);
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

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

.section {
  padding: var(--space-20) 0;
}

.section--hero {
  padding: var(--space-16) 0 var(--space-12) 0;
}

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

/* ============================================================================
   HEADER & NAVIGATION (Fixed, Pearl-inspired)
   ============================================================================ */

.header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-base);
}

.header--scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary-900);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  background: url("/images/proofly-icon-56.png") no-repeat center / contain;
  flex-shrink: 0;
}

.header__logo:hover {
  color: var(--color-primary-900);
}

.nav__list {
  list-style: none;
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.nav__link {
  color: var(--color-primary-500);
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  font-weight: 500;
  transition: color var(--transition-base);
  position: relative;
}

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

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-success-600);
  transition: width var(--transition-base);
}

.nav__link:hover::after {
  width: 100%;
}

/* ============================================================================
   BUTTONS (Pearl-inspired: rounded, clean)
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background-color: var(--color-primary-900);
  color: var(--color-neutral-0);
}

.btn--primary:hover {
  background-color: var(--color-primary-800);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn--secondary {
  background-color: var(--color-neutral-0);
  color: var(--color-primary-800);
  border: 1.5px solid var(--color-neutral-300);
}

.btn--secondary:hover {
  border-color: var(--color-primary-900);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--accent {
  background-color: var(--color-success-600);
  color: var(--color-neutral-0);
}

.btn--accent:hover {
  background-color: var(--color-success-700);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn--large {
  padding: var(--space-4) var(--space-10);
  font-size: var(--font-size-body);
  border-radius: 14px;
}

/* ============================================================================
   HERO SECTION (Pearl-inspired: big type, lots of breathing room)
   ============================================================================ */

.hero {
  text-align: center;
  padding: var(--space-20) 0 var(--space-16) 0;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-display);
  font-weight: 800;
  line-height: var(--line-height-display);
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 auto var(--space-8);
  color: var(--color-primary-900);
}

.hero__subtitle {
  font-size: var(--font-size-h4);
  color: var(--color-primary-500);
  margin-bottom: var(--space-6);
  font-weight: 400;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-body);
}

.hero__benefits {
  list-style: none;
  max-width: 560px;
  margin: 0 auto var(--space-10) auto;
  text-align: left;
}

.hero__benefit {
  padding: var(--space-3) 0;
  padding-left: var(--space-8);
  position: relative;
  font-size: var(--font-size-body);
  color: var(--color-primary-600);
}

.hero__benefit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-success-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   CARDS (Pearl-inspired: minimal borders, hover lift)
   ============================================================================ */

.card {
  background-color: var(--color-neutral-0);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-neutral-200);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--color-neutral-300);
}

.card__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.card__description {
  color: var(--color-primary-500);
  margin-bottom: 0;
  line-height: var(--line-height-body);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
  background-color: var(--color-primary-900);
  color: var(--color-neutral-400);
  padding: var(--space-16) 0 var(--space-8) 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer__section-title {
  font-family: var(--font-heading);
  color: var(--color-neutral-0);
  font-size: var(--font-size-caption);
  font-weight: 600;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer__list {
  list-style: none;
}

.footer__list-item {
  margin-bottom: var(--space-3);
}

.footer__link {
  color: var(--color-neutral-400);
  font-size: var(--font-size-small);
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: var(--color-neutral-0);
}

.footer__bottom {
  border-top: 1px solid var(--color-primary-800);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--font-size-caption);
  color: var(--color-neutral-400);
}

/* ============================================================================
   SCROLL REVEAL ANIMATIONS (Pearl-inspired smooth reveals)
   ============================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
.stagger-children.visible > *:nth-child(2) {
  transition-delay: 0.1s;
}
.stagger-children.visible > *:nth-child(3) {
  transition-delay: 0.15s;
}
.stagger-children.visible > *:nth-child(4) {
  transition-delay: 0.2s;
}
.stagger-children.visible > *:nth-child(5) {
  transition-delay: 0.25s;
}
.stagger-children.visible > *:nth-child(6) {
  transition-delay: 0.3s;
}
.stagger-children.visible > *:nth-child(7) {
  transition-delay: 0.35s;
}
.stagger-children.visible > *:nth-child(8) {
  transition-delay: 0.4s;
}

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   TESTIMONIALS
   ============================================================================ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.testimonial-card {
  background-color: var(--color-neutral-0);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-neutral-200);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--color-warning-600);
  font-size: var(--font-size-h4);
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}

.testimonial-quote {
  font-size: var(--font-size-body);
  color: var(--color-primary-600);
  font-style: italic;
  line-height: var(--line-height-body);
  margin: 0;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-style: normal;
  border-top: 1px solid var(--color-neutral-200);
  padding-top: var(--space-4);
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary-900);
  font-size: var(--font-size-small);
}

.testimonial-role {
  font-size: var(--font-size-caption);
  color: var(--color-primary-500);
}

.testimonial-result {
  font-size: var(--font-size-caption);
  color: var(--color-success-600);
  font-weight: 600;
  margin: 0;
  padding-top: var(--space-2);
}

/* ============================================================================
   JOURNEY STEPS
   ============================================================================ */

.journey-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-10);
}
.journey-step {
  flex: 0 1 calc(33.333% - var(--space-8));
  min-width: 240px;
  background-color: var(--color-neutral-0);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-neutral-200);
  text-align: center;
  transition: all var(--transition-base);
}

.journey-step:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.journey-step-number {
  width: 48px;
  height: 48px;
  background-color: var(--color-primary-900);
  color: var(--color-neutral-0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin: 0 auto var(--space-4) auto;
}

.journey-step-time {
  font-size: var(--font-size-caption);
  color: var(--color-success-600);
  font-weight: 600;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.journey-step h3 {
  font-size: var(--font-size-h4);
  margin-bottom: var(--space-3);
}

.journey-step p {
  font-size: var(--font-size-small);
  color: var(--color-primary-500);
  line-height: var(--line-height-body);
  margin: 0;
}

/* ============================================================================
   COMPARISON TABLE (clean, Pearl-inspired)
   ============================================================================ */

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--font-size-small);
  text-align: center;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.comparison-table thead tr {
  background: var(--color-neutral-50);
}

.comparison-table th {
  padding: var(--space-4) var(--space-4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-caption);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-500);
  border-bottom: 2px solid var(--color-neutral-200);
}

.comparison-table th:first-child {
  text-align: left;
}

.comparison-table th.highlight {
  color: var(--color-primary-900);
  background: var(--color-neutral-100);
}

.comparison-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-100);
  color: var(--color-primary-600);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--color-primary-700);
}

.comparison-table td.highlight {
  background: rgba(13, 148, 136, 0.04);
  color: var(--color-success-700);
  font-weight: 600;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================================
   IMAGE STYLING
   ============================================================================ */

.img-showcase {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-image);
  box-shadow: var(--shadow-elevated);
  transition: box-shadow var(--transition-slow);
}

.img-showcase:hover {
  box-shadow: var(--shadow-hover);
}

/* ============================================================================
   BADGE / PILL
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  font-size: var(--font-size-caption);
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.badge--success {
  background-color: rgba(13, 148, 136, 0.1);
  color: var(--color-success-700);
}

.badge--neutral {
  background-color: var(--color-neutral-100);
  color: var(--color-primary-600);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
  :root {
    --font-size-display: 2.75rem;
    --font-size-h1: 2.25rem;
    --font-size-h2: 1.75rem;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .hero {
    padding: var(--space-16) 0 var(--space-12) 0;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-display: 2.25rem;
    --font-size-h1: 1.875rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.125rem;
    --font-size-body: 1rem;
  }

  .container {
    padding: 0 var(--space-6);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .hero {
    padding: var(--space-12) 0 var(--space-8) 0;
  }

  .hero__title {
    font-size: var(--font-size-display);
  }

  .hero__subtitle {
    font-size: var(--font-size-body);
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

  .nav__list {
    gap: var(--space-4);
  }

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

  .journey-steps {
    flex-direction: column;
    align-items: center;
  }
  .journey-step {
    flex: 0 1 100%;
  }

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

  .card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-display: 1.875rem;
  }

  .nav__list {
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--color-primary-500);
}

.mt-0 {
  margin-top: 0;
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mt-10 {
  margin-top: var(--space-10);
}
.mt-12 {
  margin-top: var(--space-12);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mb-10 {
  margin-bottom: var(--space-10);
}

/* Section label (Pearl-style small caps above headings) */
.section-label {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-success-600);
  margin-bottom: var(--space-4);
}

.hero .section-label {
  margin-top: var(--space-6);
}

/* Divider */
.divider {
  width: 48px;
  height: 3px;
  background-color: var(--color-success-600);
  border-radius: 2px;
  margin: var(--space-4) auto var(--space-6);
}
