/* aerobbert.com: shared styles for the hub pages
   (home, about, services, contact, thank-you, not-found).
   Essay pages keep their own inline styles and load /assets/essay.css on top.

   Palette: change a value here and it changes on every hub page. */
:root {
  --bg-dark: #252321;          /* hero and mastheads */
  --bg-cream: #faf9f6;         /* reading surface */
  --ink: #1a1a1a;
  --ink-soft: #2c2c2c;
  --muted: #6b6b6b;
  --hairline: #dcd8cf;
  --on-dark: #e8e5e0;
  --on-dark-soft: #cfccc6;
  --on-dark-muted: #9a9a96;
  --gold: #c6a86b;             /* accent on dark */
  --gold-hover: #d4ba84;
  /* Green on cream, matched to the ink of a mid-century letterpress cover (sampled #058e4e).
     Headings use the sampled green (4.0:1, fine at heading size); links and other small text use
     a slightly deeper step of the same hue (4.8:1). Gold is for dark backgrounds only. */
  --ivy-display: #058e4e;
  --ivy: #048046;
  --ivy-hover: #036637;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --fs-bio: clamp(20px, 1.9vw, 23px);
  --fs-title: clamp(20px, 1.8vw, 22px);
  --fs-meta: clamp(17.5px, 1.55vw, 19.5px);
  --fs-p: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ivy);
  outline-offset: 3px;
  border-radius: 2px;
}
.band--hero a:focus-visible, .band--masthead a:focus-visible,
.band--hero button:focus-visible, .band--masthead button:focus-visible,
.site-footer a:focus-visible { outline-color: var(--gold); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--bg-cream); color: var(--ink); padding: 10px 16px;
  font-size: 17px; text-decoration: none; border: 1px solid var(--hairline);
}
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.band { width: 100%; display: flow-root; }
.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 64px; }

