/* =============================================================
   Anja — paintings and drawings
   Light theme. Display type: Archivo. Body type: Newsreader.
   Signature: every artwork casts a shadow tinted with its own colour,
   the way objects do in Anja's still lifes.
   ============================================================= */

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

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { min-height: 100dvh; }
  img, svg, picture { display: block; max-width: 100%; height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  a { color: inherit; }
  dialog { padding: 0; border: 0; }
  figure { margin: 0; }
}

/* ---------- Tokens and base type ---------- */
@layer base {
  :root {
    --paper: #f7f5fb;
    --paper-deep: #eeebf6;
    --ink: #221e3a;
    --ink-soft: #5e5a78;
    --line: #dad5e6;
    --lilac: #c9b8e8;
    --teal: #2c9dbb;
    --pink: #e5607c;
    --accent: var(--ink-soft);

    --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Newsreader", Georgia, "Times New Roman", serif;

    --wrap: 1180px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2.5rem;
    --space-7: 4rem;
    --space-8: 6.5rem;

    --dur: 380ms;
    --dur-fast: 240ms;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --radius: 4px;

    color-scheme: light;
  }

  html {
    background: var(--paper);
    color: var(--ink);
    scroll-behavior: smooth;
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }

  body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-optical-sizing: auto;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 125%;
    line-height: .98;
    letter-spacing: -.02em;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
  h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-stretch: 118%; }
  h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700; font-stretch: 115%; }
  h3 { font-size: 1.25rem; font-weight: 700; font-stretch: 110%; letter-spacing: -.01em; line-height: 1.15; }
  p { text-wrap: pretty; }

  a { text-decoration-thickness: 1px; text-underline-offset: .16em; }
  a:hover { text-decoration-color: var(--accent); }

  :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
  ::selection { background: var(--lilac); color: var(--ink); }

  .eyebrow {
    font-family: var(--font-display);
    font-stretch: 100%;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .lede { font-size: clamp(1.2rem, 1.6vw, 1.4rem); color: var(--ink-soft); max-width: 40ch; }
  .prose { max-width: 62ch; font-size: 1.2rem; }
  .prose p + p { margin-top: 1.1em; }
  .muted { color: var(--ink-soft); }
}

/* ---------- Page layout ---------- */
@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

  .skip-link {
    position: absolute; left: var(--gutter); top: -100px; z-index: 100;
    background: var(--ink); color: var(--paper);
    font-family: var(--font-display); font-weight: 600;
    padding: .6em 1em; border-radius: var(--radius); text-decoration: none;
  }
  .skip-link:focus { top: var(--space-3); }

  .site-header { position: relative; z-index: 20; padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
  .site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
  .wordmark {
    font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
    font-size: 1.6rem; letter-spacing: -.02em; line-height: 1; text-decoration: none;
  }
  .site-nav ul { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
  .site-nav a {
    display: inline-block; font-family: var(--font-display); font-weight: 500; font-size: .95rem;
    text-decoration: none; padding-block: .35rem; border-bottom: 2px solid transparent;
    transition: border-color var(--dur-fast) var(--ease);
  }
  .site-nav a:hover { border-bottom-color: var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

  .nav-toggle {
    display: none; align-items: center; gap: .6rem;
    font-family: var(--font-display); font-weight: 600; font-size: .9rem;
    padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius);
  }
  .nav-toggle-bars { display: inline-block; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }

  @media (max-width: 719px) {
    .nav-toggle { display: inline-flex; }
    html.js .site-nav {
      display: none; position: absolute; left: 0; right: 0; top: 100%;
      background: var(--paper); border-bottom: 1px solid var(--line);
      padding: var(--space-4) var(--gutter) var(--space-5);
    }
    html.js .site-nav[data-open] { display: block; }
    .site-nav ul { flex-direction: column; gap: var(--space-3); }
    .site-nav a { font-size: 1.15rem; }
    html:not(.js) .site-header .wrap { flex-wrap: wrap; }
  }

  main { padding-block: var(--space-6) var(--space-8); }
  .section + .section { margin-top: var(--space-8); }
  .section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-5); }
  .section-head .eyebrow { margin-bottom: var(--space-2); }
  .page-head { margin-bottom: var(--space-6); max-width: 60ch; }
  .page-head .eyebrow { margin-bottom: var(--space-3); }
  .page-head .lede { margin-top: var(--space-4); }

  .site-footer { border-top: 1px solid var(--line); padding-block: var(--space-6) var(--space-5); font-size: 1rem; }
  .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-5); }
  .footer-grid--two { grid-template-columns: 1.4fr 1fr; }
  .footer-grid .eyebrow { margin-bottom: var(--space-2); }
  .footer-grid ul { display: grid; gap: .35rem; }
  .footer-note { color: var(--ink-soft); max-width: 30ch; margin-top: var(--space-2); }
  .footer-bottom {
    margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
    font-family: var(--font-display); font-size: .8rem; color: var(--ink-soft);
  }
  @media (max-width: 719px) { .footer-grid { grid-template-columns: 1fr; } }
}

