/* ==========================================================================
   Jenny Hardy — copywriting portfolio
   Design language lifted from the 2022 PDF portfolio:
     mint #6EC8B0 · Domaine Display Medium (→ Playfair Display) · IBM Plex Sans
   ========================================================================== */

:root {
  --mint:        #6EC8B0;
  --mint-deep:   #3FA98C;
  --mint-wash:   #EEF9F5;
  --ink:         #14181A;
  --ink-soft:    #4A5458;
  --ink-faint:   #808A8E;
  --rule:        #E2E8E6;
  --paper:       #FFFFFF;
  --paper-alt:   #FAFBFB;

  --serif: "Playfair Display", "Domaine Display", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 34rem;          /* readable line length for body copy */
  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --shell:   76rem;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep anchor targets clear of the sticky masthead. */
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Focus — visible, on brand, never removed ------------------------------- */
:focus-visible {
  outline: 2px solid var(--mint-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: .75rem 1.25rem; z-index: 100; font-size: .9rem;
}
.skip:focus { left: 0; }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem;
}
.masthead__name {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 500;
  letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.masthead__name em { font-style: normal; color: var(--mint-deep); }

.navlist {
  display: flex; flex-wrap: wrap; gap: .25rem 1.4rem;
  list-style: none; margin: 0; padding: 0;
  font-size: .82rem; letter-spacing: .01em;
}
.navlist a {
  text-decoration: none; color: var(--ink-soft);
  padding: .35rem 0; display: inline-block;
  border-bottom: 1.5px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.navlist a:hover { color: var(--ink); border-bottom-color: var(--mint); }
.navlist a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mint); font-weight: 500; }

@media (max-width: 56rem) {
  .masthead__inner {
    flex-direction: column; align-items: stretch;
    padding-block: .7rem; gap: .4rem;
  }
  .masthead__name { font-size: 1.15rem; }

  /* One scrollable line rather than three wrapped ones — the masthead is
     sticky, so height here is permanently lost viewport. */
  .masthead nav {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .masthead nav::-webkit-scrollbar { display: none; }
  .navlist {
    flex-wrap: nowrap;
    gap: 1.1rem;
    font-size: .8rem;
    width: max-content;
  }
  .navlist a { white-space: nowrap; }
}

/* ==========================================================================
   Hero — the mint cover page, as a web page
   ========================================================================== */

.hero {
  background: var(--mint);
  color: #fff;
  padding-block: clamp(4.5rem, 14vw, 9.5rem);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  /* The 2.75rem floor keeps the name on one line down to a 320px viewport;
     raising it, or using a noticeably longer name, will force a wrap. */
  font-size: clamp(2.75rem, 11vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
}

/* The client's name reads as a unit and must not break across lines. */
.hero__name { white-space: nowrap; }
.hero__tagline {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  margin: 1.75rem 0 0;
  opacity: .95;
}

/* Copy left, circular portrait right. Only applied when a photo is set —
   without one the hero stays a plain single column. */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__portrait {
  width: clamp(9rem, 22vw, 19rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .22);
}

/* Narrow screens: everything centred, stacked name → portrait → tagline.
   `display: contents` dissolves the copy wrapper so the heading and tagline
   become grid items themselves — that's what lets the portrait sit between
   them without changing the source order (which keeps the <h1> first). */
@media (max-width: 52rem) {
  .hero__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0;
  }
  .hero__copy { display: contents; }

  .hero__title { order: 1; }
  .hero__portrait {
    order: 2;
    width: clamp(8rem, 38vw, 13rem);
    margin-top: clamp(1.5rem, 5vw, 2.25rem);
  }
  .hero__tagline {
    order: 3;
    margin-top: clamp(1.25rem, 4vw, 1.75rem);
  }
}

/* Section-page hero — the numbered divider pages */
.hero--section .hero__num {
  font-size: .95rem; letter-spacing: .06em; margin: 0 0 .9rem;
  opacity: .9; font-weight: 400;
}
.hero--section .hero__title { font-size: clamp(2.5rem, 8vw, 5.5rem); }
.hero--section .hero__blurb {
  margin: 1.75rem 0 0; max-width: 42ch;
  font-size: clamp(1rem, 2vw, 1.1rem); opacity: .95;
}

/* ==========================================================================
   Intro / prose
   ========================================================================== */

.intro { padding-block: clamp(3rem, 7vw, 5.5rem); border-bottom: 1px solid var(--rule); }

/* Editable heading, then any number of paragraphs stacked beneath it.
   Both run the full width of the page shell — no narrow measure column. */
.intro__heading {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 1.25;
  letter-spacing: -.01em; margin: 0 0 1.5rem;
  text-wrap: balance;
}
.intro__body { margin: 0 0 1.15rem; color: var(--ink-soft); }
.intro__body:last-child { margin-bottom: 0; }

/* ==========================================================================
   Section index (home)
   ========================================================================== */

.sections { padding-block: clamp(3rem, 7vw, 5rem); }

.sectioncard {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  /* Baseline, not centre: the number stays level with the title however many
     lines of blurb are written underneath it. */
  align-items: baseline;
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
  /* Breathing room on the right. Sits inside the border box, so the rules
     still run the full width while the copy stops short of the edge. */
  padding-right: clamp(0rem, 6vw, 6rem);
  border-top: 1px solid var(--rule);
  text-decoration: none;
  transition: background-color .25s var(--ease);
}
/* Rules between items only — none above the first or below the last. */
.sectioncard:first-of-type { border-top: 0; }
.sectioncard:hover { background: var(--mint-wash); }

.sectioncard__num {
  font-family: var(--serif); font-size: 1.6rem; color: var(--mint);
  transition: color .25s var(--ease);
}
.sectioncard:hover .sectioncard__num { color: var(--mint-deep); }

.sectioncard__title {
  display: block;                     /* markup uses spans, so force block flow */
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.3rem); line-height: 1.15;
  letter-spacing: -.015em; margin: 0 0 .45rem;
}
.sectioncard__text { display: block; }
/* No width cap — the blurb runs the full column, so it can be as long as needed. */
.sectioncard__blurb {
  display: block;
  margin: 0; color: var(--ink-soft); font-size: .95rem;
}

@media (max-width: 52rem) {
  .sectioncard { grid-template-columns: 3rem 1fr; padding-right: 0; }
}

/* ==========================================================================
   Work pieces
   ========================================================================== */

.pieces { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.piece {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 6rem;
}
.piece__title { scroll-margin-top: 6rem; }
.piece:first-child { border-top: 0; padding-top: clamp(1.5rem, 4vw, 2.5rem); }

/* Header block — mirrors the PDF: Client: Name / Title / note / mint rule */
.piece__head { margin-bottom: 2rem; }
.piece__client {
  font-size: .95rem; font-weight: 500; margin: 0 0 .55rem;
  letter-spacing: .005em;
}
.piece__client .lbl { color: var(--mint-deep); }
.piece__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.15;
  letter-spacing: -.015em; margin: 0 0 .5rem; text-wrap: balance;
}
.piece__year { color: var(--ink-faint); font-family: var(--sans); font-size: .55em; font-weight: 300; letter-spacing: .02em; }
.piece__note { margin: 0; color: var(--ink-soft); max-width: 56ch; font-size: 1rem; }
.piece__rule { border: 0; border-top: 1px solid var(--mint); margin: 1.6rem 0 0; }

/* Email subject / pre-header pair */
.piece__email {
  margin: 1.1rem 0 0; display: grid; gap: .3rem;
  font-size: .95rem; max-width: 56ch;
}
.piece__email div { display: flex; gap: .6rem; flex-wrap: wrap; }
.piece__email dt {
  font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  font-size: .72rem; color: var(--ink-faint); margin: 0; padding-top: .25rem;
  flex: 0 0 6.5rem;
}
.piece__email dd { margin: 0; }

/* Metric chip — reach numbers */
.chip {
  display: inline-flex; align-items: baseline; gap: .45rem;
  background: var(--mint-wash); color: var(--mint-deep);
  border: 1px solid #CDEAE0;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .8rem; font-weight: 500; letter-spacing: .01em;
  margin-top: .9rem;
}

/* Pull quote — the standout lines of copy */
.pull {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.3;
  color: var(--ink); margin: 1.5rem 0 0; padding-left: 1.25rem;
  border-left: 3px solid var(--mint); max-width: 30ch; text-wrap: balance;
}

/* Artwork */
.piece__art { margin: 0; }
.piece__art img {
  width: 100%; height: auto;
  border: 1px solid var(--rule);
  background: var(--paper-alt);
}
.piece__art figcaption { margin-top: .8rem; font-size: .8rem; color: var(--ink-faint); }

/* Tall artwork gets a capped viewport with a zoom affordance */
.artframe { position: relative; }
.artframe--tall { max-height: 78vh; overflow: hidden; border: 1px solid var(--rule); }
.artframe--tall img { border: 0; }
.artframe--tall::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 7rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.97));
  pointer-events: none;
}

