:root {
  --blue: #114986;
  --red: #fb0000;
  --gray: #eeeeee;
  --ink: #111111;
  --line: #dbdbdb;
  --heading: "Oswald", "Arial Narrow", sans-serif;
  --body: "Open Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--heading); font-weight: 400; }
p { margin: 0 0 14px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 10px; }
.container--wide { max-width: 1300px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font: 400 15px/1 var(--body);
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s;
}
.btn:hover { background: #d40000; }

/* Section titles: Oswald caps with the red dot behind the first letters */
.title {
  width: fit-content;
  margin: 0 auto;
  padding: 11px 25px;
  background: url("images/title-cir.png") left center / contain no-repeat;
  color: var(--ink);
  font-size: 36px;
  line-height: 1;
  text-transform: uppercase;
}
.title--left { margin-left: 0; }

/* Wavy edges between white and gray/blue bands */
.band { position: relative; }
.band--gray { background: var(--gray); }
.band > :not(.wave) { position: relative; z-index: 1; }
.wave {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--wave-h, 73px);
  background: center / var(--wave-w, 100%) 100% no-repeat;
  pointer-events: none;
}
.wave--top { top: -1px; background-image: url("images/wave-top.svg"); }
.wave--bottom { bottom: -1px; background-image: url("images/wave-bottom.svg"); }
.wave--flip { transform: scaleX(-1); }

/* Header */
.site-header { position: relative; z-index: 10; background: #fff; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 124px;
}
.logo img { width: 127px; }
.site-nav ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 7px 16px;
  color: var(--ink);
  font: 500 14px/20px var(--body);
  text-decoration: none;
}
.site-nav a:hover { color: var(--red); }
.site-nav .nav-buy a {
  margin-left: 16px;
  padding: 10px 25px;
  border-radius: 5px;
  background: #fe0000;
  color: #fff;
}
.site-nav .nav-buy a:hover { background: #d40000; color: #fff; }
.nav-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--red);
  cursor: pointer;
}
.nav-toggle svg { display: block; width: 26px; height: 26px; }

/* Hero */
.hero { background: var(--blue); color: #fff; padding-top: 120px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-text { padding: 10px; }
.hero-eyebrow { margin-bottom: 10px; font: 300 34px/0.9 var(--heading); text-transform: uppercase; }
.hero h1 { max-width: 620px; margin-bottom: 20px; font-size: 65px; line-height: 1.1; text-transform: uppercase; }
.hero-lede { max-width: 600px; margin-bottom: 30px; font-size: 21px; line-height: 1.5; }
.hero-media { display: flex; justify-content: center; padding: 10px; }
.hero-media img { width: 499px; margin-bottom: -60px; }

/* Where to buy */
.order { padding: 85px 0 0; }
.order .title { margin-bottom: 38px; }
.order--again { padding-top: 111px; }
.buy-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  max-width: 1042px;
  min-height: 184px;
  margin: 0 auto 120px;
  padding: 20px;
  border-radius: 20px;
  background: var(--gray);
}
.buy-box a { display: block; transition: transform 0.2s; }
.buy-box a:hover { transform: scale(1.05); }
.buy-bn { width: 131px; }
.buy-amazon { width: 174px; }
.buy-pp { width: 178px; }

/* Testimonials */
.readers { padding: 10px 0 80px; }
.readers .title { margin-bottom: 30px; }
.carousel { position: relative; max-width: 1300px; margin: 0 auto; padding: 0 40px; }
.carousel-track {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.testimonial {
  flex: 0 0 calc((100% - 68px) / 3);
  margin: 0;
  padding: 20px;
  scroll-snap-align: start;
}
.testimonial .stars { width: 95px; margin-bottom: 12px; }
.testimonial blockquote { margin: 0 0 24px; }
.testimonial blockquote p { margin: 0; }
.testimonial .testimonial-title { margin-bottom: 24px; font: 400 21px/1.5 var(--heading); }
.testimonial figcaption { font: italic 400 16px/1.5 var(--heading); }
.testimonial cite { display: block; font-style: italic; }
.carousel-btn {
  position: absolute;
  top: 50%;
  padding: 8px;
  border: 0;
  background: none;
  color: #000;
  cursor: pointer;
  transform: translateY(-50%);
}
.carousel-btn svg { display: block; width: 20px; height: 20px; }
.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }
.carousel-dots { display: flex; justify-content: center; gap: 2px; margin-top: 30px; }
.carousel-dots button {
  width: 16px;
  height: 16px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: #000 content-box;
  opacity: 0.2;
  cursor: pointer;
}
.carousel-dots button[aria-current="true"] { opacity: 1; }