/* ---------- Components ---------- */
@layer components {
  /* Tinted shadows. Each of these carries its own --accent (inline or set by script). */
  .work, .shelf-item, .art-figure, .lightbox, .btn, .contact-item {
    --shadow-tint: rgba(34, 30, 58, .18);
    --shadow-tint-soft: rgba(34, 30, 58, .1);
  }
  @supports (color: color-mix(in oklab, red 50%, transparent)) {
    .work, .shelf-item, .art-figure, .lightbox, .btn, .contact-item {
      --shadow-tint: color-mix(in oklab, var(--accent) 46%, transparent);
      --shadow-tint-soft: color-mix(in oklab, var(--accent) 24%, transparent);
    }
  }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; gap: .5em;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1;
    padding: .85em 1.35em; border-radius: var(--radius);
    background: var(--ink); color: var(--paper); text-decoration: none;
    border: 1.5px solid var(--ink);
    box-shadow: 4px 5px 0 -1px var(--shadow-tint);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .btn:hover { transform: translate(-1px, -2px); box-shadow: 7px 9px 0 -1px var(--shadow-tint); }
  .btn:active { transform: none; box-shadow: 2px 2px 0 -1px var(--shadow-tint); }
  .btn--ghost { background: transparent; color: var(--ink); }
  .btn--small { font-size: .85rem; padding: .7em 1.1em; }

  /* Hero: her words, and three works standing on a table */
  .hero {
    display: grid; grid-template-columns: 1fr 1.15fr;
    gap: clamp(var(--space-6), 5vw, var(--space-8));
    align-items: center; padding-block: var(--space-4) var(--space-6);
  }
  .hero h1 { font-size: clamp(2.1rem, 4.3vw, 3.9rem); }
  .hero-attrib { margin-top: var(--space-4); font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink-soft); }
  .hero-sub { margin-top: var(--space-5); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

  .shelf { position: relative; isolation: isolate; aspect-ratio: 5 / 4; --table: 12%; }
  .shelf::before {
    content: ""; position: absolute; z-index: 0; left: -6%; right: -6%; bottom: var(--table);
    height: 1px; background: var(--line);
  }
  .shelf::after {
    content: ""; position: absolute; z-index: 0; left: -6%; right: -6%; bottom: 0; height: var(--table);
    background: linear-gradient(90deg, rgba(201, 184, 232, .5), rgba(44, 157, 187, .26) 55%, rgba(229, 96, 124, .22));
    -webkit-mask-image: linear-gradient(#000, transparent);
    mask-image: linear-gradient(#000, transparent);
  }
  .shelf-item {
    position: absolute; bottom: var(--table); left: var(--x); width: var(--w); z-index: var(--z, 1);
    transform: rotate(var(--rot, 0deg)); transform-origin: 50% 100%;
  }
  .shelf-item img { width: 100%; box-shadow: 12px 18px 36px -12px var(--shadow-tint), 3px 5px 10px -4px var(--shadow-tint-soft); }

  @media (max-width: 899px) {
    .hero { grid-template-columns: 1fr; }
    .shelf { max-width: 560px; margin-top: var(--space-5); }
  }
  @media (prefers-reduced-motion: no-preference) {
    html.js .shelf-item { animation: land 650ms var(--ease) both; animation-delay: var(--delay, 0ms); }
    html.js .shelf-item img { animation: settle 650ms var(--ease) both; animation-delay: var(--delay, 0ms); }
    @keyframes land {
      from { opacity: 0; transform: translateY(-32px) rotate(var(--rot, 0deg)); }
      to { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }
    }
    @keyframes settle {
      from { box-shadow: 2px 3px 6px -3px var(--shadow-tint), 0 0 0 0 var(--shadow-tint-soft); }
      to { box-shadow: 12px 18px 36px -12px var(--shadow-tint), 3px 5px 10px -4px var(--shadow-tint-soft); }
    }
  }

  /* Work cards */
  .works { display: grid; grid-template-columns: 1fr; gap: var(--space-7) var(--space-5); grid-auto-flow: dense; }
  @media (min-width: 640px) {
    .works { grid-template-columns: repeat(2, 1fr); }
    .work--landscape { grid-column: span 2; }
  }
  @media (min-width: 1024px) { .works { grid-template-columns: repeat(3, 1fr); } }
  .works--featured { gap: var(--space-6) var(--space-5); grid-template-columns: repeat(2, 1fr); }
  @media (min-width: 900px) { .works--featured { grid-template-columns: repeat(4, 1fr); } }
  .works--featured .work--landscape { grid-column: auto; }

  .work { display: flex; flex-direction: column; gap: var(--space-3); }
  .work-link { display: block; text-decoration: none; }
  /* The frame keeps every card the same height; the painting is centred inside it
     with absolute positioning so its percentage caps resolve against the frame. */
  .work-frame { position: relative; aspect-ratio: 4 / 5; }
  .work--landscape .work-frame { aspect-ratio: 8 / 5; }
  .works--featured .work--landscape .work-frame { aspect-ratio: 4 / 5; }
  .work-frame img {
    position: absolute; inset: 0; margin: auto;
    max-width: 90%; max-height: 90%; width: auto; height: auto;
    box-shadow: 10px 16px 32px -10px var(--shadow-tint), 2px 4px 8px -4px var(--shadow-tint-soft);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .work-link:hover img, .work-link:focus-visible img {
    transform: translateY(-6px);
    box-shadow: 18px 30px 46px -14px var(--shadow-tint-soft), 6px 10px 16px -8px var(--shadow-tint-soft);
  }
  .work-title { margin-top: var(--space-2); }
  .work-link:hover .work-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .12em; }
  .work-meta { display: flex; justify-content: space-between; gap: var(--space-3); font-family: var(--font-display); font-size: .85rem; color: var(--ink-soft); }
  .work-price { font-weight: 600; color: var(--ink); }
  @media (max-width: 639px) {
    .works--featured .work-meta { flex-direction: column; align-items: flex-start; gap: .15rem; }
  }
  .work-desc { font-size: 1rem; color: var(--ink-soft); }
  .work-actions { margin-top: auto; padding-top: var(--space-2); }

  /* Filters */
  .filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); }
  .chip {
    font-family: var(--font-display); font-weight: 600; font-size: .85rem;
    padding: .55em 1em; border: 1.5px solid var(--line); border-radius: 999px;
    transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
  }
  .chip:hover { border-color: var(--ink-soft); }
  .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .filter-count { margin-left: auto; font-family: var(--font-display); font-size: .85rem; color: var(--ink-soft); }
  html:not(.js) .filters { display: none; }

  /* Lightbox */
  .lightbox { width: 100dvw; height: 100dvh; max-width: none; max-height: none; background: transparent; color: var(--ink); overflow: hidden; }
  .lightbox::backdrop { background: transparent; }
  .lightbox-tint { position: fixed; inset: 0; background: var(--paper); }
  @supports (color: color-mix(in oklab, red 50%, transparent)) {
    .lightbox-tint { background: color-mix(in oklab, var(--accent) 14%, var(--paper)); }
  }
  .lightbox-body {
    position: relative; z-index: 1; height: 100%;
    width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
    display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--space-7);
    align-items: center; padding-block: var(--space-7);
  }
  .lightbox-figure { display: grid; place-items: center; height: 100%; min-height: 0; }
  .lightbox-figure img {
    max-width: 100%; max-height: min(78dvh, 100%); width: auto; height: auto;
    box-shadow: 18px 26px 50px -14px var(--shadow-tint), 4px 8px 14px -6px var(--shadow-tint-soft);
  }
  .lightbox-info { max-width: 42ch; }
  .lightbox-info h2 { margin-top: var(--space-2); font-size: clamp(1.9rem, 3vw, 2.6rem); }
  .lightbox-info h2:focus-visible { outline: none; }
  .lightbox-desc { margin-top: var(--space-4); }
  .lightbox-price { margin-top: var(--space-4); font-family: var(--font-display); font-weight: 600; }
  .lightbox-actions { margin-top: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
  .lightbox-email { font-size: .95rem; color: var(--ink-soft); }
  .lightbox-close {
    position: absolute; top: var(--space-4); right: 0; z-index: 2;
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-display); font-weight: 600; font-size: .9rem;
    padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper);
  }
  .lightbox-close:hover { border-color: var(--ink); }
  .lightbox-nav { position: absolute; bottom: var(--space-4); right: 0; display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: .85rem; color: var(--ink-soft); }
  .lightbox-nav button { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
  .lightbox-nav button:hover { border-color: var(--ink); }
  .lightbox-nav svg { width: 18px; height: 18px; }
  @media (max-width: 899px) {
    .lightbox { overflow: auto; }
    .lightbox-body { grid-template-columns: 1fr; height: auto; min-height: 100%; align-content: start; gap: var(--space-5); padding-block: var(--space-7) var(--space-7); }
    .lightbox-figure { height: auto; }
    .lightbox-figure img { max-height: 56dvh; }
    .lightbox-nav { position: static; margin-top: var(--space-4); }
  }
  body:has(dialog[open]) { overflow: hidden; }
  @media (prefers-reduced-motion: no-preference) {
    .lightbox[open] .lightbox-tint { animation: fade var(--dur) var(--ease) both; }
    .lightbox[open] .lightbox-figure img { animation: rise var(--dur) var(--ease) both; }
    .lightbox[open] .lightbox-info { animation: fade var(--dur) var(--ease) both; animation-delay: 80ms; }
    @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
    @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  }

  /* Standalone artwork figure (About, Contact, Home teaser) */
  .art-figure { display: grid; gap: var(--space-3); }
  .art-figure img { box-shadow: 14px 20px 40px -12px var(--shadow-tint), 3px 6px 12px -5px var(--shadow-tint-soft); }
  .art-figure figcaption { font-family: var(--font-display); font-size: .85rem; color: var(--ink-soft); }
  .art-figure figcaption a { color: var(--ink); }

  /* About */
  .about { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-7); align-items: start; }
  .about-aside { position: sticky; top: var(--space-5); }
  .pullquote {
    margin-block: var(--space-6); padding-left: var(--space-5); border-left: 3px solid var(--accent);
    font-family: var(--font-display); font-weight: 700; font-stretch: 115%;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance;
  }
  .about-music { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
  @media (max-width: 899px) {
    .about { grid-template-columns: 1fr; }
    .about-aside { position: static; max-width: 480px; }
  }

  /* Contact */
  .contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
  .contact-list { display: grid; gap: var(--space-6); }
  .contact-item .eyebrow { margin-bottom: var(--space-2); }
  .contact-link {
    display: inline-block; font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
    font-size: clamp(1.35rem, 2.8vw, 2.1rem); letter-spacing: -.015em; line-height: 1.15;
    text-decoration: none; border-bottom: 3px solid var(--line); overflow-wrap: anywhere;
    transition: border-color var(--dur-fast) var(--ease);
  }
  .contact-link:hover { border-bottom-color: var(--accent); }
  .contact-actions { margin-top: var(--space-3); display: flex; gap: var(--space-3); flex-wrap: wrap; }
  .contact-note { color: var(--ink-soft); max-width: 36ch; }
  @media (max-width: 899px) {
    .contact { grid-template-columns: 1fr; }
    .contact .art-figure { max-width: 480px; }
  }

  /* Home: about teaser and contact band */
  .teaser { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--space-7); align-items: center; }
  .teaser .prose { font-size: 1.25rem; }
  .teaser .btn { margin-top: var(--space-5); }
  @media (max-width: 899px) {
    .teaser { grid-template-columns: 1fr; }
    .teaser .art-figure { max-width: 420px; }
  }
  .band {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5);
    padding: var(--space-6); background: var(--paper-deep); border-radius: 8px;
  }
  .band h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
  .band p { margin-top: var(--space-2); color: var(--ink-soft); }
  .band-contact { display: grid; gap: var(--space-2); font-family: var(--font-display); font-weight: 600; }
  .band-contact a { text-decoration: none; border-bottom: 2px solid var(--line); }
  .band-contact a:hover { border-bottom-color: var(--ink); }
}

