/* Elderflower Books. One column, the book's own colours, very large type. */

@font-face {
  font-family: "Ubuntu";
  src: url("fonts/Ubuntu-Regular.woff2?v=71eec218") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu";
  src: url("fonts/Ubuntu-Bold.woff2?v=285dd192") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --green: #1f5d50;   /* the cover */
  --ink: #14352e;     /* text on paper */
  --paper: #fffdf7;
  --cream: #fff8e7;   /* the circle on the cover */
  --gold: #f6c445;    /* the band on the cover */
  --measure: 34rem;
}

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

html {
  font-size: 22px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Ubuntu", "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  line-height: 1.6;
}

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

p { margin: 0 0 1em; max-width: var(--measure); }

h1, h2 { font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }

.wrap { width: min(100% - 2.4rem, 66rem); margin-inline: auto; }

/* ---- masthead and hero: the cover, opened out ---- */

.masthead { background: var(--green); padding: 1.1rem 0 0; }
.masthead.solo { padding-bottom: 1.1rem; }
.imprint { color: var(--gold); font-weight: 700; font-size: 1.05rem; margin: 0; }

.hero { background: var(--green); color: #fff; padding: 2.2rem 0 4rem; }
.hero-grid { display: grid; gap: 2.4rem; align-items: center; }
.lead { font-size: 1.3rem; line-height: 1.45; color: var(--cream); max-width: 24rem; }

.soon, .buy {
  display: inline-block;
  margin: 0.6rem 0 0;
  padding: 0.7em 1.4em;
  border-radius: 0.6em;
  background: var(--gold);
  color: var(--green);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
/* Not for sale yet, so this is a plain notice and must not look like a button. */
.soon {
  background: none;
  border: 3px solid var(--gold);
  color: var(--gold);
  padding: 0.5em 1.1em;
}
.book .soon { border-color: var(--green); color: var(--green); }
.buy:hover { background: #ffd564; }
.back { color: var(--green); font-weight: 700; }
.buy:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }

.photo, .cover, .pages img {
  border: 4px solid var(--gold);
  border-radius: 6px;
  background: #fff;
}

/* ---- the sections ---- */

.band { padding: 4.2rem 0; }
.band + .band { border-top: 2px solid #e9e2cf; }

.intro { font-size: 1.1rem; }

.pages {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
.pages p { margin: 0.7rem 0 0; font-weight: 700; font-size: 1.15rem; }

.row { display: grid; gap: 2rem; align-items: center; }
.words > :last-child { margin-bottom: 0; }

.book { background: var(--cream); }
.cover { width: min(100%, 19rem); border-color: var(--green); }
.facts { margin: 0 0 1.4rem; padding: 0; list-style: none; }
.facts li {
  padding: 0.45em 0 0.45em 1.6em;
  position: relative;
  border-bottom: 2px solid #eadfbf;
  max-width: 24rem;
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 1em;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--green);
}

/* ---- the series: one wide photo, then the two books side by side ---- */

h3 { font-weight: 700; font-size: 1.45rem; line-height: 1.2; margin: 0 0 0.7rem; text-wrap: balance; }

.photo.wide { width: 100%; margin: 2.2rem 0 3rem; }

.books { list-style: none; margin: 0; padding: 0; display: grid; gap: 3.4rem; }
.books > li { display: grid; gap: 1.5rem; align-content: start; }
.books .cover { width: min(100%, 15rem); }
.cover.red { border-color: #8e1b1f; }
.cover.navy { border-color: #1f3a5f; }
.cover.plum { border-color: #6a2c5a; }
.note { margin: 2.6rem 0 0; }

/* ---- footer ---- */

.foot { background: var(--green); color: var(--cream); padding: 2.6rem 0 3rem; font-size: 0.85rem; }
.foot .imprint { margin-bottom: 0.8rem; font-size: 1.05rem; }
.foot p { max-width: 40rem; }

/* ---- wider screens ---- */

@media (min-width: 52rem) {
  .hero { padding: 3rem 0 5rem; }
  .hero-grid { grid-template-columns: 5fr 6fr; gap: 3.5rem; }
  .pages { grid-template-columns: repeat(3, 1fr); }
  .row { grid-template-columns: 6fr 5fr; gap: 3.5rem; }
  .row.flip > .photo { order: 2; }
  .row.flip { grid-template-columns: 5fr 6fr; }
  .book .row { grid-template-columns: 19rem 1fr; }
  .books { grid-template-columns: 1fr 1fr; gap: 3.4rem 3rem; }
  .books > li { grid-template-columns: 11rem 1fr; gap: 1.6rem; }
}

@media print {
  .hero, .masthead, .foot { background: none; color: var(--ink); }
}
