/* ============================================================
 * Ray Truong Portfolio — Stylesheet
 * ============================================================
 *
 *  1. Design tokens (CSS custom properties)
 *  2. Reset & base
 *  3. Navigation
 *  4. Page system (SPA show/hide)
 *  5. Home — Hero
 *  6. Home — About
 *  7. Home — Work / Projects
 *  8. Home — Signature & Footer
 *  9. Contact page
 * 10. All Projects page
 * 11. Case study shared styles
 *     a. Hero
 *     b. Overview strip
 *     c. Content sections & layout utilities
 *     d. Image components
 *     e. Process list
 *     f. Deliverables grid
 *     g. Pullquote
 *     h. Next project CTA
 *     i. Footer variants
 * 12. Project-specific styles
 *     a. Sterling Custom Homes
 *     b. Kasata Sushi Den
 *     c. Garage Cave
 *     d. Connie's Perfect Nails
 * 13. Animation system (page fade, entrance, scroll reveal)
 * 14. Responsive (≤900px)
 * ============================================================ */


/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --serif:  'DM Serif Display', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  --black:  #0d0d0d;
  --white:  #fafaf8;

  --g100: #f5f4f1;
  --g200: #e8e7e3;
  --g400: #a8a7a2;
  --g700: #4a4a47;

  --accent:     #96D6F5;
  --accent-rgb: 150, 214, 245;

  /* Client brand colors — scoped to project pages only */
  --gold:   #bab279;  /* Sterling Custom Homes  */
  --navy:   #262e38;  /* Sterling Custom Homes  */
  --red:    #9e2a20;  /* Kasata Sushi Den        */
  --orange: #f57c00;  /* Garage Cave             */
  --zagg:     #74b72e;  /* ZAGG display system     */
  --amethyst: #1a7dc2;  /* The Bark Knight         */
  --amber:    #c8841e;  /* Mediterranean Festival  */
  --plum:     #4f1632;  /* Connie's Perfect Nails  */

  /* Elevation — one consistent shadow scale for the whole site */
  --shadow-card:   0 2px 16px rgba(0, 0, 0, 0.06);   /* resting cards: .project, .ap-card, .skill-card */
  --shadow-object: 0 6px 24px rgba(0, 0, 0, 0.10);   /* standalone mockups, documents, images, collateral */
  --shadow-lift:   0 10px 30px rgba(0, 0, 0, 0.14);  /* hover / intentionally raised objects */
}


/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--g700) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g700); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--black); }

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection      { background: var(--navy); color: var(--white); }
::-moz-selection { background: var(--navy); color: var(--white); }

/* Casual image protection — no right-click menu, no drag-to-desktop */
img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.nowrap { white-space: nowrap; }


/* ── 3. NAVIGATION ────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 2rem; left: 50%; transform: translateX(-50%);
  width: min(1400px, calc(100% - 2.5rem));
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.7rem 1.25rem;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  border: 1px solid var(--g200);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
}

.nav-left   { display: flex; align-items: center; justify-content: flex-start; }
.nav-center { display: flex; align-items: center; justify-content: center; }
.nav-right  { display: flex; align-items: center; justify-content: flex-end; }

.nav-logo { display: flex; align-items: center; cursor: pointer; padding: 4px; background: none; border: none; transition: transform 0.2s ease; }
.nav-logo svg .st0 { fill: var(--black); }
@media (hover: hover) { .nav-logo:hover { transform: translateY(-2px); } }

.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--g700);
  transition: all 0.25s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px)  rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-burger.hidden { display: none; }

.nav-back {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g700);
  display: none;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sans);
}
.nav-back.visible { display: flex; }

.nav-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--black);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--white);
  transition: background 0.2s, transform 0.2s;
}
.nav-contact-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}
.nav-contact-btn svg {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
@media (hover: hover) { .nav-contact-btn:hover { background: var(--g700); } }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 220px;
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(16px);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
  z-index: 199;
}
.nav-dropdown.open { max-height: 220px; padding: 0.4rem 0; border: 1px solid var(--g200); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.nav-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g700);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  background: none;
  border: none;
  font-family: var(--sans);
}
.nav-dropdown button:last-child { border-bottom: none; }
@media (hover: hover) { .nav-dropdown button:hover { color: var(--black); background: rgba(0,0,0,0.04); } }


/* ── 4. PAGE SYSTEM ───────────────────────────────────────── */
.page        { display: none; opacity: 0; }
.page.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: pageFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  /* Scrolls with the document, deepening to blue by the bottom of the page.
     Scroll-attached backgrounds paint with the content — no fixed layer,
     no Safari repaint cost. */
  background: linear-gradient(to bottom, #ffffff, #f0f7fa);
}
/* Pages with a full-bleed hero (home, case studies): hold white through
   the hero region so the blend starts underneath it. */
.page.active:has(.hero, .cs-hero) {
  background: linear-gradient(to bottom, #ffffff 0% , #ffffff 100vh, #f0f7fa 100%);
}
.page.active > footer { margin-top: auto; }
#page-contact.active .contact-body { flex: 1; }


/* ── 5. HERO ──────────────────────────────────────────────── */
.hero {
  height: 100vh;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: url('https://res.cloudinary.com/dqwbaqpzx/image/upload/f_auto,q_auto/hero-bg.jpg') center / cover no-repeat;
  padding: 57px clamp(3rem, 8vw, 8rem) 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
.hero-portrait {
  flex-shrink: 0;
  width: clamp(370px, 33vw, 530px);
  align-self: flex-end;
  margin-bottom: -57px;
}
.hero-portrait img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.hero-identity {
  margin-bottom: 0.75rem;
}
.hero-name {
  font-family: 'Montserrat', var(--sans);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 0.87;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  margin-left: -0.04em;
  font-variant: small-caps;
}
.kern-tight { letter-spacing: -0.09em; }
.kern-loose { letter-spacing: 0.04em; }

.hero-subtitle {
  font-size: clamp(0.85rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: -0.03em;
  margin-bottom: 0.2rem;
}

.hero-divider {
  width: 100%;
  border-top: 1px solid rgba(250, 250, 248, 0.12);
  margin-bottom: 1.5rem;
}

.hero-info {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}
.hero-desc {
  font-size: 1.12rem;
  font-weight: 300;
  color: rgba(250, 250, 248, 0.68);
  max-width: 550px;
  line-height: 1.75;
  text-align: left;
}
.hero-tags { display: grid; grid-template-columns: repeat(4, auto); gap: 0.8rem; justify-content: center; }
.tool-badge {
  padding: 0.55rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  cursor: default;
  transition: box-shadow 0.3s ease;
}
@media (hover: hover) {
  .tool-badge:hover {
    box-shadow: var(--shadow-lift);
  }
}


.hero-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.5rem 0.5rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  margin-top: 0.5rem;
}
.hero-cta-label { position: relative; z-index: 1; }
.hero-cta-arrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transition: transform 0.25s ease, background 0.25s ease;
}
@media (hover: hover) {
  .hero-cta:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
  }
  .hero-cta:hover .hero-cta-arrow { transform: translateX(3px); background: rgba(255, 255, 255, 0.25); }
}

.hero-cta--dark {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.18);
  text-decoration: none;
}
.hero-cta--dark .hero-cta-arrow {
  background: rgba(0, 0, 0, 0.07);
  color: var(--black);
}
.hero-cta--dark .hero-cta-arrow svg {
  transform: translateY(-0.5px);
}
@media (hover: hover) {
  .hero-cta--dark:hover {
    transform: none;
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.28);
  }
  .hero-cta--dark:hover .hero-cta-arrow { background: rgba(0, 0, 0, 0.12); }
}

/* ── 6. ABOUT ─────────────────────────────────────────────── */
.about { background: transparent; padding: 4rem 0; overflow: hidden; }
.about-inner { max-width: 1020px; margin: 0 auto; padding: 0 3rem; }

.about-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3.5rem;
  align-items: start;
}
.about-text { min-width: 0; }
.about-headshot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding-top: 5.75rem;
}
.headshot-frame {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(var(--accent-rgb), 0.3);
  flex-shrink: 0;
  position: relative;
  isolation: isolate;
}
.headshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  border-radius: 50%;
}
.headshot-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.18);
  transform: translate(12px, 14px);
  z-index: -1;
}
.headshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g200);
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--g400);
  letter-spacing: 0.05em;
}
.headshot-name {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g400);
}

