/* ============================================================
   OAK & RATTAN STUDIO — Design System
   Warm folk-modern interior design studio
   Palette sampled directly from the studio logo.
   ============================================================ */

:root {
  /* Brand */
  --teal:        #548478;  /* Rattan Teal — primary */
  --teal-deep:   #3d655b;  /* hover / text on cream */
  --teal-ink:    #2f4f47;  /* darkest teal */
  --gold:        #e4a848;  /* Oak Gold — accent */
  --gold-soft:   #eec078;
  --olive:       #9c6c0c;  /* Burnished Olive — deep accent */
  --olive-deep:  #7c5408;

  /* Neutrals */
  --cream:       #f7f1e6;  /* page ground */
  --cream-2:     #fbf7ee;  /* lighter cards */
  --sand:        #ece2cf;  /* muted blocks */
  --sand-deep:   #e0d4bd;
  --ink:         #2c2a26;  /* body text */
  --ink-soft:    #5a554c;  /* secondary text */
  --line:        #ddd2bd;  /* hairlines */

  /* Typography */
  /* the "Fallback" names are system fonts scaled to take up the same room as the web font; see the end of fonts.css */
  --font-display: "Fraunces", "Fraunces Fallback", "Fraunces Fallback Android", Georgia, "Times New Roman", serif;
  --font-body: "Mulish", "Mulish Fallback Segoe", "Mulish Fallback Roboto", "Mulish Fallback Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Scale & rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 18px 50px -28px rgba(47, 79, 71, 0.45);
  --shadow-soft: 0 10px 30px -22px rgba(44, 42, 38, 0.5);
  --t: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
/* A picture's alt text is for screen readers and search engines. Browsers also paint it in the picture's box
   while the picture is still loading, in the picture's text color, so that color is clear: the words never flash
   up before a picture arrives. If a picture fails to load, main.js marks it and its alt text is shown. */
img { color: transparent; }
img.img-failed { color: var(--ink-soft); font-size: 0.85rem; line-height: 1.4; }
.lightbox img.img-failed { color: var(--cream); }
/* <picture> only offers the browser a smaller .webp copy of the image inside it. It takes no part in the
   layout, so every rule written for an <img> keeps working exactly as before. */
picture { display: contents; }
a { color: var(--teal-deep); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--olive-deep); }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  color: var(--teal-ink);
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 5rem); }
/* The page headline grows with the window, and Fraunces gets narrower as it grows, so its stand-in font is
   chosen by window width (four steps; the numbers are in fonts.css). */
h1 { font-family: "Fraunces", "Fraunces Fallback H1 S", "Fraunces Fallback H1 S Android", Georgia, "Times New Roman", serif; }
@media (min-width: 600px) { h1 { font-family: "Fraunces", "Fraunces Fallback H1 M", "Fraunces Fallback H1 M Android", Georgia, "Times New Roman", serif; } }
@media (min-width: 1000px) { h1 { font-family: "Fraunces", "Fraunces Fallback H1 L", "Fraunces Fallback H1 L Android", Georgia, "Times New Roman", serif; } }
@media (min-width: 1200px) { h1 { font-family: "Fraunces", "Fraunces Fallback H1 XL", "Fraunces Fallback H1 XL Android", Georgia, "Times New Roman", serif; } }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
/* same idea for the section headings once they are large (the smaller headings inside running text keep the usual stand-in) */
@media (min-width: 1000px) { h2 { font-family: "Fraunces", "Fraunces Fallback H2 L", "Fraunces Fallback H2 L Android", Georgia, "Times New Roman", serif; } .prose h2 { font-family: var(--font-display); } }
h3 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h4 { font-size: 1.15rem; }
p { max-width: 68ch; }
.lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem); color: var(--ink-soft); line-height: 1.55; }
strong { font-weight: 700; }

/* Eyebrow / kicker */
.kicker {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--olive-deep);   /* the deeper olive: small text needs 4.5:1 against the cream grounds */
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--olive);
  display: inline-block;
}
.kicker.center::after {
  content: "";
  width: 26px; height: 1px;
  background: var(--olive);
  display: inline-block;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; }
section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .kicker { margin-bottom: 1rem; }
.section-head p { margin-top: 1rem; }
/* Anchor target offset so #start lands below the sticky header */
#start { scroll-margin-top: 124px; }

.center { text-align: center; }
.center p, p.center { margin-inline: auto; }

