/* =========================================================
   Angela Stewart Studio
   Main stylesheet

   HOW TO EDIT
   - Colors, fonts and spacing live in the :root block below.
     Change a value there and it updates across the whole site.
   - Sections are labeled with comments so you can find them
     with Ctrl+F (for example, search "HERO" or "PROJECT CARDS").
   ========================================================= */

/* ---------- 1. BRAND TOKENS ---------- */
:root {
  /* Brand colors (from the creative direction brief) */
  --paper: #f3e9d8; /* warm paper, main background */
  --paper-deep: #eadbc3; /* slightly darker paper for panels */
  --paper-light: #f8f1e6; /* lighter paper for cards */
  --coral: #d78372; /* painted coral, accents only (not for text on paper) */
  --coral-light: #f2b4a7; /* lighter coral tint, for labels on teal panels */
  --teal: #236f68; /* deep teal, links and strong panels */
  --teal-deep: #1b5853; /* darker teal for hover */
  --sage: #78836a; /* sage olive, quiet details */
  --red: #9d3542; /* vintage red, primary buttons and labels */
  --red-deep: #82293a; /* darker red for hover */
  --ink: #292a25; /* soft ink, main text */
  --ink-soft: #55564e; /* secondary text (passes contrast on paper) */
  --ochre: #a88b59; /* thin rules, from the logo */
  --rule: rgba(41, 42, 37, 0.16);
  --rule-sage: rgba(120, 131, 106, 0.3); /* sage divider, from the Creative work galleries */

  /* Fonts */
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  /* Spacing scale: 4, 8, 12, 16, 24, 32, 48, 64 */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --section: clamp(64px, 9vw, 112px); /* gap between big sections */

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 6px;
  --shadow:
    0 1px 2px rgba(41, 42, 37, 0.06), 0 12px 32px -12px rgba(41, 42, 37, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 2. RESET AND BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--teal);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--teal-deep);
}
p {
  margin: 0 0 var(--s4);
  text-wrap: pretty; /* avoids one word alone on the last line */
}
ul,
ol {
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance; /* evens out the lines of multi-line headings */
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.4vw, 5rem);
  letter-spacing: -0.01em;
}
h2,
.h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.005em;
}
h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}
h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink);
}
.muted {
  color: var(--ink-soft);
}
.small {
  font-size: 0.9rem;
}

/* Small uppercase label used above headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--s4);
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard and screen reader users */
.skip-link {
  position: absolute;
  left: var(--s4);
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: var(--s4);
  color: var(--paper);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section);
}
.section--tight {
  padding-block: clamp(48px, 6vw, 72px);
}
.section-head {
  max-width: 720px;
  margin-bottom: var(--s7);
}
.section-head p {
  color: var(--ink-soft);
  margin-top: var(--s4);
}

/* Subtle paper grain, used on the hero and colored panels */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. BUTTONS AND LINKS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--red);
  color: var(--paper-light);
}
.btn--primary:hover {
  background: var(--red-deep);
  color: var(--paper-light);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--coral {
  background: var(--coral);
  color: var(--ink);
}
.btn--coral:hover {
  background: #e3978a;
  color: var(--ink);
}
.btn--light-outline {
  background: transparent;
  color: var(--paper);
  border-color: rgba(243, 233, 216, 0.7);
}
.btn--light-outline:hover {
  background: var(--paper);
  color: var(--ink);
}
.btn--small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 1px;
}
.link-arrow span[aria-hidden] {
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover span[aria-hidden] {
  transform: translateX(3px);
}

/* ---------- 5. HEADER AND NAVIGATION ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 233, 216, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: 76px;
}

/* Text wordmark: matches the logo and stays sharp at any size */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.wordmark__name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark__first {
  color: var(--red);
}
.wordmark__last {
  color: var(--ink);
}
.wordmark__studio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sage);
}
.wordmark__studio::before,
.wordmark__studio::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--ochre);
  min-width: 14px;
}
.wordmark__studio::after {
  margin-left: -0.34em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--s5);
  list-style: none;
}
.nav__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
}
.nav__link:hover {
  color: var(--red);
}
.nav__link[aria-current="page"] {
  border-bottom-color: var(--red);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: 600 0.95rem var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle__bars {
  width: 18px;
  height: 12px;
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s;
}
.nav-toggle__bars::before {
  top: 0;
}
.nav-toggle__bars span {
  top: 5px;
}
.nav-toggle__bars::after {
  bottom: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-5px) rotate(-45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span {
  opacity: 0;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s5);
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: var(--s5) var(--gutter) var(--s6);
    box-shadow: 0 16px 24px -16px rgba(41, 42, 37, 0.25);
  }
  .js .nav {
    display: none;
  }
  .js .nav.is-open {
    display: flex;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.15rem;
  }
  .nav__link[aria-current="page"] {
    color: var(--red);
    border-bottom-color: var(--rule);
  }
  .nav .btn {
    width: 100%;
  }
}