.about h2.section-title {
  font-family: 'Montserrat', var(--sans);
  font-weight: 700;
  color: var(--black);
}
.about h2.section-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  margin-right: 0.05em;
}


/* Skillset stack — click a card to expand it, the rest shrink */
.skill-stack-label { display: none; }
.skill-stack {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-top: 2.5rem;
}
.skill-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  overflow: hidden;
  contain: layout paint;
  transform: translateZ(0);
  transition:
    flex-grow 0.4s ease,
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}
.skill-card.active {
  flex-grow: 2.4;
  background: #141920;
  border-color: rgba(var(--accent-rgb), 0.22);
  cursor: default;
  box-shadow:
    var(--shadow-lift),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(135% 85% at 50% -10%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 55%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
.skill-card.active::before { opacity: 1; }
@media (hover: hover) {
  .skill-card:not(.active):hover { box-shadow: var(--shadow-lift); }
}


.skill-icon {
  margin-bottom: auto;
  padding-bottom: 2rem;
  flex-shrink: 0;
  color: var(--g300);
  transition: color 0.4s ease;
}
.skill-icon svg { display: block; width: 40px; height: 40px; }
.skill-card.active .skill-icon { color: var(--accent); }

.skill-eyebrow { display: none; }
.skill-card.active .skill-eyebrow {
  color: var(--accent);
  transform: scale(1.18);
}

.skill-title {
  position: relative;
  z-index: 2;
  font-family: 'Montserrat', var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--black);
  transition: color 0.55s ease;
}
.skill-card.active .skill-title { color: #ffffff; }

.skill-desc {
  position: relative;
  z-index: 2;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition:
    grid-template-rows 0.4s ease,
    margin-top 0.4s ease,
    opacity 0.35s ease;
}
.skill-desc > span {
  overflow: hidden;
}
.skill-card.active .skill-desc {
  grid-template-rows: 1fr;
  margin-top: 0.75rem;
  opacity: 1;
  transition-delay: 0.2s;
}


/* ── 7. WORK / PROJECTS ───────────────────────────────────── */
.work { background: transparent; padding: 5rem clamp(3rem, 8vw, 8rem) 7.5rem; overflow: hidden; }
.work-inner { max-width: 1100px; margin: 0 auto; }
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.projects { display: flex; flex-direction: column; gap: 4rem; width: 100%; }


.project {
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.project:nth-child(even) .project-visual { order: -1; }

.project-visual { position: relative; overflow: hidden; min-height: 340px; }
.project-visual-inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
@media (hover: hover) { .project:hover .project-visual-inner { transform: scale(1.04); } }

.project-logo-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 3.75rem;
}
.project-logo-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.4));
}
.proj-med-fest .project-logo-overlay { background: rgba(0, 0, 0, 0.10); }
.ap-card-img .project-logo-overlay { padding: 1.5rem; }

.project-info {
  padding: 3rem 2.5rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
}
.project-number { display: none; }
.project-type {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.05rem;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: 1.25rem;
}
.project-desc {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-left: none;
  border-top: none;
  border-right: none;
  margin-top: 0;
  cursor: pointer;
  font-family: var(--sans);
}

/* Project type & link color modifiers */
.c-gold  { color: var(--gold); }
.c-red   { color: var(--red); }
.c-orange { color: var(--orange); }
.c-plum     { color: var(--plum); }
.c-zagg     { color: var(--zagg); }
.c-amethyst { color: var(--amethyst); }
.c-amber    { color: var(--amber); }

.link-gold   { border-color: var(--black); }
@media (hover: hover) { .link-gold:hover,   .project:hover .link-gold,   .ap-card:hover .link-gold   { color: var(--gold);    border-color: var(--gold);    } }
.link-red    { border-color: var(--black); }
@media (hover: hover) { .link-red:hover,    .project:hover .link-red,    .ap-card:hover .link-red    { color: var(--red);     border-color: var(--red);     } }
.link-orange { border-color: var(--black); }
@media (hover: hover) { .link-orange:hover, .project:hover .link-orange, .ap-card:hover .link-orange { color: var(--orange);  border-color: var(--orange);  } }
.link-plum   { border-color: var(--black); }
@media (hover: hover) { .link-plum:hover,   .project:hover .link-plum,   .ap-card:hover .link-plum   { color: var(--plum);    border-color: var(--plum);    } }
.link-zagg     { border-color: var(--black); }
@media (hover: hover) { .link-zagg:hover,     .project:hover .link-zagg,     .ap-card:hover .link-zagg     { color: var(--zagg);      border-color: var(--zagg);      } }
.link-amethyst { border-color: var(--black); }
@media (hover: hover) { .link-amethyst:hover, .project:hover .link-amethyst, .ap-card:hover .link-amethyst { color: var(--amethyst);  border-color: var(--amethyst);  } }
.link-amber    { border-color: var(--black); }
@media (hover: hover) { .link-amber:hover,    .project:hover .link-amber,    .ap-card:hover .link-amber    { color: var(--amber);    border-color: var(--amber);    } }

.more-work-wrap { display: flex; justify-content: center; margin-top: 3rem; }
.more-work-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.6rem 0.6rem 1.85rem;
  border: none;
  border-radius: 999px;
  background: var(--black);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-object);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.more-work-label { position: relative; z-index: 1; }
.more-work-arrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--black);
  transition: transform 0.25s ease;
}
.more-work-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
@media (hover: hover) {
  .more-work-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
  }
  .more-work-btn:hover::before { left: 130%; }
  .more-work-btn:hover .more-work-arrow { transform: translateX(3px); }
}



/* ── 9. SIGNATURE & FOOTER ───────────────────────────────── */
.sig-designs-by {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
}
.sig-name {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.1;
}

footer {
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1.5rem 3rem;
  min-height: 108px;
  display: flex;
  align-items: center;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-logo {
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-copyright {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--sans);
}
.footer-sig-inline {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem;
  white-space: nowrap;
}
.footer-sig-inline .sig-designs-by { font-size: 14.5px; }
.footer-sig-inline .sig-name { font-size: 1.55rem; }
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}
.footer-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: color 0.2s;
}
.footer-link-label {
  font-size: 14.5px;
  font-family: var(--sans);
  white-space: nowrap;
}
@media (hover: hover) {
  .footer-link:hover, .footer-logo:hover { color: rgba(255, 255, 255, 0.7); }
}
.footer-bottom { display: none; }


/* ── 10. CONTACT PAGE ────────────────────────────────────── */
.contact-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(72px + 3.4rem) clamp(2rem, 6vw, 6rem) 3.25rem;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a2a3a 100%);
}
.contact-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
  text-align: left;
}
.contact-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2f7f9f;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.contact-title {
  font-family: 'Montserrat', var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.625rem);
  max-width: 760px;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.contact-title-accent {
  color: inherit;
  background: linear-gradient(to top, rgba(47, 127, 159, 0.18) 0 38%, transparent 38%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.03em;
}
.contact-title-blue { color: #236f89; }
.contact-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--g700);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.contact-body {
  background: transparent;
  padding: calc(72px + 6.5rem) clamp(2rem, 6vw, 6rem) 6rem;
}
.contact-body-inner { max-width: 1040px; margin: 0 auto; }
.contact-panel {
  background: #ffffff;
  border: 1px solid rgba(13, 13, 13, 0.09);
  border-radius: 12px;
  box-shadow: var(--shadow-object);
  padding: clamp(2.5rem, 5vw, 4.25rem);
}

.contact-cols {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.45fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; }
.contact-intro {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.contact-info-item {
  padding: 1rem 0;
  border-bottom: 1px solid #d8d6d0;
}
.contact-info-item:first-child { padding-top: 0; }
.contact-info-item:last-child { border-bottom: none; }
.contact-info-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #686762;
  margin-bottom: 0.35rem;
}
.contact-info-val {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--black);
  line-height: 1.5;
}
.contact-info-val a { color: var(--black); text-decoration: none; border-bottom: 1px solid #bebcb6; }
@media (hover: hover) { .contact-info-val a:hover { border-color: var(--black); } }

.contact-form { display: flex; flex-direction: column; gap: 1.05rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #686762;
}
.form-group input,
.form-group textarea {
  background: #fafaf8;
  border: 1px solid #c9c7c1;
  border-radius: 2px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  color: var(--black);
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #85837d; }
.form-group input:focus,
.form-group textarea:focus {
  border-color: #2f7f9f;
  box-shadow: 0 0 0 3px rgba(47, 127, 159, 0.16);
  background: #ffffff;
}
.form-group textarea { resize: vertical; min-height: 185px; }

.form-submit {
  position: relative;
  overflow: hidden;
  margin-top: 0.25rem;
  padding: 0.9rem 2.25rem;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-object);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.form-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
@media (hover: hover) {
  .form-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
  }
  .form-submit:hover::before { left: 130%; }
}
.form-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: rgba(47, 127, 159, 0.08);
  border: 1px solid rgba(47, 127, 159, 0.28);
  border-radius: 2px;
  font-size: 0.9rem;
  color: #2f7f9f;
}
.form-hint {
  font-size: 0.82rem;
  color: #77756f;
  margin-top: -0.2rem;
}
.form-group label .req {
  letter-spacing: 0;
  margin-left: 0.15em;
}
.form-group.invalid label,
.form-group.invalid label .req { color: var(--red); }
.form-group.invalid input,
.form-group.invalid textarea {
  border-color: var(--red);
  animation: formShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes formShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}