.bg-cream2 { background: var(--cream-2); }
.bg-sand { background: var(--sand); }
.bg-teal { background: var(--teal); color: var(--cream); }
.bg-teal h1, .bg-teal h2, .bg-teal h3 { color: var(--cream); }
.bg-teal .kicker, .bg-teal .kicker::before, .bg-teal .kicker::after { color: var(--gold-soft); background-color: transparent; }
.bg-teal .kicker::before, .bg-teal .kicker::after { background: var(--gold-soft); }
.bg-ink { background: var(--teal-ink); color: var(--cream); }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: var(--cream); }
/* Readable body/lede text on dark sections (override the dark --ink-soft default) */
.bg-teal p, .bg-ink p { color: rgba(247, 241, 230, 0.92); }
/* CTA lede: light warm gold for emphasis + readability on dark teal */
.bg-teal .lede, .bg-ink .lede { color: #f0d49e; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--teal);
  --fg: var(--cream-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.92em 1.7em;
  background: var(--bg);
  color: var(--fg);
  border: 1.5px solid var(--bg);
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--t), background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
  text-align: center;
}
.btn:hover { color: var(--fg); transform: translateY(-2px); box-shadow: var(--shadow-soft); background: var(--teal-deep); border-color: var(--teal-deep); }
.btn-gold { --bg: var(--gold); --fg: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.btn-ghost { --bg: transparent; --fg: var(--teal-deep); border-color: currentColor; }
.btn-ghost:hover { background: var(--teal); color: var(--cream-2); border-color: var(--teal); }
.bg-teal .btn-ghost, .bg-ink .btn-ghost { --fg: var(--cream); }
.bg-teal .btn-ghost:hover, .bg-ink .btn-ghost:hover { background: var(--cream); color: var(--teal-ink); border-color: var(--cream); }
.btn-lg { font-size: 1.02rem; padding: 1.05em 2.1em; }
.text-link { font-weight: 700; color: var(--olive-deep); display: inline-flex; align-items: center; gap: 0.45em; }
.text-link svg { transition: transform var(--t); }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 230, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -20px rgba(44,42,38,0.6); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 108px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); }
.brand img { height: 88px; width: auto; }
.brand .brand-name { display: none; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); list-style: none; padding: 0; margin: 0; }
.nav-links a:not(.btn) {
  font-weight: 700; font-size: 0.92rem; color: var(--ink);
  letter-spacing: 0.01em; position: relative; padding-block: 0.4em;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gold); transition: width var(--t);
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn)[aria-current="page"] { color: var(--teal-deep); }
.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn)[aria-current="page"]::after { width: 100%; }
.nav-cta { margin-left: 0.4rem; }
@media (min-width: 941px) { .nav-cta a.btn { padding-block: 0.4em; font-size: 0.92rem; } }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; color: var(--teal-ink); }
.nav-toggle svg { width: 30px; height: 30px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  /* The menu drops down from BEHIND the header bar, not from the top of the screen.
     Layers inside the header, back to front: the menu panel (-1), a solid cover the size of the
     bar (0), then the logo and the menu button (1). The panel starts tucked up behind the cover
     and slides down into view. */
  .site-header { background: var(--cream); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header::before { content: ""; position: absolute; inset: 0; z-index: 0; background: var(--cream); }
  .brand, .nav-toggle { position: relative; z-index: 1; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--cream-2); padding: 1rem var(--gutter) 2rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%); visibility: hidden;
    transition: transform var(--t), visibility 0s linear 0.35s;
    box-shadow: var(--shadow); max-height: calc(100vh - 108px); overflow-y: auto;
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); visibility: visible; transition: transform var(--t), visibility 0s; }
  .nav-links li { width: 100%; }
  .nav-links a:not(.btn) { display: block; width: 100%; padding: 0.9em 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-cta { margin: 1rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(30rem, 78vh, 46rem);
  padding-block: clamp(3rem, 2rem + 6vw, 6rem);
}
/* Full-bleed concept picture behind the copy (the watercolor-style living room; scripts/make-hero-image.py) */
.hero-bg-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* Paper-cream wash: solid enough behind the copy on the left to stay legible,
   fading right so the picture shows through; plus the brand glow accents.
   The first layer is a corner wash in the header's cream: it starts solid in the top-left corner and thins out
   along a diagonal that ends at the pendant light, so the header runs into the picture with no edge on that side. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 66% 135% at 0% 0%,
      rgba(247,241,230,1) 0%,
      rgba(247,241,230,0.96) 38%,
      rgba(247,241,230,0.6) 68%,
      rgba(247,241,230,0) 100%),
    radial-gradient(120% 90% at 92% -10%, rgba(228,168,72,0.20), transparent 55%),
    radial-gradient(90% 80% at 0% 110%, rgba(84,132,120,0.16), transparent 55%),
    linear-gradient(90deg,
      rgba(247,241,230,0.97) 0%,
      rgba(247,241,230,0.90) 34%,
      rgba(247,241,230,0.55) 58%,
      rgba(247,241,230,0.16) 100%);
}
/* Dissolve the sketch's bottom edge into the cream of the next section */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  height: clamp(3.5rem, 9vh, 7rem); pointer-events: none;
  background: linear-gradient(180deg, rgba(247,241,230,0) 0%, var(--cream) 88%);
}
.hero-inner { width: 100%; }
.hero-copy { max-width: 36rem; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lede { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
@media (max-width: 860px) {
  .hero { min-height: clamp(28rem, 86vh, 40rem); }
  .hero-bg-img { object-position: 71% center; }   /* keeps the two chairs and the side table behind the copy */
  /* 480px and narrower: the page serves a narrower cut of the picture (scripts/make-hero-image.py), made around
     the same point, so it sits centered. This number must match the media query on the banner's <source> tags. */
  @media (max-width: 480px) { .hero-bg-img { object-position: center; } }
  /* On narrow screens the copy sits over more of the sketch — wash vertically instead */
  .hero::before {
    background:
      radial-gradient(120% 70% at 90% -10%, rgba(228,168,72,0.20), transparent 55%),
      linear-gradient(180deg,
        rgba(247,241,230,0.95) 0%,
        rgba(247,241,230,0.82) 44%,
        rgba(247,241,230,0.55) 72%,
        rgba(247,241,230,0.20) 100%);
  }
  .hero-copy { max-width: none; }
  /* Here the intro paragraph sits right on top of the drawing, so it gets a heavier weight, the darker
     text color, and a soft cream glow that lifts the letters off the sketch lines. Desktop is unchanged. */
  .hero .lede {
    font-weight: 500; color: var(--ink);
    text-shadow: 0 0 2px rgba(247,241,230,0.95), 0 0 7px rgba(247,241,230,0.95), 0 0 14px rgba(247,241,230,0.8);
  }
}
/* Phones only: a light parallax. The banner drawing scrolls at about two-thirds of the page's speed, so it
   seems to sit a little behind the words. It is done by sliding the drawing down by 35% of the distance
   scrolled; the strip this uncovers at the top is always already off screen. Browsers that can tie an animation
   to the scroll position do it right here; the rest get the same movement from the script ("Hero parallax" in
   main.js). Nothing moves on wider screens or for visitors who ask for reduced motion. */
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .hero-bg-img { will-change: transform; }
  @supports (animation-timeline: scroll()) {
    .hero-bg-img { animation: hero-drift 1ms linear both; animation-timeline: scroll(root block); animation-range: 0px 100vh; }
  }
}
@keyframes hero-drift { to { transform: translate3d(0, 35vh, 0); } }
/* Phones: the two banner buttons sit side by side at the same width (one tidy row instead of two
   stacked buttons of different widths covering the sketch). The outlined one gets a light backing
   so the drawing's lines do not run through its words. */
@media (max-width: 600px) {
  .hero .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .hero .hero-actions .btn { width: 100%; padding: 0.82em 0.5em; font-size: 0.9rem; white-space: nowrap; }
  .hero .hero-actions .btn-ghost { background: rgba(251, 247, 238, 0.84); }
  .hero .hero-actions .btn-ghost:hover { background: var(--teal); }
}
@media (max-width: 345px) {
  .hero .hero-actions { grid-template-columns: 1fr; }   /* very narrow screens: stacked, still equal width */
}

/* ---------- Placeholder media (no external images needed) ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--sand), var(--sand-deep));
  display: grid; place-items: center;
  color: var(--teal-deep); isolation: isolate;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-deep);
  opacity: 0.6; padding: 0.5em 1em; text-align: center;
}
.ph .ph-flower { position: absolute; width: 38%; max-width: 120px; opacity: 0.35; z-index: -1; }
.ph.teal { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); }
.ph.teal::after, .ph.teal .ph-flower { color: var(--cream); }
.ph.gold { background: linear-gradient(135deg, var(--gold), var(--olive)); }
.ph.gold::after { color: #4a3408; }
/* Real photo filling a .ph box (replaces the placeholder gradient) */
.ph img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--cream-2); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); transition: transform var(--t), box-shadow var(--t);
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .ph { border-radius: 0; aspect-ratio: 4 / 3; }
.card-body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-body .meta { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--olive); font-weight: 700; }
.card-body h3 { color: var(--teal-ink); }
.card-body p { color: var(--ink-soft); font-size: 0.97rem; }

