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

/* Design Tokens */
:root {
  --font-family-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 18px;
  --line-height-base: 1.6;

  --color-text: #111827;
  --color-bg: #FAFAFA;
  --color-card-bg: #FFFFFF;
  --color-muted: #4B5563;
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1EBE5D;
  --color-border: #E5E7EB;

  --container-max-width: 720px;
  /* Desktop only. Prose stays at 720px because long lines are harder to read;
     this is for the sections that are structure rather than text. */
  --container-wide: 1060px;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-system);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Mobile-First Centered Container Layout */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Header & Footer */
.site-header {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-footer {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-3xl);
  font-size: 0.95rem;
}

/* Typography & Focus Accessibility */
h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.125rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.text-muted {
  color: var(--color-muted);
}

.text-center {
  text-align: center;
}

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

a:hover,
a:focus {
  color: var(--color-primary-hover);
}

/* Visible Focus Indicators for Accessibility */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive Buttons & CTAs */
button,
.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border-radius: var(--radius-md);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  box-shadow: var(--shadow-sm);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background-color: var(--color-whatsapp-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #F3F4F6;
  color: var(--color-text);
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 540px) {
  .cta-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* Main & Section Spacing */
main {
  flex: 1 0 auto;
}

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

.section-header {
  margin-bottom: var(--space-xl);
}

/* Hero Section */
.hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: var(--space-md);
}

.hero-subline {
  font-size: 1.25rem;
  color: var(--color-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-lg);
}

/* Demo Video Showcase */
.demo {
  border-top: 1px solid var(--color-border);
}

.video-wrapper {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background-color: #000000;
  margin-bottom: var(--space-xl);
}

/* Video element sizes dynamically based on original aspect ratio (ratio-agnostic) */
.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

/* Before / After Visual Comparison Card */
.comparison-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.comparison-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.comparison-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .comparison-grid {
    flex-direction: row;
    align-items: stretch;
  }
}

.comparison-item {
  flex: 1;
  width: 100%;
  background-color: #F9FAFB;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.comparison-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.badge-raw {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge-sheet {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-founder {
  background-color: #E0E7FF;
  color: #3730A3;
}

.raw-text {
  font-style: italic;
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 0;
}

.sheet-row-preview {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.sheet-col {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.2rem;
}

.sheet-col:last-child {
  border-bottom: none;
}

.col-label {
  color: var(--color-muted);
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.tag-duplicate {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* 3-Step Process Breakdown */
.how-it-works {
  border-top: 1px solid var(--color-border);
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}

.step-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.step-card h3 {
  margin-bottom: var(--space-xs);
}

.step-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* Trust Guarantees Section */
.guarantees {
  border-top: 1px solid var(--color-border);
}

.guarantee-box {
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.guarantee-header {
  margin-bottom: var(--space-md);
}

.guarantee-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.guarantee-lead {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.guarantee-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.guarantee-list li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1rem;
  color: #1F2937;
}

.guarantee-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 800;
}

/* Founder Bio Card */
.founder {
  border-top: 1px solid var(--color-border);
}

.founder-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 540px) {
  .founder-card {
    flex-direction: row;
    align-items: flex-start;
  }
}

.founder-avatar {
  flex-shrink: 0;
}

.founder-content p {
  font-size: 0.98rem;
  color: var(--color-muted);
}

.founder-content p:last-child {
  margin-bottom: 0;
}

/* Free Pilot CTA Block */
.cta-block {
  border-top: 1px solid var(--color-border);
}

.cta-card {
  background: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.cta-card h2,
.cta-card p {
  color: #FFFFFF;
}

.cta-card p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.cta-card .btn-secondary {
  background-color: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

.cta-card .btn-secondary:hover,
.cta-card .btn-secondary:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* ------------------------------------------------------------------
   Desktop widening

   At 720px everywhere the page reads like a tall phone column on a laptop:
   the 3-card grid gets ~230px per card and the before/after comparison is
   cramped, while both sides of the screen sit empty.

   Structural sections get the wider container. The reading measure is
   deliberately NOT widened — the goal is less dead space beside the grids,
   not longer lines of text.
   ------------------------------------------------------------------ */
@media (min-width: 900px) {
  .demo,
  .how-it-works,
  .guarantees,
  .founder,
  .cta-block,
  .site-header > .container,
  .site-footer > .container {
    max-width: var(--container-wide);
  }

  /* Text blocks inside those wider sections stay narrow and centred. */
  .section-header,
  .guarantee-box,
  .cta-card,
  .founder-card {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  .steps-grid {
    gap: var(--space-lg);
  }

  /* The video is the centrepiece but does not need the full 1060px. */
  .video-wrapper {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}