.zoom {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--ink); color: #fff; border: 0;
  font-family: var(--sans); font-size: .78rem; letter-spacing: .03em;
  padding: .55rem .95rem; border-radius: 999px; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.zoom:hover { background: var(--mint-deep); transform: translateY(-1px); }

/* Outbound link to the full PDF */
.piece__link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.25rem; font-size: .9rem; font-weight: 500;
  color: var(--mint-deep); text-decoration: none;
  border-bottom: 1.5px solid var(--mint); padding-bottom: .15rem;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.piece__link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.piece__link svg { flex: 0 0 auto; }

/* ==========================================================================
   Press release copy — the words are the work, so set them properly
   ========================================================================== */

.release {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  padding: clamp(1.75rem, 5vw, 3.5rem);
}
.release__inner { max-width: var(--measure); margin-inline: auto; }
.release p { margin: 0 0 1.15rem; color: var(--ink-soft); }
.release p:last-child { margin-bottom: 0; }
.release h3 {
  font-family: var(--serif); font-weight: 500; color: var(--ink);
  font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em;
  margin: 2rem 0 .6rem;
}
.release h3:first-child { margin-top: 0; }
.release > .release__inner > p:first-child {
  font-size: 1.1rem; color: var(--ink); /* standfirst */
}
.release__ends,
.release__extract {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule);
  font-size: .75rem; letter-spacing: .16em; color: var(--ink-faint); text-align: center;
}
.release__extract { letter-spacing: .1em; font-style: italic; }

