/* ==========================================================================
   Kathia Teran — Portfolio
   Navy palette ("Color Spec — Navy") + interaction spec ("Portfolio — Navy
   (anchor 3) — states & motion"). Desktop values match the 1440px Figma frames.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces */
  --bg: #161b2b;
  --card: #1a1f31;
  --card-hover: #1d2336;
  --card-border: #2c3450;
  --card-border-hover: #9e9e9e;
  --thumb: #1f2539;
  --thumb-border: #262d44;
  --placeholder: #1e2334;

  /* Text */
  --text-1: #fcfcfc; /* primary — headlines, labels, CTAs */
  --text-2: #c4c7cf; /* secondary — body copy, nav at rest */
  --text-3: #a9adb8; /* tertiary — section labels, left column, numbers */
  --text-pressed-num: #5a6380;

  /* Lines (all #C4C7CF at different strengths) */
  --line: rgba(196, 199, 207, 0.16);
  --line-faint: rgba(196, 199, 207, 0.1);
  --line-strong: rgba(196, 199, 207, 0.48);
  --cross: rgba(196, 199, 207, 0.45);
  --outline: rgba(196, 199, 207, 0.4);
  --focus: rgba(196, 199, 207, 0.6);
  --ph-cross: rgba(196, 199, 207, 0.08);

  /* Shadows */
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout (1440 frame) */
  --page-max: 1440px;
  --rail: 240px; /* left column incl. 40px edge */
  --edge: 40px; /* page side margin */
  --gutter: 48px; /* rail line → content */
  --header-h: 104px;
  --cross-right: 116px; /* right grid cross sits at x = 1324 */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-small: 150ms; /* nav links, submenu cards */
  --t-cta: 200ms; /* CTAs, LinkedIn, anchor cards */
  --t-scroll: 600ms;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em { font-style: italic; }

:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text-1); color: var(--bg);
  padding: 10px 14px; border-radius: 4px;
  font: 500 14px/1 var(--ui);
}
.skip-link:focus { top: 16px; }

/* ---------- 3. Type styles ---------- */
.t-eyebrow { font: 300 12px/1.2 var(--sans); letter-spacing: 0.04em; color: var(--text-3); }
.t-eyebrow--13 { font-size: 13px; line-height: 1.3; }
.t-label { font: 500 12px/1.2 var(--sans); letter-spacing: 0.04em; color: var(--text-3); }
.t-index { font: 300 28px/35px var(--serif); letter-spacing: -0.01em; color: var(--text-3); }

.t-h1 {
  font: 400 57px/1.15 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.t-h2 {
  font: 400 44px/1.15 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.t-h1 em, .t-h2 em, .t-display em { font-weight: 300; font-style: italic; }
.t-display { font: 400 90px/1 var(--serif); letter-spacing: -0.01em; color: var(--text-1); }

.t-title-24 { font: 600 24px/1.2 var(--sans); color: var(--text-1); }
.t-title-22 { font: 600 22px/1.2 var(--sans); color: var(--text-1); }
.t-title-20 { font: 600 20px/1.2 var(--sans); color: var(--text-1); }
.t-title-16 { font: 600 16px/1.2 var(--sans); color: var(--text-1); }

.t-body-18 { font: 400 18px/1.5 var(--sans); color: var(--text-2); }
.t-body-17 { font: 400 17px/1.5 var(--sans); color: var(--text-2); }
.t-body-16 { font: 400 16px/1.6 var(--sans); color: var(--text-2); }
.t-body-15 { font: 400 15px/1.5 var(--sans); color: var(--text-2); }
.t-body-14 { font: 400 14px/1.5 var(--sans); color: var(--text-2); }
.t-small { font: 400 13px/1.5 var(--sans); color: var(--text-3); }
.t-caption { font: 400 12px/1.2 var(--sans); color: var(--text-3); }

/* ---------- 4. Grid furniture: crosses + lines ---------- */
.cross {
  position: absolute;
  width: 15px; height: 15px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    linear-gradient(var(--cross), var(--cross)) center / 1px 100% no-repeat,
    linear-gradient(var(--cross), var(--cross)) center / 100% 1px no-repeat;
  z-index: 1;
}

/* Placeholder (until real images are dropped in) */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background-color: var(--placeholder);
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--ph-cross) calc(50% - 0.5px), var(--ph-cross) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--ph-cross) calc(50% - 0.5px), var(--ph-cross) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  border: 1px solid var(--line);
  color: var(--text-3);
  font: 500 11px/1.3 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 16px;
  overflow: hidden;
}
.media-frame > img,
.media-frame > video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 5. Header / sticky nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: calc(var(--header-h) + 1px);
  transition: transform 250ms var(--ease-out), background-color 250ms var(--ease-out);
}
.site-header.is-solid {
  background: rgba(22, 27, 43, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__in {
  position: relative;
  max-width: var(--page-max);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 var(--edge) 1px;
}
/* header bottom line + crosses at x 240 / 920 / 1324 */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}
/* Crosses live inside the centred 1440 container so they always sit on the grid lines below */
.site-header__in > .cross { top: calc(100% - 0.5px); }
.site-header__in > .cross--a { left: calc(var(--rail) + 0.5px); }
/* follows the hero's 680fr / 520fr split (x = 920 at 1440) */
.site-header__in > .cross--b { left: calc(var(--rail) + (100% - var(--rail)) * 0.56667 + 0.5px); }
.site-header__in > .cross--c { left: auto; right: calc(var(--cross-right) - 7.5px); transform: translate(0, -50%); }

.logo {
  font: 500 22px/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--text-1);
  white-space: nowrap;
}

.main-nav { margin-left: auto; margin-right: 123px; position: relative; }
.main-nav__list { display: flex; align-items: center; gap: 40px; }

.nav-link,
.work-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font: 500 15px/18px var(--ui);
  color: var(--text-2);
  transition: color var(--t-small) var(--ease-out), transform var(--t-small) var(--ease-out), text-shadow var(--t-small) var(--ease-out);
}
@media (hover: hover) {
  .nav-link:hover,
  .work-toggle:hover {
    color: #ffffff;
    transform: translateY(-2px);
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  }
}
.nav-link[aria-current="page"] { color: #ffffff; font-weight: 700; transform: translateY(-2px); }
.work-toggle[aria-expanded="true"] { color: var(--text-1); }

.work-toggle__icon { position: relative; width: 10px; height: 10px; transition: transform 200ms var(--ease-in-out); }
.work-toggle__icon::before,
.work-toggle__icon::after {
  content: ""; position: absolute; background: currentColor;
}
.work-toggle__icon::before { left: 0; top: 4px; width: 10px; height: 2px; }
.work-toggle__icon::after { left: 4px; top: 0; width: 2px; height: 10px; transition: opacity 200ms var(--ease-in-out); }
.work-toggle[aria-expanded="true"] .work-toggle__icon { transform: rotate(360deg); }
.work-toggle[aria-expanded="true"] .work-toggle__icon::after { opacity: 0; }
.work-toggle__menu-label { display: none; }

/* Work submenu */
.submenu {
  position: absolute;
  top: 75px; /* 14px below the header line */
  left: 0;
  width: 238px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  visibility: hidden;
  pointer-events: none;
  /* stay visible until the last card has faded out: (n − 1) × 70ms + 200ms */
  transition: visibility 0s linear calc(var(--n, 4) * 70ms + 130ms);
}
.submenu.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
/* Open: cards fade in top → bottom, 70ms apart (0 / 70 / 140 / 210ms).
   Close: the same 200ms fade in reverse, bottom → top (210 / 140 / 70 / 0ms).
   --i (position from the top) and --ri (from the bottom) are set by main.js
   on the visible cards only, so the phone-only About / Contact items count
   just when they are shown. */
.submenu__item {
  opacity: 0;
  transition: opacity 200ms var(--ease-in-out);
  transition-delay: calc(var(--ri, 0) * 70ms);
}
.submenu.is-open .submenu__item { opacity: 1; transition-delay: calc(var(--i, 0) * 70ms); }
/* the − spins back to + as the top card fades out */
.work-toggle[aria-expanded="false"] .work-toggle__icon,
.work-toggle[aria-expanded="false"] .work-toggle__icon::after { transition-delay: calc((var(--n, 4) - 1) * 70ms); }
.submenu__item--mobile { display: none; }

.menu-card {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  font: 500 14px/17px var(--ui);
  color: var(--text-1);
  transition: background-color var(--t-small) var(--ease-out), border-color var(--t-small) var(--ease-out), box-shadow var(--t-small) var(--ease-out);
}
.menu-card span { transition: transform var(--t-small) var(--ease-out); }
@media (hover: hover) {
  .menu-card:hover { background: var(--card-hover); border-color: var(--card-border-hover); box-shadow: var(--shadow-card-hover); }
  .menu-card:hover span { transform: translateX(5px); }
}
.menu-card[aria-current="page"] { font-weight: 700; }

/* LinkedIn square button */
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--outline);
  border-radius: 4px;
  font: 700 15px/1 var(--sans);
  color: var(--text-1);
  transition: border-color var(--t-cta) var(--ease-out), background-color var(--t-cta), color var(--t-cta);
}
@media (hover: hover) { .icon-btn:hover { border-color: var(--text-1); } }
.icon-btn:active { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }

