/* ==========================================================================
   Molly Blackburn: Witness for Justice - launch one-pager
   Plain CSS, no frameworks, no webfonts. Palette sampled from the approved
   mock: near-black charcoal, deep crimson, warm cream, white.
   ========================================================================== */

:root {
  --ink: #1d1815;            /* hero charcoal */
  --ink-2: #14110e;          /* header / footer near-black */
  --panel-dark: #211b16;     /* author panel */
  --red: #9e1b1f;            /* buttons, links, accents */
  --red-dark: #7c1114;       /* button hover */
  --red-bright: #b8262b;     /* logo tagline, accents on dark */
  --cream: #f1ebdd;          /* warm section background */
  --white: #ffffff;
  --text-dark: #423c33;      /* body text on cream */
  --text-mut: #6b6357;       /* muted on cream */
  --text-light: #d8d1c4;     /* body text on dark */
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-h: 78px;
}

/* ---- Reset / base -------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--cream);
  overflow-x: clip; /* rotated hero book / bleeds must never scroll the page */
}

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

h1, h2, h3 { margin: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Anchors clear the sticky header. */
section[id], .panel[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink-2);
  color: var(--white);
  padding: 10px 18px;
}
.skip-link:focus { left: 0; }

/* ---- Type ---------------------------------------------------------------- */

.heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  color: #241f19;
  letter-spacing: 0.01em;
}

.heading::after {           /* short red dash accent */
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 12px;
  background: var(--red);
}

.heading--light { color: var(--white); }
.heading--light::after { background: rgba(255, 255, 255, 0.85); height: 2px; }

/* ---- Buttons & links ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 3px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--red-dark); }

.btn__chevron { flex: 0 0 auto; opacity: 0.9; }

.btn--block {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red);
}
.link-arrow .arrow { transition: transform 0.2s ease; }
.link-arrow:hover { color: var(--red-dark); text-decoration: underline; }
.link-arrow:hover .arrow { transform: translateX(4px); }

.panel--dark .link-arrow { color: var(--red-bright); }
.panel--dark .link-arrow:hover { color: #d43a3f; }

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.logo {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.logo__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}

.logo__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--red-bright);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav__link {
  display: inline-block;
  position: relative;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #e6e0d5;
  padding: 6px 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  transition: color 0.2s ease;
}
.nav__link:first-child { border-left: 0; }
.nav__link:hover { color: var(--white); }
.nav__link.is-active { color: var(--red-bright); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -2px;
  height: 2px;
  background: var(--red-bright);
}

/* ---- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  background:
    /* red grunge, approximated with gradients only */
    radial-gradient(ellipse 46% 62% at 88% 14%, rgba(158, 27, 31, 0.62), transparent 70%),
    radial-gradient(ellipse 40% 44% at 97% 88%, rgba(140, 20, 24, 0.55), transparent 72%),
    radial-gradient(ellipse 30% 38% at 4% 100%, rgba(130, 18, 22, 0.42), transparent 70%),
    radial-gradient(ellipse 52% 34% at 66% 112%, rgba(112, 14, 18, 0.5), transparent 74%),
    linear-gradient(115deg, rgba(0, 0, 0, 0.22) 0 18%, transparent 30% 70%, rgba(0, 0, 0, 0.28) 84% 100%),
    var(--ink);
  color: var(--white);
  overflow: visible;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-right: clamp(28px, 5vw, 80px); /* portrait bleeds left, book breathes right */
  min-height: clamp(430px, 44vw, 560px);
}

.hero__portrait {
  align-self: stretch;
  position: relative;
  min-height: 100%;
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
}

/* blend the photo into the charcoal */
.hero__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(29, 24, 21, 0) 55%, #1d1815 97%),
    linear-gradient(to top, rgba(29, 24, 21, 0.55), transparent 34%),
    linear-gradient(to bottom, rgba(29, 24, 21, 0.5), transparent 26%);
  pointer-events: none;
}