/* ---------- 6. HERO (HOME) ---------- */
.hero {
  padding-block: clamp(40px, 7vw, 96px) var(--section);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.hero__title {
  margin-bottom: var(--s5);
}
.hero__title em {
  font-style: italic;
  color: var(--red);
}
.hero__lead {
  max-width: 34em;
  line-height: 1.6;
  margin-bottom: var(--s3);
}
.hero__sub {
  margin: var(--s3) 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

.portrait {
  position: relative;
  max-width: 440px;
  margin-inline: auto;
}
.portrait__panel {
  position: absolute;
  inset: 9% -7% -6% 9%;
  background: var(--teal);
  border-radius: 999px 999px var(--radius) var(--radius);
}
.portrait__frame {
  position: relative;
  overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  box-shadow: var(--shadow);
}
.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.portrait__flower {
  position: absolute;
  width: 48%;
  left: -18%;
  bottom: -10%;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(41, 42, 37, 0.12));
}
.portrait__badge {
  position: absolute;
  left: -11%;
  top: 16%;
  background: var(--paper-light);
  border: 1.5px solid #e0d8c6;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 200px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
/* The dot sits in its own column so wrapped lines align under the text, not under the dot */
.portrait__badge::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-top: calc((1.3em - 8px) / 2);
}

@media (max-width: 880px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__media {
    max-width: 320px;
    margin: 16px auto 0;
    width: 78%;
  }
  .portrait__flower {
    width: 50%;
    left: -20%;
  }
  .portrait__badge {
    left: auto;
    right: -10%;
    top: auto;
    bottom: 8%;
  }
}

/* ---------- 7. QUICK FACTS ("the short version") ---------- */

.facts__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.facts__head h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}
.facts__head .link-arrow {
  color: var(--red);
}
.facts__head .link-arrow:hover {
  color: var(--red-deep);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  list-style: none;
}
.facts__item {
  background: var(--teal);
  color: var(--paper-light);
  border-left: 6px solid var(--coral);
  border-radius: var(--radius);
  padding: 20px 20px 24px 18px;
}
.facts__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 4px;
}
.facts__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: var(--s2);
}
.facts__value {
  display: block;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--paper);
}
@media (max-width: 880px) {
  .facts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .facts__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 8. PROJECT FEATURES (homepage work list) ---------- */
.projects {
  display: grid;
  gap: clamp(64px, 9vw, 120px);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.project:nth-child(even) .project__media {
  order: 2;
}
.project__media {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
  aspect-ratio: 3 / 2;
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.project__media--top img {
  object-position: top;
}
/* Shows the whole image, with a fill matching the image's own edge color */
.project__media--framed {
  background: #ebe7d8;
}
.project__media--framed img {
  object-fit: contain;
}
.project__media:hover img {
  transform: scale(1.025);
}
.project__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ochre);
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.project__num::after {
  content: "";
  height: 1px;
  width: 56px;
  background: var(--ochre);
}
.project__title {
  margin-bottom: 4px;
}
.project__title a {
  color: inherit;
  text-decoration: none;
}
.project__title a:hover {
  color: var(--red);
}
.project__subtitle {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: var(--s5);
}
.project__summary {
  display: grid;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.project__summary dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.project__summary dd {
  margin: 0 0 var(--s2);
}
.project .btn-row,
.freelance .btn-row {
  gap: var(--s5);
}
@media (max-width: 880px) {
  .project {
    grid-template-columns: 1fr;
  }
  .project:nth-child(even) .project__media {
    order: 0;
  }
}
@media (min-width: 881px) {
  .project__media {
    aspect-ratio: auto;
    height: clamp(300px, 27vw, 360px);
  }
  /* Mirror the columns on even cards so the image column is always the wide one */
  .project:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
}

/* Skill tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: var(--s5);
}
.tag {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid rgba(35, 111, 104, 0.45);
  color: var(--teal-deep);
}

/* ---------- 9. ABOUT TEASER AND PATH ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
/* Framed painting photo, matches the about page portrait treatment */
.about-teaser__art {
  position: relative;
  max-width: 560px;
}
.about-teaser__art::before {
  content: "";
  position: absolute;
  inset: -16px 16px 16px -16px;
  border: 1px solid var(--ochre);
  border-radius: var(--radius);
  z-index: -1;
}
.about-teaser__painting {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.path {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: var(--s6);
  border-top: 1px solid var(--rule);
}
.path__step {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.path__label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--red);
  line-height: 1.2;
}
.path__text {
  color: var(--ink-soft);
}
.path__text strong {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 880px) {
  .about-teaser {
    grid-template-columns: 1fr;
  }
  .about-teaser__art {
    max-width: 280px;
    margin-left: 16px;
  }
}
@media (max-width: 520px) {
  .path__step {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- 10. PANELS AND HOMEPAGE FREELANCE SECTION ---------- */
.panel {
  background: var(--paper-deep);
}
.panel--teal {
  background: var(--teal);
  color: var(--paper);
}
.panel--teal .eyebrow {
  color: var(--coral-light);
}
.panel--teal a:not(.btn) {
  color: var(--paper);
}

/* Homepage freelance section: "Start to finish. Or month to month."
   Two equal columns, each with a phrase, a decorative line, labels,
   an offer title and a description. */
.freelance {
  background: var(--paper);
  padding-block: clamp(56px, 7vw, 96px);
}
.freelance__eyebrow {
  /* Size, weight and spacing come from .eyebrow. The h2 element sets a
     tighter heading line-height, so use the body line-height like the
     <span> eyebrows elsewhere. */
  line-height: inherit;
  margin-bottom: var(--s5);
}
.freelance__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 56px);
}
.freelance__col--project {
  color: var(--red);
}
.freelance__col--ongoing {
  color: var(--sage); /* phrase, line graphic and title; labels and text set their own color */
}
.freelance__phrase {
  /* Size, font and letter-spacing come from the shared .h2 class.
     A <p> doesn't get the heading line-height, so match it here. */
  line-height: 1.12;
  margin: 0 0 var(--s5);
}

/* Decorative line: an 18px end piece, a 3px track that fills the
   width, and another 18px end piece, so both lines are equal length. */
.freelance__line {
  display: flex;
  align-items: center;
  height: 18px;
}
.freelance__dot,
.freelance__ring,
.freelance__arrow {
  flex: none;
  width: 18px;
  height: 18px;
}
.freelance__dot {
  border-radius: 50%;
  background: currentColor;
}
.freelance__ring {
  border-radius: 50%;
  border: 3px solid currentColor;
  background: var(--paper);
}
.freelance__track {
  flex: 1;
  height: 3px;
  background: currentColor;
}
.freelance__track--dashed {
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 10px,
    transparent 10px 17px
  );
}
.freelance__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  /* Same as the site's other small labels (.footer-title, .meta dt) */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.freelance__col--ongoing .freelance__labels {
  justify-content: flex-end;
}
.freelance__title {
  margin: clamp(32px, 4vw, 44px) 0 var(--s2);
}
.freelance__nowrap {
  white-space: nowrap; /* keeps "hand-built" from splitting at the hyphen */
}
.freelance__desc {
  max-width: 26em;
  text-wrap: pretty;
  color: var(--ink-soft);
  margin: 0;
}

/* Divider, note and buttons (the divider spans the grid width) */
.freelance__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule-sage);
}
.freelance__note {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
@media (max-width: 759px) {
  .freelance__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }
  .freelance__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 11. CREATIVE WORK TILES ---------- */
.creative-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
  list-style: none;
}
.creative-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--paper-light);
  padding: var(--s5);
  background: var(--tile, var(--teal));
  transition: transform 0.25s var(--ease);
}
.creative-tile:hover {
  transform: translateY(-3px);
  color: var(--paper-light);
}
.creative-grid li:nth-child(1) .creative-tile {
  --tile: var(--teal);
}
.creative-grid li:nth-child(2) .creative-tile {
  --tile: var(--red);
}
.creative-grid li:nth-child(3) .creative-tile {
  --tile: #5f6a52;
} /* darker sage so white text stays readable */
.creative-grid li:nth-child(4) .creative-tile {
  --tile: var(--coral);
  color: var(--ink);
}
.creative-grid li:nth-child(4) .creative-tile:hover {
  color: var(--ink);
}
/* Project image fills the tile and fades into the tile color behind the text */
.creative-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 82%);
  transition: transform 0.4s var(--ease);
}
.creative-tile:hover .creative-tile__img {
  transform: scale(1.03);
}
.creative-tile__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.creative-tile__name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 6px;
}
/* Thin inset frame, like a plate in an art book */
.creative-tile::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(248, 241, 230, 0.45);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}
.creative-grid li:nth-child(4) .creative-tile::before {
  border-color: rgba(41, 42, 37, 0.3);
}
/* Arrow sits on a small circle of the tile color so it shows over any image */
.creative-tile::after {
  content: "\2192";
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tile, var(--teal));
  font-size: 1.1rem;
  transition: transform 0.25s var(--ease);
}
.creative-tile:hover::after {
  transform: translateX(4px);
}
@media (max-width: 880px) {
  .creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 12. CONTACT CLOSER ---------- */
.contact {
  text-align: left;
}
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--s7);
  align-items: end;
}
.contact h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--s4);
}
.contact p {
  font-size: 1.2rem;
  max-width: 30em;
  opacity: 0.92;
}
.contact__links {
  display: grid;
  gap: var(--s3);
  justify-items: start;
}
.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 233, 216, 0.5);
  word-break: break-all;
}
.contact__email:hover {
  color: var(--coral-light);
}
/* Teal focus rings disappear on the teal banner, so use light coral there */
.contact a:focus-visible,
.contact button:focus-visible {
  outline-color: var(--coral-light);
}
/* "Let's connect" layout: buttons first, email link underneath.
   Used on every page except Services. */