/* Service / feature blocks */
.feature { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem 1.9rem; height: 100%; transition: transform var(--t), box-shadow var(--t); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.feature .icon { width: 52px; height: 52px; margin-bottom: 1.1rem; color: var(--teal); }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--ink-soft); font-size: 0.98rem; }
.feature .price { display: block; margin-top: 1rem; font-family: var(--font-display); font-size: 1.1rem; color: var(--olive); }

/* Portfolio masonry-ish gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.8rem, 2vw, 1.4rem); grid-auto-flow: dense; }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.gallery .tile { position: relative; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery .tile .ph { aspect-ratio: 1; transition: transform 0.5s ease; }
.gallery .tile.tall .ph { aspect-ratio: 3 / 4; }
.gallery .tile.wide { grid-column: span 2; }
.gallery .tile.wide .ph { aspect-ratio: 16 / 10; }
@media (max-width: 520px) { .gallery .tile.wide { grid-column: span 1; } }
.gallery .tile:hover .ph { transform: scale(1.04); }
/* Concept-sketch inset layered over a finished-photo tile (mirrors the homepage hero, no labels) */
/* margin-bottom reserves space so the inset pops DOWN into open space, pushing later tiles over */
.gallery .tile.has-sketch { overflow: visible; z-index: 3; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }
.gallery .tile.wide.has-sketch { grid-column: 2 / 4; }
.gallery .tile.tall.has-sketch { grid-column: 3; }
/* Tall sketch-tile (e.g. a custom furniture piece): portrait inset overlapping the bottom-right corner */
.gallery .tile.tall .tile-sketch { aspect-ratio: 3 / 4; width: 34%; right: -5%; bottom: -7%; }
.gallery .tile .tile-sketch {
  position: absolute; width: 30%; aspect-ratio: 1; right: -4%; bottom: -8%; z-index: 5;
  border: 5px solid var(--cream); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); pointer-events: none;
}
.gallery .tile .tile-sketch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .tile .tile-sketch::after { content: ""; position: absolute; inset: 0; background: rgba(44, 42, 38, 0.07); }
/* On narrower grids the photo tiles go full-width so the corner inset still pops into clean space */
@media (max-width: 820px) { .gallery .tile.wide.has-sketch, .gallery .tile.tall.has-sketch { grid-column: 1 / -1; } }
.gallery .tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.1rem 0.9rem;
  background: linear-gradient(transparent, rgba(47,79,71,0.78));
  color: var(--cream); font-weight: 700; font-size: 0.92rem;
  opacity: 0; transform: translateY(8px); transition: opacity var(--t), transform var(--t);
}
.gallery .tile:hover .cap, .gallery .tile:focus-within .cap { opacity: 1; transform: translateY(0); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; justify-content: center; }
.filter {
  font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 0.55em 1.2em; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; color: var(--ink-soft); cursor: pointer; transition: all var(--t);
}
.filter:hover { border-color: var(--teal); color: var(--teal-deep); }
.filter[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--cream-2); }

/* ---------- Split / about blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 820px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.split-media .ph { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
/* Side by side (above 820px) the photo grows to the height of the text beside it, so the two columns end level
   however long the text is. It is never shorter than its usual 4:5 shape, and never taller than about twice its
   own width (87vw): past that the text is simply longer and the photo sits centered beside it. */
@media (min-width: 821px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }      /* the two columns stay equal whatever is in them */
  .split-media { align-self: stretch; display: flex; align-items: center; }
  /* No aspect-ratio here: combined with a forced height, Chrome lets it widen the column. The ::before spacer
     gives the usual 4:5 height instead, as the least the photo can be. */
  .split-media .ph { flex: 1 1 0; min-width: 0; aspect-ratio: auto; height: 100%; max-height: 87vw; }
  .split-media .ph::before { content: ""; display: block; padding-top: 125%; }
  /* the spacer and the placeholder label share one cell, so the label's padding does not add to the height */
  .split-media .ph::before, .split-media .ph::after { grid-area: 1 / 1; }

  /* A section whose text runs long (Experience, class "long-text"): so that the photo and ALL of the text fit in
     one screen on a desktop, the text gets three fifths of the width instead of half, is set at the site's base
     size (1rem), and its spacing is a little tighter. That brings it from 810px tall to about 640px, and the
     photo beside it follows. The photo's column is narrower here, so its height limit is lower too. */
  .split.long-text { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .split.long-text .split-media .ph { max-height: 75vw; }
  /* The Experience photo starts level with the top of the heading's capital letters, not with the small label
     above the heading, and still ends level with the last line of text. --drop is the distance from the top of
     the text column down to those capitals: the label's line (1.86rem) plus the space above the capitals inside
     the heading's own line (0.192 of the heading's size; the clamp is the h2 size set near the top of this file).
     The picture keeps the zoom it would have at the full height of the text and loses the difference in the
     same 28:72 split as its focus point, so less of its bottom edge shows: the framing it had before the text
     grew. */
  .split.long-text { --drop: calc(1.86rem + 0.192 * clamp(2rem, 1.4rem + 2.6vw, 3.25rem)); }
  .split.long-text .split-media { padding-top: var(--drop); }
  .split.long-text .split-media .ph img.photo { inset: auto; left: 0; top: calc(-0.28 * var(--drop)); width: 100%; height: calc(100% + var(--drop)); }
  .split.long-text .split-text p:not(.kicker):not(.ps) { font-size: 1rem; text-wrap: pretty; }   /* pretty: no one-word last lines */
  .split.long-text .split-text h2 { margin-bottom: 0.85rem; }
  .split.long-text .split-text p + p { margin-top: 0.8rem; }
  .split.long-text .split-text h3 { margin: 1.4rem 0 0.55rem; }
  .split.long-text .split-text .ps { margin-top: 0.95rem; }
}
.split-text h2 { margin-bottom: 1.1rem; }
.split-text p + p { margin-top: 1rem; }
.split-text h3 { margin: 1.9rem 0 0.75rem; }   /* a sub-heading inside the text column (Experience) */
.split-text .ps { margin-top: 1.25rem; color: var(--teal-deep); font-size: 0.95rem; }

/* Stats / value strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .num { font-family: var(--font-display); font-size: clamp(2.2rem, 1.5rem + 2.5vw, 3.2rem); color: var(--gold); line-height: 1; }
.stat .label { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.5rem; }
.bg-teal .stat .label, .bg-ink .stat .label { color: var(--gold-soft); opacity: 0.95; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2rem); counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; }
.step .n {
  font-family: var(--font-display); font-size: 1.1rem; width: 48px; height: 48px;
  border-radius: 50%; display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--cream); color: var(--teal-deep); border: 1.5px solid var(--teal);
}
.step .n::before { content: counter(step, decimal-leading-zero); }
.bg-teal .step .n, .bg-ink .step .n { background: transparent; color: var(--gold-soft); border-color: var(--gold-soft); }
.step h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }
.bg-teal .step p, .bg-ink .step p { color: rgba(247,241,230,0.85); }
/* Each step grows a little and its number fills in under the mouse. On touch screens a tap
   does the same (main.js adds .is-active; tap again, or tap elsewhere, to release). */
