/* Economics for Real People: promo site styles.
   Look: the book's own cover. Ochre, cream and orange bands, a brick-red
   stripe, the three running figures, condensed light display type.
   Every colour, font and width is defined once, here. */

:root {
    /* colours, sampled from the cover */
    --ochre: #b4763f;
    --ochre-deep: #8f5a2c;
    --brick: #a7372c;
    --brick-deep: #842a21;
    --cream: #fbd9ab;
    --cream-pale: #fdf1e0;
    --paper: #fffaf3;
    --orange: #df812d;
    --ink: #231f20;
    --muted: #6b5a4c;
    --rule: #ecd3b2;
    --on-dark: #fff7ec;

    /* type */
    --display: "Barlow Condensed", "Myriad Pro Condensed", "Arial Narrow", sans-serif;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Source Sans 3", "Myriad Pro", "Helvetica Neue", Arial, sans-serif;
    --base-size: 1.125rem;

    /* geometry */
    --page-width: 68rem;
    --text-width: 40rem;
    --stripe: clamp(1.25rem, 6vw, 5.5rem);   /* the brick-red band at the right edge */
    --pad-x: clamp(1.25rem, 5vw, 3.5rem);
    --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
    margin: 0;
    font-family: var(--serif);
    font-size: var(--base-size);
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brick-deep); }

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

.wrap {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ---------- top navigation ---------- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
}
.topnav .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.5rem;
    min-height: 3.25rem;
}
.topnav a { color: var(--on-dark); text-decoration: none; }
.topnav a:hover { color: var(--cream); text-decoration: underline; }
.topnav .brand {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-right: auto;
}

/* ---------- hero: the cover's colour bands ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom,
        var(--ochre) 0 38%, var(--cream) 38% 82%, var(--orange) 82% 100%);
}
.hero::after {   /* brick stripe down the right edge */
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: var(--stripe);
    background: var(--brick);
}
.hero .wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem 3.5rem;
    align-items: center;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    padding-right: calc(var(--pad-x) + var(--stripe));
}
.hero .runners { width: min(18rem, 60%); display: block; margin-bottom: 1.5rem; }
.hero h1 {
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    line-height: 0.95;
    margin: 0;
}
.hero .subtitle {
    font-family: var(--sans);
    font-style: italic;
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    margin: 0.6rem 0 0;
}
.hero .author {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 1.75rem 0 0;
}
.hero .cover {
    width: 16.5rem;
    box-shadow: 0 0.75rem 2rem rgba(35, 31, 32, 0.35);
    border-radius: var(--radius);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
    font-family: var(--sans);
}
.button {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    color: var(--ink);
    background: transparent;
    font-weight: 600;
    text-decoration: none;
}
.button:hover { background: var(--ink); color: var(--on-dark); }
.button.primary { background: var(--brick); border-color: var(--brick); color: var(--on-dark); }
.button.primary:hover { background: var(--brick-deep); border-color: var(--brick-deep); }

/* ---------- sections ---------- */
section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--rule); }
section.tinted { background: var(--cream-pale); }

h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin: 0 0 1.5rem;
}
h2::before {   /* small brick bar, echoing the cover stripe */
    content: "";
    display: block;
    width: 2.5rem;
    height: 0.3rem;
    margin-bottom: 0.75rem;
    background: var(--brick);
}
h3 {
    font-family: var(--sans);
    font-size: 1.15rem;
    margin: 2rem 0 0.5rem;
}

.prose { max-width: var(--text-width); }
.lede { font-size: 1.25rem; }
.small { font-size: 0.95rem; color: var(--muted); }

/* ---------- epigraph ---------- */
.epigraph {
    max-width: 46rem;
    margin: 0 auto;
    text-align: center;
    font-style: italic;
    font-size: 1.15rem;
}
.epigraph cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.95rem;
    color: var(--muted);
}

/* ---------- praise ---------- */
.praise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.5rem;
}
.praise blockquote {
    margin: 0;
    padding: 1.4rem 1.5rem;
    background: var(--paper);
    border-left: 0.35rem solid var(--ochre);
    border-radius: var(--radius);
}
.praise blockquote p { margin: 0; }
.praise footer {
    margin-top: 0.9rem;
    font-family: var(--sans);
    font-size: 0.95rem;
}
.praise footer .affil { color: var(--muted); }
.praise blockquote.featured {
    grid-column: 1 / -1;
    border-left-color: var(--brick);
    font-size: 1.25rem;
}

/* ---------- back-cover quotes ---------- */
.pullquotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 0;
}
.pullquotes blockquote {
    margin: 0;
    font-family: var(--sans);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--ochre-deep);
}

/* ---------- contents ---------- */
.contents { columns: 2 22rem; column-gap: 3rem; }
.part { break-inside: avoid-column; margin-bottom: 1.75rem; }
.part h3 {
    margin: 0 0 0.6rem;
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.45rem;
    color: var(--brick);
}
.part ol { list-style: none; margin: 0; padding: 0; }
.part li { margin: 0 0 0.7rem; break-inside: avoid; }
.part .num {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.part li a { font-weight: 600; }
.part .about { display: block; font-size: 0.98rem; color: var(--muted); }

/* ---------- links lists ---------- */
.linklist { list-style: none; padding: 0; margin: 0; }
.linklist li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.linklist .meta { display: block; font-family: var(--sans); font-size: 0.92rem; color: var(--muted); }

.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2rem 3.5rem;
}

/* ---------- interview page ---------- */
.qa dt {
    font-family: var(--sans);
    font-weight: 700;
    margin-top: 2rem;
}
.qa dd { margin: 0.6rem 0 0; }
.qa dd p { margin: 0 0 1rem; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--ink);
    color: var(--on-dark);
    font-family: var(--sans);
    font-size: 0.95rem;
    padding: 2.5rem 0;
}
.site-footer a { color: var(--cream); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer img { width: 6rem; }

/* ---------- narrow screens ---------- */
@media (max-width: 44rem) {
    .hero { background: linear-gradient(to bottom,
        var(--ochre) 0 22%, var(--cream) 22% 88%, var(--orange) 88% 100%); }
    .hero .wrap { grid-template-columns: 1fr; }
    .hero .cover { width: 11rem; }
    .topnav .brand { width: 100%; }
}