.contact--connect .contact__inner {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.contact--connect .contact__links {
  gap: var(--s5);
}
.contact--connect .btn {
  min-height: 56px;
  padding-inline: 32px;
  font-size: 1.05rem;
}
.contact--connect .contact__email {
  font-family: var(--font-body);
  font-size: 1.15rem;
  padding-bottom: 2px;
}
@media (max-width: 880px) {
  .contact__inner,
  .contact--connect .contact__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- 13. FOOTER ---------- */
.site-footer {
  padding-block: var(--s7) var(--s6);
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}
.footer-logo {
  width: 190px;
}
.footer-nav {
  list-style: none;
  display: grid;
  gap: 8px;
}
.footer-nav a {
  color: var(--ink);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--red);
  text-decoration: underline;
}
.footer-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--s3);
  display: block;
}
.footer-bottom {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- 14. PAGE HEADERS (inner pages) ---------- */
.page-hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 56px);
}
.page-hero h1 {
  margin-bottom: var(--s5);
}
.page-hero .lead {
  max-width: 38em;
}
.page-hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
@media (max-width: 880px) {
  .page-hero--split {
    grid-template-columns: 1fr;
  }
}

/* ---------- 15. CASE STUDY PAGES ---------- */
.back-link {
  display: flex;
  width: fit-content;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  margin-bottom: var(--s6);
}
.back-link:hover {
  color: var(--red);
}
.case-hero h1 {
  margin-bottom: var(--s3);
}
.case-hero .lead {
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: var(--s6);
}
.case-cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.case-cover img {
  width: 100%;
}

