/* ---------------------------------------------------
   rachelbeiser.studio — structural stylesheet (v0)
   Minimal on purpose: just enough for spacing,
   hierarchy, and layout to be legible. Not final design.
--------------------------------------------------- */

:root {
  --max-width: 960px;
  --gutter: 24px;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #ddd;
  --bg: #fff;
  --bg-page: #FEFDFA;
  --bg-about-band: #F8F6F1; /* tinted bands and boxes: a touch darker than the page */
  --line-gray: #ECE8E2; /* divider lines */
  --bg-subtle: #f5f5f4;
  --accent: #1a1a1a;
  --brand-maven: #09866F;
  --radius: 20px;
  --font-body: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-home-headline: 'Aleo', Georgia, 'Times New Roman', serif; /* homepage hero only, per direction */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* All links share one color, in every state — no visited/hover/active
   color shift, so a click never "marks" a link as different from the rest.
   Plain black, not the old purple accent — no colored link text anywhere
   on the site. */
a,
a:visited,
a:active,
a:focus {
  color: var(--text);
  text-decoration: none;
}

/* Sitewide hover affordance: a normal-weight underline, on by default for
   any plain link. A handful of components below deliberately opt out
   because they already have their own hover treatment (whole-card links)
   or aren't text links (icon buttons, the nav logo). The hero headline
   links keep their own bolder, custom-thickness underline — that's a
   deliberate one-off, not this default. */
a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Nav ---------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3) 64px;
}

.site-nav__logo {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
}

.site-nav__logo:hover {
  text-decoration: none;
}

.site-nav__signature {
  height: 56px;
  width: auto;
  display: block;
}

.site-nav__links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav__links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.site-nav__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-nav__links a[aria-current="page"] {
  background: var(--bg-subtle);
  font-weight: 600;
}

/* ---------- Main content ---------- */

main.wrap {
  padding: var(--space-5) var(--gutter);
  min-height: 50vh;
}

/* When a full-bleed band follows main directly, its own top padding
   already provides the gap — main's bottom padding would double it up. */
main.wrap:has(+ .work-band) {
  padding-bottom: 0;
}

/* About: no tall empty gap under the intro before the photo band. */
main.wrap:has(+ .about-photos) {
  min-height: 0;
}

main.wrap:has(+ .about-photos) .page-intro p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-1);
}

h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

h2 {
  font-size: 32px;
  margin: 0 0 var(--space-2);
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 var(--space-1);
}

p {
  margin: 0 0 var(--space-2);
  font-size: 20px;
}

.lede {
  font-size: 20px;
  color: var(--text);
  max-width: 55ch;
}

/* Product Design / Illustration index intros only — full-width, unlike
   the standard .lede used elsewhere (e.g. Contact). */
.lede--compact {
  max-width: none;
}

/* ---------- Homepage hero ---------- */

.hero {
  text-align: center;
  padding: var(--space-4) 0 0;
  margin-bottom: 112px; /* 64 + 48 */
}

.hero__headline {
  font-family: var(--font-home-headline);
  font-weight: 300;
  font-size: 65px;
  line-height: 1.15;
  max-width: 900px;
  margin: 0 auto;
}

.hero__headline a {
  color: inherit;
  font-style: italic;
  font-weight: 400;
  text-decoration: none;
  /* A hand-drawn underline built from a background image (not
     text-decoration) so it can animate as a left-to-right sweep.
     box-decoration-break: clone gives each wrapped line its own copy,
     so both lines of a wrapped link sweep in together correctly. */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 0;
  transition: background-size 0.25s ease-out;
}

.hero__headline a:hover {
  font-style: normal;
  background-size: 100% 4px;
}

/* ---------- Homepage "about me" band ---------- */

/* A tinted box (not full-bleed) holding the photo and bio. The content inside
   keeps the page's normal margins; the box reaches out past them by --ext. */
.home-about {
  --ext: clamp(16px, calc((100vw - 912px) / 2 - 8px), 48px);
  background: var(--bg-about-band);
  margin-left: calc(-1 * var(--ext));
  margin-right: calc(-1 * var(--ext));
  margin-bottom: 112px; /* 64 + 48 */
  padding: var(--space-4) var(--ext);
}

.home-about__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Plain rectangular photo, homepage only — a separate class from the
   About page's .about-photo (arch + stroke) so that page's treatment
   is untouched until its own mockup comes in. */
.home-about-photo {
  background: var(--bg-subtle);
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
}

.home-about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-about__content {
  flex: 1 1 380px;
}

.home-about__content h2 {
  font-family: var(--font-home-headline);
  font-weight: 400;
  font-size: 32px;
  margin-bottom: var(--space-2);
}

