/* ==========================================================================
   Work carousel — 1200 x 700 slides with grouped progress indicator
   Built from Figma "MC Portfolio 2026" → Website Designs.
   ========================================================================== */

@font-face {
  font-family: "DIN";
  src: url("../fonts/DINWebPro-Medium.woff") format("woff");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --wc-bg: #000;
  --wc-text: #eeeeec;          /* primary text */
  --wc-text-dim: #7c7b74;      /* secondary text */
  --wc-gray-text: #afafaf;     /* body copy on slides */
  --wc-link: #fff;             /* links */
  --wc-highlight: #d1ff47;     /* link hover, "after" chips, outcome icons */
  --wc-highlight-2: #ff4769;   /* "before" chips */
  --wc-seg-inactive: #3b3a37;  /* progress segments */
  --wc-seg-set: #6f6d66;       /* playing segment track / hover */
  --wc-seg-active: var(--wc-highlight); /* fill of the playing segment */
  --wc-radius: 12px;
  --wc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wc-duration: 850ms;
  --wc-gutter: 28px;
  --wc-display: "DIN Alternate", "DIN", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wc-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--wc-bg);
  color: var(--wc-text);
  font-family: var(--wc-display);
  font-weight: 700;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Links: white, highlight on rollover */
a { color: var(--wc-link); text-decoration: none; transition: color 150ms; }
a:hover, a:focus-visible { color: var(--wc-highlight); }

/* ---------- Header ---------- */
.wc-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--wc-gutter);
  line-height: 1.5;
  letter-spacing: -0.16px;
  pointer-events: none;
}
.wc-header > * { pointer-events: auto; }
.wc-nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }

/* ---------- Stage & slides ---------- */
.wc-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.wc-slide {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;   /* slide content scales with the frame */
  will-change: transform, opacity;
  transition:
    transform var(--wc-duration) var(--wc-ease),
    opacity var(--wc-duration) var(--wc-ease);
}
.wc-stage.is-dragging .wc-slide,
.wc-stage.no-anim .wc-slide { transition: none; }
.wc-slide.is-peek { cursor: pointer; }

/* Frame: design canvas is 1200 x 700. --u = 1 design px. */
.wc-frame {
  --u: calc(100cqw / 1200);
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 700;
  border-radius: var(--wc-radius);
  overflow: hidden;
  background: var(--slide-bg, #000);
  box-shadow: inset 0 0 0 1px #222;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4%;
  font-family: var(--wc-body);
  font-weight: 400;
  letter-spacing: 0.07px;
  isolation: isolate;
  transform: translateZ(0);        /* Safari: keep rounded corners clipping video */
}

/* Plain media slides (older projects) */
.wc-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--fit, cover);
  background: transparent;
}
.wc-frame.is-multi { padding: 5% 6%; }
.wc-frame.is-multi .wc-media {
  width: auto;
  height: 100%;
  max-width: calc((100% - 4% * 2) / 2);
  object-fit: contain;
  flex: 0 1 auto;
}

/* ---------- Designed layouts: hero / phones / text ---------- */
.wc-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: calc(40 * var(--u));
  padding: calc(20 * var(--u)) calc(60 * var(--u));
}