/* Ghost-writing disclosure — visible, but not louder than the work itself. */
.piece__ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: .9rem 0 0; padding: .35rem .8rem .35rem .7rem;
  background: var(--paper-alt); border-left: 2px solid var(--mint);
  font-size: .85rem; color: var(--ink-soft);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10,14,15,.94);
  display: grid; grid-template-rows: auto 1fr;
  padding: 0;
}
.lightbox[hidden] { display: none; }
.lightbox__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem clamp(1rem, 4vw, 2rem); color: #fff;
}
.lightbox__caption { font-size: .85rem; opacity: .8; }
.lightbox__close {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff;
  font-family: var(--sans); font-size: .8rem; letter-spacing: .04em;
  padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.lightbox__close:hover { background: rgba(255,255,255,.14); }
.lightbox__scroll { overflow: auto; padding: 0 clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 2rem); }
.lightbox__scroll img { margin-inline: auto; background: #fff; max-width: min(100%, 1100px); }

/* ==========================================================================
   Pager + footer
   ========================================================================== */

.pager {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--rule);
}
.pager a { text-decoration: none; max-width: 20rem; }
.pager__dir { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: .3rem; }
.pager__title { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; }
.pager a:hover .pager__title { color: var(--mint-deep); }
.pager__next { text-align: right; margin-left: auto; }

.contact { background: var(--mint); color: #fff; padding-block: clamp(3.5rem, 9vw, 6rem); }
.contact__title {
  font-family: var(--serif); font-weight: 500; margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em;
}
.contact__body { max-width: 44ch; margin: 0 0 2rem; opacity: .95; }
.contact__links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.contact__links a {
  color: #fff; text-decoration: none; font-size: 1.05rem; font-weight: 400;
  border-bottom: 1.5px solid rgba(255,255,255,.55); padding-bottom: .2rem;
  transition: border-color .2s var(--ease);
}
.contact__links a:hover { border-bottom-color: #fff; }
.contact :focus-visible { outline-color: #fff; }

.colophon {
  padding-block: 2rem; font-size: .78rem; color: var(--ink-faint);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ==========================================================================
   Reveal on scroll (progressive — content is visible without JS)
   ========================================================================== */

/* Scoped to .reveal-ready, which site.js sets only once it is running and has
   confirmed IntersectionObserver support. If the script never loads, nothing
   is ever hidden — the work stays visible. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal { opacity: 0; transform: translateY(14px); }
  .reveal-ready .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .masthead, .zoom, .pager, .lightbox, .skip { display: none !important; }
  .hero, .contact { background: #fff !important; color: #000 !important; }
  .artframe--tall { max-height: none; overflow: visible; }
  .artframe--tall::after { display: none; }
  .piece { break-inside: avoid; }
  body { font-size: 11pt; }
}