/* ── 10. ALL PROJECTS PAGE ───────────────────────────────── */
.ap-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: calc(72px + 4.5rem) clamp(2rem, 6vw, 6rem) 2rem;
  background: transparent;
}
.ap-hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.ap-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2f7f9f;
  margin-bottom: 1.25rem;
}
.ap-title-row {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.ap-title-rule {
  flex: 1;
  max-width: clamp(4rem, 12vw, 11rem);
  height: 2px;
  background: var(--g200);
}
.ap-split {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex-shrink: 0;
}
.ap-split-rule {
  width: 1px;
  align-self: stretch;
  background: var(--g200);
  flex-shrink: 0;
}
.ap-title {
  font-family: 'DM Serif Display', var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 0.95;
  white-space: nowrap;
  flex-shrink: 0;
}
.ap-subtitle {
  max-width: 380px;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--g700);
}


.ap-grid-wrap { background: transparent; padding: 2rem clamp(2rem, 6vw, 6rem) 9.5rem; }
.ap-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.ap-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (hover: hover) { .ap-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); } }
.ap-card-img {
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.ap-card-img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (hover: hover) { .ap-card:hover .ap-card-img > img { transform: scale(1.04); } }
.ap-card-img-empty {
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-placeholder-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g400);
}
.ap-card-placeholder { cursor: default; }
@media (hover: hover) { .ap-card-placeholder:hover { transform: none; box-shadow: var(--shadow-card); } }

.ap-card-body {
  padding: 1.4rem 1.4rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.ap-card-type {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Per-project color overrides for all-projects cards */
.ap-card-type.c-gold   { color: var(--gold); }
.ap-card-type.c-red    { color: var(--red);    }
.ap-card-type.c-orange { color: var(--orange); }
.ap-card-type.c-plum   { color: var(--plum);   }
.ap-card-type.c-zagg     { color: var(--zagg);      }
.ap-card-type.c-amethyst { color: var(--amethyst); }
.ap-card-type.c-amber    { color: var(--amber);    }
.ap-card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.18rem, 1.45vw, 1.38rem);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--black);
}
.ap-card-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.6;
  margin-top: 0.2rem;
}
.ap-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  margin-top: auto;
  width: fit-content;
}


/* ── 11. CASE STUDY — SHARED STYLES ─────────────────────── */

/* a. Hero */
.cs-hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cs-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.page.active .cs-hero-img.hero-loaded {
  animation: heroImgReveal 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heroImgReveal {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* Hero logo — dramatic rise */
.cs-hero-logo [data-reveal="1"] {
  opacity: 0;
  transform: translateY(80px) scale(0.92);
}
.cs-hero-logo [data-reveal="1"].is-visible {
  animation: heroLogoReveal 1.8s cubic-bezier(0.4, 0, 0.6, 1) 400ms both;
}
@keyframes heroLogoReveal {
  from { opacity: 0; transform: translateY(80px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero meta — rises from below */
.cs-hero-logo [data-reveal="2"] {
  opacity: 0;
  transform: translateY(30px);
}
.cs-hero-logo [data-reveal="2"].is-visible {
  animation: heroGlassReveal 1.4s cubic-bezier(0.4, 0, 0.6, 1) 900ms both;
}
@keyframes heroGlassReveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 3rem 4.5rem;
}
.cs-hero-logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  pointer-events: none;
}
#page-connies .cs-hero-logo { gap: 2.75rem; }


.cs-meta {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  width: fit-content;
}
.cs-meta::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}
.meta-item    { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label   { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.meta-val     { font-size: 0.88rem; color: rgba(255, 255, 255, 0.9); font-weight: 300; }

/* Hero overlay — all project pages */
.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 13, 13, 0.95) 0%,
    rgba(13, 13, 13, 0.55) 50%,
    rgba(13, 13, 13, 0.25) 100%
  );
}
#page-med-fest .cs-hero-overlay {
  background: linear-gradient(
    to top,
    rgba(13, 13, 13, 0.5) 0%,
    rgba(13, 13, 13, 0.2) 50%,
    rgba(13, 13, 13, 0.05) 100%
  );
}
#page-med-fest .cs-meta {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
#page-med-fest .meta-label {
  color: #1f2a4d;
}
.mf-print-copy {
  max-width: none;
}
.mf-print-collage-outer {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}
.mf-print-collage {
  position: relative;
  width: min(800px, 100%);
  aspect-ratio: 760 / 440;
  margin: 0;
}
.mf-collage-item {
  position: absolute;
  text-align: center;
}
.mf-collage-item .img-caption {
  margin-top: 0.5rem;
}
.mf-collage-item--poster {
  left: 41%;
  top: 2%;
  width: 32%;
  z-index: 2;
  transform: rotate(-1.5deg);
}
.mf-collage-item--poster img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow-object);
}
.mf-collage-item--yard {
  left: 0%;
  top: 22%;
  width: 44%;
  z-index: 1;
  transform: rotate(-3deg);
}
.mf-collage-item--yard img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow-object);
}
.mf-collage-item--dh {
  right: -3%;
  bottom: 12%;
  width: 35%;
  z-index: 3;
}
.mf-collage-dh-fan {
  display: flex;
  justify-content: center;
}
.mf-collage-dh-back,
.mf-collage-dh-front {
  width: 45%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}
.mf-collage-dh-back {
  transform: rotate(-6deg) translateX(20%);
  transform-origin: bottom center;
}
.mf-collage-dh-front {
  transform: rotate(5deg) translateX(-20%);
  transform-origin: bottom center;
  position: relative;
  z-index: 1;
}

/* Connie's logo showcase — construction to finished mark */
.cn-logo-transform {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0.5rem 0 2.5rem;
}
.cn-logo-blueprint {
  display: flex;
  justify-content: flex-end;
}
.cn-logo-blueprint img {
  width: min(300px, 100%);
  height: auto;
  display: block;
  opacity: 0.85;
}
.cn-logo-final {
  display: flex;
  justify-content: flex-start;
}
.cn-logo-final img {
  width: min(260px, 90%);
  height: auto;
  display: block;
}
.cn-logo-arrow {
  color: var(--g400);
  flex-shrink: 0;
}
.cn-logo-arrow svg {
  width: 48px;
  height: 16px;
  display: block;
}
.cn-logo-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding-top: 1rem;
}
.cn-logo-lockup {
  flex: 0 1 auto;
  display: flex;
}
.cn-logo-lockup img {
  width: 380px;
  max-width: 100%;
  height: auto;
  display: block;
}
.cn-app-icon {
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 24%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-object);
  padding: 16px;
}
.cn-app-icon img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 640px) {
  .cn-logo-transform {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
    padding: 0.5rem 0 2rem;
  }
  .cn-logo-blueprint, .cn-logo-final { justify-content: center; }
  .cn-logo-arrow svg { transform: rotate(90deg); }
  .cn-logo-pair {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 0;
  }
}