.steps .step { border-radius: var(--radius); -webkit-tap-highlight-color: transparent; transition: opacity 0.7s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
.steps .step .n { transition: transform var(--t), background var(--t), color var(--t), border-color var(--t); }
@media (hover: hover) {
  .steps .step:hover { transform: scale(1.07); }
  .steps .step:hover .n { background: var(--gold-soft); color: var(--teal-ink); border-color: var(--gold-soft); transform: scale(1.12); }
}
.steps .step.is-active { transform: scale(1.07); }
.steps .step.is-active .n { background: var(--gold-soft); color: var(--teal-ink); border-color: var(--gold-soft); transform: scale(1.12); }
/* Phones and small tablets: center each step under the centered section heading */
@media (max-width: 820px) {
  .step { text-align: center; }
  .step .n { margin-inline: auto; }
  .step p { margin-inline: auto; max-width: 34ch; }
}

/* ---------- Testimonials ---------- */
.quote { max-width: 820px; margin-inline: auto; text-align: center; }
.quote blockquote {
  font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.35; font-style: italic; color: var(--teal-ink); margin-bottom: 1.3rem;
}
.bg-teal .quote blockquote, .bg-ink .quote blockquote { color: var(--cream); }
.quote .by { font-weight: 700; letter-spacing: 0.04em; margin-inline: auto; }
.quote .by span { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.3rem; }
.bg-teal .quote .by span { color: var(--gold-soft); }

/* ---------- Forms ---------- */
.form-card { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: var(--shadow-soft); }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.45rem; color: var(--teal-ink); }
.field .req { color: var(--olive-deep); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.8em 0.95em; transition: border-color var(--t), box-shadow var(--t);
}
.field textarea { min-height: 140px; resize: vertical; }
/* Custom dropdown caret: larger, brand-colored, inset from the right edge */
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237c5408' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px;
  padding-right: 2.75rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(84,132,120,0.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); }
/* Breathing room between the consent checkbox, submit button, and helper note */
.form-card .consent { margin-block: 0.5rem 1.6rem; }
.form-card .form-note { margin-top: 1.2rem; }
.consent input { width: auto; margin-top: 0.25rem; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); color: var(--teal-ink);
  padding: 1.3rem 2.5rem 1.3rem 0; position: relative; display: block;
}
.faq-q::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--gold); transition: transform var(--t); line-height: 1; font-family: var(--font-body);
}
.faq-q[aria-expanded="true"]::after { content: "\2013"; }
.faq-a { overflow: hidden; max-height: 0; transition: max-height var(--t); }
.faq-a-inner { padding: 0 0 1.4rem; color: var(--ink-soft); }
.faq-a-inner p + p { margin-top: 0.8rem; }

/* ---------- Links (link-in-bio) page ---------- */
.links-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: clamp(2rem, 6vw, 4rem) var(--gutter); background: radial-gradient(120% 80% at 50% 0%, rgba(228,168,72,0.16), transparent 55%), var(--cream); }
.links-card { width: 100%; max-width: 520px; text-align: center; }
.links-card img.logo { width: clamp(180px, 60%, 260px); margin: 0 auto 1.2rem; }
.links-card .bio { color: var(--ink-soft); margin: 0 auto 1.8rem; max-width: 40ch; }
.link-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: var(--cream-2); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 1.05em 1.4em; margin-bottom: 0.9rem; font-weight: 700; color: var(--teal-ink);
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
}
.link-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); background: var(--teal); color: var(--cream-2); border-color: var(--teal); }
.link-btn.accent { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.link-btn.accent:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.links-socials { display: flex; justify-content: center; gap: 1rem; margin: 1.4rem 0; }
.links-socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--cream-2); border: 1.5px solid var(--line); color: var(--teal-deep); }
.links-socials a:hover { background: var(--teal); color: var(--cream); border-color: var(--teal); }

/* ---------- Article / journal ---------- */
.article { max-width: 760px; margin-inline: auto; padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.25rem) clamp(3.25rem, 2rem + 4.5vw, 5.5rem); }
.article-header { text-align: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.article-header .meta { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive); font-weight: 700; margin-top: 1.35rem; margin-bottom: 1rem; text-align: left; }
.article-header h1 { margin-bottom: 1rem; }
.article-hero .ph { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); margin-bottom: clamp(2rem, 5vw, 3rem); }
.prose { font-size: 1.08rem; }
.prose > * + * { margin-top: 1.3rem; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5rem; }
.prose blockquote {
  border-left: 3px solid var(--gold); padding: 0.4rem 0 0.4rem 1.4rem;
  font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--teal-ink);
}
.prose figure .ph { aspect-ratio: 3 / 2; border-radius: var(--radius); }
/* Real in-article photo at natural aspect, centered (portrait figures don't get cropped) */
.prose figure img.prose-photo { display: block; margin-inline: auto; width: 100%; height: auto; border-radius: var(--radius); }
.prose figure img.prose-photo.portrait { max-width: 460px; }
.prose figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; text-align: center; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--olive); background: var(--sand); padding: 0.35em 0.9em; border-radius: 999px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.82rem; color: var(--ink-soft); letter-spacing: 0.04em; margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--olive); }
.crumbs span { color: var(--olive); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 1rem; }
.cta-band p { margin: 0 auto 2rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-ink); color: rgba(247,241,230,0.82); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--gold-soft); font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(247,241,230,0.82); }
.site-footer a:hover { color: var(--gold-soft); }
.footer-brand img { height: 82px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { font-size: 0.95rem; max-width: 32ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; font-size: 0.95rem; }
.footer-social { display: flex; gap: 0.8rem; margin-top: 1rem; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(247,241,230,0.25); }
.footer-social a:hover { background: var(--gold); color: var(--teal-ink); border-color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(247,241,230,0.18); padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.82rem; }
.footer-bottom a { text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(31,42,38,0.92); display: none; place-items: center; padding: 4vw; }
.lightbox[data-open="true"] { display: grid; }
.lightbox .lb-inner { max-width: 1000px; width: 100%; }
.lightbox .ph { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.lightbox .lb-photo { width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); }
.lightbox .lb-cap { color: var(--cream); text-align: center; margin-top: 1rem; font-weight: 700; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream); cursor: pointer; font-size: 2rem; line-height: 1; padding: 0.5rem; }
.lb-close { top: 1rem; right: 1.5rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 2.6rem; }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 2.6rem; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flower-divider { display: flex; justify-content: center; align-items: center; gap: 0.9rem; margin-block: clamp(2rem,5vw,3.5rem); }
.flower-divider::before, .flower-divider::after { content: ""; width: 26px; height: 50px; flex: none; background: center/contain no-repeat url("/assets/img/leaf-sage.svg"); opacity: 0.95; }
.flower-divider::before { transform: rotate(-20deg); }
.flower-divider::after { transform: scaleX(-1) rotate(-20deg); }
.flower-divider svg, .flower-divider img { width: 50px; height: auto; opacity: 0.9; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 0.5rem; top: -4rem; background: var(--gold); color: var(--ink); padding: 0.6em 1em; border-radius: 8px; z-index: 300; transition: top var(--t); font-weight: 700; }
.skip-link:focus { top: 0.5rem; }

