/* ============================================================
   Design tokens
   ============================================================ */
:root{
  /* Core palette */
  --bg:#F5F3EE;            /* warm off-white page background */
  --soft:#ECE5D6;          /* warm alt section background */
  --card:#FFFFFF;          /* white content cards */
  --navy:#172033;          /* deep navy - dark sections & body text */
  --navy-soft:#202B45;     /* lighter navy panel inside dark sections */
  --text:#172033;
  --muted:#596273;
  --light:#F5F3EE;         /* light text on dark sections */
  --light-muted:#AEB8CC;   /* muted text on dark sections */

  /* Accents */
  --blue:#2764A5;
  --blue-dark:#1D4E82;
  --teal:#3B8C8C;
  --teal-dark:#2E6E6E;
  --orange:#D9823B;
  --orange-dark:#B8672A;

  /* Borders / shadows */
  --border:#E1D9C8;
  --border-dark:#2C3752;
  --shadow-sm:0 2px 10px rgba(23,32,51,.07);
  --shadow-md:0 14px 32px rgba(23,32,51,.12);

  /* Shape */
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:10px;

  /* Type */
  --mono:"SFMono-Regular",ui-monospace,Menlo,Consolas,monospace;

  /* Layout */
  --max:1120px;
  --narrow:780px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.65;
}

a{color:inherit}

:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:4px}

.skip-link{position:absolute;left:-9999px;top:8px;z-index:100;padding:10px 16px;background:var(--card);color:var(--navy);border-radius:0 0 var(--radius-sm) 0;font-weight:700}
.skip-link:focus{left:0}

.container{width:min(calc(100% - 40px),var(--max));margin:auto}
.narrow{width:min(calc(100% - 40px),var(--narrow));margin:auto}

/* ============================================================
   Header & navigation
   ============================================================ */
header{
  background:var(--navy);
  color:var(--light);
  border-bottom:3px solid var(--teal);
}

.nav-wrap{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:30px}

.brand{display:inline-flex;align-items:center;gap:12px;font-weight:700;text-decoration:none;color:var(--light)}

.brand-mark{
  display:grid;place-items:center;
  width:36px;height:36px;
  border-radius:var(--radius-sm);
  border:1px solid var(--teal);
  color:var(--teal);
  background:var(--navy-soft);
  font-family:var(--mono);
  font-size:11px;letter-spacing:.08em;
}

nav{display:flex;gap:24px}
nav a{color:var(--light-muted);text-decoration:none;font-size:14px;padding-bottom:2px;border-bottom:2px solid transparent;transition:color .15s ease,border-color .15s ease}
nav a:hover,nav a:focus-visible,nav a[aria-current=page]{color:#fff;border-bottom-color:var(--orange)}

/* ============================================================
   Hero & page hero
   ============================================================ */
.page-hero{background:var(--navy);color:var(--light)}

.hero{background:var(--bg);color:var(--text);padding:96px 0}

.hero-stack{display:flex;flex-direction:column;gap:48px}

.hero-illustration{width:100%;height:auto;display:block;border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}

.hero-content{max-width:760px}

.hero .eyebrow{color:var(--blue-dark)}
.hero .eyebrow::before{content:"";display:inline-block;width:26px;height:2px;margin-right:10px;vertical-align:middle;border-radius:2px;background:var(--orange)}

.eyebrow{margin:0 0 14px;color:var(--orange);font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}

.hero h1,.page-hero h1{margin:0;max-width:850px;font-size:clamp(38px,5.2vw,58px);line-height:1.12;letter-spacing:-.02em}

.hero-copy{max-width:690px;margin:22px 0 0;color:var(--muted);font-size:19px}

.hero-tags{display:flex;flex-wrap:wrap;gap:10px;list-style:none;margin:26px 0 0;padding:0}
.hero-tags li{padding:6px 14px;border:1px solid var(--border);border-radius:999px;background:var(--card);color:var(--navy);font-family:var(--mono);font-size:12px;letter-spacing:.08em}
.hero-tags li:nth-child(1){border-color:var(--blue);color:var(--blue-dark)}
.hero-tags li:nth-child(2){border-color:var(--teal);color:var(--teal-dark)}
.hero-tags li:nth-child(3){border-color:var(--orange);color:var(--orange-dark)}
.hero-tags li:nth-child(4){border-color:var(--blue);color:var(--blue-dark)}

.actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:32px}

/* Buttons */
.button{
  display:inline-block;
  padding:13px 22px;
  border:1px solid transparent;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  transition:transform .15s ease,box-shadow .15s ease,background-color .15s ease,color .15s ease;
}
.button.primary{background:var(--blue);color:#fff;box-shadow:var(--shadow-sm)}
.button.primary:hover,.button.primary:focus-visible{background:var(--blue-dark);transform:translateY(-2px);box-shadow:var(--shadow-md)}
.button.secondary{border-color:var(--border);background:transparent;color:var(--text)}
.button.secondary:hover,.button.secondary:focus-visible{border-color:var(--teal);color:var(--teal-dark);transform:translateY(-2px)}

/* ============================================================
   Sections & cards
   ============================================================ */
.section{padding:88px 0}
.section.alt{background:var(--soft)}

.section-heading{max-width:720px;margin-bottom:38px}
.section h2{margin:0;font-size:clamp(30px,4vw,46px);line-height:1.12;letter-spacing:-.03em;color:var(--navy)}

.cards{display:grid;gap:22px}
.cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}

.card,.feature-card{
  border:1px solid var(--border);
  border-top:4px solid var(--blue);
  border-radius:var(--radius-md);
  background:var(--card);
  padding:32px;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease,box-shadow .15s ease;
}
.card:hover,.feature-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}