/* ---------- 6. Section skeleton ---------- */
main { display: block; }
.page { padding-top: calc(var(--header-h) + 1px); }

.sec { position: relative; border-top: 1px solid var(--line); }
.sec--flush { border-top: 0; }
.sec__in {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}
.sec__in > .cross--top-l { left: 240.5px; top: -0.5px; }
.sec__in > .cross--top-r { left: auto; right: calc(var(--cross-right) - 7.5px); top: -0.5px; transform: translate(0, -50%); }
.sec__in > .cross--rule { left: 240.5px; top: 98.5px; }

.rail {
  position: relative;
  border-right: 1px solid var(--line);
  padding: 47px 0 72px var(--edge);
}
.rail__index { display: block; width: 200px; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.rail__tags { margin-top: 21px; display: flex; flex-direction: column; gap: 12px; }
.rail__tags li { font: 300 15px/19px var(--sans); color: var(--text-3); }

.body { padding: 72px var(--edge) 72px var(--gutter); min-width: 0; }
.body--lp { padding-right: var(--gutter); } /* landing page content stops at x=1392 */

.eyebrow-row { margin-bottom: 30px; }

/* ---------- 7. Components ---------- */

/* Line Link CTA */
.line-cta {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  width: 100%;
  color: var(--text-1);
  border-radius: 4px;
}
.line-cta__label { font: 500 20px/24px var(--sans); padding-right: 11px; white-space: nowrap; }
.line-cta__line { flex: 1 1 auto; height: 1px; background: rgba(252, 252, 252, 0.6); min-width: 24px; }
.line-cta__box {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color var(--t-cta) var(--ease-out), background-color var(--t-cta) var(--ease-out);
}
.line-cta__arrow {
  font: 600 20px/24px var(--ui);
  transform: translateX(-3px);
  transition: transform var(--t-cta) var(--ease-out), color var(--t-cta) var(--ease-out);
}
@media (hover: hover) {
  .line-cta:hover .line-cta__box { border-color: var(--outline); }
  .line-cta:hover .line-cta__arrow { transform: translateX(0); }
}
.line-cta:active .line-cta__box { background: var(--text-1); border-color: var(--text-1); }
.line-cta:active .line-cta__arrow { color: var(--bg); }
.line-cta:focus-visible { outline-offset: 6px; }

/* Anchor link cards (hero) */
.anchor-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.anchor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 8px 20px 8px 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-cta) var(--ease-out), background-color var(--t-cta) var(--ease-out),
    border-color var(--t-cta) var(--ease-out), box-shadow var(--t-cta) var(--ease-out);
}
.anchor-card__thumb {
  flex: 0 0 72px; width: 72px; height: 48px;
  border: 1px solid var(--thumb-border);
  overflow: hidden;
}
.anchor-card__thumb .ph {
  border: 0; background-color: var(--thumb);
  font: 500 11px/1 var(--ui); letter-spacing: 0.08em; padding: 0;
}
.anchor-card__thumb > img { width: 100%; height: 100%; object-fit: cover; background: var(--thumb); }
.anchor-card__thumb > * { transition: transform var(--t-cta) var(--ease-out); }
.anchor-card__num { font: 500 12px/15px var(--ui); color: var(--text-3); min-width: 16px; transition: color var(--t-cta); }
.anchor-card__label { flex: 1 1 auto; font: 500 16px/19px var(--ui); color: var(--text-1); transition: color var(--t-cta); }
.anchor-card__arrow { font: 400 16px/19px var(--ui); color: var(--text-2); transition: transform var(--t-cta) var(--ease-out), color var(--t-cta); }
@media (hover: hover) {
  .anchor-card:hover {
    transform: translateY(-2px);
    background: var(--card-hover);
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-card-hover);
  }
  .anchor-card:hover .anchor-card__thumb > * { transform: scale(1.08); }
  .anchor-card:hover .anchor-card__num { color: var(--text-2); }
  .anchor-card:hover .anchor-card__arrow { color: var(--text-1); transform: translateY(5px); }
}
.anchor-card:active {
  transform: none;
  background: var(--text-1);
  border-color: var(--text-1);
  box-shadow: var(--shadow-card);
}
.anchor-card:active .anchor-card__label,
.anchor-card:active .anchor-card__arrow { color: var(--bg); }
.anchor-card:active .anchor-card__num { color: var(--text-pressed-num); }

/* Timeline steps (Problem / Solution / Outcome) */
.steps { display: flex; flex-direction: column; gap: 40px; }
.step { position: relative; padding-left: 36px; }
.step::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 13px; height: 13px;
  border: 1.5px solid var(--text-1);
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute; left: 6px; top: 8px;
  width: 1px; height: calc(100% + 40px);
  background: var(--line);
}
.step__title { font: 600 16px/19px var(--sans); color: var(--text-1); }
.step__text { margin-top: 7px; font: 400 14.5px/1.5 var(--sans); color: var(--text-2); max-width: 484px; }

/* Segmented carousel (crossfade) */
.carousel { width: 100%; }
.carousel__viewport {
  position: relative;
  aspect-ratio: 446 / 327;
  overflow: hidden;
  touch-action: pan-y; /* horizontal swipes change the image; vertical ones still scroll the page */
}
.carousel__viewport img { -webkit-user-drag: none; user-select: none; }
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden; /* hidden slides can't be clicked or tabbed to; hides once its fade-out ends */
  transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms;
}
.carousel__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.carousel__slide > img { width: 100%; height: 100%; object-fit: cover; object-position: left top; background: var(--placeholder); }
.carousel__controls { display: flex; align-items: center; gap: 16px; margin-top: 16px; height: 24px; }
.carousel__segments { flex: 1 1 auto; display: flex; gap: 6px; }
.seg { flex: 1 1 0; height: 24px; display: flex; align-items: center; }
.seg__track {
  position: relative; display: block;
  width: 100%; height: 2px;
  background: rgba(196, 199, 207, 0.2);
  overflow: hidden;
  transition: background-color var(--t-small) var(--ease-out);
}
@media (hover: hover) { .seg:hover .seg__track { background: rgba(196, 199, 207, 0.45); } }
.seg.is-active .seg__track { background: rgba(196, 199, 207, 0.75); }
.seg__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--text-1); }
.seg.is-active .seg__fill { animation: seg-fill var(--slide-ms, 2500ms) linear forwards; }
.is-paused .seg.is-active .seg__fill { animation-play-state: paused; }
.is-static .seg.is-active .seg__fill { animation: none; width: 100%; }
@keyframes seg-fill { from { width: 0; } to { width: 100%; } }
.carousel__arrows { display: flex; flex: 0 0 auto; }
.carousel__arrow {
  width: 24px; height: 24px;
  display: grid; place-items: center end;
  font: 400 18px/22px var(--ui);
  color: var(--text-2);
  transition: color var(--t-small);
}
@media (hover: hover) { .carousel__arrow:hover { color: var(--text-1); } }