.home-about__content p {
  font-size: 20px;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.home-about__content p:last-child {
  margin-bottom: 0;
}

/* ---------- Homepage "My services" ---------- */

.services > h2 {
  font-family: var(--font-home-headline);
  font-weight: 400;
  font-size: 32px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.service-card {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.service-card:hover {
  text-decoration: none;
}

.service-card__image {
  aspect-ratio: 3 / 2;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px solid #000;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  display: block;
  transform: scale(1.02);
}

.service-card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.service-card p {
  margin: 0;
}

section {
  margin-bottom: var(--space-5);
}

section:last-child {
  margin-bottom: 0;
}

/* ---------- Router cards (home) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.card p {
  color: var(--text);
  flex-grow: 1;
}

.card a.card__cta {
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Index grids (product-design / illustration) ---------- */

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.item-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.item-card:hover {
  text-decoration: none;
}

.item-card__thumb {
  background: var(--bg-subtle);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.item-card__body {
  padding: var(--space-2);
}

.item-card__body h3 {
  font-size: 24px;
  font-weight: 600;
}

.item-card__body p {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

/* Reusable serif display heading (same family as the homepage hero) for
   a page's top-level H1, e.g. "Product Design" / "Illustration". */
.page-title {
  font-family: var(--font-home-headline);
  font-weight: 400;
  font-size: 40px;
}

/* ---------- Intro band (Product Design page intro, full-bleed, same plain background as the sections below) ---------- */

.intro-band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
  padding: var(--space-5) 0;
}

.intro-band__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* A plain divider line between full-bleed bands, in place of a color block. */
.section-divider {
  border: none;
  border-top: 1px solid #000;
  margin: 0;
}

/* ---------- Resume link (Product Design page intro) ---------- */

.resume-link {
  display: inline-block;
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
  text-decoration: underline;
  margin-top: var(--space-2);
}

/* Plain black text, permanently underlined (not hover-only, not link-colored)
   for inline contextual links, per the Figma spec. */
.link-underline {
  color: var(--text);
  text-decoration: underline;
}

.link-underline:hover {
  color: var(--text);
}

/* ---------- "Explore my work" / "Get in touch" band heading ---------- */

.band-heading {
  font-family: var(--font-home-headline);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 var(--space-4);
}

/* ---------- "Explore my work" band (Product Design / Illustration index) ---------- */
/* No longer tinted — plain page background, separated by .section-divider lines. */

.work-band {
  background: var(--bg-about-band);
  margin-bottom: 0;
  padding: var(--space-5) 0;
}

.work-band__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid #000;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
}

.work-card:hover {
  text-decoration: none;
}

.work-card__image {
  width: 100%;
  aspect-ratio: 1067 / 521;
  background: var(--bg-subtle);
  overflow: hidden;
}

.work-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* The source thumbnails have a few stray dark pixels baked into their
     bottom edge (from the mockup tool they were exported from). A slight
     scale-up pushes that sliver outside the clipped box without a
     perceptible zoom on the photo itself. */
  transform: scale(1.02);
}

.work-card__body {
  padding: 40px;
  border-top: 1px solid #000;
}

.work-card__text-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.work-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.work-card__header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.work-card__client {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.work-card__client img {
  height: 15px;
  width: auto;
  display: block;
}

.work-card__text-block p {
  margin: 0;
  color: var(--text);
  max-width: 60ch;
}

.work-card__link {
  display: block;
  margin-top: 40px;
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
  text-decoration: underline;
}

/* ---------- "Get in touch" band (Product Design / Illustration index) ---------- */
/* No longer tinted, no photo — plain page background. */

.contact-band {
  margin-bottom: 0;
  padding: var(--space-5) 0 var(--space-3);
}

.contact-band__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.contact-band__content {
  flex: 1 1 auto;
}

.contact-band__content h2 {
  margin-bottom: var(--space-2);
}

.contact-band__content p {
  margin: 0;
  font-size: 20px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .contact-band__content p {
    white-space: normal;
  }
}


/* ---------- About page ---------- */

/* A tinted box (not full-bleed). The photos and heading inside keep the page's
   normal 912px content width; the box reaches out past the margins by --ext,
   same as the homepage "about me" box. */
.about-photos {
  --ext: clamp(16px, calc((100vw - 912px) / 2 - 8px), 48px);
  background: var(--bg-about-band);
  width: min(calc(912px + 2 * var(--ext)), calc(100% - 16px));
  margin: 0 auto var(--space-5);
  padding: 32px var(--ext);
}

.about-photos .wrap {
  max-width: none;
  padding: 0;
}

/* Heading sits centered between the top of the box and the photos (32px each side). */
@media (min-width: 701px) {
  .about-photos .band-heading {
    margin-bottom: 32px;
  }
}

.about-photos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.about-photo {
  margin: 0;
}

.about-photo__caption {
  margin: var(--space-1) 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

a.about-photo-tile {
  display: block;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

a.about-photo-tile:hover {
  opacity: 0.85;
  text-decoration: none;
}

.about-photo-tile {
  aspect-ratio: 3 / 4;
  background: #d9d9d9;
  overflow: hidden;
}

.about-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Contact page ---------- */

.contact-email {
  font-size: 20px;
  font-weight: 600;
  display: inline-block;
  margin: var(--space-2) 0 var(--space-4);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-bottom: var(--space-5);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  padding-top: var(--space-4);
}

.site-footer__row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer__links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer__links a {
  position: relative;
  text-decoration: none;
  display: block;
  color: var(--text);
}

.site-footer__links svg {
  display: block;
  width: 30px;
  height: 30px;
  transition: transform 0.18s ease;
}

.site-footer__links a:hover svg,
.site-footer__links a:focus-visible svg {
  transform: scale(1.2);
}

/* Hover label above each icon (doesn't affect layout). */
.footer-icon-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.site-footer__links a:hover .footer-icon-label,
.site-footer__links a:focus-visible .footer-icon-label {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__links svg,
  .footer-icon-label {
    transition: none;
  }
}

.site-footer__copyright {
  margin-top: 56px; /* 24 + 32 */
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

/* ---------- Back link (case study / sub pages) ---------- */

.back-link {
  display: inline-block;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}

.back-link:hover {
  text-decoration: underline;
}

/* ---------- Case study sections (product design + illustration showcase) ---------- */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-4);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__label {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.stat__value {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

.case-summary {
  background: var(--bg-about-band);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.case-summary__title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 var(--space-1);
}

.case-summary__text {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
}

.case-section {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-bottom: var(--space-4);
}

.case-section:last-child {
  margin-bottom: 0;
}

.case-section__number {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-1);
}

.case-visual {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: var(--space-4) 0;
  overflow: hidden;
}

/* A visual holding real media sizes to the media's own aspect ratio
   instead of the fixed 16:9 placeholder box. */
.case-visual:has(img),
.case-visual:has(video) {
  aspect-ratio: auto;
}

.case-visual img,
.case-visual video {
  width: 100%;
  height: auto;
  display: block;
}

/* A case-visual that's also a link (to its shadowbox) — click to enlarge. */
a.case-visual {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

a.case-visual:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* Caption under a case-visual, and its matching caption in the enlarged
   shadowbox view (light text, since that sits on the dark overlay). */
/* When a caption follows, keep the image-to-caption gap tight and push
   the full breathing room to after the caption instead. */
.case-visual:has(+ .case-visual-caption) {
  margin-bottom: var(--space-1);
}

.case-visual-caption {
  margin: 0 0 var(--space-4);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.shadowbox__caption {
  margin: var(--space-3) 0 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

/* ---------- Case-study media shadowbox (click a photo to enlarge) ---------- */

.shadowbox--media .shadowbox__content {
  width: fit-content;
  max-width: none;
  padding: 0;
  background: transparent;
}

/* A long caption wraps to the picture's width instead of stretching the frame. */
.shadowbox--media .shadowbox__caption {
  width: 0;
  min-width: 100%;
}

.shadowbox--media .shadowbox__close {
  top: -56px;
  right: 0;
  background: var(--bg);
}

.shadowbox__media {
  display: block;
  width: auto;
  height: auto;
  /* The picture area ("stage") has a fixed maximum width so the prev/next
     arrows can sit at one fixed spot on either side of it. */
  max-width: var(--stage);
  max-height: calc(100vh - 152px);
  border-radius: 0;
  cursor: zoom-in;
}

/* Zoomed: image 30% larger than fitted, the overlay scrolls to pan, and the
   close button stays pinned to the viewport corner. margin:auto centers the
   content when it fits and lets it scroll from the start when it doesn't. */
.shadowbox.is-zoomed {
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
}

.shadowbox--media.is-zoomed .shadowbox__content {
  max-width: none;
  width: max-content;
  margin: auto;
}

.shadowbox.is-zoomed .shadowbox__media {
  /* width is set inline by shadowbox.js (130% of the fitted size) */
  height: auto;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.shadowbox.is-zoomed .shadowbox__caption {
  width: 0;
  min-width: 100%;
}

.shadowbox.is-zoomed .shadowbox__close {
  position: fixed;
  top: var(--space-2);
  right: var(--space-2);
}

.case-visual-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: var(--space-2) 0;
}

.case-visual-row .case-visual {
  margin: 0;
  aspect-ratio: 4 / 3;
}

.shop-link {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  margin-top: var(--space-1);
}

.shop-link:hover {
  text-decoration: underline;
}

/* ---------- Minimal single-piece pages (patterns / editorial items) ---------- */

.piece-caption {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Invitations (inline shadowbox, CSS-only, no separate page) ---------- */

.shadowbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-4);
}

.shadowbox:target {
  display: flex;
}

/* Fills the whole overlay, behind the content box, so clicking anywhere
   in the dark area closes the shadowbox. The content box paints on top
   (later in source order) and so intercepts clicks meant for the image. */
.shadowbox__backdrop {
  position: absolute;
  inset: 0;
}

.shadowbox__content {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: var(--space-3);
  position: relative;
}

.shadowbox__visual {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}

.shadowbox__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  /* The × glyph sits slightly above visual center in most fonts; nudge
     it down a hair so it reads as centered inside the circle. */
  padding-top: 0.1em;
}

.shadowbox__close:hover {
  background: var(--border);
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .item-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.75rem;
  }

  .site-footer__row {
    flex-direction: column;
    align-items: center;
  }

  .case-visual-row {
    grid-template-columns: 1fr;
  }

  .hero__headline {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .hero__headline {
    font-size: 2.75rem;
  }
}

/* Homepage footer: full-bleed tinted band */
.site-footer--band {
  background: var(--bg-about-band);
}

/* Keeps a short phrase (e.g. "You can reach me at <email>.") from splitting across lines. */
.keep-together {
  display: inline-block;
}

/* ---------- Full-bleed alternating bands (Illustration page) ---------- */

.band {
  margin-bottom: 0;
  padding: var(--space-5) 0;
}

.band--alt {
  background: var(--bg-about-band);
}

.band__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* "Get in touch" band on a tinted page: same color as the footer below it. */
.contact-band--alt {
  background: var(--bg-about-band);
}

/* ---------- Illustration image galleries ---------- */

/* Two across. Patterns are square tiles, invitations and editorial are
   portrait tiles; images fill their tile edge to edge (cropped slightly where
   the shape differs). Art keeps every piece's own proportions (masonry). The
   full, uncropped image is always one click away in the enlarged view. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.gallery__item {
  display: block;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid #000;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.gallery__item:hover {
  opacity: 0.85;
  text-decoration: none;
}

.gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery--square .gallery__item {
  aspect-ratio: 1 / 1;
}

.gallery--portrait .gallery__item {
  aspect-ratio: 17 / 22;
}

.gallery--masonry {
  display: block;
  column-count: 2;
  column-gap: var(--space-3);
}

.gallery--masonry .gallery__item {
  break-inside: avoid;
  margin-bottom: var(--space-3);
}

.gallery--masonry .gallery__item img {
  height: auto;
}

@media (max-width: 700px) {
  .gallery {
    gap: var(--space-2);
  }

  .gallery--masonry {
    column-gap: var(--space-2);
  }

  .gallery--masonry .gallery__item {
    margin-bottom: var(--space-2);
  }
}

/* ---------- Previous / next arrows inside an enlarged-image view ---------- */

:root {
  /* Widest an enlarged picture can be. */
  --stage: min(760px, calc(100vw - 144px));
}

/* Same 36px circle as the close button. They are pinned to the viewport at a
   fixed spot just outside the widest the picture can be (and vertically
   centered), so they never move from one image to the next: click "next"
   repeatedly without moving the mouse. */
.shadowbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.shadowbox__nav:hover {
  background: var(--border);
  text-decoration: none;
}

.shadowbox__nav:focus-visible,
.shadowbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.shadowbox__nav--prev {
  left: calc(50% - var(--stage) / 2 - 60px);
}

.shadowbox__nav--next {
  left: calc(50% + var(--stage) / 2 + 24px);
}

/* Small screens have no room beside the picture: pair the arrows at bottom center. */
@media (max-width: 700px) {
  .shadowbox__media {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 170px);
  }

  .shadowbox__nav {
    top: auto;
    bottom: var(--space-3);
    transform: none;
  }

  .shadowbox__nav--prev {
    left: calc(50% - 52px);
  }

  .shadowbox__nav--next {
    left: calc(50% + 16px);
  }
}

/* Short line of copy under a section heading, above its images. */
.band__intro {
  margin: 0 0 32px;
}

.band-heading:has(+ .band__intro) {
  margin-bottom: 12px;
}

/* ---------- Mobile navigation (hamburger) ---------- */

.nav-toggle {
  display: none;
}

/* ---------- Mobile layout (phones and small tablets) ---------- */

@media (max-width: 700px) {
  :root {
    --gutter: 20px;
  }

  /* Header: logo left, hamburger right; the links become a full-screen menu. */
  .site-nav {
    position: relative;
    z-index: 60;
    flex-wrap: nowrap;
    padding: 12px var(--gutter);
  }

  .site-nav__signature {
    height: 44px;
  }

  .site-nav__logo {
    position: relative;
    z-index: 60;
  }

  .nav-toggle {
    position: relative;
    z-index: 60;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-right: -11px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav__links {
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 104px var(--gutter) 40px;
    background: var(--bg-page);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }

  .nav-open .site-nav__links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease;
  }

  .site-nav__links li {
    border-bottom: 1px solid var(--border);
  }

  .site-nav__links a {
    display: block;
    padding: 18px 0;
    border-radius: 0;
    background: none;
    font-family: var(--font-home-headline);
    font-size: 28px;
    font-weight: 400;
  }

  .site-nav__links a[aria-current="page"] {
    background: none;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  /* Lock page scroll while the menu is open. Only <html> is locked so the sticky header keeps working. */
  html.nav-open {
    overflow: hidden;
  }

  /* Type sizes */
  p,
  .lede,
  .home-about__content p,
  .contact-band__content p,
  .service-card p,
  .work-card__text-block p,
  .item-card__body p,
  .case-summary__text,
  .resume-link,
  .work-card__link,
  .band__intro {
    font-size: 18px;
  }

  .hero__headline {
    font-size: 34px;
  }

  h1,
  .page-title {
    font-size: 32px;
  }

  h2,
  .band-heading,
  .services > h2,
  .home-about__content h2 {
    font-size: 28px;
  }

  .band-heading {
    margin-bottom: var(--space-3);
  }

  .work-card__header h3,
  .service-card h3,
  .item-card__body h3 {
    font-size: 22px;
  }

  /* Spacing */
  main.wrap {
    padding: 40px var(--gutter);
    min-height: 0;
  }

  .hero {
    padding: var(--space-2) 0 0;
    margin-bottom: 88px;
  }

  .intro-band,
  .work-band,
  .band {
    padding: 40px 0;
  }

  /* The tinted boxes keep a little breathing room on every side. */
  .home-about,
  .about-photos {
    padding: 28px 20px;
  }

  /* On phones the About box stays inside the margins too. */
  .about-photos {
    width: calc(100% - 2 * var(--gutter));
  }

  /* On phones the home box stays inside the margins instead. */
  .home-about {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 88px;
  }

  .contact-band {
    padding: 40px 0 var(--space-2);
  }

  .contact-band__inner {
    gap: var(--space-3);
  }

  .home-about__inner {
    gap: var(--space-3);
  }

  /* Centered headshot first, then the heading, then the rest of the copy. */
  .home-about__inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
  }

  .home-about__content {
    display: contents;
  }

  .home-about__content h2 {
    order: 2;
    margin-bottom: var(--space-2);
  }

  .home-about-photo {
    order: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    align-self: stretch;
    margin: 0 0 var(--space-3);
  }

  .home-about__content p {
    order: 3;
  }

  .service-grid {
    gap: var(--space-4);
    margin-top: var(--space-3);
  }

  .work-list {
    gap: 32px;
  }

  .work-card__body {
    padding: 20px;
  }

  .work-card__text-block {
    gap: var(--space-2);
  }

  /* Title and client logo stack so a long title is not squeezed. */
  .work-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .work-card__link {
    margin-top: var(--space-3);
  }

  /* About photos stack one per row */
  .about-photos__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Case studies */
  .stat-row {
    gap: 20px;
  }

  .case-visual {
    margin: var(--space-3) 0;
  }

  .case-visual:has(+ .case-visual-caption) {
    margin-bottom: var(--space-1);
  }

  .case-visual-caption {
    margin-bottom: var(--space-3);
  }

  /* Footer: comfortable 44px tap targets */
  .site-footer {
    padding-bottom: 40px;
  }

  .site-footer .wrap {
    padding-top: 32px;
  }

  .site-footer__links {
    gap: 4px;
  }

  .site-footer__links a {
    padding: 7px;
  }

  /* Enlarged-image view */
  .shadowbox {
    padding: var(--space-2);
  }

  .shadowbox__media {
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
  }
}

/* ---------- Illustration + Product Design: divider lines, not tinted bands ---------- */

/* Sections sit on the plain page color. A content-width line (not full-bleed)
   separates them. The only full-width tinted band on these pages is "Get in
   touch" + the footer, same as the homepage. */
.page-illustration .band--alt,
.page-product-design .work-band {
  background: none;
}

.page-illustration .band,
.page-product-design .work-band {
  padding-top: 0;
}

.page-illustration .band__inner::before,
.page-product-design .work-band__inner::before {
  content: "";
  display: block;
  flex: 0 0 100%;
  height: 2px;
  margin-bottom: var(--space-5);
  background: var(--line-gray);
}

@media (max-width: 700px) {
  .page-illustration .band__inner::before,
  .page-product-design .work-band__inner::before {
    margin-bottom: 40px;
  }
}

/* ---------- Phones: no tinted blocks, just content-width divider lines ---------- */

@media (max-width: 700px) {
  /* Homepage "about me" */
  .hero {
    margin-bottom: 72px;
  }

  .home-about {
    background: none;
    margin: 0 0 40px;
    padding: 0;
  }

  .services {
    border-top: 2px solid var(--line-gray);
    padding-top: 40px;
  }

  /* About page "Some of my favorite things" */
  .about-photos {
    background: none;
    width: calc(100% - 2 * var(--gutter));
    margin: 0 auto 40px;
    padding: 40px 0 0;
    border-top: 2px solid var(--line-gray);
  }

  /* "Get in touch" + footer: plain, with a line above instead of a band */
  .contact-band,
  .contact-band--alt,
  .site-footer--band {
    background: none;
  }

  .contact-band {
    padding: 0 0 var(--space-2);
  }

  .contact-band__inner::before {
    content: "";
    display: block;
    flex: 0 0 100%;
    height: 2px;
    margin-bottom: calc(40px - var(--space-3));
    background: var(--line-gray);
  }
}

/* ---------- Captions under gallery tiles / in the enlarged view ---------- */

.gallery__figure {
  margin: 0;
}

.gallery__caption {
  margin: var(--space-1) 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* When a picture has a caption, leave room for it so the close button stays on screen. */
.shadowbox__content:has(.shadowbox__caption) .shadowbox__media {
  max-height: calc(100vh - 232px);
}

@media (max-width: 700px) {
  .shadowbox__content:has(.shadowbox__caption) .shadowbox__media {
    max-height: calc(100vh - 270px);
    max-height: calc(100dvh - 270px);
  }
}

/* ---------- Testimonials (About page) ---------- */

.testimonial {
  margin: 0;
}

.testimonial__quote {
  margin: 0;
}

.testimonial__quote p {
  margin: 0 0 var(--space-2);
  line-height: 1.6;
}

.testimonial__by {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: 20px;
  color: var(--text-muted);
  font-style: italic;
}

.testimonial__avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 25%;
}

@media (max-width: 700px) {
  .testimonials {
    margin-bottom: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--line-gray);
  }

  .testimonial__quote p {
    font-size: 18px;
  }

  .testimonial__by {
    font-size: 18px;
    gap: 12px;
  }
}

.testimonials .band-heading {
  margin-bottom: var(--space-3);
}

/* ---------- Portfolio v2: hero link + Work on the homepage ---------- */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

section[id] {
  scroll-margin-top: 24px;
}

.page-home .hero {
  padding: var(--space-4) 0 0;
  margin-bottom: 72px;
}

.page-home .hero__headline {
  font-size: 48px;
}

/* "Explore my work" text link with a gently bouncing arrow on the right. */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-4);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.hero__cta:hover {
  text-decoration: none;
}

.hero__cta-arrow {
  display: inline-block;
  animation: hero-bounce 1.6s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cta-arrow {
    animation: none;
  }
}

.page-home .work-section {
  margin-bottom: 112px;
}

@media (max-width: 900px) {
  .page-home .hero__headline {
    font-size: 40px;
  }
}

@media (max-width: 700px) {
  .page-home .hero {
    margin-bottom: 48px;
  }

  .page-home .hero__headline {
    font-size: 28px;
  }

  .hero__cta {
    margin-top: var(--space-3);
    font-size: 18px;
  }

  .page-home .work-section {
    margin-bottom: 40px;
  }

  /* About now follows Work, so it gets the divider line above it. */
  .home-about {
    border-top: 2px solid var(--line-gray);
    padding: 40px 0 0;
  }
}

/* ---------- Homepage hero: name headline + lighter supporting line ---------- */

.page-home .hero__headline {
  font-weight: 400;
  font-size: 60px;
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.hero__sub {
  width: calc(100% + 2 * var(--gutter));
  max-width: 960px;
  margin: 0 calc(-1 * var(--gutter));
  font-family: var(--font-home-headline);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.25;
}

.hero__sub strong {
  font-weight: 400;
}

.page-home .hero__cta {
  margin-top: 98px; /* 56 + 42 */
}

@media (max-width: 900px) {
  .page-home .hero__headline {
    font-size: 48px;
  }

  .hero__sub {
    font-size: 30px;
  }
}

@media (max-width: 700px) {
  .page-home .hero__headline {
    font-size: 38px;
  }

  .hero__sub {
    font-size: 24px;
  }

  .hero__sub {
    width: auto;
    margin: 0;
  }

  .hero__sub br {
    display: none;
  }

  .page-home .hero__cta {
    margin-top: 78px; /* 36 + 42 */
  }
}

/* ---------- Homepage: bordered "about me" box + "snapshot" cards ---------- */

/* Same container width as the work cards and snapshot cards (no breakout). */
.page-home .home-about {
  border: 1px solid #707070;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 112px;
  padding: 32px;
}

.page-home .home-about__content h2,
.snapshot__heading {
  /* Same style as the "Get in touch" heading. */
  font-family: var(--font-home-headline);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.5;
}

.page-home .home-about__content p {
  margin-bottom: var(--space-3);
}

.page-home .home-about__content p:last-child {
  margin-bottom: 0;
}

.snapshot__heading {
  margin: 0 0 var(--space-4);
  text-align: left;
}

.snapshot__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.snapshot__card {
  padding: 28px;
  border: 1px solid #707070;
}

.snapshot__card h3 {
  margin: 0 0 var(--space-2);
  font-size: 24px;
  font-weight: 600;
}

.snapshot__card p {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.snapshot__card--lilac {
  background: #fcedfc;
}

.snapshot__card--cream {
  background: #fef9e0;
}

.snapshot__card--mint {
  background: #d6f2e9;
}

.snapshot__card--blue {
  background: #e6f0fe;
}

@media (max-width: 700px) {
  /* Phones: no bordered box; a divider line above instead (as elsewhere). */
  .page-home .home-about {
    border: 0;
    border-top: 2px solid var(--line-gray);
    margin-bottom: 40px;
    padding: 40px 0 0;
  }

  .page-home .home-about__content h2,
  .snapshot__heading {
    font-size: 28px;
  }

  .snapshot__heading {
    margin-bottom: var(--space-3);
    text-align: left;
  }

  .snapshot__grid {
    grid-template-columns: 1fr;
  }

  .snapshot__card {
    padding: 20px;
  }

  .snapshot__card h3 {
    font-size: 22px;
  }

  .snapshot__card p {
    font-size: 18px;
  }
}

/* Desktop: the headshot stretches to the same height as the copy beside it. */
@media (min-width: 701px) {
  .page-home .home-about__inner {
    align-items: stretch;
  }

  .page-home .home-about-photo {
    height: auto;
  }

  .page-home .home-about-photo img {
    object-position: 50% 20%;
  }
}

/* Homepage "about me" + snapshot body copy: 18px at every screen size. */
.page-home .home-about__content p,
.snapshot__card p {
  font-size: 18px;
}

@media (max-width: 700px) {
  .page-home .home-about__content p,
  .snapshot__card p {
    font-size: 18px;
  }
}

/* Footer: less empty space under the copyright line (all pages, all sizes). */
.site-footer,
.site-footer--band {
  padding-bottom: var(--space-3);
}

.site-footer__copyright {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .site-footer,
  .site-footer--band {
    padding-bottom: var(--space-3);
  }
}

/* Trial: no outline on the about box or the snapshot cards, just the fill colors. */
.page-home .home-about,
.snapshot__card {
  border: 0;
}

@media (max-width: 700px) {
  /* Phones keep the divider line above the about section. */
  .page-home .home-about {
    border-top: 2px solid var(--line-gray);
  }
}

/* "About me ↓" link above the about box (same look as "Explore my work"). */
.about-cta {
  text-align: center;
  margin-bottom: var(--space-4);
}

.page-home .about-cta .hero__cta {
  margin-top: 0;
}

@media (max-width: 700px) {
  /* On phones the divider line sits above this link instead of above the box. */
  .about-cta {
    border-top: 2px solid var(--line-gray);
    padding-top: 40px;
    margin-bottom: var(--space-3);
  }

  .page-home .home-about {
    border-top: 0;
    padding-top: 0;
  }
}

/* ---------- Homepage "About me": no box, copy on the left, photo on the right ---------- */

.page-home .home-about {
  background: none;
  border: 0;
  margin: 0 0 112px;
  padding: 0;
}

.page-home .home-about__content h2 {
  margin: 0 0 var(--space-3);
}

@media (min-width: 701px) {
  .page-home .home-about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 64px;
    align-items: start;
  }

  .page-home .home-about__content {
    grid-column: 1;
    grid-row: 1;
  }

  .page-home .home-about-photo {
    grid-column: 2;
    grid-row: 1;
    width: 300px;
    height: 300px;
    margin: 0;
  }
}

@media (max-width: 700px) {
  /* Phones: the divider line goes back above the About section. */
  .page-home .home-about {
    border-top: 2px solid var(--line-gray);
    margin: 0 0 40px;
    padding: 40px 0 0;
  }
}

/* Desktop: the headshot spans the full height of the About copy beside it. */
@media (min-width: 701px) {
  .page-home .home-about__inner {
    align-items: stretch;
  }

  .page-home .home-about-photo {
    position: relative;
    height: auto;
    align-self: stretch;
  }

  .page-home .home-about-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
  }
}

/* More breathing room between the Work cards and the About section (doubled). */
.page-home .work-section {
  margin-bottom: 224px;
}

@media (max-width: 700px) {
  .page-home .work-section {
    margin-bottom: 80px;
  }
}

/* Full-width light line separating Work from About me. */
.full-rule {
  display: block;
  width: 100vw;
  height: 2px;
  margin: 0 0 112px calc(50% - 50vw);
  border: 0;
  background: var(--line-gray);
}

.page-home .work-section {
  margin-bottom: 112px;
}

@media (max-width: 700px) {
  .full-rule {
    margin-bottom: 40px;
  }

  .page-home .work-section {
    margin-bottom: 40px;
  }

  /* The full-width line replaces the short divider above About on phones. */
  .page-home .home-about {
    border-top: 0;
    padding-top: 0;
  }
}

/* ---------- Sticky header: stays visible while scrolling ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line-gray);
}

/* A slimmer bar so it takes little room while pinned. */
.site-nav {
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-nav__signature {
  height: 48px;
}

/* Jump links (Work / About) stop just below the pinned bar. */
html {
  scroll-padding-top: 72px;
}

@media (max-width: 700px) {
  .site-nav__signature {
    height: 44px;
  }

  html {
    scroll-padding-top: 68px;
  }
}

/* Order is now: Work → Snapshot → About me. */
.snapshot {
  margin-bottom: 112px;
}

@media (max-width: 700px) {
  .snapshot {
    margin-bottom: 40px;
  }

  /* About follows the snapshot cards, so it gets the divider line above it. */
  .page-home .home-about {
    border-top: 2px solid var(--line-gray);
    padding-top: 40px;
  }
}

/* About is now the last section on the homepage: no extra space below it. */
.page-home .home-about {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .page-home .home-about {
    margin-bottom: 0;
  }
}

/* The full-width line now sits between the snapshot and About me. */
@media (max-width: 700px) {
  .page-home .home-about {
    border-top: 0;
    padding-top: 0;
  }
}

/* Snapshot cards: white fill with a black outline (same as the project cards). */
.snapshot__card,
.snapshot__card--lilac,
.snapshot__card--cream,
.snapshot__card--mint,
.snapshot__card--blue {
  background: #fff;
  border: 1px solid #000;
}

/* About me: boxed in again (tinted box, same width as the cards above); no line above it. */
.page-home .home-about {
  background: var(--bg-about-band);
  border: 0;
  margin: 0;
  padding: 32px;
}

@media (max-width: 700px) {
  /* Phones: no tinted block; a divider line above instead. */
  .page-home .home-about {
    background: none;
    border-top: 2px solid var(--line-gray);
    padding: 40px 0 0;
  }
}

/* "Get in touch" + footer: plain page background (no tinted band). */
.contact-band,
.contact-band--alt,
.site-footer--band {
  background: none;
}

/* About me box reaches past the page margins so its text lines up with the rest of the content. */
@media (min-width: 701px) {
  .page-home .home-about {
    --ext: clamp(16px, calc((100vw - 912px) / 2 - 8px), 32px);
    margin-left: calc(-1 * var(--ext));
    margin-right: calc(-1 * var(--ext));
    padding: 32px var(--ext);
  }
}

/* ---------- Hero entrance: words rise out of a mask, "Hi," gives a little wave ---------- */

.hero__word {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: top;
  /* roomy mask so descenders and the wave are never clipped */
  padding: 0.2em 0.12em;
  margin: -0.2em -0.12em;
}

.hero__word-inner {
  display: inline-block;
  transform: translateY(115%);
  animation: hero-word-rise 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--intro-offset, 0ms) + 150ms + var(--w) * 140ms);
}

@keyframes hero-word-rise {
  to {
    transform: none;
  }
}

.hero__wave {
  display: inline-block;
  transform-origin: 20% 85%;
  animation: hero-wave 1.1s ease-in-out calc(var(--intro-offset, 0ms) + 1000ms) 1;
}

@keyframes hero-wave {
  0%, 100% { transform: rotate(0); }
  18% { transform: rotate(-12deg); }
  38% { transform: rotate(-2deg); }
  58% { transform: rotate(-9deg); }
  78% { transform: rotate(-1deg); }
}

.page-home .hero__sub,
.page-home .hero__cta {
  opacity: 0;
  animation: hero-rise 0.7s ease forwards;
}

.page-home .hero__sub {
  animation-delay: calc(var(--intro-offset, 0ms) + 850ms);
}

.page-home .hero__cta {
  animation-delay: calc(var(--intro-offset, 0ms) + 1150ms);
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* No motion for visitors who ask their device to reduce it: everything just appears. */
@media (prefers-reduced-motion: reduce) {
  .hero__word-inner,
  .hero__wave,
  .page-home .hero__sub,
  .page-home .hero__cta {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---------- Intro: the RB logo draws itself, then fades away ---------- */

.intro {
  display: none;
}

html.has-intro .intro {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-page);
  transition: background-color 0.45s ease;
}

/* The drawing is done: the logo and backdrop fade away. */
html.has-intro.intro-go .intro {
  background-color: rgba(254, 253, 250, 0);
}

html.has-intro.intro-done .intro {
  visibility: hidden;
}

html.has-intro.intro-go .intro__logo {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.intro__logo {
  display: block;
  width: min(120px, 26vw);
  height: auto;
  aspect-ratio: 750 / 510;
}

/* Hold the page still while the logo is drawn. */
html.has-intro:not(.intro-done) {
  overflow: hidden;
}

/* The headline animation starts as the intro fades. */
html.has-intro:not(.intro-go) .hero__word-inner,
html.has-intro:not(.intro-go) .hero__wave,
html.has-intro:not(.intro-go) .hero__sub,
html.has-intro:not(.intro-go) .hero__cta {
  animation-play-state: paused;
}

/* ---------- About me: no tinted box; the footer carries the full-width fill instead ---------- */

@media (min-width: 701px) {
  .page-home .home-about {
    background: none;
    position: relative;
  }

  /* full-width divider line above About (replaces the box) */
  .page-home .home-about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    border-top: 2px solid var(--line-gray);
  }
}

.page-home {
  overflow-x: clip;
}

/* "Get in touch" + footer: one full-width tinted band again. */
.contact-band,
.contact-band--alt,
.site-footer--band {
  background: var(--bg-about-band);
}

/* No divider line above About me (desktop or phone). */
.page-home .home-about::before {
  display: none;
}

@media (max-width: 700px) {
  .page-home .home-about {
    border-top: 0;
  }
}

/* Keep "Most recently at Maven Clinic." together on one line (desktop only; phones wrap freely). */
@media (min-width: 701px) {
  .hero__keep {
    white-space: nowrap;
  }
}

/* ---------- Homepage: testimonial between Work and the snapshot ---------- */
/* Same section rhythm as Work / Snapshot; no divider line on phones. */
.page-home .testimonials {
  margin-bottom: 112px;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 700px) {
  .page-home .testimonials {
    margin-bottom: 40px;
  }
}

/* ---------- Homepage About on phones: heading first, then the headshot, then the copy ---------- */
@media (max-width: 700px) {
  .page-home .home-about__content h2 {
    order: 1;
    margin: 0 0 var(--space-3);
  }

  .page-home .home-about-photo {
    order: 2;
  }
}

/* ---------- Snapshot cards: gradient fills (from Figma, left to right) ---------- */
.snapshot__card--lilac {
  background: linear-gradient(90deg, #FCF4FA 0%, #FBEFFA 12%, #FAF0F9 24%, #F8EEF6 44%, #F9EFF5 61%, #FDF2F3 79%, #FFF4F2 100%);
}

.snapshot__card--mint {
  background: linear-gradient(90deg, #F4FAF6 0%, #CFEDE8 100%);
}

.snapshot__card--cream {
  background: linear-gradient(90deg, #FFF8D9 0%, #FFF9E2 22%, #FFF0DC 36%, #FFF3ED 82%, #FFFAF5 100%);
}

.snapshot__card--blue {
  background: linear-gradient(90deg, #EBF2F7 0%, #CDECF8 100%);
}

/* ---------- Homepage order: Work → About me → Testimonial → Snapshot → Get in touch ---------- */
/* About now sits between Work and the testimonial, so it gets the same section gap as the others. */
.page-home .home-about {
  margin: 0 0 112px;
  padding: 0;
}

/* The snapshot is now the last block, so it only needs the old space above "Get in touch". */
.page-home .snapshot {
  margin-bottom: 32px;
}

@media (max-width: 700px) {
  .page-home .home-about {
    margin: 0 0 40px;
    padding: 0;
  }

  .page-home .snapshot {
    margin-bottom: 0;
  }
}

/* ---------- Super-soft dividers: About / Testimonial / Snapshot ---------- */
/* A thin line centered in the gap below About and below the testimonial. */
.page-home .home-about,
.page-home .testimonials {
  position: relative;
}

.page-home .home-about::after,
.page-home .testimonials::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -56px;   /* half of the 112px gap */
  height: 1px;
  background: #DDD8D0;   /* a touch darker than --line-gray */
  pointer-events: none;
}

@media (max-width: 700px) {
  .page-home .home-about::after,
  .page-home .testimonials::after {
    bottom: -20px;   /* half of the 40px gap */
  }
}

/* ---------- Scroll reveal: fade in + rise as blocks come into view ---------- */
/* Only active when <html> has .reveal-on (set in each page's <head>; off for reduced motion).
   Keep the selector list in sync with SELECTOR in assets/js/reveal.js. */
:root {
  --reveal-y: 28px;
  --reveal-dur: 0.8s;
}

html.reveal-on :is(
  .work-card,
  .home-about__inner,
  .testimonials > *,
  .snapshot__heading,
  .snapshot__card,
  .contact-band__content,
  .project-nav,
  .page-intro > *,
  .case-section > *
) {
  transition:
    opacity var(--reveal-dur) cubic-bezier(0.22, 0.7, 0.2, 1),
    transform var(--reveal-dur) cubic-bezier(0.22, 0.7, 0.2, 1);
}

html.reveal-on :is(
  .work-card,
  .home-about__inner,
  .testimonials > *,
  .snapshot__heading,
  .snapshot__card,
  .contact-band__content,
  .project-nav,
  .page-intro > *,
  .case-section > *
):not(.is-revealed) {
  opacity: 0;
  transform: translateY(var(--reveal-y));
}

/* ---------- Project pages: calmer section headings (Problem, Opportunity, ...) ---------- */
.case-section > h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
}

@media (max-width: 700px) {
  .case-section > h2 {
    font-size: 20px;
  }
}

/* ---------- Project pages: previous / next project arrows (above "Get in touch") ---------- */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
}

.project-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text);
  text-decoration: none;
}

.project-nav__link svg {
  display: block;
  transition: transform 0.18s ease;
}

.project-nav__link--prev:hover svg,
.project-nav__link--prev:focus-visible svg {
  transform: translateX(-4px);
}

.project-nav__link--next:hover svg,
.project-nav__link--next:focus-visible svg {
  transform: translateX(4px);
}

/* Project name: small, appears beside the arrow on hover / keyboard focus (doesn't affect layout). */
.project-nav__label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* Left arrow: name sits to its right. Right arrow: name sits to its left. */
.project-nav__link--prev .project-nav__label {
  left: calc(100% + 12px);
}

.project-nav__link--next .project-nav__label {
  right: calc(100% + 12px);
}

.project-nav__link:hover .project-nav__label,
.project-nav__link:focus-visible .project-nav__label {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .project-nav__link svg,
  .project-nav__label {
    transition: none;
  }
}

/* Arrows line up with the content edges; a larger invisible tap area keeps them easy to hit. */
.project-nav__link {
  width: 32px;
}

.project-nav__link::before {
  content: "";
  position: absolute;
  inset: -8px;
}

/* Small screens: let long project names wrap instead of running past the page margin. */
@media (max-width: 700px) {
  .project-nav__label {
    white-space: normal;
    width: max-content;
    max-width: calc(100vw - 100px);
  }

  .project-nav__link--next .project-nav__label {
    text-align: right;
  }
}

/* ---------- 404 page ---------- */
/* Keep the footer at the bottom of the window even though the page is short. */
.page-404 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-404 main {
  flex: 1 0 auto;
  width: 100%;
}

.page-404 .hero {
  padding-top: 72px;
  margin-bottom: 64px;
}

.page-404 .hero__cta {
  margin-top: 48px;
}

.page-404__arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.page-404 .hero__cta:hover .page-404__arrow,
.page-404 .hero__cta:focus-visible .page-404__arrow {
  transform: translateX(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .page-404__arrow {
    transition: none;
  }
}

.page-404__note {
  max-width: 520px;
  margin: 48px auto 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .page-404 .hero {
    padding-top: 56px;
    margin-bottom: 56px;
  }

  .page-404 .hero__cta {
    margin-top: 40px;
  }

  .page-404__note {
    margin-top: 48px;
  }
}
