/* bitranchpress.com — from the Penpot "Home v2 — anti-slop" boards, 2026-10-21. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-roman.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
/* Inter Tight, variable weight, Latin subset (from @fontsource-variable/inter-tight). The
   subset has no U+2192, so the bar's arrow falls back to the next face in --sans. */
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #173523;       /* bar, hero, button */
  --green-hover: #22482F;
  --green-deep: #0F2418;  /* footer */
  --cream: #E9EDE6;       /* text on green */
  --brass: #C98A45;       /* 4.59:1 on green */
  --dim: #8F9D8F;         /* secondary text on green, 4.71:1; stays well under cream */
  --paper: #F4F1EA;
  --paper-light: #FDFCF9; /* signup band */
  --text: #1B241E;
  --muted: #4A5A4A;
  --rule: #D8D3C8;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --gutter: 96px;
  --max: 1440px;

  /* dj-* components: square, green, matched to the design */
  --dj-color-primary-600: var(--green);       /* dj-button at rest */
  --dj-color-primary-500: var(--green-hover); /* dj-button hover */
  --dj-input-border-radius-medium: 0;
  --dj-input-height-medium: 54px; /* + 1px border top and bottom = 56, the button's height */
  --dj-input-font-family: var(--sans);
  --dj-color-border: var(--rule);
  --dj-color-background: #FFFFFF;
  --dj-focus-ring-color: var(--brass);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  font-kerning: normal;
  /* Keeps the footer at the bottom on short pages (404, privacy on tall screens). */
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }

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

/* Bar */
.bar { background: var(--green); font-family: var(--sans); color: var(--cream); }
.bar__inner { display: flex; justify-content: space-between; align-items: center; height: 66px; }
.wordmark {
  text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: 0.23em; text-transform: uppercase;
}
.bar__cta { font-size: 15px; font-weight: 500; text-decoration: none; }
.bar__cta:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { background: var(--green); color: var(--cream); }
.hero__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 96px; padding-block: 88px 104px; }
.eyebrow { font-family: var(--sans); color: var(--brass); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.2; }
.hook { font-weight: 400; font-size: clamp(48px, 5.85vw, 84px); line-height: 1.08; padding: 26px 0 36px; }
.hook span { display: block; }
.title { color: var(--brass); font-size: 40px; font-style: italic; font-weight: 500; line-height: 1.4; }
.title cite { font-style: inherit; }
.subtitle { font-size: 24px; line-height: 1.3; margin-bottom: 14px; }
.byline { font-family: var(--sans); color: var(--dim); font-size: 16px; line-height: 1.6; }
.cover, .cover-slot { width: 360px; flex: none; }
.cover { box-shadow: 0 18px 48px rgba(0,0,0,.45); }
.cover-slot {
  aspect-ratio: 2 / 3; border: 1px solid var(--rule);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px;
  font-family: var(--sans); text-align: center;
}
.cover-slot__title { font-size: 13px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; }
.cover-slot__note { color: var(--dim); font-size: 14px; }

/* Signup */
.signup { background: var(--paper-light); }
.signup__inner { display: flex; justify-content: space-between; align-items: center; gap: 80px; padding-block: 72px; }
.signup h2 { font-size: 40px; font-weight: 500; line-height: 1.15; margin-bottom: 14px; }
.signup__copy p { font-family: var(--sans); color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 520px; }
.signup__form { flex: none; }
.signup__row { display: flex; }
.signup__row dj-email-input { width: 360px; --dj-color-text-muted: #A3ABA3; }
/* label-hidden keeps the label for screen readers but still reserves its row; take it out of
   flow so the control lines up with the button. The helper-text part is where the component
   prints its own validation error. signup.js reports errors in .signup__note (role=status)
   instead, so the component's copy is hidden rather than left to overlap the button. */
.signup__row dj-email-input::part(label) { position: absolute; }
.signup__row dj-email-input::part(helper-text) { display: none; }
.signup__row dj-button::part(base) {
  height: 56px; width: 210px; padding: 0 24px; border-radius: 0;
  font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--cream);
}
.signup__note { margin-top: 12px; font-family: var(--sans); font-size: 12px; line-height: 1.4; color: var(--muted); }
.signup__note[data-state="ok"] { color: var(--text); font-size: 15px; }
.signup__note[data-state="error"] { color: #9A2B1F; font-size: 15px; }

/* The book */
.book { padding-block: 96px 40px; }
.standfirst { font-size: 28px; font-style: italic; font-weight: 400; line-height: 1.35; max-width: 600px; }
.prose { max-width: 700px; margin-top: 36px; }
.prose p { font-size: 20px; line-height: 1.65; }
.prose p + p { margin-top: 24px; }
.again { max-width: 700px; margin-top: 36px; font-family: var(--sans); font-size: 17px; color: var(--muted); }
.again a { color: var(--green); font-weight: 600; text-underline-offset: 4px; }

/* The author */
.author { display: flex; gap: 56px; align-items: flex-start; padding-block: 88px 96px; }
.author__photo { width: 180px; height: 180px; flex: none; object-fit: cover; }
.author__text { max-width: 700px; }
.label { font-family: var(--sans); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.2; }
.author h3 { margin-top: 18px; font-size: 26px; font-weight: 500; line-height: 1.2; }
.author p { margin-top: 18px; font-size: 19px; line-height: 1.6; }

/* Footer */
.foot { background: var(--green-deep); color: var(--dim); font-family: var(--sans); font-size: 13px; }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 30px; }
.foot a { color: inherit; }