.hero__content { padding: 56px 0; max-width: 660px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__title-red { color: var(--red-bright); }

.hero__tagline {
  margin-top: 14px;
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 600;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: #efe9dd;
}

.hero__sub {
  margin-top: 22px;
  max-width: 44ch;
  font-size: 17px;
  color: var(--text-light);
}

.hero__content .btn { margin-top: 26px; }

.hero__book {
  position: relative;
  z-index: 2;
  justify-self: center;
  margin: -34px 0 -40px; /* book pops over the hero edges, as in the mock */
}

.hero__book img {
  width: clamp(200px, 18vw, 252px);
  height: auto;
  transform: rotate(5deg);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 6px 16px rgba(0, 0, 0, 0.45);
}

/* ---- About the Book ------------------------------------------------------- */

.book { background: var(--cream); }

.book__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.book__text {
  padding: 72px 56px 72px max(28px, calc((100vw - 1180px) / 2 + 28px));
}

.book__text .heading { margin-bottom: 24px; }
.book__text p { max-width: 56ch; }
.book__text .btn { margin-top: 12px; }

.book__photo {
  align-self: stretch;
  position: relative;
  min-height: 400px;
}

.book__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.02);
}

/* feather the photo's left edge into the cream */
.book__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--cream), rgba(241, 235, 221, 0) 32%);
  pointer-events: none;
}

/* ---- Molly / Author panels ------------------------------------------------ */

.panels {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
}

.panel { padding: 64px clamp(28px, 4.5vw, 64px); }

.panel--cream { background: var(--cream); }
.panel--dark {
  background: var(--panel-dark);
  color: var(--text-light);
}

.panel .heading { margin-bottom: 30px; }

.panel--dark .heading { color: #f5efe4; }

.panel__row {
  display: flex;
  gap: clamp(20px, 2.5vw, 34px);
  align-items: flex-start;
}

.panel__photo {
  flex: 0 0 auto;
  width: 176px;
  height: auto;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.panel--cream .panel__photo { width: 184px; }
.panel__photo--author { width: 158px; }

.panel__body p { font-size: 15.5px; }
.panel--dark .panel__body p { color: var(--text-light); }

.panel__body .link-arrow { margin-top: 18px; }

/* ---- Register Your Interest ----------------------------------------------- */

.register {
  background:
    /* abstracted crowd/grunge in gradients only */
    radial-gradient(ellipse 22% 16% at 12% 96%, rgba(52, 6, 8, 0.65), transparent 100%),
    radial-gradient(ellipse 26% 18% at 30% 100%, rgba(52, 6, 8, 0.6), transparent 100%),
    radial-gradient(ellipse 30% 20% at 56% 98%, rgba(52, 6, 8, 0.55), transparent 100%),
    radial-gradient(ellipse 26% 16% at 82% 100%, rgba(52, 6, 8, 0.6), transparent 100%),
    radial-gradient(ellipse 70% 60% at 18% 0%, rgba(190, 48, 52, 0.28), transparent 70%),
    radial-gradient(ellipse 50% 46% at 100% 100%, rgba(40, 4, 6, 0.5), transparent 75%),
    linear-gradient(180deg, #a82226 0%, #93191d 58%, #841317 100%);
  color: var(--white);
}

.register__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.register__text p {
  margin-top: 24px;
  max-width: 46ch;
  font-size: 17px;
  color: #f6efe3;
}

.register__card {
  background: var(--white);
  border-radius: 4px;
  padding: 26px 24px;
  box-shadow: 0 24px 48px rgba(40, 4, 6, 0.4);
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mut);
  margin-bottom: 5px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: #2c2721;
  background: var(--white);
  border: 1px solid #d8d2c6;
  border-radius: 3px;
  padding: 11px 12px;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 0;
  border-color: var(--red);
}

.register__card .btn--block { margin-top: 6px; }

/* status lines: hidden by default, revealed by :target after the redirect.
   They stay RENDERED (1px, opacity:0) rather than display:none: Chromium will
   not fragment-scroll to a display:none (or zero-size) target, so the
   redirect's #mb-sent / #mb-error hash would never bring the message into
   view. opacity:0 keeps a real box for the browser to scroll to. */
.form-status {
  display: block;
  opacity: 0;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.form-status:target {
  opacity: 1;
  height: auto;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 3px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-left: 4px solid transparent;
}

.form-status--ok {
  color: #24512d;
  background: #e8f2e6;
}

.form-status--ok:target { border-left-color: #3c7a46; }

.form-status--error {
  color: #6e1215;
  background: #f9e7e7;
}

.form-status--error:target { border-left-color: var(--red); }

/* honeypot: present for bots, invisible to everyone else (clip pattern) */
.hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.hp label,
.hp input {
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* ---- Explore the Research -------------------------------------------------- */

.research {
  position: relative;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0) 62%, rgba(29, 24, 21, 0.1) 78%, rgba(29, 24, 21, 0.16) 100%),
    var(--cream);
  overflow: hidden;
}

.research::after {           /* faint archival texture, right edge */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 30%;
  background:
    repeating-linear-gradient(105deg,
      rgba(29, 24, 21, 0.05) 0 2px, transparent 2px 26px),
    radial-gradient(ellipse at 100% 50%, rgba(29, 24, 21, 0.08), transparent 70%);
  pointer-events: none;
}

.research__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-top: 56px;
  padding-bottom: 56px;
}

.research__icon {
  flex: 0 0 auto;
  color: #241f19;
}

.research__text {
  max-width: 62ch;
  border-left: 1px solid rgba(36, 31, 25, 0.28); /* mock's vertical divider */
  padding-left: clamp(28px, 4vw, 56px);
}
.research__text .heading { margin-bottom: 18px; }
.research__text p { margin-bottom: 16px; }

/* ---- Footer ----------------------------------------------------------------- */

.site-footer {
  background: var(--ink-2);
  color: #cfc8bb;
}

.footer-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}

.nav--footer .nav__link {
  font-size: 12.5px;
  color: #cfc8bb;
  padding: 6px 16px;
}
.nav--footer .nav__link:hover { color: var(--white); }

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #e6e0d5;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social:hover { border-color: var(--red-bright); color: var(--red-bright); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .hero__grid {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(0, 240px);
  }
  .hero__book { margin: 0; }
  .panel--cream .panel__photo { width: 164px; }
  .panel__photo--author { width: 144px; }
  .panel__body p { font-size: 15px; }
}

