/* ============================================================
   RUNBOOK — Shared Stylesheet
   Version: 1.0 (Pass 1)
   ============================================================ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  --navy:       #1B4F8A;
  --navy-light: #2460a0;
  --navy-dark:  #153e6e;
  --grey-bg:    #F5F7FA;
  --amber:      #E6A817;
  --amber-dark: #c8910f;
  --text:       #1A1A1A;
  --text-muted: #555;
  --white:      #ffffff;
  --footer-bg:  #1A1A1A;
  --footer-text:#CCCCCC;
  --border:     #dde2ea;

  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --max-width: 780px;
  --gap: 2rem;
  --radius: 6px;
  --transition: 0.18s ease;
}

/* ── 2. Reset & Normalise ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── 3. Typography Scale ──────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--navy);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem);  letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
h4 { font-size: 1rem; }

p { margin-top: 0; }
p + p { margin-top: 1em; }

small { font-size: 0.82rem; }

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── 4. Layout Utilities ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--wide {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main {
  position: relative;
  z-index: 0;
}

.section {
  padding-block: 4rem;
}

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

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-navy h2,
.section-navy h3,
.section-navy p,
.section-navy .lead {
  color: var(--white);
}

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

/* ── 5. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  text-decoration: none;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* Inverted — used on navy backgrounds */
.btn-inverted {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-inverted:hover {
  background: var(--grey-bg);
  border-color: var(--grey-bg);
  text-decoration: none;
  color: var(--navy);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ── 6. Header & Navigation ───────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--navy-dark);
}

.site-header .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0;
  min-height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover {
  opacity: 0.85;
  text-decoration: none;
}

.site-logo img {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
  background: rgba(255,255,255,0.98);
  border-radius: 9px;
  padding: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18), 0 8px 18px rgba(6,20,38,0.16);
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.site-logo-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-logo-tagline {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: normal;
  max-width: 26ch;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.site-nav a.nav-cta {
  background: var(--amber);
  color: var(--navy);
  font-weight: 700;
  margin-left: 0.5rem;
  padding: 0.4rem 0.9rem;
}

.site-nav a.nav-cta:hover {
  background: var(--amber-dark);
  color: var(--navy);
}

/* Hamburger */
.nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  flex: 0 0 2px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 7. Hero Section ──────────────────────────────────────── */
.hero {
  padding-block: 5rem 4.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin-bottom: 1.1rem;
}

.hero .lead {
  max-width: 600px;
  margin-bottom: 2rem;
}

/* ── 8. Section headings ──────────────────────────────────── */
.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-bottom: 0.6rem;
}

.section-divider {
  width: 40px;
  height: 3px;
  background: var(--amber);
  margin-top: 0.75rem;
  border: none;
}

/* ── 9. Product Cards ─────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 4px 24px rgba(27,79,138,0.1);
}

.card--featured {
  border-color: var(--navy);
}

.card-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.card-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.card h3 {
  margin-bottom: 0.75rem;
}

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

.card .btn {
  width: 100%;
  text-align: center;
}

/* ── 10. Feature Blocks ───────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-block {
  padding: 1.5rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.feature-block h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.feature-block p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── 11. Testimonial ──────────────────────────────────────── */

.testimonial-block {
  background: var(--white);
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
}

.testimonial-block blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.testimonial-block cite {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* ── 12. Lead Magnet / CTA Section ───────────────────────── */
.cta-section {
  text-align: center;
  padding-block: 5rem;
}

.cta-section h2 {
  margin-bottom: 0.75rem;
}

.cta-section p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ── 13. Form Inputs ──────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,79,138,0.12);
}

/* ── 14. Tables ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: var(--grey-bg);
}

/* ── 15. Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-top: 3.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--footer-text);
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: 1.25rem;
  font-size: 0.75rem;
  color: rgba(204,204,204,0.6);
  line-height: 1.5;
}

/* ── 16. Responsive Breakpoints ──────────────────────────── */

/* 768px — tablet */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero {
    padding-block: 6rem 5rem;
  }
}

/* 1024px — desktop */
@media (min-width: 1024px) {
  .site-logo img {
    height: 40px;
    padding: 4px;
  }

  .site-logo-name {
    font-size: 1.38rem;
  }

  .site-logo-tagline {
    font-size: 0.82rem;
  }

  .hero {
    padding-block: 7rem 6rem;
  }

  .site-nav a {
    font-size: 0.92rem;
    padding: 0.45rem 0.8rem;
  }
}

/* Mobile nav behaviour */
@media (max-width: 767px) {
  .site-header .container--wide {
    gap: 0.75rem;
  }

  .site-logo {
    gap: 0.6rem;
    max-width: calc(100% - 3.5rem);
  }

  .site-logo img {
    height: 34px;
    padding: 3px;
    border-radius: 8px;
  }

  .site-logo-name {
    font-size: 1.1rem;
  }

  .site-logo-tagline {
    font-size: 0.7rem;
    max-width: 19ch;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .site-nav a.nav-cta {
    margin: 0.75rem 1.5rem 0;
    border-radius: var(--radius);
    text-align: center;
  }

  .site-header {
    position: relative;
  }

  .site-header .container--wide {
    flex-wrap: wrap;
  }
}

/* ── Bundle pricing ───────────────────────────────────────── */
.card-price-was {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.4rem;
}

/* ── Best Value badge ─────────────────────────────────────── */
.card-badge--value {
  background: var(--amber);
  color: var(--navy);
}

/* ── Button text wrapping fix ─────────────────────────────── */
/* .btn uses white-space: nowrap; in narrow card columns      */
/* this truncates button text — allow wrapping inside cards   */
.card .btn {
  white-space: normal;
  word-break: keep-all;
}

/* ── 3-col card grid (homepage) ──────────────────────────── */
/* 768–1023px: 2 cols (3rd card wraps to full-width row)      */
/* 1024px+:   3 cols side by side                             */
@media (min-width: 768px) {
  .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── 4-card grid (checklist product ladder) ──────────────── */
/* 2×2 at all breakpoints — 4-across causes text truncation   */
@media (min-width: 768px) {
  .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── 17. Print ────────────────────────────────────────────── */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle { display: none; }

  body { font-size: 12pt; }

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

  .section { padding-block: 1.5rem; }
}

/* ── 18. Accessibility & Focus ────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