/* "The one minute version" summary box */
.glance {
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 56px);
}
.glance__head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--rule);
}
.glance__head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}
.glance__head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.meta {
  display: grid;
  gap: var(--s4);
  align-content: start;
}
.meta div {
  border-left: 1px solid var(--ochre);
  padding-left: var(--s4);
}
.meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}
.meta dd {
  margin: 2px 0 0;
  font-weight: 600;
}
.glance__body {
  display: grid;
  gap: var(--s5);
}
.glance__body h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.glance__body p {
  margin: 0;
}
.glance__body ul {
  padding-left: 1.1em;
}
.glance__body li {
  margin-bottom: 4px;
}
.glance .tags {
  margin: 0;
  padding-left: 0;
}
@media (max-width: 820px) {
  .glance {
    grid-template-columns: 1fr;
  }
}

/* Case study body: sticky contents list + article */
.case-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 104px;
}
.toc__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--s3);
  display: block;
}
.toc ol {
  list-style: none;
  border-left: 1px solid var(--rule);
}
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
}
.toc a:hover {
  color: var(--ink);
}
.toc a.is-active {
  color: var(--red);
  border-left-color: var(--red);
  font-weight: 600;
}
@media (max-width: 960px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
  .figure--wide {
    margin-right: 0;
  }
}

