/* ============================================================
   Applied Operations Protocols — Global Stylesheet
   Design System: Institutional. Boring. Trust-forward.
   Reference: LegalZoom spacing, hierarchy, sectioning
   ============================================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
  --color-primary: #0F2830;
  --color-primary-mid: #1A3D47;
  --color-surface-white: #FFFFFF;
  --color-surface-muted: #F4F6F5;
  --color-surface-warm: #F5EDE4;
  --color-action: #D4572A;
  --color-action-hover: #B8461F;
  --color-text-heading: #1A1A1A;
  --color-text-body: #5A6368;
  --color-text-muted: #8B9297;
  --color-border: #DFE3E5;
  --radius-card: 12px;
  --radius-button: 6px;
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

/* --- Body --- */
body {
  font-family: var(--font-stack);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-body);
  background: var(--color-surface-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography: Global Tags --- */
h1, h2, h3, h4 {
  color: var(--color-text-heading);
  margin-top: 0;
}

h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 8px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 8px;
}

p {
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Links --- */
a {
  color: var(--color-primary-mid);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout: Section --- */
.section {
  padding: 80px 0;
  width: 100%;
}

.section.is-hero {
  background: var(--color-primary);
  color: var(--color-surface-white);
  padding: 100px 0;
}

.section.is-hero h1,
.section.is-hero h2,
.section.is-hero h3,
.section.is-hero h4 {
  color: var(--color-surface-white);
}

.section.is-dark {
  background: var(--color-primary);
  color: var(--color-surface-white);
}

.section.is-dark h1,
.section.is-dark h2,
.section.is-dark h3,
.section.is-dark h4 {
  color: var(--color-surface-white);
}

.section.is-light {
  background: var(--color-surface-muted);
}

.section.is-warm {
  background: var(--color-surface-warm);
}

/* --- Layout: Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

/* --- Layout: Grids --- */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

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

.grid-60-40 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
}

/* --- Cards --- */
.card {
  background: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--color-primary-mid);
}

.card.is-dark {
  background: var(--color-primary);
  border: none;
  color: var(--color-surface-white);
}

.card.is-dark h3, .card.is-dark h4 {
  color: var(--color-surface-white);
}

.card.is-warm {
  background: var(--color-surface-warm);
  border: none;
}

.card.is-warm:hover {
  border-color: transparent;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  background: var(--color-action);
  color: var(--color-surface-white);
  font-family: var(--font-stack);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-button);
  text-align: center;
  min-width: 180px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1.4;
}

.btn-primary:hover {
  background: var(--color-action-hover);
  text-decoration: none;
  color: var(--color-surface-white);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-text-heading);
  font-family: var(--font-stack);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-button);
  text-align: center;
  min-width: 180px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}

.btn-secondary:hover {
  background: var(--color-surface-muted);
  text-decoration: none;
}

/* --- Utility Classes --- */
.label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  display: block;
}

.section.is-dark .label,
.section.is-hero .label {
  color: rgba(255,255,255,0.6);
}

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

.text-white-secondary {
  color: rgba(255,255,255,0.75);
}

.section-heading {
  margin-bottom: 40px;
}

.max-w-body {
  max-width: 680px;
}

.price-text {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1.2;
  margin-bottom: 16px;
}

.divider {
  width: 120px;
  height: 1px;
  background: var(--color-border);
  margin: 0 auto;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-surface-white);
  line-height: 1.15;
  margin-bottom: 4px;
}

.step-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  margin-bottom: 12px;
}

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

.mt-auto {
  margin-top: auto;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* --- Site Header --- */
.site-header {
  background: var(--color-primary);
  padding: 16px 0;
  width: 100%;
  position: relative;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .site-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-surface-white);
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-name:hover {
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-header nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--color-surface-white);
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-surface-white);
  margin: 5px 0;
}

/* --- Site Footer --- */
.site-footer {
  background: var(--color-primary);
  color: var(--color-surface-white);
  padding: 64px 0 32px 0;
  width: 100%;
}

.site-footer h4 {
  color: var(--color-surface-white);
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-surface-white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-weight: 400;
}

.footer-bottom a:hover {
  color: rgba(255,255,255,0.75);
}

.footer-legal-links {
  display: flex;
  gap: 16px;
}

/* --- Pricing Sidebar (sticky) --- */
.pricing-sidebar {
  position: sticky;
  top: 40px;
}

/* --- Protocol detail rich text --- */
.protocol-detail p {
  margin-bottom: 16px;
}

.protocol-detail p:last-child {
  margin-bottom: 0;
}

/* Card button pinned to bottom */
.card .btn-primary,
.card .btn-secondary {
  margin-top: auto;
}

/* Warm card on warm section — no border effect */
.section.is-warm .card.is-warm {
  max-width: 800px;
}

/* Full-width callout within warm section */
.callout-wide {
  max-width: 800px;
}

/* ============================================================
   RESPONSIVE: Tablet (768–991px)
   ============================================================ */
@media (max-width: 991px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

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

  .section {
    padding: 64px 0;
  }

  .section.is-hero {
    padding: 80px 0;
  }

  .container {
    padding: 0 32px;
  }

  h1 { font-size: 40px; }
  h2 { font-size: 32px; }

  .pricing-sidebar {
    position: static;
  }
}

/* ============================================================
   RESPONSIVE: Mobile (≤767px)
   ============================================================ */
@media (max-width: 767px) {
  .grid-3,
  .grid-2,
  .grid-60-40 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  .section.is-hero {
    padding: 64px 0;
    text-align: center;
  }

  .container {
    padding: 0 20px;
  }

  h1 { font-size: 32px; line-height: 1.2; }
  h2 { font-size: 28px; line-height: 1.25; }
  h3 { font-size: 20px; }
  h4 { font-size: 17px; }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: unset;
  }

  .card {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .site-header nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .site-header nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-primary);
    z-index: 100;
    justify-content: center;
    align-items: center;
    gap: 24px;
  }

  .site-header nav.is-open a {
    font-size: 20px;
    color: var(--color-surface-white);
  }

  .stat-number {
    font-size: 40px;
  }

  .step-number {
    font-size: 40px;
  }

  .price-text {
    font-size: 28px;
  }
}
