/* robertweller.me — site styles
   Colours taken from the cover: --ink = cover background, --accent = cover subtitle tan.
   --copper-text is a darker tan for small text on light backgrounds (contrast 5:1). */

@font-face { font-family: "Charter Web"; src: url("../fonts/charter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Charter Web"; src: url("../fonts/charter-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Charter Web"; src: url("../fonts/charter-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Charter Web"; src: url("../fonts/charter-bolditalic.woff") format("woff"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --ink: #15161A;
  --accent: #C99D82;
  --copper-text: #8A5F45;
  --text: #1C1D21;
  --text-2: #33353B;
  --muted: #55575D;
  --ground: #F6F4EF;
  --paper: #FFFFFF;
  --rule: #D9D4CA;
  --gutter: clamp(20px, 6vw, 120px);
  --section: clamp(64px, 8vw, 104px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: "Charter Web", XCharter, Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
}
h1, h2, h3, p { margin: 0; }
body > main { flex: 1 0 auto; }
body > .site-header, body > .site-footer { flex-shrink: 0; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--copper-text); }
em { font-style: italic; }

.wrap { max-width: var(--max); margin-inline: auto; }
.band { padding: var(--section) var(--gutter); }
.band--paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band--ink { background: var(--ink); color: #FFFFFF; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-text); }
.rule-accent { width: 64px; height: 3px; background: var(--accent); }
h2 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.15; font-weight: 700; color: var(--ink); text-wrap: balance; }
.band--ink h2 { color: #FFFFFF; }
.stack { display: flex; flex-direction: column; }
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(32px, 6.2vw, 80px); }
.split > * { min-width: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); padding: 22px var(--gutter); }
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 24px; }
.site-header .name { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }

/* Hero */
.hero { padding: clamp(56px, 7vw, 88px) var(--gutter) clamp(64px, 7.5vw, 96px); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(48px, 5.6vw, 72px); }
.hero-copy { flex: 3 1 460px; min-width: 0; gap: 24px; }
.hero h1 { font-size: clamp(38px, 4.8vw, 60px); line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.hero .lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.byline { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; }

/* Signup form */
.signup { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; width: 100%; }
.signup label { font-size: 15px; font-weight: 700; }
.signup .row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] {
  flex: 999 1 240px; min-width: 0; height: 56px; padding: 0 16px;
  border: 1.5px solid var(--text); border-radius: 3px; background: var(--paper);
  font: inherit; font-size: 18px; color: var(--text);
}
.signup input[type="email"]::placeholder { color: #6B7280; }
.signup input[type="email"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--ink); }
.signup button {
  flex: 1 1 auto; height: 56px; padding: 0 26px; border: 0; border-radius: 3px;
  background: var(--accent); color: var(--ink); font: inherit; font-size: 18px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.signup button:hover { background: #D6B19A; }
.signup button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.signup .consent { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Hero visual: cover placeholder + worksheet, scales as one picture */
.hero-visual { flex: 2 1 320px; min-width: 0; }
.cluster { position: relative; width: 100%; max-width: 460px; aspect-ratio: 460 / 500; margin-inline: auto; container-type: inline-size; }
.sheet {
  position: absolute; left: 32.6%; top: 12%; width: 65.2%; aspect-ratio: 300 / 424;
  background: var(--paper); border: 1px solid #C9C3B8; box-shadow: 0 10px 30px rgba(21,22,26,0.10);
  padding: 4.8cqi; display: flex; flex-direction: column; gap: 1.7cqi; transform: rotate(3deg);
}
.sheet .k { font-size: 2cqi; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-text); }
.sheet .t { font-size: 5.65cqi; font-weight: 700; line-height: 1.05; }
.sheet .m { border-top: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); padding: 1.1cqi 0; font-size: 2.4cqi; line-height: 1.3; font-weight: 700; text-align: center; }
.sheet .boxes { display: grid; grid-template-columns: 2fr 3fr; gap: 1.3cqi; margin-top: 1.3cqi; }
.sheet .box { height: 25.6cqi; padding: 1.1cqi; display: flex; flex-direction: column; gap: 2cqi; border: 1px solid var(--text); }
.sheet .box.forbids { border: 1.5px solid var(--copper-text); gap: 3cqi; }
.sheet .box b { font-size: 1.6cqi; line-height: 1.2; }
.sheet .box.forbids b { color: var(--copper-text); }
.sheet .box i { display: block; border-bottom: 1px solid #C9C5BD; }
.sheet .lines { display: flex; flex-direction: column; gap: 1.1cqi; margin-top: 1.7cqi; }
.sheet .lines i { display: block; height: 1.1cqi; background: var(--rule); }
.cover {
  position: absolute; left: 4.3%; top: 4%; width: 65.2%; height: auto; display: block;
  box-shadow: 0 16px 40px rgba(21,22,26,0.28);
}

/* Problem */
.problem .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: clamp(40px, 6.2vw, 80px); align-items: start; }
.quote { font-size: clamp(26px, 2.7vw, 34px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.source { font-size: 16px; color: var(--muted); }

/* Offer cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.card { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: clamp(24px, 2.5vw, 32px) clamp(22px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.card .num { font-size: 15px; font-weight: 700; color: var(--copper-text); }
.card h3 { font-size: clamp(21px, 1.9vw, 24px); line-height: 1.2; }
.card p { font-size: 17px; color: var(--text-2); }

/* Test steps */
.steps { border-top: 1px solid var(--text); margin: 0; padding: 0; }
.steps li { display: flex; gap: clamp(16px, 1.9vw, 24px); padding: 22px 0; border-bottom: 1px solid var(--rule); list-style: none; }
.steps .n { font-size: 28px; font-weight: 700; color: var(--copper-text); min-width: 28px; line-height: 1.1; }

/* Book */
.band--ink .big { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; text-wrap: pretty; }
.band--ink .soft { color: #E4E0D6; text-wrap: pretty; }

/* Author */
.photo { flex: 0 1 280px; max-width: 100%; aspect-ratio: 560 / 680; background: #E8E4DB; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Closing form */
.closing .wrap { max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.closing h2 { font-size: clamp(32px, 3.5vw, 44px); text-align: center; }
.closing .intro { text-align: center; color: var(--text-2); text-wrap: pretty; }

/* Footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--rule); padding: 28px var(--gutter); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* Thank-you page */
.thanks { display: flex; align-items: center; }
.thanks .wrap { max-width: 640px; gap: 22px; }
.thanks h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.1; color: var(--ink); text-wrap: balance; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Legal pages (imprint, privacy) */
.legal .wrap { max-width: 760px; gap: 18px; }
.legal h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.1; color: var(--ink); }
.legal h2 { font-size: clamp(22px, 2.2vw, 26px); margin-top: 22px; }
.legal h3 { font-size: 19px; margin-top: 8px; }
.legal p, .legal li { text-wrap: pretty; }
.legal ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.legal address { font-style: normal; }
.legal .updated { font-size: 15px; color: var(--muted); }
.todo { background: #FFF3C4; padding: 0 4px; }

/* Download page */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.download { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: clamp(24px, 2.5vw, 32px) clamp(22px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.download h3 { font-size: clamp(21px, 1.9vw, 24px); line-height: 1.2; }
.download p { font-size: 17px; color: var(--text-2); }
.download .meta { font-size: 15px; color: var(--muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  min-height: 52px; padding: 0 24px; border-radius: 3px; background: var(--accent); color: var(--ink);
  font-size: 17px; font-weight: 700; text-decoration: none; margin-top: auto;
}
.button:hover { color: var(--ink); background: #D6B19A; }
.button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.next { max-width: 760px; gap: 18px; }
