/* Welcome Home Books — palette, type and motifs taken from Welcome Home to Texas */
:root {
  --paper: #f6efdd;
  --paper-light: #fcf5e3;
  --tan: #ede0c2;
  --navy: #1e2f5e;
  --navy-deep: #09395d;
  --red: #a5301c;
  --green: #5b7d4e;
  --gold: #b9772a;
  --ink: #2a2a33;
  --slab-x: "Alfa Slab One", "Rockwell Extra Bold", Rockwell, "Rokkitt", serif;
  --slab: "Rokkitt", Rockwell, "Courier Bold", serif;
  --body: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--red); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--navy);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
.wordmark {
  font-family: var(--slab-x); font-size: 21px; letter-spacing: .02em;
  color: var(--red); text-decoration: none; white-space: nowrap;
}
.wordmark .star { color: var(--navy); font-size: .7em; vertical-align: .15em; margin: 0 .25em; }
.wordmark span.b { color: var(--navy); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 22px; }
nav.main a {
  font-family: var(--slab); font-weight: 700; font-size: 17px;
  text-decoration: none; color: var(--navy);
}
nav.main a:hover { color: var(--red); }

/* ---------- headings, with the book's rule-and-star ---------- */
h1, h2, h3 { font-family: var(--slab-x); font-weight: 400; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 66px); color: var(--navy-deep); letter-spacing: .01em; }
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: clamp(30px, 4vw, 42px); color: var(--red); }
h3 { font-family: var(--slab); font-weight: 800; font-size: 23px; color: var(--navy); }

.rule {
  display: flex; align-items: center; margin: 10px 0 26px;
  color: var(--red); font-size: 20px; line-height: 1;
}
.rule::before { content: ""; flex: 1; height: 2px; background: var(--navy); }
.rule::after { content: "★"; margin-left: 4px; }
.rule.green { color: var(--green); }
.rule.green::before { background: var(--green); }

.kicker {
  font-family: var(--slab); font-weight: 700; font-size: 16px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green);
  margin: 0 0 8px;
}
.lede { font-size: 22px; line-height: 1.5; }
.lede i { color: var(--navy); }
b.lead { font-family: var(--slab); font-weight: 800; color: var(--navy); font-size: 1.06em; }

