:root {
  --max: 980px;
  --pad: 20px;
  --radius: 14px;
  --brand: #1a73e8;
}

/* Base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: #111;
  line-height: 1.55;
  background: #fff;
}
a { color: inherit; }
h1, h2 { line-height: 1.2; }

/* Fluid type scale */
h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); }
h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.6rem); }

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad);
}

/* Skip link (a11y) */
.skip-link{
  position:absolute;
  left:-9999px; top:auto;
}
.skip-link:focus{
  left: var(--pad);
  top: 8px;
  background:#000;
  color:#fff;
  padding:8px 12px;
  border-radius:8px;
  z-index: 1000;
}

/* Focus visibility */
a:focus-visible, .btn:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Nav */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
}
.nav a { text-decoration: none; color: #111; opacity: 0.92; }
.nav a:hover { opacity: 1; }
.nav .brand { font-weight: 700; margin-right: auto; font-size: 2em; line-height: 1.2; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  text-decoration: none;
  transition: box-shadow .15s ease;
}
.btn.primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad) 8px; /* compact bottom */
  text-align: center;
}
.hero h1 { margin: 0 0 8px; line-height: 1.15; }
.hero p { margin: 0; }
.hero .blurb {
  font-size: 0.95rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
  color: #555;
}

/* Sections */
.section { margin: 28px 0; }
.section h2 { margin-top: 0; }
.lead { font-size: 1.05rem; color: #444; }

/* First section after hero */
main .section:first-of-type { margin-top: 12px; }

/* Pilot CTA */
.pilot-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.pilot-cta .blurb { font-size: 0.95rem; color: #555; }

/* Why section
.why-fail-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  margin-top:1rem;
}*/

.why-fail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns fixed */
  gap: 1.5rem;
  max-width: 900px;   /* centers grid nicely */
  margin: 2rem auto;  /* auto centers horizontally */
}
@media (max-width: 700px) {
  .why-fail-grid {
    grid-template-columns: 1fr; /* stack in one column on smaller screens */
  }
}




.card{
  border:1px solid #eee;
  border-radius: var(--radius);
  padding:16px;
  background:#fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.02);
}

/* Flow (legacy grid) */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}
.flow li {
  border: 1px solid #e6e6e6;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  background: #f7fbff;
}

/* Flow diagram */
.flow-diagram{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:16px;
}
.flow-diagram .step{
  border:1px solid #e6e6e6;
  border-radius:10px;
  padding:10px 14px;
  background:#f7fbff;
  font-weight:600;
  font-size:14px;
  min-width:120px;
  text-align:center;
}
.flow-diagram .arrow{
  font-size:20px;
  line-height:1;
  color:#333;
  user-select:none;
}
.flow-diagram .loop{
  font-size:22px;
  line-height:1;
  color:var(--brand);
  margin-left:4px;
  user-select:none;
}
.flow-diagram + .intro { margin-top: 2rem; }

/* Steps detail */
.works .intro,
.works .closing {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  text-align: center;
  color: #444;
}
.steps-detail {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 2rem auto 0;
}
@media (min-width: 1024px) {
  .steps-detail { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
}
.steps-detail .step {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.steps-detail .step h3 {
  margin-bottom: 0.5rem;
  color: #222;
}
.steps-detail .step p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

/* Note */
.note {
  background:#f8f9fb;
  border:1px solid #e8ecf2;
  border-radius: var(--radius);
  padding:16px;
}

/* Footer */
.footer {
  border-top: 1px solid #eee;
  padding: 20px var(--pad);
  text-align: center;
  color: #555;
}
.footer nav {
  display:flex; gap:12px; justify-content:center; margin-bottom:8px;
}
.footer a { text-decoration: none; color: inherit; opacity: .85; }
.footer a:hover { opacity: 1; }

/* Responsive */
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .flow-diagram{justify-content:flex-start;}
  .flow-diagram .arrow{display:none;}
  .flow-diagram .step{min-width:unset; width:100%;}
  .flow-diagram .loop{margin-left:0;}
}
@media (max-width: 540px) {
  .flow { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  body{ background:#0b0c0f; color:#eee; }
  .nav, .footer{ border-color:#1e1f25; }
  .nav a { color:#e6e6e6; }
  .card{ background:#11131a; border-color:#1e1f25; box-shadow: none; }
  .note{ background:#121420; border-color:#23263a; color:#dfe3f0; }
  .flow li{ background:#0f1520; border-color:#1e1f25; }
  .flow-diagram .step{ background:#0f1520; border-color:#1e1f25; color:#dfe3f0; }
  .hero .blurb, .pilot-cta .blurb, .works .intro, .works .closing, .lead { color:#c9cfda; }
  .footer { color:#c9cfda; }

  /* Headings readable in dark mode */
  h1, h2, h3, h4, h5, h6 { color: #f0f2f8; }
  .steps-detail .step h3 { color: #f0f2f8; }
}
/* === Added: Sticky header + logo + scroll-shrink effect === */

/* Make the header sticky (uses existing <header>) */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff; /* ensures content doesn’t show through while sticking */
}

/* Logo defaults */
.logo {
  height: 40px;
  width: auto;
  display: block;
  transition: transform .2s ease, opacity .2s ease;
}

/* Keep logo & brand aligned nicely without changing your .nav layout */
.logo-link {
  display: inline-flex;
  align-items: center;
}

/* Shrink the header/nav on scroll */
.is-shrunk .nav {
  padding: 8px var(--pad); /* was 14px; this overrides only when scrolled */
}

/* Shrink brand type slightly on scroll (doesn't change original rule, just overrides in state) */
.is-shrunk .nav .brand {
  font-size: 1.7em; /* gently smaller from the default 2em */
}

/* Shrink the logo slightly on scroll */
.is-shrunk .logo {
  transform: scale(0.9);
  opacity: 0.96;
}

/* Dark mode background for sticky header parity */
@media (prefers-color-scheme: dark){
  header { background:#0b0c0f; }
}
.steps-detail p {
  color: #cccccc !important; 
  line-height: 1.6;    /* makes text easier to read on mobile */
  margin: 0 0 1em;     /* keep spacing consistent, not too big */
}

.steps-detail h3 {
  color: #ffffff;      /* bright white for headings */
  margin-bottom: 0.4em;
}