/* Short pages (thank-you, not-found): keep the dark footer at the bottom of the screen. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- navigation ---------- */
.topnav {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  margin: 0 0 96px;
}
.topnav a { text-decoration: none; transition: color 200ms ease; }
.topnav .wordmark { font-size: 20px; color: var(--on-dark); letter-spacing: 0.005em; }
.topnav .wordmark:hover { color: var(--gold); }
.topnav .nav-links { display: flex; gap: 28px; }
.topnav .nav-links a {
  font-size: 14.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-dark-muted);
}
.topnav .nav-links a:hover { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; line-height: 0; }
.nav-toggle-bar { display: block; width: 24px; height: 1.5px; background: #c9c6c0; margin: 5px 0; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- home hero ---------- */
.band--hero { position: relative; overflow: hidden; background: var(--bg-dark); padding: 40px 0 72px; }
.band--hero > .container, .band--masthead > .container { position: relative; z-index: 2; }
.hero-bg, .hero-scrim { position: absolute; inset: 0; z-index: 1; }
.hero-scrim { background: linear-gradient(180deg, rgba(37,35,33,0.238) 0%, rgba(37,35,33,0.34) 100%); }
/* Home: illuminated Gospel manuscript. Photo by Aleksandra Sapozhnikova on Unsplash. */
.band--hero .hero-bg { background: url('/manuscript-bg.jpg') center 38% / cover; opacity: 0.21; }
/* Contact masthead image */
.band--masthead .hero-bg { background: url('/contact-bg.jpg') center 46% / cover; opacity: 0.26; }

.display {
  font-weight: 600; font-size: clamp(36px, 5.8vw, 76px); line-height: 1.12; letter-spacing: -0.012em;
  margin: 0 0 20px; color: var(--on-dark);
}
.display span { display: block; }
.idline { font-size: clamp(18px, 1.7vw, 21px); color: var(--on-dark); margin: 0 0 30px; letter-spacing: .01em; }
.idline em { color: var(--gold); margin-left: .5em; }
.bio { font-size: var(--fs-bio); color: var(--on-dark-soft); line-height: 1.55; margin: 0; text-wrap: pretty; }
.bio a, .bio-more a { color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 200ms ease; }
.bio a:hover, .bio-more a:hover { color: var(--gold-hover); }
.bio-more { margin: 20px 0 0; font-size: clamp(17px, 1.5vw, 19px); }

/* ---------- home: latest work ---------- */
.latest { margin: 52px 0 0; }
.latest__title { font-weight: 500; font-size: clamp(30px, 3.7vw, 40px); line-height: 1.14; margin: 0; letter-spacing: -.01em; }
.latest__title a { color: var(--ink); text-decoration: none; transition: color 200ms ease; }
.latest__title a:hover { color: var(--ivy); }
.latest__sub { font-style: italic; font-size: clamp(21px, 2vw, 24px); color: var(--ink-soft); margin: 8px 0 0; }
.latest__meta { font-size: var(--fs-meta); color: var(--muted); margin: 14px 0 0; }

/* ---------- home: lists ---------- */
/* A hairline separates every section. */
.section { margin: 40px 0 0; padding: 40px 0 0; border-top: 1px solid var(--hairline); }
.section h2, .closing h2, .latest__label {
  font-weight: 500; font-size: clamp(26px, 3vw, 30px); line-height: 1.25; margin: 0 0 10px; color: var(--ivy-display);
}
.title-list { list-style: none; padding: 0; margin: 0; }
.title-list li { margin: 0 0 12px; }
.title-list li:last-child { margin-bottom: 0; }
.title-link { font-size: var(--fs-title); color: var(--ink-soft); text-decoration: none; transition: color 200ms ease; }
a.title-link:hover { color: var(--ivy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.title-meta { font-size: var(--fs-meta); font-style: italic; color: var(--muted); line-height: 1.4; }

/* ---------- home: the book ----------
   Title in green with the subtitle beneath, like a section heading; cover on the left, description to its right. */
.book { margin: 40px 0 0; padding: 40px 0 0; border-top: 1px solid var(--hairline); }
.book__title { font-weight: 500; font-size: clamp(26px, 3vw, 30px); line-height: 1.25; margin: 0; color: var(--ivy-display); }
.book__title a { color: inherit; text-decoration: none; transition: color 200ms ease; }
.book__title a:hover { color: var(--ivy-hover); }
.book__body { display: grid; grid-template-columns: 172px 1fr; column-gap: 40px; align-items: center; }
.book__cover { display: block; width: 100%; height: auto; box-shadow: 0 10px 28px rgba(40,30,10,.20), 0 2px 5px rgba(40,30,10,.16); }
.book__sub { font-style: italic; font-size: var(--fs-title); color: var(--ink-soft); margin: 2px 0 20px; }
.book__desc { font-size: var(--fs-p); color: var(--ink-soft); margin: 0; max-width: 31em; text-wrap: pretty; }

/* ---------- home: services + newsletter ---------- */
.closing {
  margin: 44px 0 0; padding: 40px 0 0; border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
}
.closing > section { min-width: 0; }
.closing p { font-size: var(--fs-p); color: var(--ink-soft); line-height: 1.5; margin: 0; text-wrap: pretty; }
.more {
  display: inline-block; margin: 14px 0 0; font-size: var(--fs-title); color: var(--ivy);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 200ms ease;
}
.more:hover { color: var(--ivy-hover); }
.subscribe-btn {
  display: inline-block; margin: 18px 0 0; font-size: 14px; text-transform: uppercase; letter-spacing: .1em;
  padding: 12px 22px; background: var(--bg-dark); color: var(--on-dark); text-decoration: none; white-space: nowrap;
  transition: background 200ms ease;
}
.subscribe-btn:hover { background: #3a3733; }

/* ---------- about / services / contact / not-found ---------- */
.band--masthead { position: relative; background: var(--bg-dark); padding: 40px 0 56px; }
.band--masthead .topnav { margin-bottom: 72px; }
.band--masthead--tall { padding-bottom: 84px; }
.band--masthead--tall .topnav { margin-bottom: 84px; }
.band--masthead .display { font-size: clamp(33px, 4.8vw, 55px); font-weight: 500; margin-bottom: 0; text-align: center; }
.band--masthead .display--gold { color: var(--gold); }
.byline { margin: 14px 0 0; font-style: italic; font-size: clamp(19px, 1.7vw, 22px); color: var(--on-dark-soft); text-align: center; }
.masthead-photo { display: block; width: 100%; max-width: 560px; height: auto; margin: 36px auto 0; }

.band--prose { padding: 56px 0 24px; }
.prose { max-width: 680px; margin: 0 auto; color: var(--ink-soft); }
.prose p { font-size: clamp(20px, 1.8vw, 22px); line-height: 1.6; margin: 0 0 1.2em; text-wrap: pretty; }
.prose > p:last-child { margin-bottom: 0; }
.prose h2 { font-weight: 500; font-size: clamp(25px, 2.8vw, 29px); line-height: 1.25; color: var(--ivy-display); margin: 1.7em 0 .35em; }
.prose a { color: var(--ivy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 200ms ease; }
.prose a:hover { color: var(--ivy-hover); }

.contact-form { margin-top: 36px; max-width: 560px; }
.contact-form p { margin: 0 0 22px; }
.contact-form label { display: block; font-size: 14.5px; text-transform: uppercase; letter-spacing: 0.09em; color: #6b6861; margin-bottom: 8px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; font-family: var(--serif); font-size: 19px; color: var(--bg-dark);
  background: #fff; border: 1px solid #d8d4cc; border-radius: 0;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ivy); }
.contact-form button {
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.09em; text-transform: uppercase; padding: 13px 38px;
  background: var(--bg-dark); color: var(--on-dark); border: 1px solid var(--bg-dark); border-radius: 0; cursor: pointer;
  transition: background 200ms ease;
}
.contact-form button:hover { background: #3a3733; }
.hp-field { display: none; }

/* ---------- footer ---------- */
/* Dark band, matching the hero and mastheads; accents on it are gold. */
.site-footer { margin: 72px 0 0; padding: 40px 0 44px; background: var(--bg-dark); }
.site-footer__inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-style: italic; font-size: 16px; color: var(--on-dark-muted); text-align: center;
}
.footer-row { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer-row .mail { color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 200ms ease; }
.footer-row .mail:hover { color: var(--gold-hover); }
.footer-icons { display: inline-flex; align-items: center; gap: 16px; }
.footer-icons a { color: var(--on-dark-soft); display: inline-flex; padding: 8px; margin: -8px; transition: color 200ms ease; }
.footer-icons a:hover { color: var(--gold); }
.footer-icons svg { width: 18px; height: 18px; display: block; }
.site-footer p { margin: 0; }

/* ---------- home page on tablets, laptops and desktops ----------
   The home page is a set of lists, not a page of prose, and at full size it read as too large on big screens.
   Here its text is set at about seven-eighths of the size used on phones-up elsewhere (roughly Chrome at 87%).
   Navigation, footer and column width are untouched, so they match the other pages.
   To make the home page larger or smaller on big screens, change the values in this block only. */
@media (min-width: 721px) {
  .home { --fs-bio: 20px; --fs-title: 19.5px; --fs-meta: 17px; --fs-p: 18px; }
  .home .topnav { margin-bottom: 84px; }
  .home .band--hero { padding-bottom: 64px; }
  .home .display { font-size: clamp(36px, 5.8vw, 66px); }
  .home .idline { font-size: 18.5px; margin-bottom: 26px; }
  .home .bio { max-width: 35em; }              /* keeps the line length where it was */
  .home .bio-more { font-size: 17px; margin-top: 18px; }
  .home .latest { margin-top: 46px; }
  .home .latest__title { font-size: clamp(30px, 3.7vw, 35px); }
  .home .latest__sub { font-size: 21px; margin-top: 6px; }
  .home .latest__meta { margin-top: 12px; }
  .home .section h2, .home .closing h2, .home .latest__label, .home .book__title { font-size: 26px; }
  .home .section, .home .book { margin-top: 36px; padding-top: 36px; }
  .home .closing { margin-top: 40px; padding-top: 36px; }
  .home .book__body { grid-template-columns: 152px 1fr; column-gap: 36px; }
}

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .container { padding: 0 24px; }
  .band--hero { padding: 24px 0 48px; }
  .band--masthead { padding: 24px 0 40px; }
  .band--masthead--tall { padding-bottom: 52px; }
  .band--prose { padding: 40px 0 8px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(37,35,33,0.20) 0%, rgba(37,35,33,0.28) 100%); }
  .display { font-size: clamp(26px, 7.6vw, 44px); }

  .topnav { position: relative; gap: 16px; margin-bottom: 56px; }
  .band--masthead .topnav { margin-bottom: 48px; }
  .band--masthead--tall .topnav { margin-bottom: 56px; }
  .nav-toggle { display: block; }
  /* Same specificity as the desktop rule above, so this override wins by order. */
  .topnav .nav-links {
    position: absolute; top: 100%; right: 0; margin-top: 10px; z-index: 10;
    flex-direction: column; align-items: flex-end; gap: 4px;
    background: #2b2825; border: 1px solid rgba(198,168,107,0.30); border-radius: 2px;
    padding: 12px 22px; min-width: 168px; box-shadow: 0 12px 34px rgba(0,0,0,0.38);
    display: none;
  }
  .topnav .nav-links.open { display: flex; }
  .topnav .nav-links a { padding: 6px 0; }

  .idline em { display: block; margin-left: 0; }
  .latest { margin-top: 36px; }
  .section { margin-top: 32px; padding-top: 32px; }
  /* Phones: cover and description side by side. The text column never drops below 208px (six lines
     at phone sizes, the height of the cover); on narrower phones the cover gives way a little instead. */
  .book { margin-top: 32px; padding-top: 32px; }
  .book__sub { margin-bottom: 16px; }
  .book__body { grid-template-columns: minmax(0, 118px) minmax(208px, 1fr); column-gap: 16px; }
  .book__desc { max-width: none; }
  /* Small screens: the first sentence alone, centred against the cover as on desktop, so nothing trails under it. */
  .book__more { display: none; }
  .closing { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; padding-top: 32px; }
  .closing > section + section { border-top: 1px solid var(--hairline); padding-top: 32px; }
  .masthead-photo { margin-top: 28px; }
  .site-footer { margin-top: 56px; padding: 34px 0 38px; }
  .site-footer__inner { font-size: 15px; }
}

/* Very small phones: too narrow for text beside the cover, so the description sits beneath it. */
@media (max-width: 374px) {
  .book__body { display: block; }
  .book__link { display: block; width: 118px; margin: 0 0 18px; }
}
