/* =========================================================
   Jordan Cole — UX/Product Portfolio
   Neutral "gallery wall" system: warm paper/stone/ink palette
   with zero chromatic accent, so colorful project work is the
   only color on the page.
========================================================= */

:root{
  /* Neutral canvas */
  --paper:      #f5f2ec;
  --paper-2:    #ece6da;
  --bone:       #ddd5c4;
  --stone:      #a89e8e;
  --stone-600:  #7a7266;
  --ink:        #201d18;
  --ink-2:      #131110;
  --line:       rgba(32,29,24,0.14);
  --line-dark:  rgba(245,242,236,0.16);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, sans-serif;

  --wrap: none;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ height: 100%; }
body{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main{ flex: 1 0 auto; }

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,p{ margin: 0; }

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

/* -------- grain overlay -------- */
.grain{
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus{ left: var(--pad); top: var(--pad); }

/* -------- reveal-on-scroll -------- */
[data-reveal], [data-reveal-immediate]{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible, [data-reveal-immediate].is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   HEADER / NAV
========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,242,236,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.primary-nav{
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  font-size: 0.92rem;
  font-weight: 500;
}
.primary-nav a{
  position: relative;
  padding: 6px 0;
}
.primary-nav a:not(.nav-cta)::after{
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right .3s var(--ease);
}
.primary-nav a:not(.nav-cta):hover::after{ right: 0; }
.primary-nav a.active::after{ right: 0; }
.mobile-nav a.active{ font-weight: 700; }
.nav-cta{
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px !important;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-cta:hover{ background: var(--ink); color: var(--paper); }

.menu-toggle{
  display: none;
  width: 40px; height: 40px;
  border: none; background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.menu-toggle span{
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:first-child{ transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child{ transform: translateY(-3.75px) rotate(-45deg); }

.mobile-nav{
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 8px var(--pad) 20px;
}
.mobile-nav a{
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 500;
}
.site-header.nav-open .mobile-nav{ display: flex; }

/* =========================================================
   HERO
========================================================= */
.hero{ padding-top: clamp(64px, 10vw, 120px); padding-bottom: 0; }
.hero-grid{
  padding-bottom: clamp(64px, 9vw, 120px);
}
.hero-copy{
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.eyebrow{
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--stone-600);
  margin-bottom: 18px;
}
.hero-title{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.hero-title em{
  font-style: italic;
  font-weight: 400;
  color: var(--stone-600);
}
.hero-sub{
  max-width: 54ch;
  margin: 26px auto 0;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--stone-600);
}
.hero-actions{
  justify-content: center;
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.btn{
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary{ background: var(--ink); color: var(--paper); }
.btn-primary:hover{ background: var(--stone-600); }
.btn-ghost{ border: 1px solid var(--line); }
.btn-ghost:hover{ border-color: var(--ink); }

.hero-rule{ border-top: 1px solid var(--line); }

/* =========================================================
   SECTION HEAD (shared)
========================================================= */
.section-head{
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin-top: 4px;
}
.section-sub{
  margin-top: 18px;
  color: var(--stone-600);
  font-size: 1.02rem;
}

section{ padding: clamp(64px, 9vw, 120px) 0; }
.work{ background: var(--paper); }
.approach{ background: var(--paper-2); }

/* =========================================================
   PROJECT GRID
========================================================= */
.project-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(48px, 5vw, 72px) clamp(32px, 4vw, 56px);
}
.project{ display: flex; flex-direction: column; }
.project-media{
  display: block;
  border-radius: 4px;
  overflow: hidden;
}
.thumb{
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  transition: transform .6s var(--ease);
  background-size: 200% 200%;
  animation: drift 14s ease-in-out infinite;
}
.project-media:hover .thumb{ transform: scale(1.035); }

@keyframes drift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

/* Placeholder "colorful work" thumbnails — replace with real screenshots */
.thumb--mtl{ background-image: radial-gradient(circle at 30% 30%, #d3ddd2, transparent 60%), radial-gradient(circle at 75% 70%, #8fa8a2, transparent 55%), linear-gradient(135deg, #e4ded1, #5f7873); }
.thumb--caris{ background-image: radial-gradient(circle at 25% 75%, #8fa4b8, transparent 55%), radial-gradient(circle at 80% 20%, #48586b, transparent 55%), linear-gradient(135deg, #3d4a5a, #6b8098); }
.thumb--carisportal{ background-image: radial-gradient(circle at 30% 25%, #a7c2bd, transparent 55%), radial-gradient(circle at 75% 75%, #55707f, transparent 55%), linear-gradient(135deg, #202f3a, #64818d); }

/* Caris Provider Portal — only the screenshots are rounder than default; the backdrop container stays the standard radius */
.project-gallery:has(.thumb--carisportal) .gallery-slide img{ border-radius: 10px; }
.thumb--bell{ background-image: radial-gradient(circle at 70% 25%, #ddd6d2, transparent 55%), radial-gradient(circle at 25% 80%, #8a7570, transparent 55%), linear-gradient(135deg, #eae5e0, #6e5d59); }
.thumb--urbanair{ background-image: radial-gradient(circle at 30% 20%, #c7bccb, transparent 55%), radial-gradient(circle at 75% 75%, #6c5f78, transparent 55%), linear-gradient(135deg, #221e29, #6f6178); }
.thumb--bdow{ background-image: radial-gradient(circle at 75% 30%, #f3efe8, transparent 55%), radial-gradient(circle at 25% 75%, #bd968b, transparent 55%), linear-gradient(135deg, #ede7dc, #ab8378); }
.thumb--sportsmo{ background-image: radial-gradient(circle at 25% 25%, #a9bb92, transparent 55%), radial-gradient(circle at 75% 70%, #4d6249, transparent 55%), linear-gradient(135deg, #191d16, #47563f); }
.thumb--archives{ background-image: radial-gradient(circle at 30% 25%, #d7e0d2, transparent 55%), radial-gradient(circle at 75% 75%, #4a6b4f, transparent 55%), linear-gradient(135deg, #e9ecdf, #3f5c44); }

/* =========================================================
   PROJECT GALLERY (paged image viewer, e.g. Molecular Testing Labs)
   A persistent, drifting color backdrop fills the full frame;
   the actual screenshots float on top, inset with generous
   margin so the motion reads around the edges.
========================================================= */
.project-gallery{
  position: relative;
  aspect-ratio: 16 / 9;
  /* .project-media already sets overflow:hidden + border-radius:4px —
     that outer edge is the ONLY clip boundary, so slides travel the
     full width of the card during the transition, not just the inset
     image area. */
}
.gallery-backdrop{
  position: absolute;
  inset: 0;
}
.gallery-viewport{
  position: absolute;
  inset: 0;
}
.gallery-track{
  display: flex;
  height: 100%;
  transition: transform .45s var(--ease);
}
.gallery-slide{
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 8% 13%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-slide img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.4);
}

/* Single-image variant (e.g. Caris Life Sciences) — same backdrop +
   inset look as the gallery, no track/carousel since there's one shot.
   Tall portrait screenshots are scaled UP and top-anchored rather than
   shrunk to fit whole — the bottom overflows and is cropped by the
   card's own overflow:hidden, reading as a zoomed-in hero peek rather
   than a small, fully-visible screen floating in empty space. */
.gallery-frame{
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding-top: 8%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.gallery-image{
  width: 56%;
  height: auto;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.4);
}

/* Click-to-expand affordance on any real project screenshot */
.project-media img{
  cursor: pointer;
  transition: transform .3s var(--ease);
}
.project-media img:hover{ transform: scale(1.015); }
.gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(32,29,24,0.55);
  color: var(--paper);
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background .2s var(--ease);
}
.gallery-arrow:hover{ background: rgba(32,29,24,0.8); }
.gallery-arrow--prev{ left: 14px; }
.gallery-arrow--next{ right: 14px; }
.gallery-dots{
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(32,29,24,0.4);
  backdrop-filter: blur(3px);
}
.gallery-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(245,242,236,0.5);
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.gallery-dot:hover{ background: rgba(245,242,236,0.8); }
.gallery-dot[aria-selected="true"]{
  background: var(--paper);
  transform: scale(1.25);
}

.project-meta{
  display: flex;
  gap: 18px;
  margin-top: 22px;
}
.project-index{
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--stone);
  padding-top: 4px;
}
.project-text{
  position: relative;
  transition: transform .2s var(--ease);
}
.project-text:hover{ transform: translateY(-1px); }
.project-text h3{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.project-link{ color: inherit; text-decoration: none; transition: color .2s var(--ease); }
.project-link::after{
  content: '';
  position: absolute;
  inset: 0;
}
.project-arrow{
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stone);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.project-link:hover{ color: var(--stone-600); }
.project-link:hover ~ .project-arrow{ color: var(--stone-600); }
.project-link:hover ~ .project-arrow{ transform: translateX(5px); }
.project-text p{
  margin-top: 8px;
  color: var(--stone-600);
  font-size: 0.95rem;
}
.project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.project-tags li{
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stone-600);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

/* Small disclosure caption under a project image — e.g. noting a
   placeholder brand/logo stands in for a client's real one. */
.media-caption{
  margin-top: 10px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--stone);
}

/* =========================================================
   APPROACH / PROCESS
   Seven-stage end-to-end process, with three AI phases
   layered across it (integrated, not a separate section).
========================================================= */
.process-timeline{ margin-top: clamp(40px, 6vw, 64px); }

/* AI phases: parent groups, each visually cupping its child stages below */
.phase-row{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}
.phase-group{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.phase--span3{ grid-column: span 3; }
.phase--span2{ grid-column: span 2; }
.phase-label{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: var(--bone);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.phase-bracket{
  width: 100%;
  height: 16px;
  border: 1px solid var(--stone);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
}

.stage-row{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.stage{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stage-num{
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--stone);
}
.stage-label{
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.15;
}
.stage-desc{
  font-size: 0.82rem;
  color: var(--stone-600);
  line-height: 1.4;
}

.approach-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: clamp(48px, 6vw, 72px);
}
.approach-cta p{
  color: var(--stone-600);
  max-width: 56ch;
  font-size: 0.98rem;
}

/* =========================================================
   ABOUT
========================================================= */
.about{ background: var(--paper); }
.about-grid{
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.about-portrait{
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bone), var(--stone));
}
.about-portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-headline{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 6px;
}
.about-copy p:not(.eyebrow){
  margin-top: 18px;
  color: var(--stone-600);
  max-width: 48ch;
  font-size: 1rem;
}
.about-copy p:not(.eyebrow):first-of-type{ margin-top: 22px; }
.about-more{
  display: inline-flex;
  align-items: center;
  margin-top: clamp(22px, 3vw, 30px);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--stone-600);
  transition: color .2s var(--ease);
}
.about-more:hover{ color: var(--ink); }

/* =========================================================
   FOOTER (contact + closing)
========================================================= */
.site-footer{
  background: var(--ink-2);
  color: var(--stone);
  border-top: 1px solid var(--line-dark);
}
.footer-contact{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(40px, 6vw, 64px) var(--pad) clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--line-dark);
}
.footer-intro{ max-width: 480px; }
.footer-heading{
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--stone);
  margin: 0;
}
.footer-contact-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}
.footer-email{
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 4px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer-email:hover{ color: var(--stone); border-color: var(--stone); }
.footer-links{ display: flex; gap: 24px; }
.footer-links a{
  font-size: 0.9rem;
  color: var(--stone);
  transition: color .2s var(--ease);
}
.footer-links a:hover{ color: var(--paper); }
.footer-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--pad);
  font-size: 0.85rem;
}
.back-to-top{ transition: color .2s var(--ease); }
.back-to-top:hover{ color: var(--paper); }

/* =========================================================
   CASE STUDY PAGE (/work/*.html)
========================================================= */
.case-hero{ padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 64px); }
.case-back{
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stone-600);
  margin-bottom: clamp(28px, 4vw, 44px);
  transition: color .2s var(--ease);
}
.case-back:hover{ color: var(--ink); }
.case-title{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-top: 4px;
}
.case-tagline{
  margin-top: 20px;
  max-width: 60ch;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--stone-600);
}
.case-meta{
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  margin-top: clamp(36px, 5vw, 52px);
  padding-top: clamp(28px, 4vw, 36px);
  border-top: 1px solid var(--line);
}
.case-meta-item{ display: flex; flex-direction: column; gap: 6px; }
.case-meta-label{
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone);
}
.case-meta-value{
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* App Store badge — used where a project is a real, downloadable app */
.app-store-badge{
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 40px);
  padding: 10px 18px;
  background: var(--ink);
  border-radius: 10px;
  transition: background .2s var(--ease);
}
.app-store-badge:hover{ background: var(--stone-600); }
.app-store-badge svg{
  width: 24px;
  height: 24px;
  fill: var(--paper);
  flex-shrink: 0;
}
.app-store-badge-text{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--paper);
}
.app-store-badge-text small{
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.app-store-badge-text strong{
  font-size: 1.05rem;
  font-weight: 600;
}
.project-text .app-store-badge{ margin-top: 14px; }
.case-media{ padding-bottom: clamp(56px, 8vw, 96px); }
.case-body{ padding-top: 0; padding-bottom: clamp(56px, 8vw, 96px); }
.case-body-inner{ max-width: 82ch; display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px); }
.case-section h2{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  letter-spacing: -0.01em;
}
.case-section p{
  margin-top: 14px;
  color: var(--stone-600);
  font-size: 1.02rem;
}
.case-nav{ background: var(--paper-2); }
.case-nav-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(28px, 4vw, 40px) var(--pad);
}
.case-nav-link{
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--stone-600);
  transition: color .2s var(--ease);
}
.case-nav-link:hover{ color: var(--ink); }
.case-nav-link--all{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--stone-600);
}

/* =========================================================
   LIGHTBOX (click any project screenshot to view it larger)
========================================================= */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  background: rgba(19,17,16,0.92);
  opacity: 0;
  transition: opacity .25s var(--ease);
  overflow: hidden;
}
.lightbox[hidden]{ display: none; }
.lightbox.is-open{ opacity: 1; }
.lightbox.is-zoomed{
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  padding: 32px;
}
.lightbox-image{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform .25s var(--ease);
  cursor: zoom-in;
}
.lightbox.is-open .lightbox-image{ transform: scale(1); }
.lightbox.is-zoomed .lightbox-image{
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  flex-shrink: 0;
  margin: 0 auto;
  cursor: zoom-out;
}
.lightbox-close{
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(245,242,236,0.12);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.lightbox-close:hover{ background: rgba(245,242,236,0.22); }
.lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,242,236,0.12);
  color: var(--paper);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.lightbox-arrow:hover{ background: rgba(245,242,236,0.22); }
.lightbox-arrow--prev{ left: 16px; }
.lightbox-arrow--next{ right: 16px; }
.lightbox-arrow[hidden]{ display: none; }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px){
  .primary-nav{ display: none; }
  .menu-toggle{ display: flex; }
  .project-grid{ grid-template-columns: 1fr; }
  .stage-row{ grid-template-columns: repeat(4, 1fr); gap: 28px 16px; }
  /* the bracket can't track the stage grid once column counts diverge,
     and the grouping doesn't read cleanly stacked either — drop it on mobile */
  .phase-row{ display: none; }
  .about-grid{ grid-template-columns: 1fr; }
  .about-portrait{ max-width: 180px; }
  .footer-contact-row{ flex-direction: column; align-items: flex-start; }
  .approach-sub-break{ display: none; }
}

@media (max-width: 520px){
  .stage-row{ grid-template-columns: 1fr 1fr; }
  .footer-row{ flex-direction: column; gap: 10px; text-align: center; }
  .case-meta{ gap: 24px; }
  .case-nav-row{ flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  [data-reveal], [data-reveal-immediate]{ opacity: 1; transform: none; transition: none; }
  .thumb{ animation: none; }
}
