/* ==========================================================================
   alisonjefferson.com
   Single stylesheet. No frameworks, no external fonts, no JavaScript.
   Sections:
     1. Design tokens
     2. Reset & base
     3. Typography
     4. Layout primitives
     5. Header & navigation
     6. Hero
     7. Cards & grids
     8. Bands & callouts
     9. Buttons & links
    10. Service sections
    11. Footer
    12. Accessibility & motion
    13. Print
   ========================================================================== */


/* 1. DESIGN TOKENS ========================================================= */

:root {
  /* Greens — deep library-binding tones, used as ink rather than atmosphere */
  --green-900: #1B3A2A;   /* header / footer background */
  --green-700: #2C5A41;   /* links, buttons, headings */
  --green-500: #4A7C5E;   /* hover states, quiet accents */

  /* Tans — warm paper */
  --tan-100:   #F7F2E7;   /* page background */
  --tan-200:   #EFE6D5;   /* alternating section bands */
  --tan-400:   #D8C3A0;   /* hairline rules & borders — DECORATIVE ONLY */
  --surface:   #FFFCF6;   /* cards */

  /* Text */
  --ink:       #26241E;   /* body text */
  --ink-muted: #5C574C;   /* secondary text */
  --on-dark:   #F7F2E7;   /* text on green backgrounds */

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Measure & container */
  --measure: 68ch;
  --container: 68rem;

  --radius: 6px;
  --rule: 1px solid var(--tan-400);
}


/* 2. RESET & BASE ========================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Stops anchor targets hiding under nothing; gives them breathing room */
  scroll-padding-top: var(--space-lg);
}

body {
  margin: 0;
  background: var(--tan-100);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  /* Belt and braces: nothing should ever push the page sideways */
  overflow-x: hidden;
}

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

/* 3. TYPOGRAPHY ============================================================ */

h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--green-900);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  font-weight: 600;
  /* Long service names and the domain must never overflow a 320px screen */
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p, ul, ol { margin: 0 0 var(--space-md); }

p, li { max-width: var(--measure); }

.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  color: var(--ink-muted);
  line-height: 1.55;
}

strong { font-weight: 650; }

em { font-style: italic; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--green-700);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: var(--space-xs);
  display: block;
}


/* 4. LAYOUT PRIMITIVES ===================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--space-xl);
}

.section--tight { padding-block: var(--space-lg); }

/* Alternating warm band to break up long pages without adding ornament */
.section--band {
  background: var(--tan-200);
  border-block: var(--rule);
}

.section__head {
  margin-bottom: var(--space-lg);
}

.stack > * + * { margin-top: var(--space-md); }


/* 5. HEADER & NAVIGATION =================================================== */

.site-header {
  background: var(--green-900);
  color: var(--on-dark);
  padding-block: var(--space-md);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
}

.brand {
  text-decoration: none;
  color: var(--on-dark);
  display: block;
}

.brand__name {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  font-weight: 600;
  color: var(--on-dark);
  line-height: 1.15;
  display: block;
}

.brand__role {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tan-400);
  margin-top: 0.3rem;
}

/* Four short links. On a narrow phone they simply wrap to a second row —
   no hamburger, no JavaScript, nothing to break. */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li { max-width: none; }

.nav a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.97rem;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  display: inline-block;
}

.nav a:hover,
.nav a:focus-visible {
  border-bottom-color: var(--tan-400);
}

/* Current page marker */
.nav a[aria-current="page"] {
  border-bottom-color: var(--tan-400);
  font-weight: 650;
}


/* 6. HERO ================================================================== */

.hero {
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: var(--rule);
}

.hero h1 { margin-bottom: var(--space-md); }

.hero__text { max-width: 46rem; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}


/* 7. CARDS & GRIDS ========================================================= */

/* auto-fit + minmax reflows at every width with no media query at all.
   The min() is essential: a bare minmax(20rem, …) forces a 320px track that
   can't fit inside a 320px phone once container padding is subtracted, and
   the page overflows sideways. min(20rem, 100%) lets the track shrink. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: var(--space-md);
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

/* Four service cards. Explicit column counts rather than auto-fit, because
   auto-fit leaves an orphaned card on a row of its own (3 + 1) through the
   ~850-1000px range. These breakpoints keep the set balanced at every width:
   1 up on a phone, 2x2 on a tablet, 4 across on a desktop. */
.grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 64em) {
  .grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 34em) {
  .grid--four { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: var(--rule);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
}

.card h3 { margin-bottom: var(--space-xs); }

.card p {
  color: var(--ink-muted);
  max-width: none;
  margin-bottom: var(--space-md);
}

.card__link {
  margin-top: auto;
  font-weight: 650;
  font-size: 0.97rem;
}

/* Whole-card link target, keeps the visible link as the accessible name */
.card--linked { position: relative; }

.card--linked .card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card--linked:hover {
  border-color: var(--green-500);
}


/* 8. BANDS & CALLOUTS ====================================================== */

.pullquote {
  border-left: 4px solid var(--green-500);
  padding-left: var(--space-md);
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--green-900);
  max-width: 44rem;
}

.pullquote p { max-width: none; }

.pullquote cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-style: normal;
  color: var(--ink-muted);
}

/* Testimonials — the only pull-quotes that sit inside a grid.
   Scoped this way so the big feature quote on the home page, which is
   NOT in a grid, keeps its full size. Change the numbers here to resize
   the testimonials; leave .pullquote above alone. */