/* ============================================================
   v2 — single-page / snap-scroll additions
   ============================================================ */
/* Offset so anchored sections land just below the sticky header */
html { scroll-padding-top: 104px; }
/* Trim the top padding of jump-target sections so the heading sits close to
   the header after an anchor jump (avoids a big empty band of headroom) */
#portfolio, #experience, #process, #sourcing, #contact { padding-top: clamp(2rem, 1.25rem + 1.5vw, 3.25rem); }

/* No section snapping. Until November 13, 2026 wide screens used scroll-snap-type: y proximity, which pulled the
   page toward the top of each section. It read as friction ("sticky") when scrolling toward the next section,
   so the page now scrolls freely. The navigation links still land in the right place (scroll-padding-top above). */

/* Active in-page nav link (set by scroll-spy) mirrors the hover underline */
.nav-links a.active:not(.btn) { color: var(--teal-deep); }
.nav-links a.active:not(.btn)::after { width: 100%; }

/* Trimmed footer: brand + a single explore column */
.footer-grid-v2 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 600px) { .footer-grid-v2 { grid-template-columns: 1fr; } }

/* Flower "back to top" button */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  width: 60px; height: 60px; z-index: 150;
  display: grid; place-items: center;
  background: var(--cream-2); border: 1.5px solid var(--line);
  border-radius: 50%; box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.92);
  transition: opacity var(--t), transform var(--t), visibility var(--t), background var(--t), border-color var(--t);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--sand); border-color: var(--teal); transform: translateY(-3px); }
.to-top img { width: 30px; height: auto; transition: transform var(--t); }
.to-top:hover img { transform: scale(1.08) rotate(-6deg); }
@media (prefers-reduced-motion: reduce) { .to-top:hover { transform: none; } .to-top:hover img { transform: none; } }

/* Checklist (used on Services "what's included") */
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--ink-soft); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 1.05rem; height: 0.6rem;
  border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal);
  transform: rotate(-45deg);
}
.bg-teal .check-list li, .bg-ink .check-list li { color: rgba(247,241,230,0.9); }
.bg-teal .check-list li::before, .bg-ink .check-list li::before { border-color: var(--gold-soft); }

/* ============================================================
   v3 — portfolio in four sections
   (tabs, drawing grids, project viewer, sketch/render comparison)
   ============================================================ */

/* ---------- Tabs ---------- */
.pf-tabs { display: none; grid-template-columns: repeat(4, 1fr); gap: clamp(0.6rem, 1.4vw, 1rem); margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.js .pf-tabs { display: grid; }
.pf-tab {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.8rem; align-items: baseline; align-content: start;
  padding: 1rem 1.15rem 1.05rem; background: var(--cream-2);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.pf-tab .pf-n { grid-row: span 2; font-family: var(--font-display); font-size: 0.95rem; color: var(--olive-deep); }
.pf-tab .pf-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem); line-height: 1.15; color: var(--teal-ink); }
.pf-tab .pf-sub { font-size: 0.82rem; line-height: 1.35; color: var(--ink-soft); margin-top: 0.25rem; }
.pf-tab:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.pf-tab[aria-selected="true"] { background: var(--teal-ink); border-color: var(--teal-ink); }
.pf-tab[aria-selected="true"] .pf-n { color: var(--gold-soft); }
.pf-tab[aria-selected="true"] .pf-name { color: var(--cream); }
.pf-tab[aria-selected="true"] .pf-sub { color: rgba(247, 241, 230, 0.86); }
@media (max-width: 900px) { .pf-tabs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .pf-tab { padding: 0.8rem 0.85rem; column-gap: 0.55rem; } .pf-tab .pf-sub { font-size: 0.76rem; } }

/* ---------- Panels ---------- */
.pf-panel { outline-offset: 6px; }
.pf-panel + .pf-panel { margin-top: clamp(3rem, 6vw, 5rem); }
.js .pf-panel + .pf-panel { margin-top: 0; }
/* Before main.js has set up the tabs, keep tabs 2 to 4 out of the layout so the browser does not start
   downloading their pictures. main.js adds "tabs-ready" once the hidden attribute has taken over. */
.js:not(.tabs-ready) .pf-panel + .pf-panel { display: none; }
.js .pf-panel:not([hidden]) { animation: pf-in 0.45s ease both; }
@keyframes pf-in { from { opacity: 0; transform: translateY(10px); } }
.pf-panel-head { max-width: 66ch; margin: 0 auto clamp(1.5rem, 3vw, 2.25rem); text-align: center; }
.pf-panel-head h3 { margin-bottom: 0.6rem; }
.pf-panel-head p { margin-inline: auto; color: var(--ink-soft); }
/* With tabs on, the tab itself names the panel; keep the heading for screen readers only */
.js .pf-panel-head h3 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pf-next { max-width: none; margin-top: clamp(1.75rem, 4vw, 2.75rem); text-align: center; }
.pf-next .btn svg { transition: transform var(--t); }
.pf-next .btn:hover svg { transform: translateX(4px); }
:root:not(.js) .pf-next { display: none; }
:root:not(.js) #pf-panel-life .pf-next { display: block; }

/* ---------- Drawing grids (masonry columns, each drawing at its own proportions) ---------- */
.pf-grid { --pf-gap: clamp(0.9rem, 2vw, 1.4rem); columns: 3 280px; column-gap: var(--pf-gap); }
.pf-item { break-inside: avoid; margin: 0 0 clamp(1.1rem, 2.2vw, 1.6rem); }
/* Row-first version of the same grid, switched on by the script for a grid marked data-flow="rows".
   Columns fill top to bottom (1 2 3 down the first column); this fills across (1 2 3 along the top row), each later
   drawing dropping into whichever column is shortest, so a wide screen reads in the same order as a phone and
   the image viewer. Same column count as above: up to 3, never narrower than 280px. The script gives each drawing
   its height as a number of 4px rows ("pf-grid rows" in main.js). */