section { padding: 72px 0; }
section.tight { padding-top: 24px; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.hero p.lede { margin: 22px 0 30px; max-width: 30em; }
.dots { color: var(--red); letter-spacing: .6em; font-size: 12px; margin: 18px 0 0; }
.dots span:nth-child(2) { color: var(--navy); }

.cover-stage { position: relative; padding: 10px 30px 84px 10px; }
.cover {
  width: 100%; max-width: 380px; margin-left: auto;
  border-radius: 2px 5px 5px 2px;
  box-shadow: -1px 0 0 #d9cdb0, 14px 16px 0 var(--tan), 14px 16px 0 1px var(--navy);
  transform: rotate(1.5deg);
}
.note {
  font-family: var(--hand); color: var(--gold); font-size: 18px; line-height: 1.25;
  position: absolute; max-width: 9.5em;
}
.note.n2 { right: 30px; bottom: 0; max-width: 16em; transform: rotate(-2deg); text-align: right; }

.btn {
  display: inline-block; font-family: var(--slab); font-weight: 800; font-size: 20px;
  text-decoration: none; padding: 12px 24px 11px; border: 2px solid var(--navy);
  background: var(--red); color: var(--paper-light); box-shadow: 4px 4px 0 var(--navy);
}
.btn:hover { color: #fff; transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; margin-left: 12px; }
.btn.ghost:hover { color: var(--red); border-color: var(--red); transform: none; }

/* ---------- fact boxes (from the Fun Facts pages) ---------- */
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.boxes.two { grid-template-columns: repeat(2, 1fr); }
.box {
  background: var(--tan); border: 1px solid var(--navy);
  padding: 16px 18px 18px; font-size: 18px; line-height: 1.45;
}
.box.white { background: #fff; }
.box p { margin: 0; }
.box p + p { margin-top: .6em; }

/* ---------- inside the book ---------- */
.inside { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { padding: 12px 0; border-bottom: 1px dotted var(--navy); }
.toc li:first-child { padding-top: 0; }
.toc .t { font-family: var(--slab); font-weight: 800; font-size: 22px; color: var(--red); display: block; }
.toc .d { font-size: 17.5px; }

.pages { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pages figure, .spread { margin: 0; }
.pages img, .spread img {
  border: 1px solid #cfc3a4; box-shadow: 5px 6px 0 var(--tan);
}
.pages figure:nth-child(odd) { transform: rotate(-1deg); }
.pages figure:nth-child(even) { transform: rotate(.8deg); margin-top: 26px; }
figcaption { font-style: italic; font-size: 15.5px; margin-top: 12px; color: #4a4a55; }
.spread { margin-top: 56px; }
.spread figcaption { text-align: center; }

/* ---------- numbered steps (the map's region circles) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 48px; }
.steps li { counter-increment: s; position: relative; padding-left: 58px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: var(--paper-light);
  font-family: var(--slab-x); font-size: 20px; line-height: 40px; text-align: center;
}
.steps li:nth-child(3n+2)::before { background: var(--navy); }
.steps li:nth-child(3n)::before { background: var(--gold); }
.steps h3 { margin-bottom: 4px; padding-top: 6px; }
.steps p { margin: 0; font-size: 18px; }

/* ---------- who we are ---------- */
.bios { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; margin-top: 34px; }
.bio { display: flex; gap: 20px; align-items: flex-start; }
.bio p { margin: 6px 0 0; font-size: 18px; }
.mono {
  flex: 0 0 76px; height: 76px; border-radius: 50%;
  background: var(--navy); color: var(--paper-light); border: 3px double var(--paper-light);
  outline: 1px solid var(--navy);
  font-family: var(--slab-x); font-size: 24px; line-height: 70px; text-align: center; letter-spacing: .04em;
}
.mono.alt { background: var(--red); outline-color: var(--red); }

/* ---------- edition band ---------- */
.band { background: var(--tan); border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); }
.edition { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.checks li::before { content: "★"; color: var(--red); position: absolute; left: 0; top: 0; }
.specs { width: 100%; border-collapse: collapse; background: var(--paper-light); border: 1px solid var(--navy); font-size: 17.5px; }
.specs caption { font-family: var(--slab); font-weight: 800; font-size: 21px; color: var(--navy); text-align: left; padding-bottom: 8px; }
.specs th, .specs td { text-align: left; padding: 9px 14px; border-bottom: 1px dotted var(--navy); vertical-align: top; }
.specs th { font-family: var(--slab); font-weight: 700; color: var(--red); white-space: nowrap; width: 34%; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

/* ---------- contact + landscape footer (the back cover) ---------- */
.contact { text-align: center; padding-bottom: 0; }
.contact h2 { color: var(--red); }
.contact .rule { max-width: 420px; margin-left: auto; margin-right: auto; }
.contact .rule::before { margin-left: 24px; }
.contact p.lede { max-width: 30em; margin: 0 auto 28px; }
.landscape {
  height: clamp(260px, 42vw, 520px); margin-top: 40px;
  background:
    linear-gradient(to bottom, var(--paper) 0%, rgba(246,239,221,.85) 18%, rgba(246,239,221,0) 48%),
    url("img/texas-landscape.jpg") center bottom / cover no-repeat;
}
footer {
  background: var(--navy-deep); color: #e9dfc6; font-size: 15.5px; padding: 22px 0;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
footer a { color: #e9dfc6; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  body { font-size: 18px; }
  section { padding: 52px 0; }
  .hero .wrap, .inside, .edition { grid-template-columns: 1fr; gap: 40px; }
  .cover { margin: 0 auto; max-width: 300px; }
  .cover-stage { padding: 0 20px 84px; }
  .note.n2 { right: 0; left: 0; margin: 0 auto; text-align: center; }
  .boxes, .boxes.two, .steps, .bios { grid-template-columns: 1fr; }
  nav.main { display: none; }
  .btn.ghost { margin: 14px 0 0; }
}