/* Focus carousel (05 — three visible, centre in focus) */
.focus-carousel__stage { position: relative; aspect-ratio: 790 / 289; overflow: hidden; }
.focus-carousel__slide {
  position: absolute;
  top: 13.84%; left: 100%;
  width: 23.42%; height: 76.47%;
  opacity: 0;
  transition: left 300ms var(--ease-out), top 300ms var(--ease-out), width 300ms var(--ease-out),
    height 300ms var(--ease-out), opacity 300ms var(--ease-out);
}
.focus-carousel__slide[data-pos="prev"] { left: 0; opacity: 0.5; }
.focus-carousel__slide[data-pos="active"] { left: 25.95%; top: 0; width: 48.1%; height: 100%; opacity: 1; }
.focus-carousel__slide[data-pos="next"] { left: 76.58%; opacity: 0.5; }
.focus-carousel__slide[data-pos="before"] { left: -23.42%; }
.focus-carousel__slide[data-pos="after"] { left: 100%; }

/* Image placeholder used as a "link to lightbox" */
.media-btn { position: relative; display: block; width: 100%; cursor: zoom-in; border-radius: 0; }
/* Enlarge icon: fades in on hover / keyboard focus, always visible on touch */
.media-btn[data-lightbox]::after {
  content: "";
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  border: 1px solid var(--outline);
  border-radius: 4px;
  background: rgba(22, 27, 43, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FCFCFC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M9 21H3v-6'/%3E%3Cpath d='M21 3l-7 7'/%3E%3Cpath d='M3 21l7-7'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  opacity: 0;
  transition: opacity var(--t-small) var(--ease-out);
  pointer-events: none;
}
.media-btn[data-lightbox]:focus-visible::after { opacity: 1; }
@media (hover: hover) { .media-btn[data-lightbox]:hover::after { opacity: 1; } }
@media (hover: none) { .media-btn[data-lightbox]::after { opacity: 1; } }
.media-btn:focus-visible { outline-offset: 4px; }
/* Myli page: every image and placeholder gets the hero's 8px corners */
.cs .media-btn { border-radius: 8px; overflow: hidden; }
.cs .media-frame > img, .cs .media-frame > .ph,
.cs .media-btn > img, .cs .media-btn > .ph,
.cs .lightbox__stage img { border-radius: 8px; }
/* Landing page: same 8px corners (4px on the small 72 × 48 anchor thumbnails) */
.carousel__viewport, .carousel__slide > .ph,
.focus-carousel__slide, .focus-carousel__slide > .ph,
.project__media, .project__media > .ph,
.lp-about__portrait .ph, .lp-about__photo { border-radius: 8px; }
.focus-carousel__slide { overflow: hidden; }
.focus-carousel__slide > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; } /* wide site screenshots: keep the logo and headline in view */
.anchor-card__thumb { border-radius: 4px; }

/* ---------- 8. Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); }
.site-footer__in {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  height: 120px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--edge) 0 56px;
}
.site-footer__in--rail::before {
  content: ""; position: absolute; left: 240px; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.site-footer .cross--top-l { left: 240.5px; top: -0.5px; }
.site-footer .cross--top-r { left: auto; right: calc(var(--cross-right) - 7.5px); top: -0.5px; transform: translate(0, -50%); }
.site-footer__copy { font: 400 13px/16px var(--sans); color: var(--text-3); }
.site-footer__top { font: 400 13px/16px var(--sans); color: var(--text-3); transition: color var(--t-small); }
.site-footer__top span { font-family: var(--ui); }
@media (hover: hover) { .site-footer__top:hover { color: var(--text-1); } }
.site-footer .icon-btn { justify-self: end; }

/* Floating back-to-top (mobile only) */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 36px; height: 36px;
  display: none; place-items: center;
  border: 1px solid #737373; border-radius: 4px;
  background: rgba(22, 27, 43, 0.92);
  color: var(--text-1);
  font: 400 16px/1 var(--ui);
  opacity: 0; transform: translateY(8px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.to-top.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

/* 01 Hero */
.lp-hero .sec__in { grid-template-columns: var(--rail) minmax(0, 680fr) minmax(0, 520fr); }
.lp-hero .rail { padding-top: 46px; }
.lp-hero .sec__in > .cross--rule { top: 97.5px; }
.lp-hero__main { padding: 72px var(--edge) 83px var(--gutter); min-width: 0; }
.lp-hero__aside {
  border-left: 1px solid var(--line-faint);
  padding: 0 var(--edge) 68px;
  display: flex;
  align-items: flex-end;
}
.lp-hero__title { margin-top: 13px; }
.approach {
  position: relative;
  margin-top: 54px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 152px minmax(0, 420px);
  padding-top: 26px;
}
.approach .cross { top: -0.5px; }
.approach .cross--a { left: 0.5px; }
.approach .cross--b { left: 124.5px; }
.approach__label { padding: 4px 0 0 12px; }
.approach__text { font: 400 16px/1.3 var(--sans); color: var(--text-2); }
.lp-hero__cta { margin-top: 73px; }

/* 02 / 03 — case study + proposal */
.lp-case__grid {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 446px);
  justify-content: space-between;
  align-items: center;
  column-gap: 48px;
}
.lp-case__intro { margin-top: 20px; max-width: 520px; }
.lp-case__rule { margin-top: 40px; height: 1px; background: var(--line); }
.lp-case__steps { margin-top: 40px; }
.lp-case__media { display: flex; flex-direction: column; gap: 57px; }

.rail__stat {
  position: absolute;
  left: var(--edge);
  top: 356px;
  width: 200px;
  border-top: 1px solid var(--line-strong);
  padding-top: 39px;
}
.rail__stat .cross { left: 0.5px; top: -0.5px; }
.rail__stat-num { font: 400 64px/79px var(--serif); letter-spacing: -0.01em; color: var(--text-3); }
.rail__stat-text { margin-top: 1px; font: 400 13px/1.5 var(--sans); color: var(--text-3); }

/* 04 — e-commerce */
.lp-shop__title { margin-top: 14px; }
.lp-shop__grid {
  margin-top: 47px;
  display: grid;
  grid-template-columns:
    minmax(0, 200fr) minmax(0, 32fr) minmax(0, 200fr) minmax(0, 16fr) minmax(0, 204fr)
    minmax(0, 32fr) minmax(0, 200fr) minmax(0, 16fr) minmax(0, 204fr);
  grid-template-rows: auto auto;
}
.lp-shop__intro { grid-column: 1; grid-row: 1; }
.lp-shop__intro h3 { font: 400 24px/1.15 var(--serif); letter-spacing: -0.01em; color: var(--text-1); }
.lp-shop__intro p { margin-top: 16px; }
.project { display: contents; }
.project__text {
  grid-row: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  text-align: right;
}
.project__num { font: 500 13px/16px var(--sans); color: var(--text-3); }
.project__name { margin-top: 12px; }
.project__desc { margin-top: 16px; }
.project__meta { font: 400 12px/14px var(--sans); color: var(--text-3); }
.project__stat { margin-top: 12px; font: 600 16px/19px var(--sans); color: var(--text-1); }
.project__media { grid-row: 1; align-self: start; aspect-ratio: 204 / 440; overflow: hidden; }
.project__media > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; } /* full-page screenshots: crop the sides, keep the top */
.project--a .project__text { grid-column: 3; margin-bottom: 60px; } /* stops at its own image's bottom, not project 02's (which sits 60px lower) */
.project--a .project__media { grid-column: 5; }
.project--b .project__text { grid-column: 7; margin-top: 60px; }
.project--b .project__media { grid-column: 9; margin-top: 60px; }
.lp-shop__cta { grid-column: 1 / 6; grid-row: 2; margin-top: 0; }

/* 05 — web & dev */
.lp-web__title { margin-top: 14px; }
.lp-web__grid {
  margin-top: 47px;
  display: grid;
  grid-template-columns: minmax(0, 790fr) minmax(0, 266fr);
  column-gap: 48px;
  row-gap: 10px;
}
.lp-web__side h3 { font: 600 20px/24px var(--sans); color: var(--text-1); }
.lp-web__side p { margin-top: 16px; }
.lp-web__controls { grid-column: 1; }
.lp-web__cta { grid-column: 2; align-self: center; }