.wc-text {
  flex: 0 0 auto;
  width: calc(360 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}
.wc-text h2,
.wc-text h3,
.wc-outcomes h2,
.wc-outcome h3 {
  margin: 0;
  font-family: var(--wc-display);
  font-weight: 700;
  color: #fff;
}
.wc-text h2 { font-size: calc(28 * var(--u)); line-height: 1.2; }
.wc-layout-hero .wc-text h2 { font-size: calc(40 * var(--u)); }
.wc-text h3 { font-size: calc(20 * var(--u)); line-height: 1.4; }
.wc-text p,
.wc-outcome p,
.wc-outcome ul {
  margin: 0;
  font-size: calc(15 * var(--u));
  line-height: 1.4;
  color: var(--wc-gray-text);
}
.wc-text p + p,
.wc-outcome p + p,
.wc-outcome p + ul { margin-top: calc(12 * var(--u)); }
.wc-meta { font-size: calc(15 * var(--u)); line-height: 1.4; color: var(--wc-gray-text); }
.wc-role { color: var(--wc-highlight); }

/* Hero: title left, device video fills the rest of the frame */
.wc-hero-media {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  margin: calc(-20 * var(--u)) 0;
  height: calc(100% + 40 * var(--u));
}
.wc-hero-media .wc-media { object-fit: contain; }

/* Phones: iPhone frames with captions underneath */
.wc-mocks {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(40 * var(--u));
}
.wc-phone {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  padding-top: calc(20 * var(--u));
}
/* iPhone 15 Pro frame (img/iphone-15-pro-frame.png, transparent screen) sits
   over the screen. Figma size 292 x 599.345. */
.wc-phone-device {
  position: relative;
  width: calc(292 * var(--u));
  aspect-ratio: 292 / 599.345;
}
.wc-phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.wc-phone-screen {
  position: absolute;
  inset: 1.92% 4.48% 1.84% 4.4%;
  border-radius: calc(29.787 * var(--u));
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.wc-phone-screen .wc-media { object-fit: cover; }
.wc-phone-label {
  margin: 0;
  text-align: center;
  font-size: max(11px, calc(14 * var(--u)));
  line-height: 1.4;
  color: #fff;
}
.wc-phone-label span { color: var(--wc-gray-text); }

/* Callout chips (Figma "chip"): pill + 70px leader line pointing at the phone */
.wc-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  color: var(--chip-bg);
  opacity: 0;
  transform: translateY(calc(6 * var(--u)));
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: none;
}
.wc-chip--pink  { --chip-bg: var(--wc-highlight-2); --chip-fg: #fff; }
.wc-chip--green { --chip-bg: var(--wc-highlight);   --chip-fg: #000; }
.wc-chip-line {
  flex: 0 0 auto;
  width: calc(70 * var(--u));
  height: 1px;
  background: currentColor;
}
.wc-chip-pill {
  padding: calc(6 * var(--u)) calc(12 * var(--u));
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: calc(14 * var(--u));
  line-height: 1.4;
  white-space: nowrap;
}
/* Cascade in (JS adds .chips-in 2s after the slide becomes active) */
.wc-slide.chips-in .wc-chip {
  opacity: 1;
  transform: none;
  transition:
    opacity 500ms var(--wc-ease) calc(var(--i, 0) * 180ms),
    transform 600ms var(--wc-ease) calc(var(--i, 0) * 180ms);
}

/* Text slide (Outcomes) */
.wc-outcomes {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(40 * var(--u));
  padding: calc(20 * var(--u)) calc(60 * var(--u));
}
.wc-outcomes h2 { font-size: calc(40 * var(--u)); line-height: 1.2; }
.wc-outcome-cols { display: flex; gap: calc(40 * var(--u)); }
.wc-outcome {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}
.wc-outcome-head { display: flex; align-items: center; gap: calc(10 * var(--u)); }
.wc-outcome h3 { font-size: calc(20 * var(--u)); line-height: 1.4; white-space: nowrap; }
.wc-outcome-icon {
  flex: 0 0 auto;
  display: flex;
  padding: calc(6 * var(--u));
  border-radius: 999px;
  background: var(--wc-highlight);
}
.wc-outcome-icon img { display: block; width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.wc-outcome ul { padding-left: calc(22.5 * var(--u)); }
.wc-outcome li::marker { font-size: 0.8em; }

/* ---------- Soft text fade on slide change ---------- */
.wc-fade {
  opacity: 0;
  transform: translateY(calc(8 * var(--u)));
  transition: opacity 350ms ease, transform 350ms ease;
}
.wc-slide.is-current .wc-fade {
  opacity: 1;
  transform: none;
  transition:
    opacity 900ms ease calc(250ms + var(--fi, 0) * 120ms),
    transform 900ms var(--wc-ease) calc(250ms + var(--fi, 0) * 120ms);
}

/* Narrow frames (phones): drop the text column and chips — the page
   caption already names the project — and centre the devices. */
@container (max-width: 700px) {
  .wc-body > .wc-text,
  .wc-chip { display: none; }
  .wc-body { justify-content: center; }
  .wc-mocks, .wc-hero-media { flex: 0 1 auto; }
  .wc-mocks { gap: calc(60 * var(--u)); }
  .wc-outcomes { gap: 10px; padding: 16px; }
  .wc-outcomes h2 { font-size: 18px; }
  .wc-outcome-cols { flex-direction: column; gap: 6px; }
  .wc-outcome p, .wc-outcome ul { display: none; }
  .wc-outcome h3 { font-size: 13px; }
  .wc-outcome-icon { padding: 4px; }
  .wc-outcome-icon img { width: 12px; height: 12px; }
}

/* ---------- Bottom bar: caption + progress ---------- */
.wc-caption {
  position: fixed;
  left: var(--wc-gutter);
  bottom: 38px;
  z-index: 40;
  max-width: calc(50% - 160px);
  line-height: 1.5;
  letter-spacing: -0.16px;
  transition: opacity 200ms, color 150ms;
}
.wc-caption:not([href]) { color: var(--wc-text); cursor: default; }
.wc-caption-title { display: block; }
.wc-caption-sub   { display: none; color: var(--wc-text-dim); }
.wc-caption.is-swapping { opacity: 0; }

.wc-progress {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 8px;
  max-width: 1120px;
  padding: 10px 0;          /* bigger hit area */
}
/* Group width = 15px per slide (e.g. 6 slides → 90px); pill ends on the group */
.wc-group {
  display: flex;
  gap: 2px;
  width: calc(var(--n, 1) * 15px);
  border-radius: 32px;
  overflow: hidden;
  flex: 0 0 auto;
  transition: width 300ms var(--wc-ease);
}
/* Project being viewed: segments twice as wide (30px per slide), same height */
.wc-group.is-current {
  width: calc(var(--n, 1) * 30px);
}
.wc-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 1px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--wc-seg-inactive);
  cursor: pointer;
  transition: background-color 150ms;
}
.wc-seg:hover,
.wc-seg.is-active { background: var(--wc-seg-set); }
.wc-seg-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--wc-seg-active);
}
.wc-seg:not(.is-active) .wc-seg-fill { opacity: 0; }