/* Connie's palette — design-system / editorial treatment */
.cn-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: 1.75rem;
}
.cn-swatch { display: flex; flex-direction: column; }
.cn-swatch-chip {
  aspect-ratio: 5 / 3;
  border-radius: 10px;
  border: 1px solid rgba(13, 13, 13, 0.06);
  box-shadow: var(--shadow-card);
}
.cn-swatch-meta {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--g200);
  display: flex;
  flex-direction: column;
}
.cn-swatch-name {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-top: 0.4rem;
}
.cn-swatch-hex {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--g400);
  margin-top: 0.3rem;
}
@media (max-width: 640px) {
  .cn-palette { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; }
}

/* Connie's website section — mask fades image, so less bottom padding needed */
#cn-website { padding-bottom: 0; margin-bottom: -5rem; }

/* Connie's business card collage */
/* Connie's business card collage */
.cn-bc-collage-outer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}
.cn-bc-collage {
  position: relative;
  width: min(720px, 100%);
  aspect-ratio: 720 / 230;
}
.cn-bc-item {
  position: absolute;
  width: 44%;
  left: 50%;
  bottom: 0;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
}
.cn-bc-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: var(--shadow-object);
}
.cn-bc-item--left  { z-index: 3; }
.cn-bc-item--center { z-index: 2; }
.cn-bc-item--right { z-index: 1; }

/* Override default reveal — each card fans out with its own animation */
.cn-bc-item--left.scroll-reveal.is-visible {
  animation: cnFanLeft 0.8s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cn-bc-item--center.scroll-reveal.is-visible {
  animation: cnFanCenter 0.8s 0s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cn-bc-item--right.scroll-reveal.is-visible {
  animation: cnFanRight 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cn-bc-item--left.revealed {
  opacity: 1; animation: none; will-change: auto;
  transform: translateX(-120%) translateY(-5%) rotate(-9deg);
}
.cn-bc-item--center.revealed {
  opacity: 1; animation: none; will-change: auto;
  transform: translateX(-50%) translateY(-18%) rotate(0deg);
}
.cn-bc-item--right.revealed {
  opacity: 1; animation: none; will-change: auto;
  transform: translateX(20%) translateY(-5%) rotate(9deg);
}

@keyframes cnFanCenter {
  from { opacity: 0; transform: translateX(-50%) rotate(0deg) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(-18%) rotate(0deg) scale(1); }
}
@keyframes cnFanLeft {
  from { opacity: 0; transform: translateX(-50%) rotate(0deg) scale(0.95); }
  to   { opacity: 1; transform: translateX(-120%) translateY(-5%) rotate(-9deg) scale(1); }
}
@keyframes cnFanRight {
  from { opacity: 0; transform: translateX(-50%) rotate(0deg) scale(0.95); }
  to   { opacity: 1; transform: translateX(20%) translateY(-5%) rotate(9deg) scale(1); }
}

.mf-ticket-fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 2rem;
}
.mf-ticket-back,
.mf-ticket-front {
  height: 200px;
  width: auto;
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow-object);
}
.mf-ticket-back {
  transform: rotate(-4deg) translateX(12%);
  transform-origin: bottom center;
}
.mf-ticket-front {
  transform: rotate(4deg) translateX(-12%);
  transform-origin: bottom center;
  position: relative;
  z-index: 1;
}

.mf-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.mf-board img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  box-shadow: var(--shadow-object);
}
.mf-board-placeholder {
  aspect-ratio: 1/1;
  border: 2px dashed var(--g200);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g400);
  font-size: 0.85rem;
  font-weight: 500;
}

.mf-booklet-showcase {
  margin-top: 2.5rem;
}
.mf-booklet-showcase img {
  border-radius: 4px;
  display: block;
  box-shadow: var(--shadow-object);
}
/* Center gutter — makes a two-page spread read as one open booklet fold */
.mf-spread { position: relative; }
.mf-spread::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(0,0,0,0) 42%,
    rgba(0,0,0,0.04) 46%,
    rgba(0,0,0,0.18) 50%,
    rgba(0,0,0,0.04) 54%,
    rgba(0,0,0,0) 58%);
}
.mf-booklet-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 84%;
  margin-inline: auto;
}
.mf-bk-cover {
  flex: 0 0 30%;
  position: relative;
  z-index: 2;
}
.mf-bk-cover img {
  width: 100%;
  transform: rotate(-2.2deg);
}
.mf-bk-spread {
  flex: 0 0 58%;
  margin-left: 2%;
  position: relative;
  z-index: 1;
  transform: rotate(1.2deg);
}
.mf-bk-spread img {
  width: 100%;
}
.mf-booklet-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
.mf-booklet-details img { width: 100%; }
.mf-booklet-details .mf-spread:first-child { transform: rotate(-1.2deg); }
.mf-booklet-details .mf-spread:last-child  { transform: rotate(1.2deg); }
.mf-booklet-hero--reverse {
  margin-top: clamp(1.75rem, 4vw, 3rem);
}
.mf-booklet-hero--reverse .mf-bk-spread {
  margin-left: 0;
  z-index: 1;
  transform: rotate(-1.2deg);
}
.mf-booklet-hero--reverse .mf-bk-cover {
  margin-left: 2%;
  z-index: 2;
}
.mf-booklet-hero--reverse .mf-bk-cover img { transform: rotate(2.2deg); }

.mf-board.scroll-reveal {
  will-change: transform, opacity;
}
#page-med-fest .mf-board.scroll-reveal.is-visible:nth-child(1) { animation-delay: 0ms; }
#page-med-fest .mf-board.scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
#page-med-fest .mf-board.scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
#page-med-fest .mf-board.scroll-reveal.is-visible:nth-child(4) { animation-delay: 300ms; }

.mf-editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2.5rem;
}
.mf-editorial-grid .mf-ticket-fan {
  margin-top: 0;
}
.mf-impact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 2px solid rgba(128, 128, 128, 0.15);
  padding-left: 2rem;
}
.mf-impact .mf-stat {
  align-items: flex-start;
}
.mf-overview-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.mf-overview-photos img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.mf-digital-layout {
  position: relative;
  /* Percentage padding is based on the container WIDTH, so the space reserved
     for the ad's overhang scales in lockstep with the ad's own % width. The
     whole banner + ad composition shrinks as one unit at any viewport. */
  padding-bottom: 9%;
}
.mf-digital-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow-object);
}
.mf-digital-ad {
  position: absolute;
  bottom: 0;
  right: 4%;
  width: 28%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-object);
}
.mf-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 68%;
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
}
.mf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  position: relative;
}
.mf-stat-number {
  font-family: 'Montserrat', var(--sans);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--amber);
  line-height: 1;
}
.mf-stat-delta {
  font-size: 0.75rem;
  font-weight: 500;
  font-style: normal;
  font-family: var(--sans);
  color: var(--g400);
  margin-left: 0.25rem;
}
.mf-stat-label {
  font-size: 0.75rem;
  color: var(--g700);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.mf-logo-process {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.mf-logo-before,
.mf-logo-after {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-logo-before img,
.mf-logo-after img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}
.mf-logo-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--g300);
}
#mf-logo p.body { margin-bottom: 0; }
#page-connies .meta-label {
  color: rgba(255, 255, 255, 0.55);
}

/* Brand-tinted meta card — driven by var(--brand) set in showPage() */
.cs-meta {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}
.meta-label { color: color-mix(in srgb, var(--brand) 85%, transparent); }