/* 06 — how I work */
.lp-about__top {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(0, 280px);
  justify-content: space-between;
  column-gap: 48px;
}
.lp-about__title { margin-top: 14px; }
.lp-about__intro { margin-top: 16px; max-width: 560px; }
.lp-about__portrait { margin-top: 26px; }
.lp-about__portrait .ph { aspect-ratio: 280 / 240; height: auto; }
.lp-about__photo { display: block; width: 100%; height: auto; aspect-ratio: 280 / 240; object-fit: cover; object-position: 50% 30%; background: var(--placeholder); }
.lp-about__portrait .line-cta { margin-top: 16px; }
.process {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
}
.process__item { border-top: 1px solid var(--line); padding-top: 16px; }
.process__num { font: 500 12px/14px var(--sans); color: var(--text-3); }
.process__title { margin-top: 13px; }
.process__text { margin-top: 16px; max-width: 234px; }
.ai-bar {
  position: relative;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  padding-top: 17px;
}
.ai-bar__tick { position: absolute; top: -9px; width: 1px; height: 8px; background: var(--line); }
.ai-bar__label { padding-top: 3px; font: 600 12px/14px var(--sans); letter-spacing: 0.04em; color: var(--text-1); }
.ai-bar__text { grid-column: 2 / 5; }

/* 07 — final CTA */
.lp-final .body { padding-top: 104px; padding-bottom: 111px; }
.final-cta {
  margin-top: 113px;
  margin-left: 6px;
  max-width: 880px;
  height: 52px;
  display: flex; align-items: center;
  color: var(--text-1);
  border-radius: 6px;
}
.final-cta__label { font: 500 20px/24px var(--sans); white-space: nowrap; padding-right: 24px; }
.final-cta__line { flex: 1 1 auto; height: 1px; background: rgba(252, 252, 252, 0.6); transition: background-color 150ms var(--ease-out); }
.final-cta__box { position: relative; flex: 0 0 52px; width: 52px; height: 52px; margin-left: 32px; display: grid; place-items: center; border-radius: 6px; transition: background-color 100ms; }
.final-cta__border {
  position: absolute; inset: 0;
  border: 1px solid var(--outline);
  border-radius: 6px;
  transform: rotate(90deg);
  transition: border-color 150ms var(--ease-out);
}
.final-cta.is-visible .final-cta__border { animation: border-settle 600ms var(--ease-out) forwards; }
@keyframes border-settle { from { transform: rotate(90deg); } to { transform: rotate(0deg); } }
.final-cta__arrow { width: 24px; height: 24px; transition: transform 150ms var(--ease-out); }
.final-cta__arrow path { stroke: currentColor; }
@media (hover: hover) {
  .final-cta:hover .final-cta__arrow { transform: rotate(-45deg); }
  .final-cta:hover .final-cta__border { border-color: var(--text-1); }
  .final-cta:hover .final-cta__line { background: var(--text-1); }
}
.final-cta:active .final-cta__box { background: var(--text-1); color: var(--bg); }
.final-cta:active .final-cta__arrow { transform: rotate(-45deg); }

/* ==========================================================================
   CASE STUDY PAGE (Myli)
   ========================================================================== */
.cs .body { padding-bottom: 80px; }

/* Shared header row: heading left, short intro right */
.cs-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  column-gap: 52px;
  align-items: start;
}
.cs-head__title { margin-top: 18px; max-width: 760px; }
.cs-head__intro { margin-top: 40px; }

/* Hero */
.cs-hero .rail { padding-top: 47px; }
.toc { margin-top: 44px; }
.toc__list { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; line-height: 16px; }
.toc__link {
  display: inline-block;
  font: 300 13px/16px var(--sans);
  color: var(--text-3);
  transition: color var(--t-small);
}
.toc__link span { display: inline-block; min-width: 22px; }
.toc__link.is-current { font-weight: 500; color: var(--text-1); }
@media (hover: hover) { .toc__link:hover { color: var(--text-1); } }
.toc__arrow { font-family: var(--ui); font-weight: 400; }

.cs-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  column-gap: 52px;
}
.cs-hero .body { padding-top: 40px; padding-bottom: 69px; }
.back-link { display: inline-block; font: 500 13px/16px var(--sans); color: var(--text-2); transition: color var(--t-small); }
.back-link span { font-family: var(--ui); display: inline-block; transition: transform var(--t-small) var(--ease-out); }
@media (hover: hover) { .back-link:hover { color: var(--text-1); } .back-link:hover span { transform: translateX(-3px); } }
.cs-hero__eyebrow { margin-top: 32px; }
.cs-hero__title { margin-top: 18px; font-size: 50px; }
.cs-hero__intro { margin-top: 35px; max-width: 600px; }
.cs-hero__media { margin-top: 70px; max-width: 612px; }
.cs-hero__media .media-frame { aspect-ratio: 1224 / 643; overflow: hidden; border-radius: 8px; } /* the app's own shape (1620 × 850 stage) */
.cs-hero__media .media-frame > * { animation: hero-settle 1.2s var(--ease-out) both; }
.cs-hero__media .media-btn { height: 100%; }
.cs-hero__media .media-btn > img { width: 100%; height: 100%; object-fit: cover; }
@keyframes hero-settle { from { transform: scale(1.06); } to { transform: scale(1); } }
.cs-hero__caption { margin-top: 16px; }

