/* Trajectory landing page. Colours are sampled from the book cover. */

:root {
    --paper: #eceaf0;
    --ink: #262622;
    --pink: #f2b0cb;
    --lilac: #aba3b9;
    --light: #f4efec;

    --page: var(--paper);
    --text: var(--ink);
    --muted: #5b5560;
    --rule: rgba(38, 38, 34, 0.18);
    --plinth: var(--pink);

    --serif: 'Newsreader', Georgia, serif;
    --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --body: var(--serif);
    --measure: 34rem;
    --gutter: clamp(1.25rem, 5vw, 4rem);
    --section-pad: clamp(3.5rem, 8vw, 6.5rem);
}

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

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

body {
    background: var(--page);
    color: var(--text);
    font-family: var(--body);
    font-size: 1.1875rem;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

main { display: flex; flex-direction: column; }

.inner { max-width: 72rem; margin: 0 auto; }

h2 {
    font-family: var(--body);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

/* ---------- First screen ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }

.plinth { background: var(--plinth); display: grid; place-items: center; padding: clamp(2rem, 6vw, 5rem); }

.cover { width: min(100%, 25rem); transform: rotate(-2.5deg); box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.4), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.25); }

.pitch { align-self: center; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); max-width: 46rem; }

.headline {
    font-weight: 500;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.byline { margin: 1.75rem 0 2.25rem; font-size: 1.1875rem; font-weight: 400; line-height: 1.6; letter-spacing: 0; color: var(--muted); }

.signup label { display: block; margin-bottom: 0.6rem; font-size: 1rem; color: var(--muted); }
.signup-row { display: flex; gap: 0.5rem; max-width: 27rem; }

.signup input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.signup button {
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 4px;
    background: var(--ink);
    color: var(--light);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.signup button:hover { opacity: 0.85; }
.signup button:disabled { opacity: 0.55; cursor: default; }

.signup-msg { margin-top: 0.6rem; min-height: 1.4em; font-size: 0.95rem; }
.signup-msg.success { color: #1d7a3e; }
.signup-msg.error { color: #b3261e; }

/* ---------- Quotes ---------- */

.quotes { background: var(--ink); color: var(--light); padding: clamp(4rem, 10vw, 8rem) var(--gutter); }
.quotes .inner { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); max-width: 76rem; }

.quotes blockquote p {
    font-family: var(--sans);
    font-weight: 800;
    font-stretch: 80%;
    font-size: clamp(2.4rem, 7.2vw, 6.5rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-wrap: balance;
    max-width: 18ch;
    color: var(--pink);
}

.quotes blockquote + blockquote { justify-self: end; text-align: right; }
.quotes blockquote + blockquote p { font-size: clamp(2rem, 5.4vw, 4.75rem); max-width: 20ch; color: var(--lilac); }
.quotes footer { margin-top: 1rem; font-size: 1.05rem; }
.quotes cite { font-style: normal; font-weight: 600; }

/* ---------- People ---------- */

.people { padding: var(--section-pad) var(--gutter); }
.people .note { max-width: var(--measure); margin-bottom: 2.5rem; color: var(--muted); }
.people ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.75rem 2.5rem; }
.people li { font-size: 1.05rem; line-height: 1.45; }
.people strong { display: block; font-weight: 600; font-size: 1.1875rem; }
.people span { color: var(--muted); }

/* ---------- About the book, about the author ---------- */

.abouts { padding: var(--section-pad) var(--gutter); border-top: 1px solid var(--rule); }
.abouts .inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem clamp(2.5rem, 7vw, 6rem); }
.about p { max-width: var(--measure); }
.about p + p { margin-top: 1em; }

/* ---------- Narrow screens: one column ---------- */

@media (max-width: 52rem) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .cover { width: min(70%, 17rem); }
    .abouts .inner { grid-template-columns: 1fr; }
    .quotes blockquote + blockquote { justify-self: start; text-align: left; }
}

@media (max-width: 30rem) {
    .signup-row { flex-direction: column; }
}