.case-section {
  padding-block: var(--s7);
  border-top: 1px solid var(--rule);
}
.case-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.case-section > h2 {
  margin-bottom: var(--s5);
}
.case-section h3 {
  font-size: 1.5rem;
  margin: var(--s6) 0 var(--s3);
}
.case-section p,
.case-section li {
  max-width: 42em;
}
.case-section ul.list {
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}
.case-section .eyebrow {
  margin-bottom: var(--s2);
}

.hmw {
  margin: var(--s6) 0 0;
  padding: var(--s5) var(--s6);
  border-left: 4px solid var(--coral);
  background: var(--paper-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  line-height: 1.35;
}
.hmw cite {
  display: block;
  margin-top: var(--s3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.figure {
  margin: var(--s6) 0 0;
}
.figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}
.figure figcaption {
  margin-top: var(--s3);
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 42em;
}
.figure--wide {
  margin-right: 0;
} /* hook for wide diagrams if you want them to bleed later */
.zoom {
  display: block;
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
}
.zoom__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(41, 42, 37, 0.8);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.zoom:hover .zoom__hint,
.zoom:focus-visible .zoom__hint {
  opacity: 1;
}
@media (hover: none) {
  .zoom__hint {
    opacity: 1;
  }
}

/* Row of single phone screens on a dark panel */
.screens {
  margin-top: var(--s6);
  background: var(--ink);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.screens figure {
  margin: 0;
  flex: 1 0 140px;
  max-width: 200px;
  scroll-snap-align: start;
}
.screens img {
  width: 100%;
  height: auto;
}
.screens figcaption {
  color: var(--paper);
  font-size: 0.9rem;
  text-align: center;
  margin-top: var(--s2);
  opacity: 0.85;
}

/* Research tables */
.table-wrap {
  overflow-x: auto;
  margin-top: var(--s5);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-light);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  min-width: 560px;
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--paper-deep);
}
.table tbody tr:last-child > * {
  border-bottom: 0;
}
.table tbody th {
  font-weight: 700;
}

/* Design decisions */
.decisions {
  display: grid;
  gap: var(--s4);
  list-style: none;
  margin-top: var(--s5);
}
.case-section .decisions > li {
  max-width: none;
}
.decision {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s4);
  padding: var(--s5);
  background: var(--paper-light);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.decision__num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--coral);
}
.decision h3 {
  margin: 0 0 var(--s2);
  font-size: 1.35rem;
}
.decision p {
  margin: 0;
  color: var(--ink-soft);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  margin-top: var(--s5);
}
.two-col h3 {
  margin-top: 0;
}
@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.callout {
  margin-top: var(--s5);
  padding: var(--s5);
  background: var(--paper-deep);
  border-radius: var(--radius);
}
.callout p:last-child {
  margin: 0;
}

