/* ==========================================================================
   christabel.co — main stylesheet
   ==========================================================================

   Written PHONE FIRST: the plain rules are for small screens, and the
   "@media (min-width: …)" blocks add to them as the screen gets wider.

   Layers (a later layer always wins over an earlier one):
     1. reset       browser clean-up
     2. tokens      ALL colours, the font and spacing. Start here to edit.
     3. base        plain HTML elements
     4. components  header, hero, lists, footer…
     5. utilities   small helpers
   ========================================================================== */

@layer reset, tokens, base, components, utilities;

/* Archivo: one variable font that goes from extra-condensed poster
   letters (font-stretch 62%) to wide (125%), thin to black.
   Self-hosted in /assets/fonts/. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* Affigue: the headline font (section headings and the big name).
   Bought from Typoraith Co. One weight only, so headings use it at its
   natural weight rather than a faked bold. */
@font-face {
  font-family: "Affigue";
  src: url("../fonts/affigue.ttf") format("truetype");
  font-display: swap;
}


/* ==========================================================================
   1. RESET
   ========================================================================== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: none; text-size-adjust: none; }
  img, video, svg { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  ul, ol { list-style: none; }
  h1, h2, h3, p { overflow-wrap: break-word; }
}


/* ==========================================================================
   2. TOKENS — edit colours and sizes here
   ========================================================================== */
@layer tokens {
  :root {
    /* ---- Colours: materials from the three places -------------------
       Mexico City: limewash walls, tezontle (red volcanic stone),
                    pink cantera stone, basalt
       South India: laterite earth, turmeric, banana leaf
       UAE:         gypsum, dune sand, date palm
       The page stays quiet and earthy so the PATTERNS bring the colour.

       Contrast checked for WCAG AA (4.5:1 for small text):
         basalt on limewash 13.0   tezontle on limewash 6.5
         basalt on sand 10.6       basalt on cantera 8.2
         sand on basalt 10.6       limewash on palm 7.3
         limewash on tezontle 6.5  sand on palm 6.0
       Don't put small tezontle text on cantera (4.1). */
    --limewash: #F2ECE2;   /* page background: cal walls, gypsum     */
    --sand:     #E3D5BF;   /* Gulf dunes                              */
    --cantera:  #D8B7A2;   /* CDMX pink cantera stone                 */
    --tezontle: #8A3B2B;   /* CDMX volcanic red: headlines, accents   */
    --laterite: #A9532F;   /* South Indian red earth (shapes only)    */
    --turmeric: #C99A3A;
    --palm:     #44502F;   /* banana leaf / date palm green           */
    --basalt:   #2A2420;   /* near-black text                         */

    /* ---- Font ----------------------------------------------------------- */
    --font: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --font-display: "Affigue", "Archivo", "Arial Narrow", sans-serif;   /* headings */

    /* ---- Sizes: small on phones, growing with the screen ---------------- */
    /* THE TYPE SCALE: every piece of text on the site uses one of these
       five sizes, so each level looks the same from section to section.
         --text-xl  SECTION TITLES  (.display) "Selected writing", "Work with me"…
         --text-l   ITEM TITLES     (.title)   writing headlines, service names,
                                               publication names; also the hero lead
         --text-m   BODY            every paragraph and intro
         --text-s   SMALL PRINT     notes, disclaimers
         --text-xs  LABELS          (.label)   the small capitals              */
    --text-xs: 0.75rem;
    --text-s:  0.875rem;
    --text-m:  clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    --text-l:  clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
    --text-xl: clamp(2.4rem, 1.4rem + 4.4vw, 5rem);

    --title-gap: clamp(1.5rem, 1rem + 2vw, 3rem);   /* space under every section title */

    --pad: clamp(1rem, 0.6rem + 2vw, 2.5rem);   /* side margin of the page */
    --gap: clamp(3.5rem, 2rem + 6vw, 8rem);     /* space between sections  */

    --rule: 1.5px solid currentColor;           /* thin lines in lists     */
  }
}


/* ==========================================================================
   3. BASE
   ========================================================================== */
@layer base {
  body {
    background: var(--limewash);
    color: var(--basalt);
    font-family: var(--font);
    font-size: var(--text-m);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;       /* the scattered artwork may poke off-screen */
  }

  a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }

  :focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

  ::selection { background: var(--tezontle); color: var(--limewash); }

  @media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }   /* soft fade between pages */
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition-duration: 0.01ms !important;
    }
  }
}


