/* Make IT Work — makeitworkbook.com
   Brand: navy + gold, matched to the book cover.
   Mobile-first. No build step.
*/

:root {
  --navy-deep: #0b1730;
  --navy: #13254a;
  --navy-mid: #1e3768;
  --gold: #e8a317;
  --gold-dark: #c4860a;
  --gold-soft: #f6d48a;
  --cream: #f7f3ea;
  --smoke: #eef1f6;
  --white: #ffffff;
  --ink: #1b2130;
  --muted: #5b6475;
  --line: #e3e7ee;
  --head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  --header-h: 68px;
  --wrap: 1120px;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(11, 23, 48, 0.08);
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

h1, h2, h3, h4 {
  font-family: var(--head);
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
  color: var(--navy-deep);
}

h1 { font-size: clamp(3rem, 12vw, 6.25rem); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
a:hover { color: var(--gold-dark); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--gold);
  color: var(--navy-deep);
  font-family: var(--head);
  font-weight: 800;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 4px;
}
.skip:focus { top: 12px; }

.eyebrow {
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  display: block;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--gold);
  margin-top: 10px;
}
.center { text-align: center; }
.center .eyebrow::after,
.eyebrow.center::after { margin-inline: auto; }
.section-intro {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 4px;
  border: 2px solid var(--gold);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  cursor: pointer;
  line-height: 1;
}
.btn:hover { color: inherit; }
.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--navy-deep);
}
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  color: var(--white);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.logo {
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
}
.logo:hover { color: var(--white); }
.logo span { color: var(--gold); }

#nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 8px;
  cursor: pointer;
  margin-right: -8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
#nav-toggle:focus-visible + .nav-toggle {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
#nav-toggle:checked + .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#nav-toggle:checked + .nav-toggle span:nth-child(2) { opacity: 0; }
#nav-toggle:checked + .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  padding: 12px 20px 20px;
}
#nav-toggle:checked ~ .site-nav { display: flex; }

.site-nav a {
  color: #d7deea;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 4px;
}
.site-nav a:hover { color: var(--gold); }
.site-nav .btn {
  margin-top: 8px;
  color: var(--navy-deep);
  padding: 0.8rem 1.2rem;
  align-self: flex-start;
}
.site-nav .btn:hover { color: var(--navy-deep); }

/* Hero */
#hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(1200px 600px at 75% 30%, #1e3768 0%, var(--navy) 45%, var(--navy-deep) 100%);
  padding: 48px 0 64px;
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
#hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-cover { order: -1; justify-self: center; width: min(100%, 260px); }
.hero-cover picture,
.hero-cover img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
#hero h1 { color: var(--white); margin-bottom: 0.15em; }
#hero h1 span { color: var(--gold); font-style: normal; }
.subtitle {
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: #e6ebf4;
  margin-bottom: 1.25rem;
  max-width: 34rem;
  line-height: 1.4;
}
.lede {
  font-size: 1.125rem;
  color: #c9d2e3;
  max-width: 36rem;
  margin-bottom: 1.75rem;
}
.hero-meta {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #9fb0cc;
}
.hero-meta strong { color: var(--white); font-weight: 600; }

/* Sections */
.section { padding: 72px 0; }

#inside { background: var(--white); }
.inside-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.inside-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.5rem;
  border-top: 4px solid var(--gold);
}
.inside-card .num {
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.4rem;
}
.inside-card h3 { margin-bottom: 0.4rem; }
.inside-card p { color: var(--muted); font-size: 1.02rem; }

#for { background: var(--cream); }
.for-grid {
  display: grid;
  gap: 1.25rem;
}
.for-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.for-card h3 { margin-bottom: 0.45rem; }
.for-card p { color: var(--muted); font-size: 1.02rem; }

#author { background: var(--white); }
.author-grid { display: grid; gap: 2rem; }
.rule {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  color: var(--navy-deep);
  line-height: 1.2;
  margin: 0 0 1.25rem;
}
.rule em {
  font-style: normal;
  color: var(--gold-dark);
}
.author-bio { font-size: 1.125rem; color: var(--ink); }
.author-bio p { margin-bottom: 1em; }
.awards {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.awards li {
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  background: var(--smoke);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  line-height: 1.35;
}

#praise { background: var(--smoke); }
.foreword {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 auto 2rem;
  max-width: 40rem;
}
.foreword strong { font-weight: 800; color: var(--navy-deep); }
.endorsers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.endorser {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem 1.25rem;
  border-top: 4px solid var(--gold);
  box-shadow: 0 4px 12px rgba(19, 37, 74, 0.06);
}
.endorser .name {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy-deep);
  margin: 0 0 0.2rem;
}
.endorser .title {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

#cta {
  background:
    radial-gradient(900px 500px at 30% 20%, #1e3768 0%, var(--navy) 50%, var(--navy-deep) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
#cta .wrap { position: relative; }
.cta-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.cta-cover { justify-self: center; width: min(100%, 200px); }
.cta-cover img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
#cta h2 { color: var(--white); }
#cta p { color: #c9d2e3; font-size: 1.125rem; max-width: 32rem; margin-bottom: 1.5rem; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #9fb0cc;
  padding: 2.5rem 0;
  border-top: 3px solid var(--gold);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}
.footer-rule {
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--white);
  margin: 0;
}
.footer-rule em { font-style: normal; color: var(--gold); }
.site-footer a { color: #d7deea; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--gold); }
.footer-meta { margin: 0; }

/* Buy fallback + 404 pages */
.simple-page {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: grid;
  place-items: center;
  padding: 64px 0;
  background: var(--cream);
  text-align: center;
}
.simple-page h1 { font-size: clamp(2rem, 6vw, 3rem); }
.simple-page p { color: var(--muted); margin-bottom: 1.5rem; }

@media (max-width: 719px) {
  #hero .btn-primary,
  #cta .btn-primary { width: 100%; }
}

/* Desktop */
@media (min-width: 720px) {
  .wrap { width: min(var(--wrap), calc(100% - 64px)); }
  .section { padding: 96px 0; }
  .inside-grid,
  .for-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .endorsers { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .awards { grid-template-columns: 1fr 1fr; }
  .hero-cover { width: min(100%, 300px); }
  .cta-grid {
    grid-template-columns: 200px 1fr;
    gap: 3rem;
  }
  .cta-cover { width: 200px; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    position: static;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .site-nav a { padding: 0; font-size: 0.875rem; }
  .site-nav .btn {
    margin-top: 0;
    padding: 0.65rem 1.1rem;
    font-size: 0.75rem;
    align-self: auto;
  }
  #nav-toggle:checked ~ .site-nav { display: flex; }

  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }
  .hero-cover {
    order: 0;
    width: min(100%, 340px);
    transform: rotate(2deg);
  }
  #hero {
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
    padding: 64px 0;
  }
  .endorsers { grid-template-columns: repeat(4, 1fr); }
  .author-grid { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: start; }
  .site-footer .wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-toggle span { transition: none; }
  .hero-cover { transform: none; }
}