.grid .pullquote {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.05rem);
  line-height: 1.5;
}

/* Four testimonials in a container called "grid--two" were laying out as
   three across plus one stranded on its own row: auto-fit packs in as many
   20rem columns as the width allows, which is three on a desktop. Pin the
   quote grid to a genuine two columns. Below 44rem it drops to one, as the
   base .grid--two rule already does. */
@media (min-width: 44em) {
  .grid--two:has(.pullquote) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.callout {
  background: var(--surface);
  border: var(--rule);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.callout :last-child { margin-bottom: 0; }

/* Numbered process list */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}

.steps li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
  max-width: none;
  color: var(--ink-muted);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--on-dark);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.steps strong {
  display: block;
  color: var(--ink);
}

/* Simple tick list */
.ticks {
  list-style: none;
  padding: 0;
}

.ticks li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--space-sm);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green-500);
}


/* 9. BUTTONS & LINKS ======================================================= */

a {
  color: var(--green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--green-500); }

.btn {
  display: inline-block;
  background: var(--green-700);
  color: var(--tan-100);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
  border: 2px solid var(--green-700);
}

.btn:hover,
.btn:focus-visible {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--tan-100);
}

.btn--ghost {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--green-700);
  color: var(--tan-100);
}

/* Prominent email link on the contact page */
.email-link {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.2rem, 1rem + 1.4vw, 1.9rem);
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
  border-bottom: 2px solid var(--tan-400);
  /* A long address must wrap rather than overflow on a 320px screen */
  overflow-wrap: break-word;
  word-break: break-word;
  display: inline-block;
  max-width: 100%;
}

.email-link:hover,
.email-link:focus-visible {
  border-bottom-color: var(--green-500);
}


/* 10. SERVICE SECTIONS ===================================================== */

.service {
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: var(--rule);
}

.service:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.service h2 { margin-bottom: var(--space-xs); }

/* Genre sub-headings inside a service (Fiction / Non-fiction / Academic) */
.service h3 {
  margin-top: var(--space-lg);
  padding-top: var(--space-xs);
  border-top: 1px dotted var(--tan-400);
}

.service__what {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.service__what li {
  border-left: 2px solid var(--tan-400);
  padding-left: var(--space-sm);
  max-width: var(--measure);
}

.service__what strong { color: var(--green-900); }

/* Jump menu at the top of the services page */
.jumplinks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
}

.jumplinks li { max-width: none; }

.jumplinks a {
  display: inline-block;
  background: var(--surface);
  border: var(--rule);
  border-radius: 999px;
  padding: 0.34rem 0.85rem;
  font-size: 0.92rem;
  text-decoration: none;
}

.jumplinks a:hover,
.jumplinks a:focus-visible {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--tan-100);
}


/* About page portrait */
.portrait {
  border-radius: var(--radius);
  border: var(--rule);
  width: 100%;
}

/* Styled empty state so the layout holds up before the photo is added */
.portrait--placeholder {
  aspect-ratio: 4 / 5;
  background: var(--tan-200);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
  padding: var(--space-md);
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.about-layout__media { max-width: 22rem; }



/* 11. FOOTER =============================================================== */

.site-footer {
  background: var(--green-900);
  color: var(--tan-400);
  padding-block: var(--space-lg);
  margin-top: var(--space-xl);
  font-size: 0.94rem;
}

.site-footer a {
  color: var(--on-dark);
  text-underline-offset: 0.2em;
}

.site-footer a:hover { color: var(--tan-400); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  justify-content: space-between;
  align-items: start;
}

.site-footer p { max-width: 34rem; margin-bottom: var(--space-xs); }

.site-footer__name {
  color: var(--on-dark);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.05rem;
}


/* 12. ACCESSIBILITY & MOTION =============================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--green-900);
  padding: 0.7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 650;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Focus ring needs to be visible against the dark green header too */
.site-header :focus-visible,
.site-footer__legal {
  color: var(--tan-400);
  opacity: 0.75;
  font-size: 0.85rem;
  margin-top: var(--space-sm);
}
.site-footer :focus-visible {
  outline-color: var(--tan-400);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Single breakpoint: tighten vertical rhythm on small screens */
@media (max-width: 40em) {
  :root {
    --space-xl: 2.75rem;
    --space-2xl: 3.5rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero { padding-block: var(--space-xl) var(--space-lg); }

  .btn {
    /* Full-width tap targets read better on a phone */
    display: block;
    width: 100%;
    text-align: center;
  }

  .hero__actions { flex-direction: column; }
}


/* 13. PRINT ================================================================ */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .jumplinks { display: none; }

  body { background: #fff; color: #000; font-size: 11pt; }

  a { color: #000; }

  /* Make link destinations visible on paper */
  main a[href^="http"]::after,
  main a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
}


/* 13. STET ORNAMENT =======================================================
   The proofreader's mark for "let it stand" — a rule with dots beneath,
   cancelling a correction and leaving the author's original alone. Drawn
   inline as SVG: no extra request, no third-party host, sharp at any size.
   Always aria-hidden; it carries no meaning for a screen reader. */

.ornament {
  display: flex;
  justify-content: center;
  color: var(--green-500);
  margin-block: var(--space-lg);
}
.ornament svg {
  display: block;
  width: 8.5rem;
  height: auto;
}

/* Left-aligned variant, for sitting under a left-aligned heading */
.ornament--start { justify-content: flex-start; margin-block: 0 var(--space-md); }
.ornament--start svg { width: 7rem; }