/* ---------- Utilities ---------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  [hidden] { display: none !important; }
  @media (prefers-reduced-motion: no-preference) {
    html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
    html.js .reveal.is-visible { opacity: 1; transform: none; }
  }
}

/* =============================================================
   Expressive layer: washes, grain, brushstroke, ribbon, tilt,
   cursor, marks, palette. All motion sits behind reduced-motion.
   ============================================================= */
@layer base {
  body { overflow-x: clip; position: relative; }
  /* Paper grain over everything (the lightbox lives in the top layer above it) */
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none;
    opacity: .3; background-size: 220px 220px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

@layer components {
  /* Drifting watercolor washes behind the page */
  .washes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
  .wash {
    position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
    opacity: .42;
    background: radial-gradient(circle at 50% 50%, var(--c) 0%, transparent 68%);
  }
  .wash--1 { --c: #c9b8e8; top: -20vmax; left: -14vmax; }
  .wash--2 { --c: #7fd0e2; top: 4vmax; right: -18vmax; }
  .wash--3 { --c: #f7b86e; bottom: -22vmax; left: 6vmax; }
  .wash--4 { --c: #f4a3b6; bottom: -16vmax; right: 2vmax; }
  .wash--5 { --c: #cde68a; top: 38vmax; left: 34vmax; width: 34vmax; height: 34vmax; opacity: .26; }
  @media (prefers-reduced-motion: no-preference) {
    .wash { animation: drift 40s ease-in-out infinite alternate; }
    .wash--2 { animation-duration: 52s; animation-delay: -14s; }
    .wash--3 { animation-duration: 46s; animation-delay: -6s; }
    .wash--4 { animation-duration: 58s; animation-delay: -22s; }
    .wash--5 { animation-duration: 36s; animation-delay: -9s; }
    @keyframes drift {
      from { transform: translate(0, 0) scale(1); }
      50% { transform: translate(7vmax, -5vmax) scale(1.18); }
      to { transform: translate(-5vmax, 7vmax) scale(.94); }
    }
  }

  /* Hero: words rise in one by one, then a brushstroke draws itself under her last words */
  .w { display: inline-block; }
  @media (prefers-reduced-motion: no-preference) {
    html.js h1 .w { opacity: 0; transform: translateY(.45em) rotate(1.5deg); animation: word-rise 450ms var(--ease) forwards; animation-delay: calc(var(--i, 0) * 30ms); }
    @keyframes word-rise { to { opacity: 1; transform: none; } }
  }
  .stroke { position: relative; display: inline-block; isolation: isolate; white-space: nowrap; }
  .stroke-svg { position: absolute; z-index: -1; left: -3%; bottom: -.06em; width: 106%; max-width: none; height: .38em; overflow: visible; }
  .stroke-svg path {
    fill: none; stroke: #ef8f2c; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round;
    vector-effect: non-scaling-stroke; opacity: .8;
  }
  @media (prefers-reduced-motion: no-preference) {
    html.js .stroke-svg path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 700ms var(--ease) 500ms forwards; }
    @keyframes draw { to { stroke-dashoffset: 0; } }
  }

  /* Hero shelf: the paintings shift with the cursor at three depths */
  .shelf-item img {
    transform: translate(calc(var(--px, 0) * var(--depth, 8) * 1px), calc(var(--py, 0) * var(--depth, 8) * 1px));
    transition: transform 600ms cubic-bezier(.2, .8, .2, 1);
  }

  /* Slanted ribbon of her subjects */
  .ribbon-wrap { overflow: clip; padding-block: var(--space-6) var(--space-6); }
  .ribbon-wrap + .section { margin-top: var(--space-4); }
  .ribbon {
    width: 110vw; margin-left: calc(50% - 55vw); transform: rotate(-2deg);
    background: var(--ink); color: var(--paper); overflow: hidden; padding-block: .55em;
    box-shadow: 8px 12px 0 -2px rgba(201, 184, 232, .55);
  }
  .ribbon-track { display: flex; width: max-content; gap: 0; }
  .ribbon-track span {
    display: inline-flex; align-items: center; gap: 1.2rem; padding-right: 1.2rem;
    font-family: var(--font-display); font-weight: 700; font-stretch: 122%; letter-spacing: -.01em;
    font-size: clamp(1.4rem, 3.4vw, 2.6rem); line-height: 1; white-space: nowrap;
  }
  .ribbon-track i { width: .5em; height: .5em; border-radius: 50%; background: var(--dot); flex: none; }
  @media (prefers-reduced-motion: no-preference) {
    .ribbon-track { animation: ticker 34s linear infinite; }
    .ribbon:hover .ribbon-track { animation-play-state: paused; }
    @keyframes ticker { to { transform: translateX(-50%); } }
  }

  /* Gallery cards: perspective tilt that follows the cursor; staggered reveal */
  .work-frame { perspective: 900px; }
  .work-frame img { transition: transform 220ms var(--ease), box-shadow 260ms var(--ease); }
  .work-link:hover .work-frame, .work-link:focus-visible .work-frame { --lift: -8px; }
  .work-link:hover img, .work-link:focus-visible img {
    transform: translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
  .work-swatch { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--accent); margin-right: .45em; vertical-align: -.02em; }

  /* Filter chips carry their subject's colour */
  .chip[data-filter]:not([data-filter="all"])::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .5em; background: var(--dot, var(--ink-soft)); vertical-align: .02em; }
  .chip[data-filter="still-life"] { --dot: #ef8f2c; }
  .chip[data-filter="landscape"] { --dot: #3b5db0; }
  .chip[data-filter="abstract"] { --dot: #e3162a; }
  .chip[data-filter="flowers"] { --dot: #d8536a; }
  .chip[data-filter="figures"] { --dot: #7a3f9d; }
  .chip[data-filter="drawings"] { --dot: #55504a; }

  /* Lightbox: the colour blooms out from the centre */
  @media (prefers-reduced-motion: no-preference) {
    .lightbox[open] .lightbox-tint { animation: bloom 700ms var(--ease) both; }
    @keyframes bloom { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(120% at 50% 50%); } }
  }

  /* Marker highlight inside headings */
  .mark {
    padding: 0 .14em; margin: 0 -.14em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
    background: linear-gradient(100deg, transparent 1%, var(--mark) 3%, var(--mark) 97%, transparent 99%);
    --mark: rgba(201, 184, 232, .55);
  }
  @supports (color: color-mix(in oklab, red 50%, transparent)) {
    .mark { --mark: color-mix(in oklab, var(--accent) 34%, transparent); }
  }

  /* Standalone figures float gently */
  @media (prefers-reduced-motion: no-preference) {
    .art-figure img { animation: float 7s ease-in-out infinite; }
    @keyframes float { 50% { transform: translateY(-9px); } }
  }

  /* Palette strip: one swatch per painting */
  .palette-section { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--line); }
  .palette-section .eyebrow { margin-bottom: var(--space-2); }
  .palette { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
  .palette a {
    display: block; width: 52px; height: 52px; background: var(--accent);
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
    box-shadow: 6px 9px 18px -6px var(--shadow-tint);
    transition: transform var(--dur-fast) var(--ease), border-radius var(--dur) var(--ease);
  }
  .palette a { --shadow-tint: rgba(34, 30, 58, .25); }
  @supports (color: color-mix(in oklab, red 50%, transparent)) { .palette a { --shadow-tint: color-mix(in oklab, var(--accent) 55%, transparent); } }
  .palette a:hover, .palette a:focus-visible { transform: translateY(-6px) rotate(-6deg); border-radius: 50%; }

  /* Footer: a bar of all twelve accents */
  .site-footer { border-top: 0; position: relative; }
  .site-footer::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, #ef8f2c, #9e2b2b, #8f7f6a, #3f4d7a, #3b5db0, #f28a3d, #6b6fb5, #3f7f8f, #e3162a, #f98104, #4db3c6, #d8536a);
  }

  /* Cursor ring that takes each painting's colour (pointer devices only) */
  .cursor { display: none; }
  @media (hover: hover) and (pointer: fine) {
    .cursor {
      display: block; position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none;
      width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink);
      transform: translate(-50%, -50%); opacity: 0;
      transition: width 260ms var(--ease), height 260ms var(--ease), background-color 260ms, border-color 260ms, opacity 300ms;
    }
    .cursor.is-on { opacity: .9; }
    .cursor.is-art { width: 48px; height: 48px; background: var(--accent); border-color: transparent; opacity: .6; }
  }
}

@layer utilities {
  @media (prefers-reduced-motion: no-preference) {
    html.js .reveal { transition-delay: calc(var(--i, 0) * 40ms); }
  }
}

/* =============================================================
   Artistic text layer: handwritten notes, drop cap, paper cards,
   and the painted footer.
   ============================================================= */
@layer base {
  :root { --font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive; }
}

@layer components {
  /* Labels become handwritten notes with a squiggle underneath */
  .eyebrow {
    display: table; position: relative;
    font-family: var(--font-hand); font-size: 1.6rem; font-weight: 600; line-height: 1;
    letter-spacing: 0; text-transform: none; color: var(--ink);
    transform: rotate(-2deg); transform-origin: left bottom; padding-bottom: 9px;
  }
  .eyebrow::after {
    content: ""; position: absolute; left: 0; right: -4px; bottom: 0; height: 8px;
    background: var(--note, #ef8f2c);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='8' viewBox='0 0 36 8'%3E%3Cpath d='M0 4 Q 4.5 0 9 4 T 18 4 T 27 4 T 36 4' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 36px 8px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='8' viewBox='0 0 36 8'%3E%3Cpath d='M0 4 Q 4.5 0 9 4 T 18 4 T 27 4 T 36 4' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 36px 8px;
  }
  .page-head .eyebrow { --note: #d8536a; }
  .teaser .eyebrow { --note: #4db3c6; }
  .band .eyebrow { --note: #d8536a; }
  .palette-section .eyebrow { --note: #9bbe3b; }
  .contact-item:nth-child(1) .eyebrow { --note: #2c9dbb; }
  .contact-item:nth-child(2) .eyebrow { --note: #e5607c; }
  .lightbox .eyebrow { --note: var(--accent); }
  .section-head .eyebrow, .page-head .eyebrow { margin-bottom: var(--space-3); }

  /* Her name under the hero quote, as a signature */
  .hero-attrib {
    display: table; font-family: var(--font-hand); font-size: 2.4rem; font-weight: 700; line-height: 1;
    color: var(--ink); transform: rotate(-4deg); transform-origin: left center; margin-top: var(--space-5);
  }

  /* Prices and counts read like handwritten tags */
  .work-price, .lightbox-price, .filter-count {
    font-family: var(--font-hand); font-weight: 600; font-size: 1.3rem; line-height: 1; color: var(--ink);
  }
  .work-meta { align-items: baseline; }
  .lightbox-price { font-size: 1.8rem; display: table; transform: rotate(-2deg); }
  .filter-count { font-size: 1.4rem; }

  /* Home: the quoted line in the About teaser */
  .teaser .prose p:first-child {
    font-style: italic; font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.3; color: var(--ink);
    padding-left: var(--space-4); border-left: 4px solid #4db3c6;
  }

  /* Home: the contact band becomes a tilted paper card */
  .band {
    background: rgba(255, 255, 255, .72); border: 1.5px solid var(--ink); border-radius: 6px;
    transform: rotate(-.8deg); box-shadow: 12px 14px 0 -2px rgba(216, 83, 106, .45);
  }
  .band-contact { font-size: 1.15rem; }

  /* About: drop cap, paper-card quote, closing note */
  .about .prose > p:first-child::first-letter {
    float: left; font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
    font-size: 4.6em; line-height: .78; padding: .06em .12em 0 0; color: #ef8f2c;
  }
  .pullquote {
    position: relative; border-left: 0; margin-block: var(--space-7) var(--space-6);
    padding: 1.5em 1.2em 1.2em 1.4em; background: rgba(255, 255, 255, .7);
    border: 1.5px solid var(--ink); border-radius: 6px; transform: rotate(-1.2deg);
    box-shadow: 12px 14px 0 -2px rgba(239, 143, 44, .5);
  }
  .pullquote::before {
    content: "\201C"; position: absolute; top: -.32em; left: .12em;
    font-family: var(--font-display); font-weight: 800; font-size: 5.5em; line-height: 1; color: #ef8f2c;
  }
  .about-music { font-style: italic; }
  .contact-note { font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.2; color: var(--ink); transform: rotate(-1.5deg); }

  /* Footer: note, statement, marker links, and her name in her own colours */
  .site-footer { overflow: hidden; padding-block: var(--space-7) var(--space-5); }
  .footer-hand {
    display: table; font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1; color: #d8536a; transform: rotate(-3deg); transform-origin: left bottom;
  }
  .footer-statement {
    margin-top: var(--space-4); max-width: 20ch;
    font-family: var(--font-body); font-weight: 400; font-size: clamp(1.8rem, 4.2vw, 3.4rem);
    line-height: 1.08; letter-spacing: -.015em; text-wrap: balance;
  }
  .footer-statement em {
    font-style: italic; padding: 0 .12em; margin: 0 -.06em; border-radius: .16em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
    background: linear-gradient(100deg, transparent 1%, rgba(201, 184, 232, .75) 3%, rgba(201, 184, 232, .75) 97%, transparent 99%);
  }
  .footer-nav { margin-top: var(--space-6); }
  .footer-nav ul { display: flex; flex-wrap: wrap; gap: .5rem 1.8rem; }
  .footer-nav a {
    --swipe: rgba(201, 184, 232, .7);
    font-family: var(--font-display); font-weight: 700; font-stretch: 115%;
    font-size: clamp(1.05rem, 1.8vw, 1.4rem); letter-spacing: -.01em; text-decoration: none;
    padding: .1em .15em; margin-inline: -.15em;
    background: linear-gradient(var(--swipe), var(--swipe)) no-repeat 0 78% / 0% 46%;
    transition: background-size 380ms var(--ease);
  }
  @supports (color: color-mix(in oklab, red 50%, transparent)) {
    .footer-nav a { --swipe: color-mix(in oklab, var(--accent) 48%, transparent); }
  }
  .footer-nav a:hover, .footer-nav a:focus-visible { background-size: 100% 46%; }
  .footer-bottom { align-items: baseline; }
  .footer-prices { font-family: var(--font-hand); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
}

/* ---------- Layout fixes ---------- */
@layer components {
  /* Breathing room between handwritten labels, headings, and the text after them */
  .hero .eyebrow, .teaser .eyebrow, .band .eyebrow, .contact-item .eyebrow, .palette-section .eyebrow, .lightbox .eyebrow { margin-bottom: var(--space-3); }
  .teaser .prose { margin-top: var(--space-5); }
  .band h2 + p { margin-top: var(--space-3); }
  .page-head h1 + .lede { margin-top: var(--space-5); }

  /* Wide works: give the frame the same height as the tall cards beside it */
  @media (min-width: 640px) {
    .works--gallery .work--landscape .work-frame {
      aspect-ratio: auto; height: 0; padding-top: calc((100% - var(--space-5)) * .625);
    }
  }
}