.meta { padding-top: 64px; }
.meta__row { border-top: 1px solid var(--line); padding: 11px 0 18px; }
.meta__row dt { font: 500 12px/1.2 var(--sans); letter-spacing: 0.04em; color: var(--text-3); }
.meta__row dd { margin-top: 6px; font: 400 14px/1.4 var(--sans); color: var(--text-1); }
.quick { margin-top: 33px; }
.quick__list { margin-top: 15px; display: flex; flex-direction: column; gap: 12px; }
.pill {
  display: flex; align-items: center;
  height: 47px;
  padding: 0 21px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font: 500 14px/17px var(--sans);
  color: var(--text-1);
  transition: border-color var(--t-cta) var(--ease-out), background-color var(--t-cta) var(--ease-out), transform var(--t-cta) var(--ease-out);
}
.pill .ext, .pill .play { font-family: var(--ui); display: inline-block; transition: transform var(--t-cta) var(--ease-out); }
.pill .play { margin-right: 8px; font-size: 13px; }
.pill .ext { margin-left: 4px; }
.pill--primary { background: var(--text-1); border-color: var(--text-1); color: var(--bg); }
@media (hover: hover) {
  .pill:hover { border-color: var(--text-1); }
  .pill:hover .ext { transform: translate(2px, -2px); }
  .pill--primary:hover { background: #ffffff; transform: translateY(-2px); }
}
.pill:active { background: var(--text-1); color: var(--bg); }

/* Problem & bet */
.cs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; }
.cs-problem__cols { margin-top: 40px; }
.cs-problem__cols p { margin-top: 9px; }
.stats { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
.stat { border-top: 1px solid var(--line); padding-top: 20px; }
.stat__num { font: 400 42px/52px var(--serif); letter-spacing: -0.01em; color: var(--text-1); }
.stat__text { margin-top: 8px; max-width: 320px; }
.cs-problem .sources { margin-top: 28px; }
.cs-problem .body { padding-bottom: 50px; }

/* Work items (zig-zag) */
.works {
  margin-top: 88px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.works__col { display: flex; flex-direction: column; gap: 53px; }
.works__col--offset { padding-top: 300px; }
.works__col .line-cta { margin-top: auto; max-width: 520px; }
.work__media { aspect-ratio: 540 / 360; }
.work__media .media-btn { height: 100%; }
.media-btn > img { width: 100%; height: 100%; object-fit: cover; }
.work__label { margin-top: 24px; }
.work__title { margin-top: 9px; max-width: 520px; }
.work__text { margin-top: 11px; max-width: 500px; }
.work__link { display: inline-block; margin-top: 12px; font: 500 12px/15px var(--sans); color: var(--text-1); }
.work__link span { font-family: var(--ui); display: inline-block; transition: transform var(--t-small) var(--ease-out); }
@media (hover: hover) { .work__link:hover span { transform: translate(2px, -2px); } }

/* Brand identity */
.brand-grid {
  margin-top: 76px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 50px;
}
.brand-grid .media-frame { aspect-ratio: 540 / 360; }
.block__title { margin-top: 9px; }
.block__text { margin-top: 10px; max-width: 500px; }
.logo-row { margin-top: 44px; display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px; }
.logo-row .media-frame { aspect-ratio: 1; }
.swatches { margin-top: 40px; display: grid; grid-template-columns: repeat(5, 100px); column-gap: 8px; row-gap: 26px; }
.swatch__chip { display: block; width: 60px; height: 29px; border: 1px solid var(--line); border-radius: 4px; }
.swatch__name { margin-top: 8px; font: 500 11px/13px var(--sans); color: var(--text-1); }
.swatch__hex { margin-top: 2px; font: 400 11px/13px var(--sans); color: var(--text-3); }
.specimen { margin-top: 66px; }
.specimen__serif { display: flex; align-items: flex-start; gap: 24px; }
.specimen__aa { font: 500 77px/93px "Cormorant Garamond", Georgia, serif; color: var(--text-1); }
.specimen__line { margin-top: 26px; font: italic 500 23px/28px "Cormorant Garamond", Georgia, serif; color: var(--text-1); }
.specimen__note { margin-top: 3px; }
.specimen__rule { margin-top: 16px; height: 1px; background: var(--line); }
.specimen__ui { margin-top: 17px; font: 600 16px/22px "Manrope", system-ui, sans-serif; color: var(--text-1); }
.specimen__ui + .t-caption { margin-top: 6px; }
.brand-cta { margin-top: 32px; max-width: 520px; }

/* Iteration */
.evolution {
  margin-top: 88px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
}
.evo { position: relative; }
.evo__media { aspect-ratio: 352 / 260; }
.evo__media .media-btn { height: 100%; }
.evo__arrow {
  position: absolute; top: 50%; right: -24px;
  transform: translateY(-50%);
  font: 600 20px/24px var(--ui); color: var(--text-1);
}
.evo__fig { position: relative; }
.evo__title { margin-top: 20px; }
.evo__text { margin-top: 7px; max-width: 330px; }
.decisions { margin-top: 52px; }
.decisions__list { margin-top: 15px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
.decision {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
}
.decision__num { padding-top: 2px; font: 500 12px/15px var(--sans); color: var(--text-3); }
.decision__text { margin-top: 8px; }

/* Final design */
.video {
  position: relative;
  margin-top: 68px;
  aspect-ratio: 1112 / 626;
  overflow: hidden;
  background: var(--placeholder);
}
.video__el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__el:not(.has-src) { display: none; }
.video__ph { position: absolute; inset: 0; padding-top: 96px; }
.ui-glyph { font-family: var(--ui); }
.video.has-src .video__ph { display: none; }
.video__play {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--text-1);
  color: var(--bg);
  display: grid; place-items: center;
  font: 600 22px/1 var(--ui);
  padding-left: 4px;
  transition: transform var(--t-cta) var(--ease-out), background-color var(--t-cta);
}
@media (hover: hover) { .video__play:hover { transform: translate(-50%, -50%) scale(1.06); background: #ffffff; } }
.video__chip {
  position: absolute; left: 20px; bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  font: 500 12px/15px var(--sans);
  color: var(--text-1);
}
.video.is-playing .video__play,
.video.is-playing .video__chip { opacity: 0; pointer-events: none; }
.video__after {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  column-gap: 72px;
  align-items: center;
}
.video__note { font: 300 13px/16px var(--sans); color: var(--text-3); }
.walkthroughs {
  margin-top: 68px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.walkthroughs .video { margin-top: 0; aspect-ratio: 1600 / 838; border-radius: 8px; } /* same shape as the prototype recordings (1620 × 850 stage) */
.walkthrough .video__note { margin-top: 16px; }
.walkthrough__cta { margin-top: 24px; max-width: 520px; }
.cs-final .works { margin-top: 94px; }

/* Design system */
.ds-grid {
  margin-top: 68px;
  display: grid;
  grid-template-columns: minmax(0, 700px) minmax(0, 360px);
  justify-content: space-between;
  column-gap: 52px;
}
.ds-grid .media-frame { aspect-ratio: 700 / 460; }
.ds-grid .media-btn { height: 100%; }
.num-list { margin-top: 15px; }
.num-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 10px 0 11px;
}
.num-list__num { font: 500 12px/15px var(--sans); color: var(--text-3); }
.num-list__text { font: 400 15px/18px var(--sans); color: var(--text-1); }
.color-key { margin-top: 44px; }
.color-key__list { margin-top: 15px; display: flex; flex-direction: column; gap: 11px; }
.color-key__list li { display: grid; grid-template-columns: 24px 116px minmax(0, 1fr); align-items: center; }
.color-key__dot { width: 14px; height: 14px; border-radius: 50%; }
.color-key__type { font: 500 14px/17px var(--sans); color: var(--text-1); }
.color-key__name { font: 400 14px/17px var(--sans); color: var(--text-2); }
.ds-cta { margin-top: 30px; max-width: 520px; }

/* What's next */
.next-grid { margin-top: 47px; }
.num-list--next li { padding: 14px 0 26px; }
.num-list--next .num-list__text { line-height: 18px; }
.metrics { margin-top: 15px; }
.metrics li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 11px 0 24px;
}
.metrics__value { font: 600 20px/24px var(--sans); color: var(--text-1); }
.reflection { margin-top: 56px; }
.reflection blockquote { margin: 13px 0 0; max-width: 900px; font: 400 24px/1.35 var(--serif); color: var(--text-1); }
.res-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 140px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-cta) var(--ease-out), background-color var(--t-cta) var(--ease-out),
    border-color var(--t-cta) var(--ease-out), box-shadow var(--t-cta) var(--ease-out);
}
.res-card__arrow { position: absolute; top: 18px; right: 15px; font: 600 16px/19px var(--ui); color: var(--text-1); transition: transform var(--t-cta) var(--ease-out); }
.res-card__title { font: 600 16px/19px var(--sans); color: var(--text-1); }
.res-card__meta { margin-top: 9px; font: 400 13px/16px var(--sans); color: var(--text-3); }
@media (hover: hover) {
  .res-card:hover { transform: translateY(-2px); background: var(--card-hover); border-color: var(--card-border-hover); box-shadow: var(--shadow-card-hover); }
  .res-card:hover .res-card__arrow { transform: translate(2px, -2px); }
}
.res-card:active { transform: none; }
.cs-next-steps .body { padding-bottom: 96px; }

/* Next project */
.cs-nextproj .rail { padding-top: 56px; }
.cs-nextproj__grid {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 454px);
  justify-content: space-between;
  column-gap: 58px;
}
.cs-nextproj__intro { margin-top: 40px; }
.cs-nextproj .line-cta { margin-top: 28px; }

/* Lightbox */
.lightbox {
  width: fit-content;
  max-width: 92vw;
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-1);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 13, 22, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in 200ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
/* stage takes the image's own shape (--ratio is set by the script) */
.lightbox__stage { --ratio: 1.5; width: min(1200px, 92vw, calc(86vh * var(--ratio))); aspect-ratio: var(--ratio); }
.lightbox__stage .ph { font-size: 13px; }
.lightbox__stage img { width: 100%; height: 100%; object-fit: contain; }
/* Tall page screenshots: open at a readable width and scroll, instead of shrinking to the screen height */
.lightbox__stage.is-tall { width: min(600px, 92vw); aspect-ratio: auto; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 8px; }
.lightbox__stage.is-tall img { height: auto; }
.lightbox__close {
  position: absolute; top: -48px; right: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--outline); border-radius: 4px;
  display: grid; place-items: center;
  font: 400 20px/1 var(--ui); color: var(--text-1);
}

/* ==========================================================================
   CASE STUDY PAGE (GCCJ — Brand & Web Revitalization)
   Reuses the Myli case-study layout above; only these slots differ.
   ========================================================================== */
.cs--gccj .cs-hero__media .media-frame { aspect-ratio: 2122 / 1164; } /* the homepage export's own shape */
.brand-grid .gccj-styleguide { aspect-ratio: 540 / 380; }
.gccj-styleguide .media-btn { height: 100%; }
.gccj-block { margin-top: 40px; }
.media-btn > img.img-contain { object-fit: contain; background: var(--img-bg, transparent); } /* very wide exports: show all of it, pad with the image's own background */
.media-btn > img.img-top { object-position: top; }
/* Carousel inside a work card (e-commerce wireframes): same frame as the other work images */
.work__carousel .carousel__viewport { aspect-ratio: 540 / 360; }
.carousel__slide > .media-btn { height: 100%; }
.slide-chip {
  position: absolute; left: 16px; bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  font: 500 12px/15px var(--sans);
  color: var(--text-1);
  pointer-events: none;
} /* taller exports: keep the heading in view; the lightbox shows the whole image */