/* b. Overview strip */
.cs-overview {
  padding: 1.6rem 0;
  background: var(--black);
}
.cs-overview .container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ov-item {
  padding: 0 2.5rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.ov-item:last-child {
  border-right: none;
}
.ov-label {
  font-size: 0.73rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  line-height: 1.3;
  white-space: nowrap;
}
.ov-val {
  font-size: 0.96rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  white-space: nowrap;
}

/* c. Content sections & layout utilities */

/* Section wrappers */
.cs-section           { padding: 4rem 0; background: transparent; overflow: hidden; }
.cs-section--tinted   { background: var(--g100); }   /* gray background variant */
.cs-section--flush    { padding-top: 0; }             /* no top padding */

/* Container — all content lives inside this */
.container            { max-width: 1020px; margin: 0 auto; padding: 0 4rem; }

/* Two-column grid */
.two-col              { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.two-col--center      { align-items: center; }        /* vertically center both columns */
.two-col--bottom      { align-items: end; }           /* bottom-align both columns */

/* Horizontal rule between sections */
.divider              { border: none; border-top: 1px solid var(--g200); }

/* Shared section label + title + body text */
.section-label {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.label-accent { color: var(--brand, #4a8fa8); }
.label-red    { color: var(--brand, var(--red)); }
.label-orange { color: var(--brand, var(--orange)); }
.label-plum   { color: var(--brand, var(--plum)); }
.label-zagg     { color: var(--brand, var(--zagg)); }
.label-amethyst { color: var(--brand, var(--amethyst)); }
.label-amber    { color: var(--brand, var(--amber)); }

/* The Bark Knight — editorial layout */
.label-amethyst {
  color: var(--brand, #6F4DC7);
}

#page-bark-knight .cs-hero-img {
  background-position: center 42%;
}

/* Overview poster */
.bk-poster-frame {
  max-width: 440px;
  justify-self: center;
}
.bk-poster-frame img {
  cursor: default;
  pointer-events: none;
}

/* Logo process */
.bk-logo-process {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2vw, 1.25rem);
  max-width: 720px;
  margin: 0.4rem auto 0;
}
.bk-logo-final {
  flex: 0 1 310px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}
.bk-logo-final img {
  width: min(310px, 100%);
  height: auto;
  display: block;
}
.bk-logo-arrow {
  flex-shrink: 0;
  justify-self: center;
  align-self: center;
  width: 48px;
  height: 16px;
  color: var(--g400);
}

/* Backdrop gradient swatches */
.bk-gradient-palette {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 740px;
  margin: 2.5rem auto 0;
}
.bk-grad-swatch { display: flex; flex-direction: column; }
.bk-grad-chip {
  aspect-ratio: 5 / 3;
  border-radius: 10px;
  border: 1px solid rgba(13, 13, 13, 0.06);
  box-shadow: var(--shadow-card);
}
.bk-grad-meta {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--g200);
  display: flex;
  flex-direction: column;
}
.bk-grad-name {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-top: 0.4rem;
}
.bk-grad-hex {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--g400);
  margin-top: 0.3rem;
}

/* Image-heavy sections — extra bottom padding so images sit clear of the next section */
#page-bark-knight #bark-knight-overview,
#page-bark-knight #bark-knight-backdrop,
#page-bark-knight #bark-knight-composite {
  padding-bottom: 6rem;
}

/* Backdrop + composite — constrained image pairs */
#page-bark-knight #bark-knight-backdrop .two-col {
  max-width: 740px;
  margin: 0 auto;
  gap: clamp(1rem, 1.6vw, 1.25rem);
}

#page-bark-knight #bark-knight-composite .container {
  max-width: 1180px;
}
#page-bark-knight #bark-knight-composite .bk-three-step {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
  align-items: start;
  margin: 0 auto;
}

/* Backdrop — before/after comparison */
.bk-comparison-item {
  position: relative;
}
.bk-comparison-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1;
}
.bk-comparison-tag--after {
  background: rgba(111, 77, 199, 0.65);
  color: rgba(255, 255, 255, 0.95);
}

.bk-backdrop-palettes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 780px;
  margin: 2rem auto 0;
}
.bk-backdrop-palette .format-row-label {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.bk-backdrop-palette .color-palette-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 0;
}

/* Lightbox — dark scrim + shared-element zoom */

#bark-knight-cast {
  overflow: visible;
}
#bark-knight-cast .two-col {
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}
#bark-knight-cast .gallery-item {
  overflow: visible;
}
#bark-knight-cast .gallery-item img {
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.10));
  padding: 1rem;
  margin: -1rem;
}

/* Cast credits — billing block */
.bk-cast-credits {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}
.bk-cast-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.bk-cast-name {
  font-family: 'Montserrat', var(--sans);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  line-height: 1;
}
.bk-cast-role {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

/* Nav footer — hero wallpaper background */
#page-bark-knight .cs-next {
  background: var(--black) url('https://res.cloudinary.com/dqwbaqpzx/image/upload/f_auto,q_auto/v1783703102/the-bark-knight-hero-v2.jpg') center 73% / cover no-repeat;
  position: relative;
}
#page-bark-knight .cs-next::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 18, 0.55);
}
#page-bark-knight .cs-next > * {
  position: relative;
  z-index: 1;
}
#page-bark-knight .cs-next .next-btn {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ZAGG case study */
.zagg-hero {
  min-height: 680px;
  background:
    radial-gradient(circle at 50% 42%, rgba(116, 183, 46, 0.18), transparent 30%),
    linear-gradient(145deg, #050505 0%, #111111 45%, #030303 100%);
  justify-content: flex-end;
}
.zagg-material-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.zagg-material-grid > div {
  min-width: 0;
}
.zagg-material-grid .zagg-message-asset {
  height: 143px;
}
.zagg-material-grid > div:first-child > img {
  height: 143px;
  object-fit: cover;
}
.zagg-message-asset,
.zagg-phone-asset {
  object-fit: contain;
  background: #ffffff;
  padding: 2rem;
}
.zagg-message-asset--dark {
  background: #0d0d0d;
}
.zagg-production-group {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1.5rem;
}
.zagg-production-left {
  flex: 0 0 440px;
  min-width: 0;
}
.zagg-45-panel {
  display: block;
  height: 90px;
  width: auto;
}
.zagg-panel-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.zagg-phone-float {
  flex: 0 0 auto;
  height: 330px;
  width: auto;
  transform: translateY(-42px);
}
.zagg-wood-strip {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  object-position: center;
  margin-top: 0.5rem;
}
#zg-booth .cs-media-stack img {
  display: block;
  width: 80%;
  margin: 0 auto;
}
.zagg-print-panel {
  display: block;
  height: 90px;
  width: auto;
}
.zagg-asset-pair {
  align-items: center;
}
.zagg-asset-pair .zagg-message-asset {
  height: 220px;
  background: #f4f2ee;
}
.zagg-asset-pair .zagg-phone-asset {
  height: 440px;
  background: #f4f2ee;
}



.zagg-result {
  margin-top: 2rem;
}
.zagg-result-hero {
  display: block;
  width: 100%;
  height: auto;
}
.zagg-result-pair {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.zagg-result-pair img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.zagg-result-pair img:nth-child(1).is-visible { animation-delay: 150ms; }
.zagg-result-pair img:nth-child(2).is-visible { animation-delay: 300ms; }


h2.section-title {
  font-family: 'Montserrat', var(--sans);
  font-weight: 700;
  font-size: clamp(1.75rem, 2.55vw, 2.25rem);
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h3.section-subtitle {
  font-family: 'Montserrat', var(--sans);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--black);
}

p.body {
  font-size: 1rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
p.body:last-child { margin-bottom: 0; }

/* d. Image components */
.img-full             { width: 100%; object-fit: cover; display: block; border-radius: 2px; }
.img-caption          { font-size: 0.75rem; color: var(--g400); margin-top: 0.35rem; letter-spacing: 0.04em; }
.img-shadow           { box-shadow: var(--shadow-object); }

/* Equal-height white cell for centering logos of different aspect ratios.
   Square cell (1:1) — logos sit centered on white instead of stretching the
   card to their own height, so a row of mixed-ratio logos stays level. */
.logo-lockup-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-object);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}
.logo-lockup-cell img {
  max-width: 110%;
  max-height: 110%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}


.cs-media-stack {
  margin-top: 2rem;
}
.cs-media-stack + .cs-media-stack {
  margin-top: 2.5rem;
}

/* Aspect ratio utilities — applied directly on <img class="img-full ratio-*"> */
.ratio-3-4  { aspect-ratio: 3/4; }
.ratio-4-3  { aspect-ratio: 4/3; }
.ratio-16-7 { aspect-ratio: 16/7; }
.ratio-16-8 { aspect-ratio: 16/8; }
.ratio-16-9 { aspect-ratio: 16/9; }

.property-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 280px;
  gap: 1.5rem;
  margin-top: 2rem;
}
.gallery-item {
  overflow: hidden;
  border-radius: 3px;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* e. Process list */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--g200);
  align-items: center;
}
.process-item:first-child { padding-top: 0; }
.process-item:last-child { border-bottom: none; }
.process-num {
  font-family: 'Montserrat', var(--sans);
  font-weight: 700;
  font-size: 2.15rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
  color: #cecdc9;
  line-height: 1;
  text-align: right;
}
.process-body { display: flex; flex-direction: column; gap: 0.25rem; }
.process-body h4 { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; }
.process-body h4:only-child { margin-bottom: 0; }
.process-body p  { font-size: 0.9rem; font-weight: 300; color: var(--g700); line-height: 1.75; }