/* How to use the book */
.how { padding: 140px 0 68px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.how-media { display: flex; justify-content: center; padding: 10px; }
.how-media img { width: 427px; box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.29); }
.how-text { padding: 20px 10px 10px; }
.how-text .title { margin-bottom: 26px; }
.how-text p { font-size: 15px; line-height: 1.5; }
.icon-list { margin: 20px 0 40px; padding: 0; list-style: none; }
.icon-list li { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
.icon-list img { width: 64px; }
.icon-list h3 { font-size: 26px; line-height: 1.2; }

/* Chapters */
.chapters-head { padding: 10px 0 39px; }
.chapters { padding: 20px 0 150px; }
.chapters-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 33px; max-width: 1100px; }
.chapter-list { margin: 0; padding: 0; list-style: none; }
.chapter { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 35px; }
.chapter img { flex: none; width: 69px; }
.chapter details { flex: 1; }
.chapter summary {
  position: relative;
  padding: 20px 30px 0 15px;
  font: 400 19px/1.15 var(--heading);
  list-style: none;
  cursor: pointer;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::after {
  content: "";
  position: absolute;
  top: 23px;
  right: 0;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
}
.chapter details[open] summary::after { background-size: 100% 2px, 2px 0; }
.chapter details p { margin: 0; padding: 15px; font-size: 15px; line-height: 1.5; }

/* Research */
.research { padding: 50px 0 45px; }
.research .title { margin-bottom: 60px; }
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; }
.research-grid img { width: 353px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.research-grid a:hover img { transform: translateY(-4px); }

/* Authors */
.authors { padding: 123px 0 152px; }
.authors .title { margin-bottom: 61px; }
.authors-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.author { display: flex; flex-direction: column; align-items: center; padding: 0 10px; text-align: center; }
.author img { width: 414px; margin-bottom: 20px; }
.author h3 { font-size: 32px; line-height: 1; }
.author-site { margin: 5px 0 29px; color: #cc3366; text-decoration: none; }
.author-site:hover { text-decoration: underline; }
.author details { width: 360px; max-width: 100%; text-align: left; }
.author summary {
  position: relative;
  padding: 15px 40px 15px 15px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font: 400 16px/1 var(--heading);
  list-style: none;
  cursor: pointer;
}
.author summary::-webkit-details-marker { display: none; }
.author summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}
.author details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.author-bio { padding: 15px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }

/* Videos */
.videos { padding: 71px 0 40px; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 61px 0 0;
}
.video-grid iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

/* Teaching and workshops */
.teaching { padding: 140px 0; }
.teaching-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.teaching-media { padding: 0 30px; }
.teaching-media img { width: 496px; margin: 0 auto; box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.29); }
.teaching-text { padding: 0 30px; }
.teaching-text .title { margin-bottom: 26px; }
.teaching-text p { font-size: 15px; line-height: 1.5; }
.teaching-text .btn { margin-top: 10px; }

/* Resources */
.resources { padding: 81px 0 0; }
.resources .title { margin-bottom: 29px; }
.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1120px; margin: 0 auto; }
.resource {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  margin: 15px;
  padding: 20px 10px;
  background: var(--blue);
  color: #fff;
  font: 400 24px/1 var(--heading);
  text-align: center;
  text-transform: uppercase;
}

/* Contact */
.contact { padding: 60px 0; background: var(--blue); color: #fff; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 677px; margin: 0 auto; }
.contact-author { padding: 10px; text-align: center; }
.contact-author + .contact-author { border-left: 1px solid #cacaca; }
.contact-author h2 { margin-bottom: 14px; font-size: 23px; line-height: 1; }
.social { display: flex; justify-content: center; gap: 16px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; transition: opacity 0.2s; }
.social a:hover { opacity: 0.85; }
.social svg { width: 22px; height: 22px; fill: #fff; }
.social .linkedin { background: #0077b5; }
.social .twitter { background: #1da1f2; }

.site-footer { padding: 21px 10px; background: var(--red); color: #fff; font: 300 13px/1.5 var(--body); text-align: center; }
.site-footer p { margin: 0; }

/* Tablet */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 0 16px; }
  .site-nav a { padding: 12px 24px; font-size: 16px; }
  .site-nav .nav-buy a { display: inline-block; margin: 8px 24px 0; }

  .hero h1 { font-size: 52px; }
  .testimonial { flex-basis: calc((100% - 34px) / 2); }
}

/* Phone */
@media (max-width: 767px) {
  .container { padding: 0 16px; }
  .site-header .container { min-height: 100px; }
  .logo img { width: 110px; }

  .title { font-size: 28px; background-size: auto 50px; background-position: left top; }

  .hero { padding: 40px 0 70px; text-align: center; }
  .hero-grid, .how-grid, .chapters-grid, .research-grid, .authors-grid, .teaching-grid, .video-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { order: -1; }
  .hero-media img { width: min(300px, 80%); margin-bottom: 30px; }
  .hero-eyebrow { font-size: 24px; }
  .hero h1 { font-size: 46px; line-height: 1.1; }
  .hero-lede { font-size: 18px; margin-left: auto; margin-right: auto; }
  .hero .wave { --wave-h: 50px !important; }

  .order, .order--again { padding-top: 60px; }
  .order .title { margin-bottom: 24px; }
  .buy-box { margin: 0 16px 80px; min-height: 0; padding: 20px 10px; gap: 10px; }

  .carousel { padding: 0 32px; }
  .carousel-track { gap: 10px; }
  .testimonial { flex-basis: 100%; padding: 10px; }
  .carousel-prev { left: 0; }
  .carousel-next { right: 0; }

  .how { padding: 90px 0 40px; }
  .how-media img { width: min(300px, 80%); }
  .how-text { padding: 30px 0 0; }

  .chapters { padding-bottom: 110px; }
  .chapter summary { font-size: 18px; }

  .research-grid { gap: 30px; }
  .research-grid img { width: min(300px, 100%); }

  .authors { padding: 90px 0 110px; }
  .authors .title { margin-bottom: 40px; }
  .authors-grid { gap: 50px; }

  .videos { padding: 60px 0 20px; }
  .video-grid { gap: 20px; padding: 30px 16px 0; }

  .teaching { padding: 100px 0; }
  .teaching-grid { gap: 30px; }
  .teaching-media { order: 1; padding: 0; }
  .teaching-text { padding: 0; }

  .resources { padding-top: 60px; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 8px; }
  .resource { margin: 8px; min-height: 110px; font-size: 18px; }

  .contact-grid { max-width: none; }
  .contact-author h2 { font-size: 20px; }
}