/* Cycle accent colors across cards for visual variety without touching markup */
.cards .card:nth-of-type(3n+2){border-top-color:var(--teal)}
.cards .card:nth-of-type(3n+3){border-top-color:var(--orange)}
.cards .card:nth-of-type(3n+2) .card-number{color:var(--teal-dark)}
.cards .card:nth-of-type(3n+3) .card-number{color:var(--orange-dark)}

.card-number,.tag{margin:0 0 18px;color:var(--blue);font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.14em}

.card-illustration{width:100%;height:auto;display:block;border-radius:var(--radius-sm);margin-bottom:18px}

/* Cap the Crosswalk illustration so it matches the book cover's visual size instead of filling the card column */
.showcase-grid .card-illustration{width:auto;max-width:200px;max-height:220px;object-fit:contain;margin:0 auto 18px}

.card h3,.feature-card h3{margin:0 0 12px;font-size:22px;line-height:1.2;color:var(--navy)}

.card p,.feature-card p:not(.tag),.feature-grid p,.content-grid p,.contact-grid p{color:var(--muted)}

.feature-section{background:var(--soft)}

.feature-grid,.content-grid,.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:70px}

.text-link{display:inline-block;margin-top:14px;color:var(--blue-dark);font-weight:700;text-decoration:none}
.text-link:hover,.text-link:focus-visible{text-decoration:underline;color:var(--teal-dark)}

.page-hero{padding:90px 0 80px}
.page-hero p:not(.eyebrow){max-width:720px;margin:26px 0 0;color:var(--light-muted);font-size:19px}

.feature-card{
  display:grid;
  grid-template-columns:minmax(160px,200px) minmax(0,1.3fr) minmax(200px,.8fr);
  gap:40px;
  align-items:center;
  background:var(--soft);
  border-top-color:var(--orange);
}
.feature-image{width:100%;height:auto;display:block;border-radius:var(--radius-md);box-shadow:var(--shadow-sm)}
.feature-actions{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}

/* ============================================================
   Technology Lab: hero, showcase, and note
   ============================================================ */
.lab-hero{background:var(--bg);color:var(--text);padding:72px 0 64px}
.lab-hero .eyebrow{color:var(--blue-dark)}
.lab-hero .eyebrow::before{content:"";display:inline-block;width:26px;height:2px;margin-right:10px;vertical-align:middle;border-radius:2px;background:var(--orange)}
.lab-hero h1{margin:0;font-size:clamp(30px,4vw,44px);line-height:1.15;letter-spacing:-.02em}
.lab-hero p:not(.eyebrow){max-width:680px;margin:20px 0 0;color:var(--muted);font-size:18px}

.lab-note{margin:26px 0 0;color:var(--muted);font-size:14px}
.lab-note .text-link{margin-top:0}

.showcase-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;align-items:start}

.book-feature{
  display:grid;
  grid-template-columns:minmax(150px,200px) minmax(0,1fr);
  gap:32px;
  align-items:center;
  border:1px solid var(--border);
  border-top:4px solid var(--teal);
  border-radius:var(--radius-md);
  background:var(--card);
  padding:32px;
  box-shadow:var(--shadow-sm);
}
.book-cover{width:100%;height:auto;display:block;border-radius:var(--radius-sm);box-shadow:var(--shadow-md)}
.book-feature-body h3{margin:0 0 12px;font-size:24px;line-height:1.2;color:var(--navy)}
.book-feature-body p:not(.tag){color:var(--muted)}

.ad-placeholder{
  margin:16px auto 56px;
  padding:18px;
  min-height:90px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed var(--border);
  border-radius:var(--radius-sm);
  color:var(--muted);
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

/* ============================================================
   Prose & contact
   ============================================================ */
.prose{max-width:700px}
.prose p{margin-top:0;margin-bottom:24px}

.email-link{display:inline-block;margin-top:14px;color:var(--blue-dark);font-size:22px;font-weight:700;text-decoration:none}
.email-link:hover,.email-link:focus-visible{color:var(--teal-dark)}

.contact-note{padding:28px;background:var(--card);border:1px solid var(--border);border-left:4px solid var(--teal);border-radius:var(--radius-md);box-shadow:var(--shadow-sm)}

/* ============================================================
   Closing & footer
   ============================================================ */
.closing{background:var(--navy);color:var(--light)}
.closing p:not(.eyebrow){color:var(--light-muted)}

footer{background:var(--navy-soft);color:var(--light-muted);padding:26px 0;font-size:13px;border-top:1px solid var(--border-dark)}
.footer-wrap{display:flex;justify-content:space-between;gap:20px}
.footer-wrap p{margin:0}

/* ============================================================
   Responsive
   ============================================================ */
@media(max-width:850px){
  .feature-grid,.content-grid,.contact-grid,.feature-card,.showcase-grid,.book-feature{grid-template-columns:1fr;gap:36px}
  .cards.three,.cards.four{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:620px){
  .container,.narrow{width:calc(100% - 28px)}
  .nav-wrap{align-items:flex-start;flex-direction:column;padding:18px 0}
  nav{flex-wrap:wrap;gap:14px}
  .hero{padding:64px 0}
  .hero-stack{gap:32px}
  .page-hero{padding:65px 0}
  .lab-hero{padding:56px 0 48px}
  .section{padding:64px 0}
  .cards.two,.cards.three,.cards.four{grid-template-columns:1fr}
  .book-cover{max-width:220px;margin:0 auto}
  .footer-wrap{flex-direction:column}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .button,.card,.feature-card,nav a{transition:none}
}