/* ---------- Arrows (appear on hover) ---------- */
.wc-arrow {
  position: fixed;
  top: 50%;
  z-index: 45;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid rgba(150, 150, 160, 0.25);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(15, 15, 15, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.75);
  pointer-events: none;
  transition: opacity 250ms var(--wc-ease), transform 250ms var(--wc-ease), filter 250ms var(--wc-ease), color 150ms;
}
.wc-arrow svg { width: 20px; height: 20px; }
.wc-arrow:hover { color: var(--wc-highlight); }
.wc-arrow.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  pointer-events: auto;
}
.wc-arrow:active { transform: scale(0.92); }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  :root { --wc-gutter: 16px; }
  .wc-nav { gap: 16px; }
  .wc-caption {
    max-width: none;
    right: var(--wc-gutter);
    bottom: 64px;
  }
  .wc-caption-sub { display: block; }
  .wc-caption:hover .wc-caption-sub { color: inherit; }
  .wc-progress { bottom: 22px; }
  .wc-arrow { display: none; }
  .wc-frame.is-multi { padding: 6% 4%; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --wc-duration: 1ms; }
  .wc-fade, .wc-chip { transform: none !important; }
}

/* ==========================================================================
   About & Contact (Figma "About" 270:8866, "Contact" 297:9900)
   Bio on the left, 10 x 10 shape grid on the right. At 1440 x 900 the
   bio sits 120px from the left and the 668px grid is centred at 50% + 279px.
   ========================================================================== */

/* Header nav: current page bright, others dim */
.wc-nav a { color: var(--wc-text-dim); }
.wc-nav a[aria-current="page"] { color: var(--wc-text); }
.wc-nav a:hover, .wc-nav a:focus-visible { color: var(--wc-highlight); }

:root {
  --sg-grey: #1a1a1a;          /* resting shape color */
}

.pg-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.pg-bio {
  position: absolute;
  z-index: 1;
  left: clamp(28px, 8.333vw, 120px);
  top: 50%;
  transform: translateY(-50%);
  width: min(400px, 36vw);
  font-family: var(--wc-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.0454px;
  color: var(--wc-gray-text);
}
.pg-logo { display: block; width: 112px; height: auto; margin: 0 0 37px; }
.pg-bio p { margin: 0; }
.pg-bio p + p { margin-top: 8px; }
.pg-bio a { color: var(--wc-link); }
.pg-bio a:hover, .pg-bio a:focus-visible { color: var(--wc-highlight); }

/* Contact links */
.pg-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pg-bio .pg-links a {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: var(--wc-link);           /* white text, grey icons (Figma) */
}
.pg-links img { display: block; width: 24px; height: 24px; flex: 0 0 auto; }
.pg-bio .pg-links a:hover, .pg-bio .pg-links a:focus-visible { color: var(--wc-highlight); }

/* Entrance fade for the bio */
.pg-fade {
  opacity: 0;
  transform: translateY(8px);
  animation: pg-in 900ms var(--wc-ease) 150ms forwards;
}
.pg-fade + .pg-fade { animation-delay: 270ms; }
@keyframes pg-in { to { opacity: 1; transform: none; } }

/* ---------- Shape grid ---------- */
.sg-grid {
  --size: min(668px, 46.4vw, calc(100vh - 232px));
  position: absolute;
  left: calc(50% + 19.375vw);
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--size);
  height: var(--size);
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: calc(var(--size) * 12 / 668);
}
.sg-cell {
  position: relative;
  opacity: 0;
  transition: opacity var(--fade, 1800ms) ease-in-out;
}
.sg-cell.is-on { opacity: 1; }
.sg-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  color: var(--sg-grey);
  /* keep the highlight color while fading out, then drop back to grey */
  transition: color 0s linear var(--fade, 1800ms);
}
/* Hover: fade in to highlight 1 */
.sg-cell.is-hot { opacity: 1; transition: opacity 250ms ease-out; }
.sg-cell.is-hot .sg-shape {
  color: var(--wc-highlight);
  transition: color 250ms ease-out;
}

/* Click: pinned on the highlight color until clicked again */
.sg-cell { cursor: pointer; }
.sg-cell.is-pinned { opacity: 1; transition: opacity 250ms ease-out; }
.sg-cell.is-pinned .sg-shape {
  color: var(--wc-highlight);
  transition: color 250ms ease-out;
}
.sg-cell.no-anim, .sg-cell.no-anim .sg-shape { transition: none !important; }

@media (max-width: 767px) {
  .pg-stage {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding: 112px 16px 48px;
  }
  .pg-bio { position: static; transform: none; width: auto; max-width: 400px; }
  .sg-grid { position: static; transform: none; flex: 0 0 auto; --size: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  .pg-fade { animation: none; opacity: 1; transform: none; }
  .sg-cell, .sg-shape { transition: none !important; }
}