/* Client palette: 80 × 38 chips, two rows of five */
.swatches--gccj { grid-template-columns: repeat(5, 80px); column-gap: 16px; row-gap: 32px; }
.swatches--gccj .swatch__chip { width: 80px; height: 38px; }

/* Client type specimen: Nunito Sans (brand) + Source Serif 4 (articles) */
.specimen--gccj { margin-top: 43px; }
.specimen--gccj .specimen__serif { gap: 46px; }
.specimen--gccj .specimen__aa { font: 700 65px/116px "Nunito Sans", system-ui, sans-serif; }
.specimen--gccj .specimen__line { margin-top: 20px; font: 700 23px/31px "Nunito Sans", system-ui, sans-serif; }
.specimen--gccj .specimen__ui { font: 400 18px/25px "Source Serif 4", Georgia, serif; }

@media (max-width: 860px) {
  .swatches--gccj { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 8px; }
  .swatches--gccj .swatch__chip { width: 100%; }
  .specimen--gccj .specimen__serif { gap: 24px; }
}

/* ==========================================================================
   CASE STUDY PAGE (E-commerce — Marquee Surface + Butter & Glow)
   Reuses the case-study layout above; only these slots differ.
   ========================================================================== */
.cs--ecom .cs-hero__media .media-frame { aspect-ratio: 16 / 10; } /* Figma slot 612 × 383 */
.cs--ecom .cs-hero__media .carousel__viewport { aspect-ratio: 16 / 10; } /* hero carousel: same 612 × 383 slot */

/* "↓" links scroll down the page, so their arrow nudges down (not up-right) */
.pill .ext--down { margin-left: 6px; }
@media (hover: hover) {
  .pill:hover .ext--down { transform: translateY(2px); }
  .work__link--down:hover span { transform: translateY(2px); }
}

.ecom-brief .decisions { margin-top: 36px; }

/* Name + note rows (What I recommended / Where they are now): 18px names */
.metrics--names .metrics__value { font-size: 18px; line-height: 22px; }

/* BigCommerce vs Shopify: four static cards, text centred vertically */
.compare { margin-top: 88px; }
.compare__list {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 20px;
}
.compare-card {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 140px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}
.compare-card__title { font: 600 16px/19px var(--sans); color: var(--text-1); }
.compare-card__text { margin-top: 9px; font: 400 13px/16px var(--sans); color: var(--text-2); }
.compare .sources { margin-top: 20px; line-height: 1.4; }
.sources__link { text-decoration: underline; text-underline-offset: 2px; transition: color var(--t-small); }
@media (hover: hover) { .sources__link:hover { color: var(--text-1); } }

/* Store screen recordings: 540 × 338 (16:10) players with a title + note */
.store-videos { margin-top: 83px; }
.store-videos .walkthroughs { margin-top: 19px; }
.store-videos .video { aspect-ratio: 1600 / 856; } /* same shape as the store recordings */
.walkthrough__title { margin-top: 20px; }
.walkthrough__text { margin-top: 7px; max-width: 480px; }

@media (max-width: 1080px) {
  .compare__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ecom-brief .decisions { margin-top: 32px; }
  .compare { margin-top: 56px; }
  .store-videos { margin-top: 56px; }
}
@media (max-width: 600px) {
  .compare__list { grid-template-columns: minmax(0, 1fr); }
  .compare-card { min-height: 0; }
}

/* ==========================================================================
   WEB & DEV PAGE (five Wix client builds)
   Figma: 04 - UI Prototypes → Web & Dev — UI Prototype.
   Reuses the case-study layout above; only these slots differ.
   ========================================================================== */

/* Hero: tighter "On this page" list and meta rows, wider intro */
.cs--webdev .toc { margin-top: 37px; }
.cs--webdev .toc__list { margin-top: 12px; gap: 8px; }
.cs--webdev .cs-hero .body { padding-bottom: 61px; }
.cs--webdev .cs-hero__intro { max-width: 660px; }
.cs--webdev .back-link, .cs--about .back-link { display: flex; width: max-content; gap: 4px; } /* block-level so the 16px link doesn't take the 24px body line */
.meta--tight .meta__row { padding: 9px 0 14px; }
.meta--tight .meta__row dd { margin-top: 2px; }

/* Included in every build: six columns across the full content width */
.build { margin-top: 48px; }
.build__list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 28px;
}
.build__item { border-top: 1px solid var(--line); padding-top: 13px; }
.build__text { margin-top: 5px; }

/* Project sections: text 580 | 51 gap | carousel 481 */
.wd-proj .body { padding-bottom: 87px; }
.wd-proj__grid {
  display: grid;
  grid-template-columns: minmax(0, 580fr) minmax(0, 481fr);
  column-gap: 51px;
  align-items: start;
}
.wd-proj__text { margin-top: 40px; max-width: 560px; display: flex; flex-direction: column; gap: 28px; }
.wd-block > p { margin-top: 8px; }
.wd-block > .t-label { margin-top: 0; }
.wd-proj__media { margin-top: 18px; } /* lines up with the heading (eyebrow + 18px) */
.wd-proj .carousel__viewport { aspect-ratio: 481 / 361; }

/* Keyword tags: outlined = shared with other projects, filled = this project only */
.kw-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.kw {
  padding: 6px 12px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font: 500 11px/13px var(--sans);
  color: var(--text-2);
  white-space: nowrap;
}
.kw--unique { background: var(--text-1); border-color: var(--text-1); color: var(--bg); }

/* Site + prototype links */
.wd-links { padding-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.wd-links .pill { padding: 0 20px; }

/* PageSpeed scores: up to three 150px columns */
.speed { margin-top: 32px; }
.speed__list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 150px);
  justify-content: space-between;
}
.speed__item { border-top: 1px solid var(--line); padding-top: 9px; }
.speed__num { font: 400 42px/52px var(--serif); letter-spacing: -0.01em; color: var(--text-1); }
.speed__metric { margin-top: 7px; font: 400 14px/17px var(--sans); color: var(--text-2); }
.speed__device { margin-top: 3px; font: 400 12px/14px var(--sans); color: var(--text-3); }