.pf-grid.is-rows {
  columns: auto; display: grid; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(280px, calc((100% - 2 * var(--pf-gap)) / 3 - 1px))), 1fr));
  column-gap: var(--pf-gap); row-gap: 0; grid-auto-rows: 4px;
}
.pf-grid.is-rows > .pf-item { min-width: 0; }
.pf-open {
  position: relative; display: block; width: 100%; padding: 0; cursor: zoom-in;
  background: #fdfaf3; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.pf-open img { display: block; width: 100%; height: auto; }
.pf-open:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--teal); }
.pf-item figcaption { padding: 0.55rem 0.15rem 0; font-weight: 700; font-size: 0.95rem; line-height: 1.35; color: var(--teal-ink); }
.pf-item figcaption span { display: block; font-weight: 400; font-size: 0.82rem; color: var(--ink-soft); }
/* Small chip under a drawing's title naming how it was drawn */
.pf-item figcaption .pf-tag {
  display: inline-block; margin-top: 0.4rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.32em 0.75em; border-radius: 999px; background: var(--teal-ink); color: var(--cream);
}
.pf-item figcaption .pf-tag.hand { background: var(--cream-2); color: var(--olive-deep); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Project viewer ---------- */
.project { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.project-info .kicker { margin-bottom: 0.9rem; }
.project-info h3 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 0.9rem; }
.project-info p { color: var(--ink-soft); }
.project-facts { list-style: none; padding: 1.2rem 0 0; margin: 1.4rem 0 0; display: grid; gap: 0.5rem; font-size: 0.93rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.project-facts strong { display: inline-block; min-width: 4.6rem; color: var(--teal-ink); }
.viewer-stage {
  position: relative; display: grid; place-items: center; width: 100%;
  aspect-ratio: 1 / 1; max-height: 76vh; overflow: hidden;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.viewer-zoom { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.viewer-zoom img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.28s ease; }
.viewer-zoom img.swap { opacity: 0; }
.viewer-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem; line-height: 1; padding: 0 0 4px; cursor: pointer;
  background: rgba(251, 247, 238, 0.92); color: var(--teal-ink); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.viewer-arrow:hover { background: var(--teal-ink); color: var(--cream); border-color: var(--teal-ink); }
.viewer-arrow.prev { left: 0.75rem; }
.viewer-arrow.next { right: 0.75rem; }
.viewer-cap {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-width: none; margin: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; pointer-events: none;
  padding: 0.5rem 0.9rem; border-radius: 999px; font-size: 0.86rem; font-weight: 700;
  background: rgba(47, 79, 71, 0.9); color: var(--cream);
}
.viewer-count { font-weight: 400; white-space: nowrap; color: rgba(247, 241, 230, 0.86); }
.viewer-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.4rem, 1vw, 0.7rem); margin-top: clamp(0.7rem, 1.5vw, 1rem); }
.viewer-thumb { font: inherit; padding: 0; cursor: pointer; text-align: center; overflow: hidden; background: var(--cream-2); border: 2px solid var(--line); border-radius: 12px; transition: border-color var(--t), transform var(--t); }
.viewer-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; }
.viewer-thumb span { display: block; padding: 0.35rem 0.2rem 0.45rem; font-size: 0.76rem; font-weight: 700; color: var(--ink-soft); }
.viewer-thumb:hover { border-color: var(--teal); transform: translateY(-2px); }
.viewer-thumb[aria-pressed="true"] { border-color: var(--olive); }
.viewer-thumb[aria-pressed="true"] span { color: var(--teal-ink); }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project-viewer { order: -1; }
  .viewer-thumb span { font-size: 0.68rem; }
}
/* More than one project: a rule and some air between them, and every other one mirrored (words on the right)
   so the tab does not read as a column of identical blocks. On narrow screens they all stack the same way. */
.project + .project { margin-top: clamp(2.75rem, 6vw, 4.75rem); padding-top: clamp(2.75rem, 6vw, 4.75rem); border-top: 1px solid var(--line); }
@media (min-width: 861px) {
  .project.flip { grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr); }
  .project.flip .project-viewer { order: -1; }
}
/* Drawing sets are mostly wider than tall, so their stage is 4:3 instead of square */
.project-viewer.wide .viewer-stage { aspect-ratio: 4 / 3; background: #fdfaf3; }   /* the drawings' own paper tone, so their edges do not show */
/* a drawing is kept clear of the caption bar (a tall plan would otherwise lose its bottom rooms behind it) */
.project-viewer.wide .viewer-zoom img { box-sizing: border-box; padding: 0.6rem 0.6rem 3.5rem; }
/* a set of six views: one row of six, or two rows of three on a phone */
.viewer-thumbs.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 600px) { .viewer-thumbs.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* projects with drawings and 3D model views: eight to eleven small pictures, in rows of four to six (three on a phone from nine up) */
.viewer-thumbs.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.viewer-thumbs.nine, .viewer-thumbs.ten { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.viewer-thumbs.eleven { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 600px) { .viewer-thumbs.nine, .viewer-thumbs.ten, .viewer-thumbs.eleven { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Without scripts the viewer cannot switch views */
:root:not(.js) .viewer-arrow, :root:not(.js) .viewer-count { display: none; }

/* ---------- Sketch / render comparison ---------- */
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem); align-items: start; }
@media (max-width: 760px) { .compare-grid { grid-template-columns: 1fr; } }
.compare { margin: 0; }
.compare-frame {
  --pos: 50%;
  position: relative; overflow: hidden; background: #fdfaf3;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare-frame img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.compare-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-top img { height: 100%; object-fit: cover; }
/* When the render is showing in full, the sketch layer is hidden outright rather than left as a zero-width clip */
.compare-frame.at-render .compare-top { visibility: hidden; }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--cream-2); box-shadow: 0 0 0 1px rgba(44, 42, 38, 0.28); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: var(--pos); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
  background: var(--cream-2); color: var(--teal-deep); border: 1.5px solid var(--teal); box-shadow: 0 6px 18px -8px rgba(44, 42, 38, 0.7);
}
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.compare-range:focus-visible ~ .compare-knob { outline: 3px solid var(--gold); outline-offset: 3px; }
/* The two labels trade emphasis as the handle moves: whichever side is showing more gets the
   brighter, slightly larger pill. --p runs from 0 (all render) to 1 (all sketch); main.js keeps it in step.
   Each label is also a button: tapping or clicking it slides the picture all the way to that version, so the
   dimmer one stays visible enough to find (it never fades below 45%). */
.compare-label {
  position: absolute; bottom: 0.6rem; cursor: pointer;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.32em 0.75em; border-radius: 999px;
  transition: opacity 0.12s linear, transform 0.12s linear;
}
.compare-label.l {
  left: 0.6rem; background: var(--cream); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--line);
  transform-origin: left bottom; opacity: calc(0.45 + 0.55 * var(--p, 0.5)); transform: scale(calc(0.86 + 0.24 * var(--p, 0.5)));
}
.compare-label.r {
  right: 0.6rem; background: var(--teal-ink); color: var(--cream);
  transform-origin: right bottom; opacity: calc(1 - 0.55 * var(--p, 0.5)); transform: scale(calc(1.1 - 0.24 * var(--p, 0.5)));
}
/* After a badge is tapped the divider slides across instead of jumping. main.js moves it frame by frame;
   there is deliberately no CSS transition on the clipped sketch layer (it can flash unclipped for a frame). */
