/* We Make a Movie: shared styles for the main page and the advert pages */
:root {
  --yellow: #f2dc2e;
  --yellow-soft: #f5efc9;
  --ink: #161616;
  --grey: #555;
  --rule: #d4cfbd;
  --paper: #f8f4e8;
  --blue: #7fc3dc;
  --sans: "Questrial", "Gill Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Libre Baskerville", Baskerville, Georgia, serif;
  --school: "Andika", "Questrial", sans-serif;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.6;
  background-color: var(--paper);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Yellow band */
.band { background: var(--yellow); }
.band .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.badge { font-family: var(--sans); background: var(--ink); color: var(--yellow); font-size: 20px; line-height: 1; padding: 7px 18px 7px 10px;
  clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%); }
.band .series { font-family: var(--sans); font-size: 16px; }
.band .crew { height: 44px; width: auto; mix-blend-mode: multiply; margin-left: auto; }
.band .go { font-family: var(--sans); background: var(--ink); color: #fff; text-decoration: none; padding: 9px 16px; font-size: 15px; white-space: nowrap; }
@media (max-width: 560px) { .band .series { display: none; } .band .crew { height: 36px; } }

/* Hero */
.hero { padding: 26px 0 44px; }
.hero .grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .hero .grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } .hero { padding: 52px 0 70px; } }
.cover-shot { max-width: 400px; }
.cover-shot img { width: 100%; transform: rotate(-1.4deg); box-shadow: 7px 7px 0 rgba(22, 22, 22, .2); }
h1 { font-family: var(--sans); font-weight: normal; font-size: clamp(42px, 7vw, 70px); line-height: 1; margin: 0 0 10px; letter-spacing: -.015em; }
.byline { font-family: var(--sans); font-size: 19px; margin: 0 0 22px; }
.lead { font-size: 21px; line-height: 1.45; margin: 0 0 12px; }
.blurb { margin: 0 0 24px; max-width: 34em; }
.m-row { display: grid; grid-template-columns: 38% 1fr; gap: 18px; align-items: center; }
.m-row .cover-shot img { transform: none; box-shadow: 4px 4px 0 rgba(22, 22, 22, .2); }
.facts { font-family: var(--sans); font-size: 15px; line-height: 1.45; margin: 0; }
.facts p { margin: 0 0 8px; }
.facts .big { font-size: 26px; line-height: 1.1; margin-bottom: 4px; }

/* Buttons */
.buttons { max-width: 520px; }
.btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 12px 20px;
  font-family: var(--sans); font-size: 19px; text-decoration: none; cursor: pointer; border: 2px solid var(--ink); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
.btn.secondary { background: transparent; color: var(--ink); margin-top: 10px; }
.btn.secondary:hover { background: var(--yellow); }
.btn small { font-size: 13.5px; opacity: .75; display: block; }
.btn .price { font-size: 22px; white-space: nowrap; }
.after { font-family: var(--sans); font-size: 14.5px; color: var(--grey); margin: 12px 0 0; }
.warn { font-family: var(--sans); font-size: 15px; margin: 22px 0 0; max-width: 34em; }
.warn b { background: var(--yellow); font-weight: normal; padding: 1px 5px; }

/* Sections */
section.block { padding: 56px 0; }
section.tint { background-color: var(--yellow-soft); }
h2 { font-family: var(--sans); font-weight: normal; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; margin: 0 0 12px; letter-spacing: -.01em; }
.intro { max-width: 34em; margin: 0 0 30px; }
.intro p { margin: 0 0 14px; }