/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */
@layer components {

  .skip-link {
    position: absolute; left: var(--pad); top: 0.5rem; z-index: 10;
    background: var(--basalt); color: var(--limewash); padding: 0.5rem 1rem;
    translate: 0 -300%;
  }
  .skip-link:focus { translate: 0 0; }

  /* ---- Type roles ----------------------------------------------------
     Big condensed CAPITALS are kept for section headings only (.display).
     Small capitals are only for tiny "eyebrow" labels (.label, .kicker…).
     Everything functional (menu, links, captions, tags) is quiet
     sentence case, so the hierarchy stays clear. */
  .label, .kicker, .worklist__meta, .worklist__num {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.35;
  }
  .top, .arrow-link, figcaption, .chips, .bottom__small {
    font-size: var(--text-s);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
  }

  /* The small search-friendly line above a section heading */
  .kicker {
    display: block;
    margin-bottom: 0.6rem;
    font-family: var(--font);
    font-stretch: 100%;
    color: currentColor;
    opacity: 0.85;
  }

  /* ---- Big condensed display type ------------------------------------ */
  .display, .hero__name {
    font-family: var(--font-display);
    font-synthesis: none;      /* never fake a bold version */
    font-stretch: 62%;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.88;
    letter-spacing: -0.01em;
  }
  /* Section titles: one size and one gap below, in every section */
  .display { font-size: var(--text-xl); text-wrap: balance; }
  /* A few section titles break the pattern on purpose: bigger, in
     sentence case, with no small label above (Illustration, Shop my
     patterns). This keeps the page from feeling built from repeated blocks. */
  .display--sentence {
    font-size: calc(var(--text-xl) * 1.3);
    text-transform: none;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.02em;
  }

  /* Item titles: writing headlines, service names, publication names */
  .title, .worklist__title, .service h3, .seen__list, .copy-email__action {
    font-size: var(--text-l);
    font-stretch: 87%;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  /* ---- Text link with an arrow ↗ ------------------------------------- */
  .arrow-link {
    display: inline-flex;
    gap: 0.4em;
    align-items: center;
    padding-block: 0.5rem;           /* comfy tap target on phones */
    text-decoration: none;
    border-bottom: var(--rule);
  }
  .arrow-link::after { content: "↗"; font-size: 1.25em; line-height: 1; transition: translate 0.2s; }
  .arrow-link:hover::after { translate: 2px -2px; }
  .arrow-link--big { font-size: var(--text-s); }

  .section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: var(--title-gap);
  }


  /* ---- HEADER --------------------------------------------------------
     One quiet line: Christabel's hand-drawn "CL" (home) on the left, the
     menu on the right, with "Work with me" as the one outlined button.
     Phones: the monogram and a Menu button; the menu opens full screen
     over one of her patterns (main.js). Without JavaScript the links
     simply wrap underneath. */
  .top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem) var(--pad) 0;
  }
  .top a { text-decoration: none; }
  .top__mark { display: block; flex: none; }
  .top__mark img { height: clamp(2rem, 1.6rem + 1.2vw, 2.75rem); width: auto; }
  .top__nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; }
  .top__nav a { display: inline-block; padding-block: 0.4rem; }   /* tap target */
  .top__nav a:hover, .top__nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.3em;
    text-decoration-thickness: 1.5px;
  }
  /* "Work with me": the one outlined button */
  .top__cta a, .top__menu-btn {
    padding: 0.45em 1.05em;
    border: 1.5px solid currentColor;
    border-radius: 99px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
  }
  .top__cta a:hover, .top__cta a:focus-visible, .top__cta a[aria-current="page"], .top__menu-btn:hover {
    background: var(--basalt);
    color: var(--limewash);
  }
  .top__menu-btn { display: none; font: inherit; color: inherit; background: none; cursor: pointer; }

  /* Phones and small tablets, with JavaScript: Menu button + full-screen menu */
  @media (max-width: 47.99rem) {
    .js .top__menu-btn { display: block; }
    .js .top__nav {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 50;
      place-items: center;
      padding: 5rem var(--pad) var(--pad);
      background: var(--limewash) url("../img/patterns/mughal-florals-light-blue-pattern.jpg") center / 26rem auto repeat;
    }
    .js .top.is-open .top__nav { display: grid; }
    .js .top__nav ul {
      flex-direction: column;
      gap: 0.25rem;
      width: min(22rem, 100%);
      padding: 1.75rem 1.5rem 2rem;
      background: var(--limewash);
      border-radius: 1.25rem;
      box-shadow: 0 1.25rem 2.5rem -1rem rgb(42 36 32 / 0.5);
      text-align: center;
    }
    .js .top__nav a {
      font-family: var(--font-display);
      font-weight: 400;
      font-size: clamp(1.9rem, 8vw, 2.5rem);
      line-height: 1.15;
      color: var(--tezontle);
    }
    .js .top__cta { margin-top: 0.75rem; }
    .js .top__cta a { font-size: 1.35rem; font-family: var(--font); font-weight: 600; color: var(--basalt); }
    /* filled black (hover, or on the Work with me page): white text */
    .js .top__cta a:hover, .js .top__cta a:focus-visible, .js .top__cta a[aria-current="page"] {
      background: var(--basalt);
      color: var(--limewash);
    }
    /* while open: the button turns into "Close" above the menu */
    .js .top.is-open { z-index: 60; }
    .js .top.is-open .top__menu-btn {
      position: fixed;
      top: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
      right: var(--pad);
      z-index: 51;
      background: var(--limewash);
      color: var(--basalt);
    }
  }
  .menu-open { overflow: hidden; }   /* no page scrolling behind the open menu */

  /* Homepage: while the hero (with the big hand-drawn name) is on screen,
     the CL monogram is hidden so the name isn't repeated. Once you scroll
     past the painting, the header slides down as a slim paper bar with
     the CL, and stays at the top (main.js adds .is-stuck). */
  .top--over .top__mark { visibility: hidden; }
  .top--over.is-stuck {
    position: fixed;
    z-index: 40;
    padding-bottom: clamp(0.6rem, 0.4rem + 0.6vw, 0.9rem);
    background: var(--limewash);
    border-bottom: var(--rule);
  }
  .top--over.is-stuck .top__mark { visibility: visible; }
  @media (prefers-reduced-motion: no-preference) {
    .top--over.is-stuck { animation: header-in 0.35s ease-out; }
  }
  @keyframes header-in { from { translate: 0 -100%; } }


  /* Homepage: the menu floats over the hero painting with no background.
     The hero gets extra space at the top so the name clears the menu. */
  .top--over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
  }
  /* Room above the name for the menu (see .hero__stage) */
  .hero--under-menu { --menu-space: 3.5rem; }
  @media (min-width: 48rem) {
    .hero--under-menu { --menu-space: 3rem; }
  }

  /* ---- HERO ----------------------------------------------------------- */
  .hero { position: relative; }

  /* The name fills the width of any screen: the font size is a fixed
     fraction of the space between the side margins. If the name ever
     changes, adjust --fit until the longest line touches both edges. */
  .hero__name {
    --fit: 0.199;             /* measured for Affigue */
    position: relative;
    z-index: 1;
    font-size: calc((100vw - 2 * var(--pad)) * var(--fit));
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.02em;
    color: var(--tezontle);
    /* solid letters laid on top of the painting, like cut paper */
  }
  .hero__line { display: block; white-space: nowrap; }

  /* Hand-drawn name: one image per letter. --letter-h (set on .hero,
     below) makes the first line ("CHRISTABEL") fill the width exactly;
     9.31 is that line's total width divided by the letters' height. If a letter is redrawn wider or
     narrower, update this number. */
  .hero__name--drawn .hero__line { display: flex; align-items: flex-end; }
  .hero__name--drawn .hero__line:last-child { justify-content: flex-end; margin-top: calc(var(--letter-h) * 0.08); }
  .hero__name--drawn picture, .hero__name--drawn img { display: block; }
  .hero__name--drawn img { height: var(--letter-h); width: auto; max-width: none; }
  /* Wider screens: CHRISTABEL LOBO on one line (9.31 + 0.45 gap + 4.0) */
  @media (min-width: 48rem) {
    .hero__name--drawn {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }
    .hero__name--drawn .hero__line:last-child { margin-top: 0; }
  }
  .hero__line:last-child { text-align: right; }

  /* Each letter tilts a little, like hand-cut or hand-lettered type,
     and pops in one after another when the page opens. */
  .letter {
    display: inline-block;
    rotate: var(--rot, 0deg);
    translate: 0 var(--ly, 0);
  }
  .letter:nth-child(3n+1) { --rot: -2deg;   --ly: 0.02em; }
  .letter:nth-child(3n+2) { --rot: 1.5deg;  --ly: -0.03em; }
  .letter:nth-child(3n)   { --rot: -0.5deg; --ly: 0.01em; }

  @media (prefers-reduced-motion: no-preference) {
    .letter {
      animation: letter-in 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) backwards;
      animation-delay: calc(var(--i) * 55ms + 150ms);  /* --i is set per letter in the HTML */
    }
  }
  @keyframes letter-in {
    from { opacity: 0; translate: 0 0.35em; rotate: calc(var(--rot, 0deg) - 14deg); }
  }






  /* LAYOUT
     Phones and tablets: the painting on top with the name in its sky,
     then the intro below it on plain paper.
     Large screens (72rem+): the wide painting fills the section and the
     intro is set straight onto its sand, between the small cacti on the
     left and the tall ones on the right. No box: the text sits on the art.
     Everything shares one grid cell so the painting can sit behind. */
  .hero {
    --letter-h: calc((100vw - 2 * var(--pad)) / 9.31);   /* see the name, above */
    display: grid;
    overflow: hidden;
    background: var(--limewash);
  }
  @media (min-width: 48rem) {
    .hero { --letter-h: calc((100vw - 2 * var(--pad)) / 13.76); }   /* one line */
  }
  .hero__picture { display: contents; }    /* the <img> itself joins the grid */
  .hero__bg {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 12% top;              /* phones: sun in view, tall cactus just off the right edge */
  }
  @media (min-width: 48rem) {
    .hero__bg { object-position: center top; }
  }

  /* Parallax: while the page scrolls past the hero, the painting drifts
     down a little, so it moves slower than the text and seems to sit
     further back. Pure CSS (browsers that can't do it just scroll
     normally); off for visitors who prefer less motion. To make it
     stronger or gentler, change 35vh. */
  /* Laptops only (72rem+), where the text sits on the painting. On phones
     and tablets the painting is above the intro, so drifting it down
     would slide it over the text. */
  @media (prefers-reduced-motion: no-preference) and (min-width: 72rem) {
    @supports (animation-timeline: scroll()) {
      .hero__bg {
        animation: hero-drift linear both;
        animation-timeline: scroll(root);
        animation-range: 0 100vh;
      }
    }
  }
  @keyframes hero-drift {
    to { translate: 0 35vh; }
  }

  .hero__stage {
    grid-area: 1 / 1;
    position: relative;
    padding: calc(var(--menu-space, 0rem) + clamp(2.5rem, 1rem + 8vw, 7rem)) var(--pad) 0;
    min-height: 180vw;                     /* phones: how much painting shows (taller = more zoomed in) */
  }
  @media (min-width: 48rem) {
    .hero__stage { min-height: 50vw; }     /* the wide painting is 2:1 */
  }

  .hero__intro {
    grid-row: 2;
    position: relative;
    display: grid;
    gap: 1.25rem;
    padding: clamp(2rem, 1rem + 4vw, 3.5rem) var(--pad) var(--gap);
  }
  @media (min-width: 72rem) {
    .hero__intro {
      grid-area: 1 / 1;
      align-self: start;
      width: min(38vw, 36rem);
      margin-left: 18vw;
      /* starts just below the name */
      padding: calc(var(--menu-space, 0rem) + clamp(2.5rem, 1rem + 8vw, 7rem) + var(--letter-h) + 2.5rem) 0 var(--gap);
      /* a soft sunlit glow around the letters (no box) so the painted
         hill line behind them never makes a word hard to read */
      text-shadow:
        0 0 2px rgb(236 206 120 / 0.95),
        0 0 8px rgb(236 206 120 / 0.8),
        0 0 18px rgb(236 206 120 / 0.55);
    }
    .hero__sub { font-weight: 500; }
  }
  .statement {
    text-wrap: balance;      /* no single word left alone on the last line */
    font-size: var(--text-l);
    font-weight: 600;
    font-stretch: 87%;
    line-height: 1.15;
    max-width: 32ch;
  }
  .hero__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
  /* The normal-size paragraph under the big statement */
  .hero__text { display: grid; gap: 1rem; }
  .hero__sub { max-width: 42ch; }



  /* ---- AS SEEN IN: a tezontle band of publication names ---------------- */
  .seen {
    background: var(--tezontle);
    color: var(--limewash);
    padding: 1.5rem var(--pad) 1.75rem;
  }
  .seen .label { margin-bottom: 0.75rem; }
  /* The ribbon: publication names glide right to left in a loop.
     Change 45s to make it faster (smaller) or slower (bigger). */
  .ribbon {
    margin-inline: calc(-1 * var(--pad));   /* runs edge to edge */
    overflow: hidden;
  }
  .ribbon__track {
    display: flex;
    width: max-content;
  }
  .seen__list {
    display: flex;
    flex: none;
    gap: 0.9rem;
    padding-inline: 0.45rem;
    white-space: nowrap;
    line-height: 1.2;
  }
  .seen__list li::after { content: "✺"; color: var(--turmeric); margin-left: 0.9rem; }

  @media (prefers-reduced-motion: no-preference) {
    .ribbon__track { animation: ribbon 45s linear infinite; }
    .ribbon:hover .ribbon__track { animation-play-state: paused; }
  }
  @keyframes ribbon { to { translate: -50% 0; } }

  /* Less motion: no scrolling, the names simply wrap onto lines */
  @media (prefers-reduced-motion: reduce) {
    .ribbon { margin-inline: 0; }
    .ribbon__track, .seen__list { width: auto; flex-wrap: wrap; white-space: normal; }
    .seen__list[aria-hidden="true"] { display: none; }
  }


  /* ---- SELECTED WRITING: story list with thin rules and spot pictures - */
  .writing { padding: var(--gap) var(--pad); background: var(--sand); }
  .writing .display { color: var(--tezontle); }

  .worklist { border-top: var(--rule); }
  .worklist li { border-bottom: var(--rule); }
  .worklist a {
    display: grid;
    grid-template-columns: 3.25rem 1fr 1.5rem;
    gap: 0.4rem 1rem;
    padding-block: 1.1rem;
    text-decoration: none;
  }
  .worklist__num { padding-top: 0.4em; }
  /* The small round picture at the start of each story (a spot drawing,
     or for now a swatch of one of Christabel's patterns) */
  .worklist__spot {
    grid-row: span 2;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    rotate: -4deg;
    transition: rotate 0.3s, scale 0.3s;
  }
  .worklist li:nth-child(even) .worklist__spot { rotate: 5deg; }
  .worklist a:hover .worklist__spot { rotate: 0deg; scale: 1.08; }
  .worklist__meta { grid-column: 2; grid-row: 2; }
  .worklist a::after { content: "↗"; grid-column: 3; grid-row: 1; font-size: 1.4rem; line-height: 1; }
  .worklist a:hover { background: var(--tezontle); color: var(--limewash); }

  @media (min-width: 48rem) {
    .worklist a {
      grid-template-columns: 4.5rem 1.4fr 1fr 2rem;
      align-items: center;
      padding-inline: 0.25rem;
    }
    .worklist__meta { grid-column: 3; grid-row: 1; }
    .worklist a::after { grid-column: 4; }
    .worklist__spot { grid-row: 1; width: 3.5rem; }
  }


  /* ---- INNER PAGES: page intro + theme links (e.g. /writing/) -------- */
  .page-intro {
    padding: clamp(2.5rem, 1rem + 6vw, 5rem) var(--pad) var(--gap);
    display: grid;
    gap: 1rem;
    justify-items: start;
  }
  .page-intro .display { color: var(--tezontle); }

  /* Floral corner on the illustrations page: its flat base rests exactly
     on the top edge of the next section, like plants growing on a ledge.
     To make it bigger or smaller, change width. */
  .page-intro--floral { position: relative; z-index: 1; }
  .page-intro__floral {
    position: absolute;
    right: 0;
    bottom: 0;
    width: clamp(10rem, 42vw, 38rem);
    height: auto;
    z-index: -1;             /* behind the text, above the background */
    pointer-events: none;
  }
  /* Phones: extra room under the intro so the floral sits below the pills */
  @media (max-width: 48rem) {
    .page-intro--floral { padding-bottom: max(var(--gap), 36vw); }
  }
  .page-intro__text { max-width: 46ch; }
  .page-intro .label a { text-decoration: none; }
  .page-intro .label a:hover { text-decoration: underline; }

  /* Row of pill links that jump to each theme on the page */
  .jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
  .jump a {
    display: inline-block;
    padding: 0.5em 1em;                      /* comfy tap target */
    border: 1.5px solid currentColor;
    border-radius: 99px;
    font-size: var(--text-s);
    font-weight: 600;
    text-decoration: none;
  }
  .jump a:hover { background: var(--tezontle); border-color: var(--tezontle); color: var(--limewash); }

  /* One theme of clips; alternates sand / limewash */
  .writing-group { padding: var(--gap) var(--pad); scroll-margin-top: 1rem; }
  .writing-group--sand  { background: var(--sand); }
  .writing-group .display { color: var(--tezontle); margin-bottom: var(--title-gap); }
  /* "I'm Yahoo Health's yoga expert. All my Yahoo Health stories ↗" */
  .writing-group__more { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin-top: 1.5rem; }

  /* The "why it matters" line under each headline */
  .worklist__note { grid-column: 2; max-width: 52ch; }
  .worklist__pdf {
    margin-left: 0.4em;
    padding: 0.1em 0.45em;
    border: 1px solid currentColor;
    border-radius: 4px;
  }
  @media (min-width: 48rem) {
    .worklist--notes .worklist__note { grid-column: 2; grid-row: 2; }
  }


  /* ---- GALLERIES (/illustrations/) -----------------------------------
     .gallery--comm  commissions: big cards, 1 column → 3
     .gallery--pat   patterns: square swatches, 2 columns → 4
     .gallery--art   paintings: staggered columns, 1 → 2 → 3 */
  .gallery-group { padding: var(--gap) var(--pad); scroll-margin-top: 1rem; }
  .gallery-group--sand { background: var(--sand); }
  .gallery-group--dark { background: var(--basalt); color: var(--sand); }
  .gallery-group .display { color: var(--tezontle); margin-bottom: var(--title-gap); }
  .gallery-group--dark .display { color: var(--sand); }
  .gallery-group__intro { max-width: 46ch; margin: calc(var(--title-gap) * -0.5) 0 var(--title-gap); }

  .gallery img { width: 100%; height: auto; transition: translate 0.25s; }
  .gallery li:hover img { translate: 0 -4px; }
  .gallery figcaption { display: grid; gap: 0.15rem; margin-top: 0.6rem; }
  .gallery__title { font-weight: 600; }
  .gallery__meta {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .gallery--comm { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
  @media (min-width: 60rem) { .gallery--comm { grid-template-columns: repeat(3, 1fr); } }
  .gallery--comm img { aspect-ratio: 4 / 3; object-fit: cover; }

  .gallery--pat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  @media (min-width: 48rem) { .gallery--pat { grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; } }
  @media (min-width: 75rem) { .gallery--pat { grid-template-columns: repeat(4, 1fr); } }
  .gallery--pat img { aspect-ratio: 1; object-fit: cover; }

  .gallery--art { columns: 1; column-gap: clamp(1rem, 3vw, 2.5rem); }
  @media (min-width: 34rem) { .gallery--art { columns: 2; } }
  @media (min-width: 60rem) { .gallery--art { columns: 3; } }
  .gallery--art li { break-inside: avoid; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }


  /* ---- ABOUT PAGE (/about/) ------------------------------------------- */
  .about__lede { max-width: 30ch; }
  /* About intro with Christabel's headshot: below the text on phones,
     beside it on wider screens, tilted slightly like a print on a table */
  .about__portrait { display: block; width: min(100%, 22rem); margin-top: 1rem; }
  .about__portrait img {
    width: 100%;
    height: auto;
    rotate: 1.5deg;
    box-shadow: 0 1rem 2rem -1rem rgb(42 36 32 / 0.45);
  }
  @media (min-width: 48rem) {
    .page-intro--portrait {
      grid-template-columns: 1fr minmax(16rem, 26rem);
      column-gap: clamp(2rem, 5vw, 5rem);
      align-items: center;
    }
    .page-intro--portrait > :not(.about__portrait) { grid-column: 1; }
    .about__portrait { grid-column: 2; grid-row: 1 / span 3; width: 100%; margin: 0; }
  }
  .about-story, .about-facts, .about-credits, .about-bio { padding: var(--gap) var(--pad); }
  .about-story  { background: var(--sand); }
  .about-credits { background: var(--cantera); }
  .about-story .display, .about-facts .display,
  .about-credits .display, .about-bio .display { color: var(--tezontle); margin-bottom: var(--title-gap); }
  /* "Between places" story cards: one illustration per paragraph.
     Phones and tablets: a row you swipe through, with the next card
     peeking in. Large screens: all four side by side. */
  .story-cards {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--pad));
    padding: 0.5rem var(--pad) 1.25rem;
    scroll-padding-inline: var(--pad);
    scrollbar-width: thin;
  }
  .story-card {
    flex: 0 0 min(82%, 24rem);
    scroll-snap-align: start;
    display: grid;
    gap: 0.75rem;
    align-content: start;
  }
  .story-card__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 0.5rem;
    rotate: -1.5deg;
    box-shadow: 0 0.9rem 1.6rem -0.8rem rgb(42 36 32 / 0.45);
  }
  .story-card:nth-child(even) .story-card__img { rotate: 1.5deg; }
  @media (min-width: 64rem) {
    .story-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: clamp(1.5rem, 2.5vw, 2.5rem);
      overflow: visible;
      margin-inline: 0;
      padding: 0.5rem 0 0;
    }
  }

  /* "At a glance" list: label on the left, answer on the right */
  .facts { border-top: var(--rule); }
  .facts div {
    display: grid;
    gap: 0.2rem 1rem;
    padding-block: 0.9rem;
    border-bottom: var(--rule);
  }
  @media (min-width: 48rem) { .facts div { grid-template-columns: 16rem 1fr; } }
  .facts dt {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 0.2em;
  }

  .credits { display: grid; gap: 1rem; margin-bottom: var(--gap); }
  @media (min-width: 48rem) { .credits { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 75rem) { .credits { grid-template-columns: repeat(3, 1fr); } }
  .credits li { border: var(--rule); border-radius: 1rem; padding: 1.25rem; display: grid; gap: 0.5rem; align-content: start; }
  .credits__meta, .about-bio__note {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .bylines { max-width: 60ch; font-size: var(--text-l); line-height: 1.35; margin-bottom: 1.5rem; }

  .about-bio__note { margin: calc(var(--title-gap) * -0.5) 0 1rem; }
  .bio {
    max-width: 60ch;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-left: 4px solid var(--tezontle);
    background: var(--sand);
    margin-bottom: 1.5rem;
  }


  /* ---- HOMEPAGE: pattern shops ------------------------------------- */
  .pattern-shops { padding: var(--gap) var(--pad); }
  .pattern-shops .display { color: var(--tezontle); margin-bottom: var(--title-gap); }
  .pattern-shops__intro { max-width: 46ch; margin: calc(var(--title-gap) * -0.5) 0 var(--title-gap); }
  .pattern-shops .shops { margin-bottom: 1.5rem; }

  /* ---- WORK WITH ME (/work-with-me/) ---------------------------------- */
  .wwm-section { padding: var(--gap) var(--pad); scroll-margin-top: 1rem; }
  .wwm-section--sand    { background: var(--sand); }
  .wwm-section--cantera { background: var(--cantera); }
  .wwm-section .display { color: var(--tezontle); margin-bottom: var(--title-gap); }
  .wwm-section__intro { max-width: 52ch; margin: calc(var(--title-gap) * -0.5) 0 var(--title-gap); }

  /* Four offers: 1 column → 2 → 4 */
  .offers { counter-reset: s; display: grid; gap: 1rem; }
  @media (min-width: 48rem) { .offers { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 80rem) { .offers { grid-template-columns: repeat(4, 1fr); } }
  .offer {
    counter-increment: s;
    position: relative;
    display: grid;
    gap: 0.75rem;
    align-content: start;
    padding: 1.25rem;
    border: var(--rule);
    border-radius: 1rem;
    scroll-margin-top: 1rem;
  }
  .offer::before {
    content: "(0" counter(s) ")";
    position: absolute; top: 1.1rem; right: 1.25rem;
    font-size: var(--text-l); font-stretch: 75%; font-weight: 700;
  }
  .offer { overflow: hidden; }
  /* One of Christabel's patterns across the top of each service card */
  .offer__img {
    width: calc(100% + 2.5rem);
    max-width: none;
    margin: -1.25rem -1.25rem 0.25rem;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-bottom: var(--rule);
  }
  /* The (01)–(04) number sits on a small pill over the pattern */
  .offer:has(.offer__img)::before {
    top: 0.85rem;
    right: 0.85rem;
    z-index: 1;
    padding: 0.1em 0.55em;
    border-radius: 99px;
    background: var(--limewash);
  }
  .offer:has(.offer__img) .title { padding-right: 0; }
  .offer .title { padding-right: 3rem; }
  .offer__incl-label { margin-top: 0.5rem; }
  .offer__incl { display: grid; gap: 0.35rem; padding-left: 1.1rem; list-style: disc; }
  .offer .arrow-link { justify-self: start; margin-top: 0.5rem; }

  /* Pattern swatches: 2 → 3 → 6 across */
  .swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
  @media (min-width: 48rem) { .swatches { grid-template-columns: repeat(3, 1fr); } }
  @media (min-width: 80rem) { .swatches { grid-template-columns: repeat(6, 1fr); } }
  .swatches img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 0.5rem; }

  /* Shop cards (Spoonflower, Raspberry Creek, Pattern Bank) */
  .wwm-shops__title { margin: var(--title-gap) 0 1rem; }
  .shops { display: grid; gap: 1rem; }
  @media (min-width: 48rem) { .shops { grid-template-columns: repeat(3, 1fr); } }
  /* Each card: one of Christabel's patterns on top, the shop name below */
  .shops a {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: var(--rule);
    border-radius: 1rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }
  .shops__img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-bottom: var(--rule);
    transition: scale 0.4s;
  }
  .shops__text { display: grid; gap: 0.35rem; padding: 1rem 3.25rem 1.25rem 1.25rem; }
  .shops a::after { content: "↗"; position: absolute; right: 1.25rem; bottom: 1.4rem; font-size: 1.4rem; line-height: 1; }
  .shops a:hover { background: var(--tezontle); border-color: var(--tezontle); color: var(--limewash); }
  .shops a:hover .shops__img { scale: 1.04; }

  /* Process steps, numbered 01–04 */
  .steps { counter-reset: step; display: grid; gap: 1.5rem; }
  @media (min-width: 60rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
  .steps li { counter-increment: step; display: grid; gap: 0.5rem; align-content: start; border-top: var(--rule); padding-top: 1rem; }
  .steps li::before { content: "0" counter(step); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; }

  /* FAQ: tap a question to open it */
  .faq { border-top: var(--rule); max-width: 60rem; }
  .faq__item { border-bottom: var(--rule); }
  .faq__item summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.1rem;
    cursor: pointer;
    list-style: none;
    font-size: var(--text-l);
    font-stretch: 87%;
    font-weight: 700;
    line-height: 1.1;
  }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after { content: "+"; font-size: 1.6rem; line-height: 1; transition: rotate 0.2s; }
  .faq__item[open] summary::after { rotate: 45deg; }
  .faq__item p { max-width: 60ch; padding-bottom: 1.25rem; }

  /* Enquiry form */
  .enquiry { display: grid; gap: 1.25rem; max-width: 60rem; }
  @media (min-width: 48rem) { .enquiry { grid-template-columns: 1fr 1fr; } }
  .enquiry__row { display: grid; gap: 0.4rem; }
  .enquiry__row--full, .enquiry__note, .enquiry__send { grid-column: 1 / -1; }
  .enquiry label {
    font-size: var(--text-s);
    font-weight: 600;
  }
  .enquiry input, .enquiry select, .enquiry textarea {
    width: 100%;
    padding: 0.85rem 1rem;             /* big enough to tap comfortably */
    border: var(--rule);
    border-radius: 0.5rem;
    background: var(--limewash);
    color: var(--basalt);
    font-size: max(16px, var(--text-m)); /* 16px+ stops phones zooming in */
  }
  .enquiry textarea { resize: vertical; }
  .enquiry input:focus-visible, .enquiry select:focus-visible, .enquiry textarea:focus-visible {
    outline: 3px solid var(--tezontle);
    outline-offset: 2px;
  }
  .enquiry__note { font-size: var(--text-s); }
  .enquiry__send {
    justify-self: start;
    padding: 1rem 2rem;
    border: 0;
    border-radius: 99px;
    background: var(--tezontle);
    color: var(--limewash);
    font-size: var(--text-s);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
  }
  .enquiry__send:hover { background: var(--basalt); }
  /* The spam trap: moved off-screen so people never see it */
  .enquiry__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .form-status {
    max-width: 60rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--tezontle);
    background: var(--limewash);
    font-weight: 600;
  }


  /* ---- ANIMATION LOOPS (/animations/) ---------------------------------
     Phones: one column. Tablets and up: three tall (9:16) loops per row.
     A wide (16:9) loop with class "loop--wide" runs the full width, so the
     evil eye sits in the middle, three loops above and three below. */
  .loops {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
  }
  @media (min-width: 48rem) {
    .loops { grid-template-columns: repeat(3, 1fr); }
    .loop--wide { grid-column: 1 / -1; }
  }

  .loop video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: var(--sand);
  }
  .loop--wide video { aspect-ratio: 16 / 9; }
  .loop figcaption { display: grid; gap: 0.15rem; margin-top: 0.75rem; }
  .loop__title { font-weight: 600; }
  .loop__place {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }


  /* ---- GALLERY VIEWER (opens when you click a piece) ------------------ */
  .gallery__link { display: block; cursor: zoom-in; }

  .viewer {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: clamp(1rem, 4vw, 3rem);
    border: 0;
    background: transparent;
    color: var(--sand);
  }
  .viewer::backdrop { background: rgb(42 36 32 / 0.97); }   /* basalt */
  .viewer[open] { display: grid; place-items: center; }
  .viewer__figure { display: grid; justify-items: center; gap: 0.75rem; }
  .viewer__img {
    max-width: min(92vw, 1400px);
    max-height: calc(100dvh - 8rem);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.5);
  }
  .viewer__caption {
    font-size: var(--text-s);
    font-weight: 600;
    text-align: center;
  }
  .viewer__btn {
    position: fixed;
    width: 3rem;
    height: 3rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: rgb(42 36 32 / 0.6);
    color: var(--limewash);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }
  .viewer__btn:hover { background: var(--limewash); color: var(--basalt); }
  .viewer__btn:focus-visible { outline: 3px solid var(--limewash); }
  .viewer__close { top: 1rem; right: 1rem; }
  .viewer__prev  { left: 1rem;  top: 50%; translate: 0 -50%; }
  .viewer__next  { right: 1rem; top: 50%; translate: 0 -50%; }
  /* Phones: arrows move to the bottom so they don't cover the picture */
  @media (max-width: 40rem) {
    .viewer__prev, .viewer__next { top: auto; bottom: 1rem; translate: none; }
  }


  /* ---- FEATURED STORY (homepage, top of Selected writing) ------------ */
  .feature {
    display: grid;
    gap: 1rem;
    justify-items: start;
    margin-bottom: var(--title-gap);
    padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
    background: var(--limewash);
    border-left: 6px solid var(--tezontle);
  }
  .feature__title {
    max-width: 22ch;
    font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem);
    font-stretch: 80%;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }
  .feature__title a { text-decoration: none; }
  .feature__title a:hover { color: var(--tezontle); }
  .feature__dek { max-width: 52ch; }

  /* Tagline under each service name ("Words people actually want to read.") */
  .service__tagline {
    font-size: var(--text-m);
    font-style: italic;
    font-weight: 500;
    margin-top: -0.35rem;
  }

  /* ---- GUIDEBOOK COVERS (homepage) --------------------------------------
     The books as objects: slightly tilted covers with a shadow.
     Phones: 2 across, then 3; wide screens: all 5 in a row. */
  .covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.25rem;
    margin-bottom: 1.5rem;
  }
  @media (min-width: 40rem) { .covers { grid-template-columns: repeat(3, 1fr); } }
  @media (min-width: 64rem) { .covers { grid-template-columns: repeat(5, 1fr); } }
  .covers a { display: grid; gap: 0.35rem; text-decoration: none; }
  .covers img {
    width: 100%;
    aspect-ratio: 13 / 20;
    object-fit: cover;
    margin-bottom: 0.5rem;
    box-shadow: 0 0.9rem 1.6rem -0.6rem rgb(42 36 32 / 0.45);
    rotate: -2deg;
    transition: rotate 0.25s, translate 0.25s;
  }
  .covers li:nth-child(even) img { rotate: 2deg; }
  .covers a:hover img { rotate: 0deg; translate: 0 -6px; }
  .covers__title { font-weight: 700; line-height: 1.2; }

  /* ---- PATTERN BANDS -------------------------------------------------
     Full-width strips of Christabel's patterns between sections.
     In the HTML, each band sets its picture:
       <div class="band">
         <div class="band__pattern" style="background-image: url(assets/img/patterns/….jpg)"></div>
     To make the pattern look bigger or smaller, change --tile.
     The pattern slides slowly as you scroll (not for reduced-motion users). */
  .band {
    --tile: 30rem;                              /* size of one repeat */
    position: relative;
    height: clamp(14rem, 55vw, 30rem);
    display: flex;
    align-items: end;
    padding: var(--pad);
    overflow: hidden;
  }
  /* The pattern itself, filling the band edge to edge */
  .band__pattern {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: var(--tile) auto;
    background-repeat: repeat;
  }
  @media (min-width: 48rem) { .band { --tile: 36rem; } }
  /* The trellis file already holds 2×2 repeats, so it's shown larger to
     match the scale of the other patterns */
  /* Bands vary in height so they don't feel like a repeating block:
     the trellis is tall, the nazar a thin strip, the talavera in between. */
  .band--gulf { height: clamp(7rem, 16vw, 11rem); }
  .band--trellis { --tile: 44rem; }
  @media (min-width: 48rem) { .band--trellis { --tile: 64rem; } }


  .band__tag {
    position: relative;             /* sits above the pattern */
    width: fit-content;
    background: var(--limewash);
    color: var(--basalt);
    padding: 0.45em 0.9em;
    border-radius: 99px;
    font-size: var(--text-s);
    font-weight: 600;
  }

  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      .band__pattern {
        animation: pattern-slide linear both;
        animation-timeline: view();
      }
    }
  }
  @keyframes pattern-slide {
    from { background-position: center 0; }
    to   { background-position: center calc(var(--tile) * -0.35); }
  }


  /* ---- ILLUSTRATION: floating collage on basalt ----------------------
     Pieces of different sizes overlap like prints on a table.
     Normal (no JavaScript / less motion): a strip you swipe sideways.
     With JavaScript, main.js adds "art--pinned": the section sticks to
     the screen while you scroll down and the collage floats left. */
  .art {
    background: var(--basalt);
    color: var(--sand);
    padding-block: var(--gap);
  }
  .art .section-head { padding-inline: var(--pad); }
  .art__intro { max-width: 46ch; padding-inline: var(--pad); margin-top: calc(var(--title-gap) * -0.5); }

  /* The window the collage is seen through. Its height sets the size of
     everything inside: 1 "unit" = 1% of this height (1cqh). */
  .collage {
    height: 72svh;
    min-height: 22rem;
    container-type: size;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .collage__table {
    --table-w: 345;                     /* table width in units; widen if you add pieces */
    position: relative;
    width: calc(var(--table-w) * 1cqh);
    height: 100%;
    margin-inline: var(--pad);
  }

  .collage__piece {
    position: absolute;
    left: calc(var(--x) * 1cqh);
    top: calc(var(--y) * 1cqh);
    height: calc(var(--h) * 1cqh);
    rotate: var(--r, 0deg);
    z-index: var(--z, 1);
  }
  .collage__piece figure { position: relative; height: 100%; }
  .collage__piece img {
    height: 100%;
    width: auto;
    max-width: none;
    box-shadow: 0 1.2cqh 3cqh -1cqh rgb(0 0 0 / 0.5);
    transition: scale 0.3s var(--ease, ease);
  }
  .collage__piece--card img  { border-radius: 2.2cqh; }
  .collage__piece--round     { aspect-ratio: 1; }
  .collage__piece--round img { width: 100%; object-fit: cover; border-radius: 50%; }
  .collage__piece:hover { z-index: 10; }
  .collage__piece:hover img { scale: 1.03; }

  /* Caption: a small label that appears on hover (always read by screen readers) */
  .collage__piece figcaption {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0.35em 0.8em;
    border-radius: 99px;
    background: var(--limewash);
    color: var(--basalt);
    font-size: var(--text-xs);
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
  }
  .collage__piece:hover figcaption { opacity: 1; }

  /* ---- Pinned version (switched on by main.js) ---- */
  .art--pinned { padding-block: 0; }   /* main.js sets the section's height */
  .art--pinned .art__pin {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding-top: clamp(2rem, 1rem + 4vw, 4rem);
    overflow: hidden;
  }
  .art--pinned .collage {
    flex: 1;
    height: auto;
    min-height: 0;
    overflow: visible;
    margin-block: 1rem clamp(1rem, 4vh, 2.5rem);
  }
  .art--pinned .collage__table { will-change: transform; }


  /* ---- SHOP TEASER (hidden in the HTML until the shop is live) ------- */
  .shop-teaser { padding: var(--gap) var(--pad); display: grid; gap: 1rem; justify-items: start; }


  /* ---- GUIDEBOOKS (inside the writing section) -------------------------- */
  /* Writing page: the guidebooks are their own section on pink cantera */
  .books {
    background: var(--cantera);
    color: var(--basalt);
    padding: var(--gap) var(--pad);
  }
  .books__lede { margin: 0.75rem 0 var(--title-gap); color: var(--tezontle); }   /* large text: 4.1:1 on cantera passes */

  /* Homepage: the guidebooks sit at the end of the writing section, on
     its sand (the story list's bottom line separates them) */
  .writing .books {
    background: none;
    padding: var(--gap) 0 0;
  }
  .writing .books__lede {
    margin: 0.75rem 0 1rem;
    font-family: var(--font-display);
    font-size: var(--text-l);
    line-height: 1.1;
  }
  .books__sub { max-width: 46ch; margin-bottom: 2rem; }
  /* Homepage: the five covers fill the full width of the section */
  @media (min-width: 48rem) {
    .writing .covers { grid-template-columns: repeat(5, 1fr); gap: 2rem clamp(1.25rem, 2.5vw, 2.5rem); }
  }
  .books__note { margin-top: 1rem; font-size: var(--text-s); }
  .books__list a { text-decoration: none; }
  .books__list a:hover { text-decoration: underline; }
  .books__list { border-top: var(--rule); }
  .books__list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding-block: 0.8rem;
    border-bottom: var(--rule);
    font-weight: 600;
  }
  .books__list li span:last-child { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; }


  /* ---- DRIFTING DRAWINGS ------------------------------------------------
     Christabel's hand-drawn elements sway slowly back and forth in the
     open space of the cream sections (Shop my patterns, Work with me):
     along the top right and beside the bottom link, never across text.
       --top/--bottom  where it sits vertically
       --from          where its trip starts (from the left edge)
       --travel        how far it drifts before turning back
       --size, --dur   how big, and how long one trip takes
     Visitors who prefer less motion see them resting at --from. */
  .pattern-shops, .services { position: relative; overflow: hidden; }
  .pattern-shops > :not(.drifters), .services > :not(.drifters) { position: relative; z-index: 1; }
  .drifters { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
  .drifter { position: absolute; top: var(--top, auto); bottom: var(--bottom, auto); left: var(--from); width: var(--size); }
  .drifter img { width: 100%; height: auto; }
  .drifter--a { --top: 0.75rem; --from: 58vw; --travel: 22vw; --size: clamp(2.5rem, 7vw, 6.5rem); --dur: 26s; --delay: -6s; }
  .drifter--c { --top: 0.75rem; --from: 62vw; --travel: 20vw; --size: clamp(2.5rem, 6.5vw, 6rem); --dur: 24s; --delay: -4s; }
  .drifter--d { --bottom: 0.75rem; --from: 50vw; --travel: 26vw; --size: clamp(2.75rem, 7vw, 6.5rem); --dur: 30s; --delay: -15s; }
  @media (prefers-reduced-motion: no-preference) {
    .drifter { animation: sway var(--dur) ease-in-out var(--delay) infinite alternate; }
  }
  @keyframes sway {
    from { translate: 0 0;                 rotate: -7deg; }
    50%  { translate: calc(var(--travel) / 2) -0.6rem; rotate: 4deg; }
    to   { translate: var(--travel) 0;     rotate: -3deg; }
  }
  /* phones: a little extra room above the heading for the drawings */
  @media (max-width: 47.99rem) {
    .pattern-shops, .services { padding-top: calc(var(--gap) + 2.5rem); }
  }
  /* cards sit on solid paper so nothing shows through them */
  .service { background: var(--limewash); }


  /* ---- WORK WITH ME -------------------------------------------------- */
  .services { padding: var(--gap) var(--pad); }
  .services .display { color: var(--tezontle); margin-bottom: 1rem; }
  .services__intro { max-width: 46ch; margin-bottom: var(--title-gap); }
  .service-list { counter-reset: s; display: grid; gap: 1rem; margin-bottom: 2rem; }
  .service {
    counter-increment: s;
    position: relative;
    border: var(--rule);
    border-radius: 1rem;
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    align-content: start;
  }
  .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .chips li { border: 1.5px solid currentColor; border-radius: 99px; padding: 0.3em 0.8em; }
  @media (min-width: 60rem) {
    .service-list { grid-template-columns: repeat(2, 1fr); }
  }


  /* ---- PRIVACY (and any other plain text page) ------------------------ */
  .legal {
    padding: 0 var(--pad) var(--gap);
    max-width: calc(46rem + 2 * var(--pad));
  }
  .legal h2 {
    margin: 2.5rem 0 0.75rem;
    font-family: var(--font-display);
    font-size: var(--text-l);
    font-weight: 400;
    line-height: 1.1;
    color: var(--tezontle);
  }
  .legal p + p { margin-top: 0.9rem; }
  .legal__updated { margin-top: 2.5rem !important; font-size: var(--text-s); }

  /* ---- 404 ----------------------------------------------------------- */
  .notfound { min-height: 60vh; align-content: start; }
  .notfound__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2rem; }


  /* ---- FOOTER: palm green --------------------------------------------- */
  .bottom {
    background: var(--palm);
    color: var(--limewash);
    padding: var(--gap) var(--pad) var(--pad);
  }
  .bottom__cta { max-width: 14em; }
  .bottom__cta span { display: block; color: var(--sand); }

  .copy-email {
    display: block;
    width: 100%;
    margin-top: 2.5rem;
    padding: 1rem 0;
    border: 0;
    border-block: var(--rule);
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .copy-email__action { display: block; }
  .copy-email__address { font-size: var(--text-s); opacity: 0.85; }
  .copy-email:hover .copy-email__action { color: var(--sand); }
  .copy-email__status { min-height: 1.5em; margin-top: 0.5rem; font-size: var(--text-s); }

  .bottom__grid { display: grid; gap: 1.5rem; margin-block: 2.5rem; }
  .bottom__grid .label { margin-bottom: 0.4rem; }
  @media (min-width: 48rem) {
    .bottom__grid { grid-template-columns: 2fr 1fr 1fr; }
  }
}


/* ---- Headline font everywhere a heading appears --------------------------
   Section headings already use Affigue (.display). These smaller headings
   join them: the bylines ribbon, story headlines, card and book titles,
   the hero brand line, FAQ questions and "Click to copy my email".
   Affigue has one weight, so no bold is faked. Labels, captions, buttons
   and body text stay in Archivo. */
@layer components {
  .seen__list, .title, .worklist__title, .service h3, .feature__title,
  .faq__item summary, .statement, .copy-email__action, .covers__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-synthesis: none;
    font-stretch: normal;
    letter-spacing: 0;
  }
  /* Keep the FAQ's open/close "+" in Archivo: Affigue draws it too small */
  .faq__item summary::after { font-family: var(--font); }
}


/* ==========================================================================
   5. UTILITIES
   ========================================================================== */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