.compare figcaption { padding: 0.6rem 0.15rem 0; font-weight: 700; font-size: 0.95rem; color: var(--teal-ink); }

/* ---------- Lightbox additions ---------- */
.lightbox .lb-inner { display: grid; justify-items: center; }
/* The frame is sized from the picture's proportions (--ar = width / height, set by main.js), not from
   whichever file happens to be loaded, so it does not jump when the full-size picture replaces the preview. */
.lightbox .lb-photo { width: min(92vw, calc(82vh * var(--ar, 1.5))); max-width: 100%; height: auto; aspect-ratio: var(--ar, 1.5); max-height: 82vh; background: #fdfaf3; }
.lightbox .lb-cap { max-width: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1rem; }
.lightbox .lb-count { font-weight: 400; color: rgba(247, 241, 230, 0.75); }
.lightbox button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0 0 4px; }
.lightbox button:hover { background: rgba(247, 241, 230, 0.14); }
.lightbox button[hidden] { display: none; }
/* Desktop: the arrows sit just outside the picture's left and right edges (not over it, and not
   out at the edges of the screen). The middle column shrinks to the picture's own width. */
@media (min-width: 761px) {
  /* The arrows stand at the two sides of a fixed "stage" in the middle of the screen, and each picture is centered
     on that stage. The stage is as wide as the widest picture in the set being viewed (--ar-max, set by main.js when
     the viewer opens), so:
       - the arrows are in exactly the same place for every picture, however narrow or wide it is. Clicking through
         a set never leaves the pointer on empty background, where a click would close the viewer.
       - an arrow can never be over a picture, because no picture is wider than the stage.
     --lb-room is the width left for the stage once the two arrows, the gaps, and the edge padding are taken out. */
  .lightbox {
    --lb-gap: clamp(0.6rem, 1.4vw, 1.1rem);
    --lb-room: calc(100vw - 8vw - 96px - 4 * var(--lb-gap));
    --lb-stage: min(1000px, var(--lb-room), calc(82vh * var(--ar-max, 2.2)));
  }
  .lightbox[data-open="true"] { grid-template-columns: 1fr auto var(--lb-stage) auto 1fr; column-gap: var(--lb-gap); }
  .lightbox .lb-inner { grid-column: 3; grid-row: 1; width: auto; max-width: 100%; }
  .lightbox .lb-photo { width: min(1000px, var(--lb-room), calc(82vh * var(--ar, 1.5))); }
  .lightbox .lb-cap { width: 0; min-width: 100%; }      /* the caption wraps to the picture's width instead of widening it */
  /* inset: auto clears the left / right / top offsets the phone layout places the arrows with. Their height on the
     screen is set from the window itself (its middle, less the caption's share), not from the row they share with
     the picture, so a tall picture with a two-line caption cannot nudge them either. */
  .lightbox .lb-prev, .lightbox .lb-next {
    position: relative; inset: auto; transform: none; grid-row: 1;
    align-self: start; margin: calc(50vh - 4vw - 24px - 1.2rem) 0 0;
  }
  .lightbox .lb-prev { grid-column: 2; }
  .lightbox .lb-next { grid-column: 4; }
  /* a taller, slightly wider unseen target around each arrow, so a click that lands a little off still counts.
     It stays inside the gap beside the stage, so it is never over a picture either. */
  .lightbox .lb-prev::after, .lightbox .lb-next::after { content: ""; position: absolute; inset: -5.5rem -0.5rem; }
}
/* Touch screens: swipe left / right to change pictures; pinch to zoom in and drag to look around */
.lightbox { touch-action: manipulation; }
/* With a mouse, clicking the picture goes to the next one (main.js); the hand cursor says so */
@media (hover: hover) and (pointer: fine) {
  .lightbox[data-many="true"] .lb-photo { cursor: pointer; -webkit-user-select: none; user-select: none; }
}
.lightbox .lb-photo.go-next { animation: lb-go-next 0.28s ease both; }
.lightbox .lb-photo.go-prev { animation: lb-go-prev 0.28s ease both; }
@keyframes lb-go-next { from { opacity: 0; transform: translateX(30px); } }
@keyframes lb-go-prev { from { opacity: 0; transform: translateX(-30px); } }
@media (prefers-reduced-motion: reduce) { .js .pf-panel:not([hidden]) { animation: none; } }

/* Phones: the contact details (email, phone, studio, Instagram) are centered between the intro text and the form */
@media (max-width: 560px) {
  #contact .footer-links { align-items: center; text-align: center; }
}

/* ---------- Footer: brand left, section links in one centered row, social icons right ---------- */
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2rem clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 2.75rem; }
.footer-top .footer-brand img { margin-bottom: 0.9rem; }
.footer-top .footer-social { margin-top: 0; justify-self: end; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem clamp(1.2rem, 2.4vw, 2.2rem); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em; }
.footer-nav a { position: relative; padding-block: 0.35rem; }
.footer-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width var(--t); }
.footer-nav a:hover::after { width: 100%; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.6rem; margin-bottom: 2.25rem; }
  .footer-top .footer-brand img, .footer-top .footer-brand p { margin-inline: auto; }
  .footer-top .footer-social { justify-self: center; }
}

/* ============================================================
   The studio cat: a small hidden friend that peeks out from behind
   the logo, headings, and portfolio pieces once a visitor has been
   exploring for a little while. Purely decorative (see main.js).
   ============================================================ */
.peek-cat {
  --cat-w: 46px;
  position: absolute; z-index: 90; pointer-events: none;
  width: var(--cat-w); height: calc(var(--cat-w) * 0.8125);   /* matches the 64 x 52 drawing */
}
/* the window the cat is seen through: its picture is cut off at the window's sides */
.peek-cat .cat-clip { position: absolute; inset: 0; display: block; overflow: hidden; }
.peek-cat.in-header { position: fixed; z-index: 101; }
/* Between visits the script strips the pose off to measure the cat and look for its next spot. In that bare
   state it must be neither seen nor in the way: if no spot was found it used to be left standing, whole and
   unposed, where it last was, and it could block that same spot from being offered again. */
.peek-cat:not(.pop):not(.lean-r):not(.lean-l) { visibility: hidden; }
.peek-cat svg { display: block; overflow: visible; pointer-events: auto; cursor: pointer; transition: transform 0.55s cubic-bezier(0.3, 1.35, 0.5, 1); }
.peek-cat .cat-art { width: 100%; height: 100%; }
.peek-cat .cat-torso, .peek-cat .cat-grip { display: none; }   /* the long body and the holding paw belong to the leaning pose */
/* "pop": slides straight out of an edge. The box is turned (--rot) around the middle of its base, which sits
   on that edge: 0deg = up over the top, 90deg = out to the right, 180deg = hanging below, 270deg = out to the left */