/* Next project link */
.next-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.next-project img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}
.next-project:hover h2 {
  color: var(--red);
}
@media (max-width: 720px) {
  .next-project {
    grid-template-columns: 1fr;
  }
}

/* ---------- 16. ABOUT PAGE ---------- */
.about-portrait {
  position: relative;
  max-width: 400px;
  margin-inline: auto;
}
.about-portrait img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: 50% 30%;
  width: 100%;
}
.about-portrait::before {
  content: "";
  position: absolute;
  inset: -16px 16px 16px -16px;
  border: 1px solid var(--ochre);
  border-radius: var(--radius);
  z-index: -1;
}
.timeline {
  list-style: none;
  border-top: 1px solid var(--rule);
}
.timeline__item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s5);
  padding-block: var(--s6);
  border-bottom: 1px solid var(--rule);
}
.timeline__item:last-child {
  border-bottom: none;
}
.timeline__when {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.timeline__when strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--red);
  line-height: 1.2;
  margin-bottom: 4px;
}
.timeline__item h3 {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.timeline__item .muted {
  margin-bottom: var(--s3);
}
.timeline__item p {
  max-width: 42em;
}
.timeline__item p:last-child {
  margin-bottom: 0;
}
.timeline__item ul {
  padding-left: 1.1em;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .timeline__item {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s5);
}
.skills-grid h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
}
.skills-grid ul {
  list-style: none;
  display: grid;
  gap: 6px;
}
@media (max-width: 880px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 16b. CREATIVE WORK PAGE (galleries) ----------
   Each [data-gallery] shows one image at a time on a "stage",
   with arrows, a thumbnail strip and a caption (see js/main.js).
   Without JavaScript, the first image of each gallery shows. */

/* Intro: Beyond screens */
.cw-hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 96px);
}
.cw-hero .cw-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
.cw-hero h1 {
  margin-bottom: var(--s5);
  text-wrap: balance;
}
.cw-hero .lead {
  max-width: 38em;
  margin: 0;
}
.cw-hero-stage {
  position: relative;
  aspect-ratio: 683 / 911;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-light);
  box-shadow: 0 30px 60px -20px rgba(41, 42, 37, 0.35);
}
.cw-hero-stage .g-fg {
  position: absolute;
  inset: 0;
}
.cw-hero-stage .g-fg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.55s ease;
}
.cw-hero-stage .g-fg img[data-fit="contain"] {
  object-fit: contain;
  background: var(--paper-light);
}
@media (max-width: 880px) {
  .cw-hero .cw-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Project galleries */
.cw-gallery {
  padding-block: clamp(56px, 7vw, 76px);
}
.cw-gallery--light {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--rule-sage);
}

.g-stage {
  position: relative;
  height: 58svh;
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}
.cw-gallery--light .g-stage {
  background: var(--paper-light);
  border: 1px solid rgba(120, 131, 106, 0.28);
}
.g-stage .g-fg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.g-stage .g-fg img {
  position: absolute;
  max-width: 88%;
  max-height: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition:
    opacity 0.45s ease,
    transform 0.5s ease;
}
.cw-gallery--light .g-stage .g-fg img {
  box-shadow: 0 26px 54px -16px rgba(41, 42, 37, 0.26);
  border: 8px solid var(--paper-light);
}