/* Before / after slider (Sponsorship Catalyst) */
.ba-wrap { margin-top: 40px; }
.ba {
  --pos: 50%;
  position: relative;
  margin-top: 10px;
  aspect-ratio: 481 / 312;
  border-radius: 8px;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y; /* horizontal drags move the handle, vertical ones still scroll */
  user-select: none;
  -webkit-user-select: none;
}
.ba__img { position: absolute; inset: 0; }
.ba__img > .ph, .ba__img > img { width: 100%; height: 100%; object-fit: cover; object-position: left top; border-radius: 8px; }
.ba__img--after { clip-path: inset(0 0 0 var(--pos)); }
.ba__tag {
  position: absolute; bottom: 14px; z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg); /* navy pill so the label reads on light or dark screenshots */
  font: 500 11px/13px var(--sans);
  letter-spacing: 0.04em;
  color: var(--text-1);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: zoom-in;
  transition: background-color var(--t-small) var(--ease-out);
}
/* same enlarge glyph as the image buttons */
.ba__tag::after {
  content: ""; width: 10px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FCFCFC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M9 21H3v-6'/%3E%3Cpath d='M21 3l-7 7'/%3E%3Cpath d='M3 21l7-7'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
}
@media (hover: hover) { .ba__tag:hover { background: var(--card-hover); } }
.ba__tag:focus-visible { outline: 1px solid var(--focus); outline-offset: 3px; }
.ba__tag--before { left: 16px; }
.ba__tag--after { right: 16px; }
.ba__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2;
  width: 2px;
  transform: translateX(-50%);
  background: var(--text-1);
  pointer-events: none;
}
.ba__handle {
  position: absolute; top: 50%; left: var(--pos); z-index: 2;
  width: 40px; height: 40px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border: 1.5px solid var(--text-1);
  border-radius: 50%;
  background: var(--bg);
  font: 500 14px/17px var(--ui);
  color: var(--text-1);
  white-space: pre;
  pointer-events: none;
  transition: transform var(--t-cta) var(--ease-out), background-color var(--t-cta) var(--ease-out), color var(--t-cta) var(--ease-out);
}
@media (hover: hover) { .ba:hover .ba__handle { transform: translate(-50%, -50%) scale(1.06); } }
.ba.is-dragging .ba__handle { background: var(--text-1); color: var(--bg); }
/* The range input is there for keyboards and screen readers; the pointer is handled by main.js */
.ba__range {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.ba__range:focus-visible ~ .ba__handle { outline: 1px solid var(--focus); outline-offset: 4px; }
.ba__caption { margin-top: 12px; line-height: 1.4; }

@media (max-width: 1080px) {
  .wd-proj__grid { grid-template-columns: minmax(0, 1fr); }
  .wd-proj__media { margin-top: 48px; max-width: 560px; }
  .build__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cs--webdev .cs-hero .body, .wd-proj .body { padding-bottom: 64px; }
  .build { margin-top: 40px; }
  .wd-proj__text { margin-top: 28px; }
  .wd-proj__media { margin-top: 40px; }
}
@media (max-width: 600px) {
  .build__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .speed__list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .speed__num { font-size: 36px; line-height: 44px; }
}

/* ==========================================================================
   ABOUT PAGE
   Figma: 04 - UI Prototypes → About — UI Prototype. The Figma portrait is left
   out on purpose (the photo lives on the landing page only); the right column
   holds short facts in the case-study meta style, starting level with the title.
   ========================================================================== */
.cs--about .cs-hero .body { padding-bottom: 88px; }
.about-lead { max-width: 620px; } /* colour + weight come from .t-body-18: #C4C7CF, Regular */

/* Education: school + place | degree + details */
.edu { margin-top: 48px; }
.edu__list { margin-top: 10px; border-bottom: 1px solid var(--line); }
.edu__row {
  display: grid;
  grid-template-columns: 270px minmax(0, 400px);
  column-gap: 30px;
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.edu__school, .edu__degree { font: 600 16px/19px var(--sans); color: var(--text-1); }
.edu__place { margin-top: 3px; font: 400 12px/14px var(--sans); color: var(--text-3); }
.edu__details { margin-top: 3px; }

/* Resume button: white pill with a muted "PDF ↓" */
.resume-btn { width: max-content; max-width: 100%; margin-top: 35px; padding: 0 22px; gap: 10px; }
.resume-btn__meta { color: var(--text-pressed-num); }
.resume-btn .ui-glyph { display: inline-block; transition: transform var(--t-cta) var(--ease-out); }
@media (hover: hover) { .resume-btn:hover .ui-glyph { transform: translateY(2px); } }

/* What I bring: four columns, 260 wide, 24px apart */
.about-bring .body { padding-bottom: 92px; }
.about-bring__title { max-width: 620px; }
.bring {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 32px;
}
.bring__item { border-top: 1px solid var(--line); padding-top: 19px; }
.bring__num { display: block; font: 500 12px/14px var(--sans); color: var(--text-3); }
.bring__title { margin-top: 10px; font: 600 18px/22px var(--sans); color: var(--text-1); }
.bring__text { margin-top: 10px; max-width: 244px; }

@media (max-width: 1080px) {
  .bring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bring__text { max-width: 320px; }
}
@media (max-width: 860px) {
  .cs--about .cs-hero .body, .about-bring .body { padding-bottom: 64px; }
  .edu { margin-top: 40px; }
}
@media (max-width: 600px) {
  .edu__row { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .bring { grid-template-columns: minmax(0, 1fr); }
  .bring__text { max-width: none; }
}

/* ==========================================================================
   CONTACT PAGE
   Figma: 04 - UI Prototypes → Contact — UI Prototype, and
   "Contact — Success state (replaces the form)". Intro 420 | 52 gap | form 640.
   ========================================================================== */
.contact { --error: #f0a3a3; }
.cs--contact .cs-hero .body { padding-bottom: 88px; }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  column-gap: 52px;
  align-items: start;
}
.contact__title { max-width: 420px; }
.contact__lead { margin-top: 40px; max-width: 380px; line-height: 1.55; }
.contact__panel { padding-top: 64px; min-width: 0; }

/* Form: 28px between rows, label 8px above its field */
.contact-form { display: flex; flex-direction: column; gap: 28px; }
.contact-form[hidden], .contact-success[hidden] { display: none; }
.contact-form.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.contact-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { font: 500 12px/13px var(--sans); letter-spacing: 0.04em; color: var(--text-3); }
.field__input {
  width: 100%;
  height: 52px;
  padding: 0 17px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font: 400 15px/18px var(--sans);
  color: var(--text-1);
  appearance: none;
  transition: border-color var(--t-small) var(--ease-out), background-color var(--t-small) var(--ease-out);
}
.field__input::placeholder { color: var(--text-3); opacity: 1; }
.field__input--area { height: 180px; min-height: 120px; padding: 17px; resize: vertical; line-height: 1.5; }
@media (hover: hover) { .field__input:hover { border-color: var(--outline); } }
.field__input:focus { outline: none; border-color: var(--text-2); background: var(--card-hover); }
.field.is-invalid .field__input { border-color: var(--error); }
.field__error { font: 400 12px/1.3 var(--sans); color: var(--error); }

/* What can I help with? — multi-select pills (outlined; filled white when picked) */
.options { display: block; }
.options .field__label { padding: 0; margin-bottom: 10px; }
.options__list { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; display: inline-flex; cursor: pointer; }
.option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.option span {
  display: inline-flex; align-items: center;
  height: 36px;
  padding: 0 17px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font: 500 13px/16px var(--sans);
  color: var(--text-2);
  white-space: nowrap;
  transition: border-color var(--t-small) var(--ease-out), background-color var(--t-small) var(--ease-out), color var(--t-small) var(--ease-out);
}
@media (hover: hover) { .option:hover span { border-color: var(--text-1); color: var(--text-1); } }
.option input:checked + span { background: var(--text-1); border-color: var(--text-1); color: var(--bg); }
.option input:focus-visible + span { outline: 1px solid var(--focus); outline-offset: 3px; }

/* Send message: the large-arrow CTA at 90% (47px box), already settled */
.final-cta.final-cta--static .final-cta__border { transform: none; animation: none; }
.contact .contact-form__submit { width: 100%; max-width: none; height: 47px; margin: 0; text-align: left; }
.contact .contact-form__submit .final-cta__label { font-size: 18px; line-height: 22px; padding-right: 22px; }
.contact .contact-form__submit .final-cta__box { flex-basis: 47px; width: 47px; height: 47px; margin-left: 29px; border-radius: 5px; }
.contact .contact-form__submit .final-cta__border { border-radius: 5px; }
.contact .contact-form__submit .final-cta__arrow { width: 22px; height: 22px; }
.contact-form__submit:disabled { cursor: progress; opacity: 0.7; }
.contact-form__status { font: 400 13px/1.5 var(--sans); color: var(--error); }

/* Success state: replaces the form */
.contact-success { border-top: 1px solid var(--line); padding-top: 17px; }
.contact-success.is-entering { animation: success-in 400ms var(--ease-out) both; }
@keyframes success-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.contact-success__title {
  margin-top: 16px;
  font: 400 28px/1.2 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.contact-success__title em { font-weight: 300; font-style: italic; }
.contact-success__title:focus { outline: none; }
.contact-success__text { margin-top: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.contact .contact-success__cta { width: 100%; max-width: none; margin: 16px 0 0; }

/* 404 page: reuses the contact layout; case-study cards in a 2-column grid */
.not-found__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.not-found__links .menu-card { height: 100%; padding: 16px; font-size: 15px; line-height: 19px; }
.not-found .contact-success__cta { margin-top: 28px; }
@media (max-width: 600px) { .not-found__links { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1080px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__title, .contact__lead { max-width: 560px; }
  .contact__panel { padding-top: 48px; max-width: 640px; }
}
@media (max-width: 860px) {
  .cs--contact .cs-hero .body { padding-bottom: 64px; }
  .contact__lead { margin-top: 24px; }
  .contact__panel { padding-top: 40px; }
  .contact .contact-form__submit .final-cta__label { font-size: 17px; padding-right: 16px; }
  .contact .contact-form__submit .final-cta__box { margin-left: 16px; }
  .contact .contact-success__cta .final-cta__label { font-size: 18px; padding-right: 16px; }
  .contact .contact-success__cta .final-cta__box { margin-left: 16px; }
  .contact-success__title { font-size: 24px; }
}
@media (max-width: 600px) {
  .contact-form__row { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
}

/* ==========================================================================
   RESPONSIVE
   Provisional until the mobile designs are done in Figma.
   ========================================================================== */

/* ≤1280: tighten the rail and the long fixed widths */
@media (max-width: 1280px) {
  :root { --rail: 200px; --gutter: 40px; }
  .sec__in > .cross--top-l, .sec__in > .cross--rule, .site-footer .cross--top-l { left: 200.5px; }
  .site-footer__in--rail::before { left: 200px; }
  .rail__index { width: 160px; }
  .rail__stat { width: 160px; }
  .main-nav { margin-right: 64px; }
  .t-h1 { font-size: 50px; }
  .t-display { font-size: 76px; }
  .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ≤1080: header crosses + third hero column get cramped */
@media (max-width: 1080px) {
  .site-header .cross--b { display: none; }
  .lp-hero .sec__in { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .lp-hero__aside {
    grid-column: 2;
    border-left: 0;
    padding: 0 var(--edge) 64px var(--gutter);
  }
  .lp-hero__main { padding-bottom: 48px; }
  .t-h2 { font-size: 38px; }
  .cs-hero__title { font-size: 44px; }
  .lp-case__grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .lp-case__media { max-width: 560px; }
  .rail__stat { position: static; margin-top: 40px; }
  .lp-shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
  .lp-shop__intro { grid-column: 1 / -1; grid-row: auto; }
  .project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); column-gap: 16px; grid-column: 1 / -1; }
  .project__text, .project__media { grid-row: auto; grid-column: auto !important; margin-top: 0 !important; margin-bottom: 0 !important; }
  .project__text { min-height: 0; }
  .project__media { aspect-ratio: 204 / 300; }
  .lp-shop__cta { grid-column: 1 / -1; grid-row: auto; margin-top: 8px; }
  .lp-web__grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .lp-web__controls, .lp-web__cta { grid-column: 1; }
  .focus-carousel__stage { order: 1; }
  .lp-web__controls { order: 2; }
  .lp-web__side { order: 3; margin-top: 16px; }
  .lp-web__cta { order: 4; }
  .lp-about__top { grid-template-columns: minmax(0, 1fr) minmax(0, 240px); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .ai-bar { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .ai-bar__tick { display: none; }
  .ai-bar__text { grid-column: 1; }
  .cs-head, .cs-hero__grid, .ds-grid, .cs-nextproj__grid { grid-template-columns: minmax(0, 1fr); }
  .cs-head__intro { margin-top: 20px; max-width: 560px; }
  .cs-hero__grid .meta { padding-top: 48px; max-width: 520px; }
  .ds-grid { row-gap: 48px; }
  .cs-nextproj__intro { margin-top: 24px; }
}

/* ≤860: rail folds into a header row; two-column layouts stack */
@media (max-width: 860px) {
  :root { --edge: 24px; --gutter: 24px; --header-h: 72px; --cross-right: 24px; }
  .main-nav { margin-right: 30px; } /* +10px gap before the LinkedIn button */
  .main-nav__list { gap: 24px; }
  .submenu { top: 58px; }
  .site-header .cross { display: none; }
  .logo { font-size: 19px; }

  .sec__in, .lp-hero .sec__in { grid-template-columns: minmax(0, 1fr); }
  .sec__in > .cross { display: none; }
  .rail {
    border-right: 0;
    padding: 40px var(--edge) 0;
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 24px; row-gap: 12px;
  }
  .rail__index { width: auto; border-bottom: 0; padding-bottom: 0; }
  .rail__tags { margin-top: 0; flex-direction: row; flex-wrap: wrap; column-gap: 16px; row-gap: 6px; }
  .rail__tags li { font-size: 14px; }
  .rail__stat { flex-basis: 100%; border-top: 0; padding-top: 0; margin-top: 8px; display: none; }
  .lp-hero .rail, .cs-hero .rail { display: none; }
  .body, .lp-hero__main { padding: 28px var(--edge) 64px; }
  .lp-hero__main { padding-top: 40px; padding-bottom: 40px; }
  .lp-hero__aside { grid-column: 1; padding: 0 var(--edge) 56px; }
  .lp-final .body { padding-top: 28px; padding-bottom: 72px; }
  .cs-hero .body { padding-top: 28px; }
  .toc { display: none; }

  .t-h1, .cs-hero__title { font-size: 40px; }
  .t-h2 { font-size: 32px; }
  .t-display { font-size: 56px; }
  .t-body-18 { font-size: 16px; }

  .approach { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .approach__label { padding-left: 0; }
  .approach .cross { display: none; }
  .lp-hero__cta { margin-top: 48px; }
  .line-cta__label { font-size: 18px; white-space: normal; }

  .project { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .project__text { text-align: left; }
  .project__media { aspect-ratio: 4 / 5; max-width: 360px; }

  .lp-about__top { grid-template-columns: minmax(0, 1fr); }
  .lp-about__portrait { max-width: 360px; }
  .process { grid-template-columns: minmax(0, 1fr); }
  .process__text { max-width: none; }
  .final-cta { margin-left: 0; margin-top: 56px; }
  .final-cta__label { font-size: 18px; padding-right: 16px; }
  .final-cta__box { margin-left: 16px; }

  .cs-two, .stats, .works, .brand-grid, .evolution, .decisions__list, .video__after, .walkthroughs { grid-template-columns: minmax(0, 1fr); }
  .walkthroughs { margin-top: 40px; row-gap: 48px; }
  .cs-two { row-gap: 32px; }
  .stats { row-gap: 28px; }
  .works { margin-top: 48px; display: flex; flex-direction: column; gap: 56px; }
  .works__col { display: contents; }
  .works__col:first-child > :nth-child(1) { order: 1; }
  .works__col:first-child > :nth-child(2) { order: 3; }
  .works__col:first-child > .line-cta { order: 5; margin-top: 0; }
  .works__col--offset > :nth-child(1) { order: 2; }
  .works__col--offset > :nth-child(2) { order: 4; }
  .project__text { gap: 16px; }
  .brand-grid { margin-top: 48px; }
  .evolution { margin-top: 48px; row-gap: 40px; }
  .evo__arrow { display: none; }
  .decisions__list { row-gap: 20px; }
  .video { margin-top: 40px; }
  .video__play { width: 64px; height: 64px; font-size: 22px; }
  .video__after { row-gap: 16px; }
  .metrics li { grid-template-columns: 130px minmax(0, 1fr); }
  .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 8px; }
  .swatch__chip { width: 100%; }
  .logo-row { grid-template-columns: 120px minmax(0, 1fr); }
  .reflection blockquote { font-size: 20px; }

  .site-footer__in { height: auto; padding: 32px var(--edge); grid-template-columns: 1fr auto; row-gap: 16px; }
  .site-footer__in--rail::before, .site-footer .cross { display: none; }
  .site-footer__top { display: none; }
  .to-top { display: grid; }
}

/* ≤600: phone — Work / About / Contact fold into one menu */
@media (max-width: 600px) {
  .main-nav { margin-right: 22px; } /* +10px gap before the LinkedIn button */
  .main-nav__list > li:not(:first-child) { display: none; }
  .work-toggle__work-label { display: none; }
  .work-toggle__menu-label { display: inline; }
  .submenu { left: auto; right: -58px; width: min(300px, calc(100vw - 32px)); } /* still lines up with the page edge after the +10px nav gap */
  .submenu__item--mobile { display: block; }
  .t-h1, .cs-hero__title { font-size: 36px; }
  .t-h2 { font-size: 30px; }
  .t-display { font-size: 46px; }
  .line-cta__label { font-size: 17px; }
  .video__ph > span { display: none; } /* placeholder label only; the chip says what it is */
}

/* Reduced motion: no lifts, spins, cascades, smooth scroll or autoplay.
   Colour / opacity changes stay (instant or ≤100ms). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .nav-link:hover, .work-toggle:hover, .anchor-card:hover, .res-card:hover,
  .pill--primary:hover { transform: none !important; }
  .anchor-card:hover .anchor-card__arrow, .anchor-card:hover .anchor-card__thumb > *,
  .menu-card:hover span, .line-cta:hover .line-cta__arrow { transform: none !important; }
  .final-cta__border { transform: none; }
  .final-cta:hover .final-cta__arrow { transform: none; }
  .cs-hero__media .media-frame > * { animation: none; }
}