.peek-cat.pop { transform-origin: 50% 100%; transform: rotate(var(--rot, 0deg)) translateY(var(--follow, 0px)); clip-path: inset(0 0 var(--cover, 0px) 0); }
.peek-cat.pop .cat-art { transform: translateY(108%); }
.peek-cat.pop.show .cat-art { transform: translateY(4%); }
/* "lean": leans out from behind a side edge. The cat stands upright just behind the edge, then swings its head
   and shoulders out about 36 degrees around a point low on its body, with one paw coming to rest on the edge.
   The box is the patch of page beside the edge (the edge is its inner side, which cuts the body off); its size
   is LEAN_OUT x LEAN_TALL in main.js. Every length is a share of the cat's width, so the phone size scales. */
.peek-cat.lean-r, .peek-cat.lean-l { width: calc(var(--cat-w) * 0.87); height: calc(var(--cat-w) * 1.72); }
/* the trim (--cover) leaves a little room on the hidden side for the paw, which sits across the edge */
.peek-cat.lean-r { transform: translateX(calc(-1 * var(--follow, 0px))); clip-path: inset(0 0 0 calc(var(--cover, 0px) - var(--cat-w) * 0.1)); }
.peek-cat.lean-l { transform: translateX(var(--follow, 0px)); clip-path: inset(0 calc(var(--cover, 0px) - var(--cat-w) * 0.1) 0 0); }
.peek-cat.lean-r .cat-art, .peek-cat.lean-l .cat-art {
  position: absolute; top: calc(var(--cat-w) * -0.1065); width: var(--cat-w); height: calc(var(--cat-w) * 0.8125);
  transform-origin: 50% 194%;
}
.peek-cat.lean-r .cat-art { left: calc(var(--cat-w) * -0.846); transform: translateX(calc(var(--cat-w) * -0.24)) rotate(0deg); }
.peek-cat.lean-r.show .cat-art { transform: translateX(0px) rotate(36deg); }
.peek-cat.lean-l .cat-art { right: calc(var(--cat-w) * -0.846); transform: translateX(calc(var(--cat-w) * 0.24)) rotate(0deg); }
.peek-cat.lean-l.show .cat-art { transform: translateX(0px) rotate(-36deg); }
.peek-cat.lean-r .cat-torso, .peek-cat.lean-l .cat-torso { display: inline; }
.peek-cat.lean-r .cat-paws, .peek-cat.lean-l .cat-paws { display: none; }
/* the paw: when the cat leans out from behind something solid (class "grip"), one paw wraps around the edge
   onto its face, open side on the edge. It reaches around as the cat leans out and lets go first when it leaves.
   The 3px puts the open side just past the edge (the box starts 2px inside it). The sizes below are the fallback:
   the script sets the same sizes rounded to whole pixels (GRIP_W, GRIP_H, GRIP_MID in main.js), so the paw is
   equally crisp on both sides. It is big enough, with its outline and toe lines, to read on white paper and on
   the cream tabs, not only on the dark selected tab. */
.peek-cat.grip .cat-grip {
  display: block; position: absolute; top: calc(var(--cat-w) * 0.92); width: calc(var(--cat-w) * 0.15); height: calc(var(--cat-w) * 0.25);
  opacity: 0; transform: scale(0.2); transition: transform 0.4s cubic-bezier(0.3, 1.35, 0.5, 1) 0.14s, opacity 0.16s ease 0.14s;
}
.peek-cat.lean-r.grip .cat-grip { left: calc(3px - var(--cat-w) * 0.15); }
.peek-cat.lean-l.grip .cat-grip { right: calc(3px - var(--cat-w) * 0.15); transform: scale(-0.2, 0.2); }   /* drawn mirrored */
.peek-cat.lean-r.grip.show .cat-grip { transform: none; opacity: 1; }
.peek-cat.lean-l.grip.show .cat-grip { transform: scaleX(-1); opacity: 1; }
.peek-cat.hide-slow .cat-grip, .peek-cat.hide-fast .cat-grip { transition: transform 0.14s ease-in, opacity 0.14s ease-in; }
/* --cover and --follow keep the cat behind a perch that moves, such as a tab or a drawing lifting under the
   mouse: --cover trims the cat on its hidden side by as far as that edge has moved toward it, --follow slides
   the cat along when the edge moves away. Both are set by the script and are 0 while nothing has moved. */
/* leaving: slowly when the page scrolls, quickly when it is clicked or tapped */
.peek-cat.hide-slow svg { transition: transform 1.3s cubic-bezier(0.45, 0, 0.8, 0.6); }
.peek-cat.hide-fast svg { transition: transform 0.16s cubic-bezier(0.5, 0, 1, 0.5); }
/* while it is out it holds still; only the eyes blink (first blink shortly after it appears) */
.peek-cat .cat-eye { transform-box: fill-box; transform-origin: center; }
.peek-cat.show .cat-eye { animation: cat-blink 3.4s 0.9s infinite; }
@keyframes cat-blink { 0%, 9%, 100% { transform: scaleY(1); } 3%, 6% { transform: scaleY(0.08); } }
/* a little heart when someone spots it */
.peek-heart {
  position: absolute; z-index: 102; pointer-events: none; width: 18px; height: 18px; margin: -22px 0 0 -9px;
  color: #d98f7f; animation: cat-heart 0.9s ease-out forwards;
}
.peek-heart.in-header { position: fixed; }
.peek-heart svg { display: block; width: 100%; height: 100%; }
@keyframes cat-heart { 0% { opacity: 0; transform: translateY(6px) scale(0.5); } 25% { opacity: 1; transform: translateY(-4px) scale(1.1); } 100% { opacity: 0; transform: translateY(-26px) scale(0.9); } }
@media (max-width: 600px) { .peek-cat { --cat-w: 40px; } }
@media (prefers-reduced-motion: reduce) {
  .peek-cat svg { transition: opacity 0.4s ease; opacity: 0; }
  .peek-cat.pop .cat-art, .peek-cat.pop.show .cat-art { transform: translateY(4%); }
  .peek-cat.lean-r .cat-art, .peek-cat.lean-r.show .cat-art { transform: translateX(0px) rotate(36deg); }
  .peek-cat.lean-l .cat-art, .peek-cat.lean-l.show .cat-art { transform: translateX(0px) rotate(-36deg); }
  .peek-cat.lean-r.grip .cat-grip { transform: none; transition: opacity 0.4s ease; }
  .peek-cat.lean-l.grip .cat-grip { transform: scaleX(-1); transition: opacity 0.4s ease; }
  .peek-cat.show svg { opacity: 1; }
  .peek-cat.show .cat-eye, .peek-heart { animation: none; }
  .peek-heart { display: none; }
}