/* With JavaScript on, only the active image shows */
.js .g-fg img {
  opacity: 0;
}
.js .g-stage .g-fg img {
  transform: scale(0.97);
}
.js .g-fg img.active {
  opacity: 1;
  transform: none;
}
/* Without JavaScript, show the first image and hide the controls */
html:not(.js) .g-fg img + img,
html:not(.js) .g-arrow,
html:not(.js) .g-thumbs {
  display: none;
}

/* Arrows */
.g-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
  background: rgba(20, 17, 14, 0.42);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.cw-gallery--light .g-arrow {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(41, 42, 37, 0.15);
}
.g-arrow:hover {
  background: var(--teal);
  color: #fff;
}
.g-arrow.prev {
  left: 14px;
}
.g-arrow.next {
  right: 14px;
}

/* Thumbnail strip */
.g-thumbs {
  display: flex;
  justify-content: center;
  gap: var(--s2);
  margin-top: 14px;
  padding: 4px 4px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.g-thumbs::-webkit-scrollbar {
  display: none;
}
.g-thumbs img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0.4;
  filter: blur(0.5px) saturate(0.65);
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    opacity 0.25s,
    filter 0.25s,
    border-color 0.25s;
}
.g-thumbs img:hover {
  opacity: 0.75;
}
.g-thumbs img.active {
  opacity: 1;
  filter: none;
  border-color: var(--teal);
}

/* Text under each gallery */
.g-copy {
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 680px;
}
.g-copy .eyebrow {
  margin: 0;
}
.g-copy h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  text-wrap: balance;
}
.g-copy .desc {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 58ch;
}
.cw-gallery--light .desc {
  color: var(--ink-soft);
}
.g-medium {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0;
}
.g-caption {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.85;
  min-height: 1.4em;
  margin: 0;
}

/* Fine art header and caption */
.fa-title {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  margin-bottom: var(--s2);
}
.fa-intro {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 56ch;
  margin: 0 0 26px;
}
.fa-caption {
  margin-top: 14px;
  text-align: center;
}

@media (max-width: 640px) {
  .g-stage {
    height: 44svh;
    min-height: 300px;
  }
  .g-thumbs img {
    width: 40px;
    height: 40px;
  }
}

/* ---------- 17. LIGHTBOX ---------- */
.lightbox {
  border: 0;
  padding: 0;
  max-width: 96vw;
  max-height: 94vh;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(28, 29, 25, 0.88);
}
.lightbox img {
  max-width: 96vw;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
}
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: var(--radius);
  font: 600 1rem var(--font-body);
  cursor: pointer;
}
.lightbox__caption {
  color: var(--paper);
  text-align: center;
  margin-top: var(--s3);
  font-size: 0.95rem;
}

/* ---------- 18. MOTION ---------- */
/* Content fades up gently as it scrolls in. Only runs when JavaScript is on. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 19. PRINT ---------- */
@media print {
  .site-header,
  .site-footer,
  .toc,
  .contact,
  .btn-row {
    display: none !important;
  }
  body {
    background: #fff;
  }
}


/* =========================================================
   SERVICES PAGE
   Uses the site's existing variables. Fallback values in
   var(...) match the design-system spec.
   ========================================================= */

/* ---- Shared bits ---- */
.svc-lead {
  margin: 0;
  max-width: 36em;
  font-size: clamp(1.15rem, 1.5vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.svc-note {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.svc-label {
  margin: 0 0 var(--s3, 12px);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- 1. Hero ---- */
.svc-hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: var(--section, clamp(64px, 8vw, 112px));
}

/* Hero layout: the text column keeps at least 500px so the h1 never wraps early */
.svc-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 56px 48px;
}

@media (min-width: 64em) {
  .svc-hero__grid {
    grid-template-columns: minmax(500px, 1fr) minmax(0, 1.1fr);
  }
}

.svc-hero__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s5, 24px);
}

.svc-hero__visual {
  min-width: 0;
}