/* f. Deliverables grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.del-item  { padding: 1.25rem 1rem 1rem; border: 1px solid var(--g200); border-radius: 2px; }
.del-icon  { font-size: 1.3rem; margin-bottom: 0.5rem; }
.del-label { font-size: 0.88rem; font-weight: 500; margin-bottom: 0.2rem; }
.del-sub   { font-size: 0.75rem; color: var(--g400); }

/* g. Next project CTA */
.cs-next    { background: var(--black); color: var(--white); padding: 3.25rem 3rem; text-align: center; }
.next-label { display: none; }
.next-title { display: none; }
.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
  background: none;
  font-family: var(--sans);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
@media (hover: hover) { .next-btn:hover { background: var(--white); color: var(--black); border-color: var(--white); } }
.next-btn-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  .next-btn:hover .next-btn-arrow { transform: translateX(4px); }
  .next-btn--prev:hover .next-btn-arrow { transform: translateX(-4px); }
}

.cs-next-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.cs-next-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 320px;
  margin: 0 auto;
}
.cs-next-nav .cs-next-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
}
.cs-next-nav .cs-next-actions .next-btn {
  display: flex;
  justify-content: center;
  width: 100%;
}
.cs-all-projects-btn {
  justify-content: center;
}


/* ── 12. PROJECT-SPECIFIC STYLES ─────────────────────────── */

/* a. Sterling Custom Homes */

/* All case study project pages — slow, luxurious image reveals (the "Sterling feel").
   Scoped to .cs-section so the three utility pages (home, contact, all-projects)
   keep their snappier 0.7s expo-out. Any future project page inherits this. */
.cs-section .scroll-reveal.is-visible {
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}

/* Sterling image reveals — smooth wave instead of spring pop */
#page-sterling .st-gallery > .scroll-reveal.is-visible,
#page-sterling .flyer-grid > .scroll-reveal.is-visible,
#page-sterling .sheet-grid > .scroll-reveal.is-visible,
#page-sterling .flyer-pair > .scroll-reveal.is-visible,
#page-sterling .brochure-covers > .scroll-reveal.is-visible,
#page-sterling .brochure-inside.scroll-reveal.is-visible {
  animation-name: apCardReveal;
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  animation-fill-mode: both;
}
#page-sterling .st-gallery > .scroll-reveal.is-visible:nth-child(2),
#page-sterling .flyer-grid      > .scroll-reveal.is-visible:nth-child(2),
#page-sterling .sheet-grid      > .scroll-reveal.is-visible:nth-child(2),
#page-sterling .flyer-pair      > .scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
#page-sterling .st-gallery > .scroll-reveal.is-visible:nth-child(3),
#page-sterling .flyer-grid       > .scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
#page-sterling .st-gallery > .scroll-reveal.is-visible:nth-child(4),
#page-sterling .flyer-grid       > .scroll-reveal.is-visible:nth-child(4) { animation-delay: 300ms; }

/* Sterling — asymmetric editorial layout.
   5/7 split rail: eyebrow + title live in the narrow left column, body copy
   in the right, top-aligned to the eyebrow line. */
#page-sterling .st-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 4.5rem;
  align-items: start;
}
#page-sterling .st-split-head .section-title:last-child { margin-bottom: 0; }

/* Palette — equal swatch columns beside the direction copy,
   top-aligned to the section title rather than the eyebrow label */
#page-sterling .st-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.65rem;
}
#page-sterling .st-palette .color-card { min-height: 200px; }

/* Editorial gallery — 12-col asymmetric composition. Items without an
   aspect ratio (st-g2, st-g3) stretch to their row partner's height so
   tops and bottoms stay flush. */
#page-sterling .st-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
#page-sterling .st-gallery .gallery-item { box-shadow: var(--shadow-object); }
#page-sterling .st-g1 { grid-column: 1 / 9; aspect-ratio: 16 / 10; }
#page-sterling .st-g2 { grid-column: 9 / 13; }
#page-sterling .st-g3 { grid-column: 1 / 6; }
#page-sterling .st-g4 { grid-column: 6 / 13; aspect-ratio: 16 / 9; }
#page-sterling .st-gallery-caption { margin-top: 0.75rem; text-align: right; }

/* Summary — numbered steps as a 4-across strip so the content itself
   spans the full container width */
#page-sterling .process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}
#page-sterling .process-item {
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.25rem 0 0;
  border-bottom: none;
  border-top: 1px solid var(--g200);
  align-items: start;
  align-content: start;
}
#page-sterling .process-item:first-child { padding-top: 1.25rem; }
#page-sterling .process-num { text-align: left; }


.palette-image-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6rem;
  align-items: start;
  margin-bottom: 2rem;
}

.color-card {
  border-radius: 6px;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  box-shadow: var(--shadow-card);
}