/* Look inside: three spreads in a row, swipe on phones, tap to enlarge */
.spreads { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 4px 16px 14px; scrollbar-width: none; }
.spreads::-webkit-scrollbar { display: none; }
.spreads button { all: unset; cursor: zoom-in; scroll-snap-align: start; display: block; }
.spreads img { width: 100%; border: 1px solid #c9c3ad; background: #fff; }
.spreads button:hover img { border-color: var(--ink); }
.spreads button:focus-visible img { outline: 3px solid var(--ink); }
.swipe { font-family: var(--sans); font-size: 14px; color: var(--grey); margin: 6px 0 0; }
@media (min-width: 760px) {
  .spreads { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 22px; }
  .swipe { display: none; }
}

dialog.zoom { border: 0; padding: 0; background: transparent; max-width: min(1300px, 96vw); width: 96vw; max-height: 96vh; overflow: auto; }
dialog.zoom::backdrop { background: rgba(20, 18, 12, .88); }
.zoom .close { position: sticky; top: 0; float: right; z-index: 2; font: 15px var(--sans); background: var(--ink); color: #fff; border: 0; padding: 10px 16px; cursor: pointer; }
.zoom .whole { width: 100%; background: #fff; }
.zoom .halves { display: none; }
@media (max-width: 759px) {
  dialog.zoom { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; background: #fff; }
  .zoom .whole { display: none; }
  .zoom .halves { display: block; }
  .zoom .half { width: 100%; aspect-ratio: 651 / 993; background-size: 200% 100%; background-repeat: no-repeat; }
  .zoom .half.l { background-position: left top; }
  .zoom .half.r { background-position: right top; }
}

/* Humans and AI */
.human .grid { display: grid; gap: 34px; }
@media (min-width: 900px) { .human .grid { grid-template-columns: 4fr 6fr; gap: 56px; align-items: start; } }
.human .intro { font-size: 18px; }
.human .last { font-family: var(--sans); font-size: 30px; margin: 6px 0 0; }
.pairs { display: grid; gap: 26px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.pair.three { grid-template-columns: 1fr 1fr 1fr; }
.pair figure { margin: 0; }
.pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pair.wide img { aspect-ratio: 4 / 3; }
figcaption { font-family: var(--sans); font-size: 14px; color: var(--grey); margin-top: 7px; }

/* Authors */
.authors { display: grid; gap: 36px; margin-top: 8px; }
@media (min-width: 800px) { .authors { grid-template-columns: 1fr 1fr; gap: 48px; } }
.author { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.author img { width: 120px; height: 150px; object-fit: cover; }
.author h3 { font-family: var(--sans); font-weight: normal; font-size: 23px; margin: 0 0 6px; }
.author p { margin: 0; font-size: 16px; }

/* Series shelf */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(7, 1fr); } }
.shelf a { text-decoration: none; font-family: var(--sans); font-size: 14px; line-height: 1.3; }
.shelf img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; margin-bottom: 6px; }
.shelf a:hover img { outline: 2px solid var(--ink); }
.shelf .ours img { object-position: top; outline: 3px solid var(--ink); outline-offset: 2px; }
.shelf .num { color: var(--grey); display: block; font-size: 13px; }
.more { font-family: var(--sans); margin-top: 22px; }

/* Questions */
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; max-width: 760px; }
.faq summary { font-family: var(--sans); font-size: 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 10px 0 2px; max-width: 640px; }

/* Final buttons */
.final .grid { display: grid; gap: 26px; align-items: center; }
@media (min-width: 860px) { .final .grid { grid-template-columns: 3fr 7fr; gap: 56px; } }
.final .cover-shot { max-width: 260px; }
@media (max-width: 859px) { .final .cover-shot { max-width: 170px; } }

/* A page of the book, set as text */
.page-quote { font-family: var(--school); font-size: clamp(22px, 3.2vw, 28px); line-height: 1.45; background: #fff; border: 1px solid #c9c3ad; padding: 26px 28px 16px; }
.page-quote p { margin: 0 0 14px; }
.page-quote .nw { border-top: 2px solid var(--blue); padding-top: 8px; margin-top: 20px; font-size: 14px; color: #555; display: flex; gap: 26px; }
.page-quote .nw::before { content: "new words"; color: #999; font-size: 11px; }

/* Footer */
footer { background: var(--ink); color: #cfcfcf; font-family: var(--sans); font-size: 14px; padding: 40px 0 110px; }
footer .wrap { display: grid; gap: 20px; }
@media (min-width: 760px) { footer .wrap { grid-template-columns: 2fr 1fr 1fr; } footer { padding-bottom: 44px; } }
footer a { color: #fff; }
footer h4 { font-weight: normal; font-size: 14px; color: #8d8d8d; margin: 0 0 6px; }
footer p { margin: 0 0 6px; }

/* Sticky buy bar on phones */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 2px solid var(--ink);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .2s ease; z-index: 20; }
.sticky.show { transform: none; }
.sticky img { width: 36px; height: auto; }
.sticky .t { font-family: var(--sans); font-size: 15px; line-height: 1.2; flex: 1; }
.sticky .t span { display: block; color: var(--grey); font-size: 13px; }
.sticky .btn { width: auto; min-height: 46px; font-size: 16px; padding: 8px 18px; }
@media (min-width: 860px) { .sticky { display: none; } }

/* Advert pages */
.lp-hero { padding: 24px 0 40px; }
.lp-hero .grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .lp-hero .grid { grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; } .lp-hero { padding: 48px 0 60px; } }
.lp-hero .spread img { width: 100%; border: 1px solid #c9c3ad; }
.duo { display: grid; max-width: 520px; }
.duo img { border: 1px solid #c9c3ad; border-top: 0; }
@media (min-width: 860px) { .duo { grid-template-columns: 1fr 1fr; max-width: 900px; } .duo img { border-top: 1px solid #c9c3ad; border-left: 0; height: 100%; object-fit: cover; } }