/* Collage: website top right, design card upper left, paintings lower right */
.svc-collage {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 500 / 520;
  margin-inline: auto;
}

.svc-collage__item {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius, 6px);
  box-shadow: 0 16px 32px rgba(41, 42, 37, 0.18);
}

.svc-collage__item img {
  display: block;
  width: 100%;
  height: auto;
}

.svc-collage__site {
  left: 30%;
  top: 0;
  width: 70%;
  transform: rotate(1.8deg);
  box-shadow: 0 16px 32px rgba(41, 42, 37, 0.2);
  z-index: 3; /* brown website photo on top */
}

.svc-collage__card {
  left: 0;
  top: 11.5%;
  width: 36%;
  transform: rotate(-2deg);
  box-shadow: 0 16px 32px rgba(41, 42, 37, 0.22);
  z-index: 1; /* design card pushed back, behind the other two */
}

.svc-collage__art {
  left: 41%;
  top: 48%;
  width: 58%;
  transform: rotate(1.5deg);
  z-index: 2;
}

.svc-hero__title {
  margin: 0;
}

.svc-hero__line {
  display: block;
  text-wrap: balance;
}

.svc-hero__line--red  { color: var(--red); }
.svc-hero__line--sage { color: var(--sage); }

.svc-hero__text .btn-row {
  margin-top: var(--s2, 8px);
}

/* ---- 2. Services ---- */
.svc-offers {
  padding-block: var(--section, clamp(64px, 8vw, 112px));
  border-top: 1px solid var(--rule);
}

.svc-offers > .container {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

.svc-offers__intro {
  display: flex;
  flex-direction: column;
  gap: var(--s4, 16px);
}

.svc-offers__intro h2 {
  margin: 0;
}

.svc-offers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 56px 64px;
  align-items: start;
}

.svc-offer {
  display: flex;
  flex-direction: column;
  gap: var(--s6, 32px);
  min-width: 0;
  scroll-margin-top: var(--s5, 24px);
}

/* The two lines, taken from the homepage freelance section */
.svc-line {
  display: flex;
  align-items: center;
  height: 18px;
}

.svc-line__end {
  flex: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.svc-line__rule {
  flex: 1;
  height: 3px;
}

.svc-path__labels {
  display: flex;
  justify-content: space-between;
  margin: var(--s3, 12px) 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.svc-path__labels--end {
  justify-content: flex-end;
}

.svc-offer--project .svc-line__end,
.svc-offer--project .svc-line__rule {
  background: var(--red);
}

.svc-offer--ongoing .svc-line__end--ring {
  border: 3px solid var(--sage);
  background: var(--paper);
}

.svc-offer--ongoing .svc-line__rule {
  background: repeating-linear-gradient(90deg, var(--sage) 0 10px, transparent 10px 17px);
}

.svc-line__chevron {
  flex: none;
  color: var(--sage);
}

/* Illustrations */
.svc-offer__art {
  aspect-ratio: 1600 / 1067; /* both images are cut to this shape, so the frames stay level */
  overflow: hidden;
  border-radius: var(--radius, 6px);
  box-shadow: 0 16px 32px rgba(41, 42, 37, 0.14);
}

.svc-offer__art img {
  display: block;
  width: 100%;
  height: auto; /* same shape as the frame, so nothing is cropped */
}

/* Title, description, list */
.svc-offer__head {
  display: flex;
  flex-direction: column;
  gap: var(--s3, 12px);
}

.svc-offer__head h3 {
  margin: 0;
}

.svc-offer--project .svc-offer__head h3 { color: var(--red); }
.svc-offer--ongoing .svc-offer__head h3 { color: var(--sage); }

.svc-offer__head p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.svc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-list li {
  padding: var(--s3, 12px) 0;
  border-top: 1px solid var(--rule);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
}

/* Closing row: note + one button */
.svc-offers__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: var(--s6, 32px);
  border-top: 1px solid var(--rule-sage);
}

.svc-offers__cta p {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