@media (max-width: 880px) {
  :root { --header-h: 112px; } /* nav wraps below the logo: keep anchors clear of it */

  .header-inner { justify-content: center; text-align: center; }
  .nav { justify-content: center; row-gap: 2px; }
  .nav__link { padding: 6px 12px; font-size: 12.5px; }

  /* hero stacks: natural-size portrait (edge-faded), content, book */
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
  }
  .hero { padding: 0 28px; }
  .hero__portrait {
    justify-self: center;
    width: min(340px, 86vw);   /* natural size - no upscale blur */
    min-height: 0;
    height: auto;
    position: relative;
  }
  .hero__portrait img {
    width: 100%;
    height: auto;
    object-fit: fill;
  }
  .hero__portrait::after {
    background:
      linear-gradient(to right, #1d1815, rgba(29, 24, 21, 0) 26% 74%, #1d1815),
      linear-gradient(to bottom, rgba(29, 24, 21, 0.5), rgba(29, 24, 21, 0) 32% 70%, rgba(29, 24, 21, 0.88));
  }
  .hero__content {
    padding: 36px 0 8px;
    text-align: center;
  }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__content .btn { justify-content: center; }
  .hero__book {
    margin: 28px auto -46px;
  }
  .hero { padding-bottom: 46px; }

  .panels { grid-template-columns: 1fr; }

  .book__grid { grid-template-columns: 1fr; }
  .book__text { padding: 56px 28px 40px; }
  .book__photo { min-height: 260px; }
  .book__photo::after {
    background: linear-gradient(to bottom, var(--cream), rgba(241, 235, 221, 0) 30%);
  }

  .panel { padding: 52px 28px; }

  .register__grid { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .register__text p { margin-top: 18px; }

  .research__inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .research__text { border-left: 0; padding-left: 0; }
  .research::after { width: 60%; }

  .footer-inner { justify-content: center; text-align: center; }
  .nav--footer .nav__link { padding: 6px 10px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero { padding: 0 20px 46px; }
  .hero__portrait { width: min(340px, 92vw); }
  .logo__name { font-size: 17px; }
  .nav__link { padding: 5px 9px; font-size: 12px; border-left: 0; }
  .nav__link.is-active::after { left: 9px; right: 9px; }
  .book__text, .panel { padding-left: 20px; padding-right: 20px; }
  .panel__row { flex-direction: column; }
  .panel__photo, .panel--cream .panel__photo, .panel__photo--author { width: 168px; }
  .register__card { padding: 20px 16px; }
}

/* ---- Reduced motion -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .link-arrow .arrow, .nav__link, .social { transition: none; }
  .link-arrow:hover .arrow { transform: none; }
}