/* Plain pages (privacy, 404) */
.page { max-width: 760px; padding-block: 96px 112px; }
.page h1 { font-size: 44px; font-weight: 500; line-height: 1.15; margin-bottom: 32px; }
.page h2 { font-size: 26px; font-weight: 500; margin: 40px 0 10px; }
.page p + p, .page ul { margin-top: 16px; }

/* Chapter one downloads */
.downloads { list-style: none; padding: 0; margin: 32px 0; display: flex; flex-wrap: wrap; gap: 16px; }
.downloads a {
  display: block; padding: 16px 28px; background: var(--green); color: var(--cream);
  font-family: var(--sans); font-size: 16px; font-weight: 600; text-decoration: none;
}
.downloads a:hover { background: var(--green-hover); }
.downloads a:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.downloads small { display: block; font-size: 13px; font-weight: 400; color: var(--cream); margin-top: 2px; }

/* Narrow screens — matches the 390 phone board */
@media (max-width: 900px) {
  :root { --gutter: 24px; --dj-input-height-medium: 50px; }
  .bar__inner { height: 56px; }
  .wordmark { font-size: 11px; }
  .bar__cta { font-size: 13px; }
  .hero__inner { flex-direction: column; align-items: flex-start; gap: 32px; padding-block: 44px 56px; }
  .eyebrow { font-size: 10px; }
  .hook { font-size: 40px; line-height: 1.1; padding: 18px 0 28px; }
  .title { font-size: 26px; line-height: 1.2; }
  .subtitle { font-size: 18px; margin: 4px 0 10px; }
  .byline { font-size: 13px; }
  .cover, .cover-slot { width: 240px; }
  .cover-slot__title { font-size: 11px; }
  .cover-slot__note { font-size: 12px; }
  .signup__inner { flex-direction: column; align-items: stretch; gap: 14px; padding-block: 40px; }
  .signup h2 { font-size: 28px; line-height: 1.2; }
  .signup__copy p { font-size: 14px; }
  .signup__row { flex-direction: column; gap: 14px; }
  .signup__row dj-email-input { width: 100%; }
  .signup__row dj-button::part(base) { width: 100%; height: 52px; font-size: 14px; }
  .signup__note { margin-top: 14px; font-size: 11px; }
  .book { padding-block: 56px 0; }
  .standfirst { font-size: 20px; line-height: 1.4; }
  .prose { margin-top: 28px; }
  .prose p { font-size: 16px; line-height: 1.6; }
  .prose p + p { margin-top: 18px; }
  .again { margin-top: 28px; font-size: 14px; }
  .downloads { flex-direction: column; }
  .author { flex-direction: column; gap: 16px; padding-block: 48px 56px; }
  /* Phone order is label, photo, name, bio: flatten the text column into the flex column. */
  .author__text { display: contents; }
  .author .label { order: -2; }
  .author__photo { order: -1; width: 120px; height: 120px; }
  .label { font-size: 10px; }
  .author h3 { margin-top: 0; font-size: 22px; }
  .author p { margin-top: 0; font-size: 15px; }
  .foot__inner { flex-direction: column; gap: 8px; padding-block: 24px; font-size: 12px; }
  .page { padding-block: 48px 64px; }
  .page h1 { font-size: 32px; }
}