.color-palette-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.color-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.color-card-hex {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.palette-row { display: flex; gap: 1rem; margin: 1.5rem 0; align-items: center; }
.swatch-block { display: flex; flex-direction: column; gap: 0.4rem; align-items: center; }
.swatch { width: 56px; height: 56px; border-radius: 4px; border: 1px solid var(--g200); }
.swatch-hex  { font-size: 0.72rem; color: var(--g400); letter-spacing: 0.04em; }
.swatch-name { font-size: 0.7rem; color: var(--g700); }

.logo-wrap {
  background: var(--navy);
  padding: 3rem 2.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.brochure-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.brochure-covers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.brochure-cover-item {
  display: flex;
  flex-direction: column;
}
.brochure-cover-item > img {
  aspect-ratio: 11 / 8;
  width: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.brochure-inside {
  display: flex;
  flex-direction: column;
}
.brochure-inside > img,
.brochure-inside > div {
  flex: 1;
  min-height: 0;
  border-radius: 2px;
  -webkit-mask-image: linear-gradient(to right, black 70%, transparent);
  mask-image: linear-gradient(to right, black 70%, transparent);
}
.brochure-inside > .img-caption {
  flex: none;
}

/* Inside spread with fold indicator — no mask */
.spread-wrap {
  flex: 1;
  min-height: 0;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.spread-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.spread-fold {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  border-top: 1.5px dashed rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.spread-fold::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
}

.flyer-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.sheet-face {
  aspect-ratio: 8.5 / 11;
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
}
.sheet-face > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.format-row-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g400);
  margin-top: 2rem;
}
.dim-x { text-transform: lowercase; }

.flyer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.flyer-grid--2x2 {
  grid-template-columns: repeat(2, 1fr);
}
.flyer-grid-placeholder {
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.04);
  border: 1.5px dashed rgba(0, 0, 0, 0.12);
  aspect-ratio: 11 / 8;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* b. Kasata Sushi Den */
.identity-block { padding: 4rem 0; background: var(--black); color: var(--white); }
p.body--on-dark { color: rgba(255,255,255,0.55); max-width: 640px; }

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.process-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.process-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
}
.process-placeholder {
  background: var(--white);
  border-radius: 6px;
  min-height: 220px;
  box-shadow: var(--shadow-object);
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-ph-num {
  font-family: 'Montserrat', var(--sans);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  color: var(--g200);
}

/* Placeholder size tokens — use alongside .process-placeholder */
.ph-sm { min-height: 280px; }
.ph-md { min-height: 420px; }
.ph-lg { min-height: 600px; }

.menu-tiers { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.menu-tier {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 2px;
  border-left: 3px solid transparent;
}
.tier-premium { border-left-color: var(--red); }
.tier-mid     { border-left-color: var(--g400); }
.tier-entry   { border-left-color: var(--g200); }
.tier-name  { font-size: 0.88rem; font-weight: 500; margin-bottom: 0.25rem; }
.tier-desc  { font-size: 0.8rem; color: var(--g400); line-height: 1.5; }
.tier-price { font-size: 0.85rem; font-weight: 500; white-space: nowrap; margin-top: 0.15rem; }

/* c. Garage Cave */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.specs-grid--inline { max-width: 720px; }
.spec-item { padding: 1.25rem; background: var(--g100); border-radius: 2px; text-align: center; }
.cs-section--tinted .spec-item { background: #ffffff; }
.spec-val   { font-family: 'Montserrat', var(--sans); font-weight: 700; font-size: 1.5rem; color: var(--black); margin-bottom: 0.25rem; }
.spec-label { font-size: 0.75rem; color: var(--g400); text-transform: uppercase; letter-spacing: 0.08em; }

/* Garage Cave — promo messaging transformation ledger */
.gr-promo { margin-top: 2.5rem; display: flex; flex-direction: column; }
.gr-promo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 2fr);
  align-items: center;
  gap: 1.75rem;
  padding: 1.75rem 0;
  padding-left: clamp(1.5rem, 8vw, 6rem); /* shifts text toward center */
  border-bottom: 1px solid var(--g200);
}
.gr-promo-item:first-child { padding-top: 0.5rem; }
.gr-promo-item:last-child { border-bottom: none; }

.gr-promo-label {
  font-size: 1rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.6;
  text-align: center;
}
.gr-promo-arrow { color: var(--g400); display: flex; align-items: center; }
.gr-promo-graphic {
  max-height: var(--graphic-h, 85px); /* override per-row: style="--graphic-h: 110px" */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  justify-self: start;
}
@media (max-width: 700px) {
  .gr-promo-item {
    grid-template-columns: 1fr;
    grid-template-areas: "label" "graphic";
    padding-left: 0;
    gap: 0.75rem;
  }
  .gr-promo-label   { grid-area: label; }
  .gr-promo-arrow   { display: none; }
  .gr-promo-graphic { grid-area: graphic; justify-self: center; }
}


/* Garage Cave — liftgate section stagger */
#gr-rear .container > div:nth-of-type(1).is-visible { animation-delay: 0ms; }
#gr-rear .container > div:nth-of-type(2).is-visible { animation-delay: 150ms; }

/* Garage Cave — final result stagger */
#gr-final .container > div:nth-of-type(1).is-visible { animation-delay: 0ms; }
#gr-final .container > div:nth-of-type(2).is-visible { animation-delay: 150ms; }
#gr-final .container > div:nth-of-type(3).is-visible { animation-delay: 300ms; }
#gr-final .cs-media-stack + .cs-media-stack { margin-top: 1rem; }
#gr-final .container > div:nth-of-type(3) { margin-top: 0.25rem; }

/* ── BACK TO TOP ─────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--btt-color, var(--accent)) 50%, transparent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s;
  z-index: 150;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) { .back-to-top:hover { transform: translateY(-3px); } }
.back-to-top .btt-arrow {
  stroke: var(--black);
  transition: stroke 0.2s;
}
.back-to-top.over-dark {
  background: color-mix(in srgb, var(--btt-color, var(--accent)) 85%, transparent);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}
.back-to-top.over-dark .btt-arrow { stroke: var(--white); }


/* ── PAGE TABLE OF CONTENTS ──────────────────────────────── */
.page-toc {
  position: fixed;
  left: 30px;
  top: 40%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.page-toc.toc-visible {
  opacity: 1;
  pointer-events: all;
}
.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.toc-item::before {
  content: '';
  display: block;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--g200);
  flex-shrink: 0;
  transition: background 0.3s;
}
.toc-item span {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--g400);
  transition: color 0.2s;
}
@media (hover: hover) {
  .toc-item:hover span { color: var(--g700); }
}
.toc-item.toc-active::before {
  background: var(--toc-color, var(--accent));
}
.toc-item.toc-active span {
  opacity: 1;
  color: var(--toc-color, var(--accent));
}
@media (max-width: 1280px) {
  .page-toc { display: none; }
}


/* ── 13. ANIMATION SYSTEM ────────────────────────────────── */

/* Layer A — page fade on navigation */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Layer B — staggered entrance (data-reveal elements) */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}
[data-reveal].is-visible {
  animation: apCardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-reveal="1"] { animation-delay: 0ms;   }
[data-reveal="2"] { animation-delay: 150ms; }
[data-reveal="3"] { animation-delay: 300ms; }
[data-reveal="4"] { animation-delay: 450ms; }
[data-reveal="5"] { animation-delay: 600ms; }

/* Home hero — staggered entrance */
.hero-content [data-reveal="1"] { animation-delay: 150ms; }
.hero-content [data-reveal="2"] { animation-delay: 300ms; }
.hero-content [data-reveal="3"] { animation-delay: 450ms; }
.hero-content [data-reveal="4"] { animation-delay: 600ms; }
.hero-content [data-reveal="5"] { animation-delay: 750ms; }
.hero-content [data-reveal="6"] { animation-delay: 900ms; }

/* Layer C — scroll reveal (IntersectionObserver) */
.scroll-reveal {
  opacity: 0;
  /* translateY(10px) lives in the apCardReveal keyframes + fill-mode:both, not here */
}

/* Promote image containers to GPU layers ahead of animation */
.gallery-item.scroll-reveal,
.flyer-grid-item.scroll-reveal,
.flyer-pair-item.scroll-reveal,
.sheet-grid-item.scroll-reveal,
.brochure-cover-item.scroll-reveal,
.brochure-inside.scroll-reveal,
.cs-media-stack.scroll-reveal,
.project.scroll-reveal {
  will-change: transform, opacity;
}
.scroll-reveal.is-visible {
  animation: apCardReveal 1.0s cubic-bezier(0.4, 0, 0.6, 1) both;
}
/* After animation completes: clear fill-mode so hover transitions run freely */
.scroll-reveal.revealed {
  opacity: 1;
  animation: none;
  will-change: auto;
}

/* Stagger for sibling scroll-reveals in grids */
.scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
.scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
.scroll-reveal.is-visible:nth-child(4) { animation-delay: 100ms; }
.scroll-reveal.is-visible:nth-child(5) { animation-delay: 200ms; }
.scroll-reveal.is-visible:nth-child(6) { animation-delay: 300ms; }

/* Home featured cards are single-column sequential reveals — no stagger needed.
   Each card fires at a different time naturally as you scroll to it.
   The nth-child delay was causing a 200ms invisible gap before Garage Cave animated. */
.projects > .project.scroll-reveal.is-visible { animation-delay: 0ms !important; }

/* 2x2 process grid reveals in reading order (1,2,3,4), not the shared diagonal */
.process-grid .scroll-reveal.is-visible:nth-child(4) { animation-delay: 240ms; }

/* Contact page — match the All Projects wave feel, not the snappy default */
.contact-panel.scroll-reveal.is-visible {
  animation-name: apCardReveal;
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  animation-fill-mode: both;
}

/* All-projects grid — slow-start easing keeps cards at graduated opacities during the stagger,
   creating a continuous wave rather than discrete pops */
.ap-grid > .scroll-reveal.is-visible {
  animation-name: apCardReveal;
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  animation-fill-mode: both;
}
.ap-grid > .scroll-reveal.is-visible:nth-child(1) { animation-delay: 0ms;   }
.ap-grid > .scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
.ap-grid > .scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
.ap-grid > .scroll-reveal.is-visible:nth-child(4) { animation-delay: 300ms; }
.ap-grid > .scroll-reveal.is-visible:nth-child(5) { animation-delay: 400ms; }
.ap-grid > .scroll-reveal.is-visible:nth-child(6) { animation-delay: 500ms; }
.ap-grid > .scroll-reveal.is-visible:nth-child(7) { animation-delay: 600ms; }

/* Skill stack stagger */
.skill-stack > .scroll-reveal.is-visible:nth-child(1) { animation-delay: 0ms;   }
.skill-stack > .scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
.skill-stack > .scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
.skill-stack > .scroll-reveal.is-visible:nth-child(4) { animation-delay: 300ms; }

/* Global process-list stagger — all case studies, no per-project rules needed */
.process-list > .scroll-reveal.is-visible:nth-child(1) { animation-delay: 0ms; }
.process-list > .scroll-reveal.is-visible:nth-child(2) { animation-delay: 100ms; }
.process-list > .scroll-reveal.is-visible:nth-child(3) { animation-delay: 200ms; }
.process-list > .scroll-reveal.is-visible:nth-child(4) { animation-delay: 300ms; }
.process-list > .scroll-reveal.is-visible:nth-child(5) { animation-delay: 400ms; }
.process-list > .scroll-reveal.is-visible:nth-child(6) { animation-delay: 500ms; }


@keyframes apCardReveal {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal],
  .scroll-reveal,
  .cs-hero-logo [data-reveal="1"],
  .cs-hero-logo [data-reveal="2"] {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
  }
}



/* ── 14. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  #main-nav { padding: 0.6rem 1rem; }

  .hero { padding: 0 2rem 4rem; }
  .hero-content { flex-direction: column; text-align: center; }
  .hero-text { text-align: center; order: 2; }
  .hero-info { align-items: center; }
  .hero-desc { text-align: center; }
  .hero-portrait { width: min(375px, 85%); align-self: center; margin-bottom: 1.5rem; order: 1; }
  .hero-identity { margin-bottom: 1.25rem; }
  .hero-divider { margin-bottom: 1.25rem; }
  .hero-info { gap: 1rem; }
  .hero-tags { grid-template-columns: repeat(2, auto); gap: 0.5rem; }

  .nav-contact-label { display: none; }
  .nav-contact-btn { padding: 0.45rem 0.65rem; }

  .about { padding: 5rem 2rem; }
  .work { padding: 5rem 2rem 7.5rem; }

  .about-intro { grid-template-columns: 1fr; gap: 2rem; }
  .about-inner { padding: 0; }
  .about-headshot { display: none; }

  .project { grid-template-columns: 1fr; min-height: auto; }
  .project:nth-child(even) .project-visual { order: 0; }
  .project-visual { height: 300px; }

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

  .contact-body { padding: calc(72px + 3rem) clamp(1.5rem, 6vw, 2rem) 4rem; }
  .contact-panel { padding: 1.5rem; }
  .contact-cols { grid-template-columns: 1fr; gap: 2.5rem; }

  .ap-grid { grid-template-columns: repeat(2, 1fr); }
  .ap-title-row { gap: 1rem; }
  .ap-title-rule { display: none; }
  .ap-split { flex-direction: column; align-items: flex-start; gap: 1rem; text-align: left; }
  .ap-split-rule { width: 48px; height: 1px; align-self: auto; }
  .ap-title { white-space: normal; }

  .cs-hero-content { padding: 0 2rem 3rem; }
  .cs-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 2rem;
    padding: 1rem 1.5rem;
    width: 460px;
    max-width: calc(100vw - 3rem);
  }
  .cs-overview { padding: 1.3rem 0; }
  .cs-overview .container { flex-wrap: wrap; justify-content: center; }
  .ov-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 1rem 1.5rem; }
  .ov-item:nth-last-child(-n+2) { border-bottom: none; }

  .container { padding: 0 2.5rem; }
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .property-gallery { grid-template-rows: 180px; }

  /* Sterling editorial layout collapses to a single column */
  #page-sterling .st-split { grid-template-columns: 1fr; row-gap: 1.25rem; }
  #page-sterling .st-palette { gap: 1rem; margin-top: 0; }
  #page-sterling .st-palette .color-card { min-height: 140px; }
  #page-sterling .st-gallery { gap: 1rem; }
  #page-sterling .st-g1 { grid-column: 1 / -1; }
  #page-sterling .st-g2 { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  #page-sterling .st-g3 { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  #page-sterling .st-g4 { grid-column: 1 / -1; }
  #page-sterling .process-list { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }

  .identity-block { padding: 3rem 0; }
  .process-item { grid-template-columns: 2.5rem 1fr; gap: 0.9rem; }
  .process-num { font-size: 1.55rem; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .zagg-hero { min-height: 620px; }
  .zagg-material-grid,
  .zagg-result-pair {
    grid-template-columns: 1fr;
  }
  .bk-poster-frame { max-width: 340px; }
  .bk-logo-process {
    flex-direction: column;
    gap: 1.25rem;
    max-width: 360px;
  }
  .bk-logo-final { flex: 0 1 auto; }
  .bk-logo-arrow { transform: rotate(90deg); }
  #page-bark-knight #bark-knight-backdrop .two-col {
    max-width: 420px;
  }
  #page-bark-knight #bark-knight-composite .bk-three-step {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .bk-cast-credits {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2.5rem;
  }
  .bk-backdrop-palettes {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  footer { padding: 1.5rem 2rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1rem; justify-items: center; }
  .footer-brand, .footer-links { display: none; }
  .footer-bottom { display: flex; align-items: center; gap: 1.25rem; }

  .home-signature { padding: 2rem 2rem; }
  .sig-name { font-size: 1.5rem; }

  .brochure-layout { grid-template-columns: 1fr; }
  .brochure-inside > img,
  .brochure-inside > div {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .flyer-pair  { grid-template-columns: 1fr; gap: 1.25rem; }
  .flyer-grid  { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .sheet-grid  { grid-template-columns: 1fr; gap: 1rem; }

  .cs-next { padding: 2.25rem 2rem; }

  /* Stats sit bottom-left, clear of the ad overhanging the banner's top-right. */
  .mf-stats { max-width: 100%; justify-content: flex-start; }
  .mf-editorial-grid { grid-template-columns: 1fr; gap: 2rem; }
  .mf-editorial-grid .mf-ticket-fan { justify-content: flex-start; }
  .mf-collage-item--dh { right: 0; }
  .mf-overview-photos { grid-template-columns: 1fr 1fr; }
  .mf-overview-photos img:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .tool-badge { padding: 0.45rem 0.85rem; font-size: 0.82rem; }

  .about { padding: 3.5rem 2rem; }
  .work { padding: 3.5rem 2rem 6rem; }
  .about-inner { padding: 0; }
  .container { padding: 0 2rem; }
  .skill-stack-label {
    display: block;
    position: relative;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--black);
    margin-top: 3rem;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--g300, #d6d4cf);
  }
  .skill-stack-label::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: var(--accent);
    margin-bottom: 0.85rem;
  }
  .skill-stack {
    display: block;
    margin-top: 0;
  }
  .skill-icon { display: none; }
  .skill-card,
  .skill-card.active {
    display: block;
    position: relative;
    min-height: 0;
    padding: 1.4rem 2.5rem 1.4rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    overflow: visible;
    contain: none;
    will-change: auto;
    border-bottom: 1px solid var(--g200);
    flex: none;
  }
  .skill-card:last-child { border-bottom: none; }
  .skill-card::before,
  .skill-card.active::before { display: none; }
  .skill-card::after {
    content: '';
    position: absolute;
    right: 0.25rem;
    top: 1.85rem;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--g400);
    border-bottom: 2px solid var(--g400);
    transform: rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
  }
  .skill-card.active::after {
    transform: rotate(-135deg);
    top: 2.1rem;
    border-color: var(--accent);
  }
  .skill-title,
  .skill-card.active .skill-title {
    display: block;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--black);
    margin-bottom: 0;
  }
  .skill-desc,
  .skill-card.active .skill-desc {
    display: grid;
    color: var(--g700);
    font-size: 0.95rem;
    line-height: 1.55;
  }
  .skill-desc {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    transition: grid-template-rows 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
  }
  .skill-desc > span { overflow: hidden; }
  .skill-card.active .skill-desc {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 0.6rem;
  }

  .ap-grid { grid-template-columns: 1fr; }
  .ap-card-title {
    font-size: 1.15rem;
    line-height: 1.15;
  }

  .cs-hero-logo { gap: 0.75rem; }
  .cs-hero-content { padding: 0 2rem 2.5rem; }

  .flyer-grid { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .property-gallery { grid-template-columns: 1fr; grid-template-rows: auto; }

  .cs-next { padding: 1.5rem 2rem; }

  .zagg-message-asset,
  .zagg-phone-asset { padding: 1.25rem; }
  .zagg-result-pair img { min-height: 210px; }

  /* Banner is too small here to tuck stats beside the ad overhang, so let them
     drop fully below it instead of pulling up into the ad. */
  .mf-stats { gap: 1.5rem; margin-top: 0.75rem; }
  .mf-overview-photos { grid-template-columns: 1fr; }
  .mf-overview-photos img:nth-child(3) { grid-column: auto; }
  .mf-logo-process { flex-direction: column; gap: 1.5rem; }
  .mf-logo-arrow { transform: rotate(90deg); }

  .mf-collage-item .img-caption { display: none; }

  .mf-boards { grid-template-columns: 1fr; }

  .mf-ticket-back,
  .mf-ticket-front { height: clamp(100px, 30vw, 200px); }
}
