/* ==========================================================================
   Other work
   Opening (her candy scene, see "For fun" below) → the lab (experiments) →
   shorter engagements as large cards sliding sideways (the background morphs
   to each project’s colors) → footer. Loaded after styles.css and case.css.
   ========================================================================== */

.js body.is-loading .ow-hero { visibility: hidden; }

.ow-main { position: relative; z-index: 1; }

/* ---------- Opening ---------- */

.ow-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
  padding: 0 8.2vw 0 11.5vw;
}
.ow-hero__title {
  margin: clamp(10px, 1.4vh, 20px) 0 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
}
.ow-hero__word {
  display: block;
  margin-left: -0.055em;
  font-size: calc(var(--u) * 24);
  line-height: 0.92;
  letter-spacing: var(--track-display);
  white-space: nowrap;
}
.ow-hero__word .ch { display: inline-block; }
.ow-hero__sub {
  display: block;
  max-width: 22em;
  margin-top: clamp(14px, 1.6vw, 30px);
  font-size: clamp(22px, 2.1vw, 40px);
  line-height: 1.3;
  letter-spacing: var(--track-lead);
}
.ow-hero__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: clamp(24px, 3vw, 48px) 0 0;
}


/* ---------- For fun: her candy scene ----------
   The art is one image (her gradient + cluster, with the top a touch darker so the nav passes AA),
   covering the opening and anchored top-right so the text side keeps the deep pink. On top: the
   heart and the donut's face (both pokeable), candy balls on a canvas (they pass behind the text),
   then the text. Inside .ff-cluster everything is placed in the cluster's own pixels, as percentages. */
.ff {
  overflow: hidden;
  isolation: isolate;
  background: #d61e7c;
  /* its bottom edge melts into the same scene, out of focus, behind the rest of the page
     (js/forfun.js keeps the balls' floor just above this fade: 9% of the screen height) */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 9svh), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 9svh), transparent);
}
.ff-art {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: max(100%, calc(100svh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: url("../assets/other/forfun/forfun-hero.webp") center / 100% 100% no-repeat;
}
.ff-cluster {
  position: absolute;
  left: 54.323%;
  top: 8.38%;
  width: 43.385%;
  height: 88.981%;
}
.ff-heart {
  position: absolute;
  left: 44.626%;
  top: 10.987%;
  width: 35.981%;
  height: auto;
  transform-origin: 50% 92%; /* wobbles from its tip, like it's sitting in the pile */
}
.ff-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ff-eye__happy,
.ff-mouth {
  fill: none;
  stroke: #2b140e;
  stroke-width: 8.5;
  stroke-linecap: round;
}
.ff-eye__happy,
.ff-mouth-open { opacity: 0; }
.ff-mouth-open path { fill: #3a1410; }
.ff-cheek {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}
/* Poked: she laughs and blushes */
.ff-face.is-laughing .ff-eye,
.ff-face.is-laughing .ff-mouth { opacity: 0; }
.ff-face.is-laughing .ff-eye__happy,
.ff-face.is-laughing .ff-mouth-open { opacity: 1; }
.ff-face.is-laughing .ff-cheek { transform: scale(1.18); filter: saturate(1.4) brightness(0.96); }

.ff-hit {
  position: absolute;
  border-radius: 50%; /* rounded, so only the shape itself answers the pointer */
  cursor: pointer;
}
.ff-hit--heart { left: 46.729%; top: 11.646%; width: 33.294%; height: 18.734%; }
.ff-hit--donut { left: 63.96%; top: 24.557%; width: 29.498%; height: 21.772%; }
.ff-balls {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ff .ow-hero__text {
  position: relative;
  z-index: 2;
  margin-top: -6svh; /* the block sits a little above centre, like her layout */
}
/* "For Fun!" stays clear of the cluster on any desktop shape (cluster edge ≈ 43% of the art from the right) */
.ff .ow-hero__word {
  font-size: min(9.5vw, 15.5svh, calc((100vw - 0.4308 * max(100vw, 177.78svh) - 14vw) / 4.26)); /* 4.26em: the title's width (was 4.1 before the looser tracking) */
}
.ff .ow-hero__sub { max-width: 16em; } /* two lines, like her layout */
.ff .ow-hero__counts { gap: 16px; }

/* The ring arrow at the end of the last engagement card: more below */
.ow-more {
  display: inline-block;
  margin-top: clamp(20px, 2.2vw, 36px);
}

/* ---------- Section switcher (always visible) ---------- */

.ow-switch {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(12, 11, 30, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.ow-switch__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: var(--track-ui);
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}
.ow-switch__item:hover { opacity: 1; }
.ow-switch__item[aria-current="true"] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
}
.ow-switch__count {
  font-size: 10px;
  letter-spacing: var(--track-label);
  color: rgba(255, 255, 255, 0.66);
}
.ow-switch__short { display: none; }

/* Hidden on the opening (it has its own two buttons), and steps aside at the footer so it never covers the links */
.in-hero .ow-switch,
.at-footer .ow-switch {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
}
.js body.is-loading .ow-switch { visibility: hidden; }

/* ---------- Shorter engagements ---------- */

.ow-engage__pin {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.ow-engage__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 8.2vw 0 11.5vw;
  margin-bottom: clamp(20px, 3vh, 40px);
}
.ow-engage__head h2,
.ow-lab__head h2 {
  margin: clamp(10px, 1vw, 16px) 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 2.8vw, 54px);
  line-height: 1.16;
  letter-spacing: var(--track-head);
}
.ow-engage__head .eyebrow,
.ow-lab__head .eyebrow { color: rgba(255, 255, 255, 0.72); }
.ow-engage__head .case__body { max-width: none; margin: clamp(8px, 0.8vw, 14px) 0 0; } /* one line under the heading */
.ow-count {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 4vw, 76px);
  line-height: 1;
  flex: none; /* "02 / 06" stays on one line beside a long heading */
  white-space: nowrap;
}
.ow-count small {
  margin-left: 0.4em;
  font-size: 0.35em;
  color: rgba(255, 255, 255, 0.6);
}

.ow-track {
  display: flex;
  gap: 3vw;
  width: max-content;
  padding: 0 8.2vw 0 11.5vw;
  will-change: transform;
}

.ow-card {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 2.6vw, 48px);
  width: 84vw;
  padding: clamp(18px, 1.8vw, 32px);
  border-radius: 24px;
  /* See-through glass with a hairline edge, as first designed. These cards sit on a plain colour
     field, so they stay glass on purpose (her call, Oct 2026); only case study cards are solid. */
  background: rgba(12, 11, 26, 0.42);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 120px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}
/* Desktop reel: the cards peeking in at the sides are clickable (they glide into focus) */
@media (min-width: 761px) {
  .ow-card:not(.is-current) { cursor: pointer; }
  .ow-card:not(.is-current):hover {
    background: rgba(12, 11, 26, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 40px 120px rgba(0, 0, 0, 0.35);
  }
}
.ow-card__media {
  overflow: hidden;
  aspect-ratio: 1560 / 976;
  border-radius: 14px;
  background: #0d0d12;
}
.ow-card__media video,
.ow-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ow-card__num {
  margin: 0;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: var(--track-label);
  color: rgba(255, 255, 255, 0.66);
}
.ow-card__text h3 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 2.4vw, 46px);
  line-height: 1.16;
  letter-spacing: var(--track-head);
}
.ow-card__sub {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(18px, calc(1.2vw + 1px), 23px);
  line-height: 1.38;
  letter-spacing: var(--track-lead);
}
.ow-card__meta {
  margin: 16px 0 18px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.ow-card__text .case__body {
  max-width: 26em;
  margin: 0;
  font-size: clamp(16px, calc(0.95vw + 1px), 18px);
}
.ow-card__result {
  max-width: 26em;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: clamp(16px, calc(0.95vw + 1px), 18px);
  line-height: var(--lead-small);
  letter-spacing: var(--track-body);
  font-feature-settings: "ss01" 1;
}
.ow-card__result span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
/* A result worth a second look: the rank set large, its claim beside it, the rest of the sentence under it */
.ow-card__win {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-family: var(--display);
  font-weight: 400;
}
.ow-card__win b {
  font-weight: 400;
  font-size: clamp(40px, 3.3vw, 60px);
  line-height: 1;
  letter-spacing: var(--track-display);
}
.ow-card__win em {
  font-style: normal;
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.3;
  letter-spacing: var(--track-lead);
}

/* ---------- The lab ---------- */

.ow-lab {
  padding: clamp(120px, 20vh, 220px) 8.2vw 0 11.5vw;
}
.ow-lab__head { max-width: 40em; }
.ow-lab__head .case__body { margin: 18px 0 0; }

.ow-lab__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); /* thirds (span 2), halves (span 3) or the full row */
  gap: clamp(20px, 2.4vw, 44px);
  margin-top: clamp(40px, 6vh, 72px);
}
.ow-lab__item {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ow-lab__item { grid-column: span 2; }
.ow-lab__item.is-wide { grid-column: 1 / -1; }
.ow-lab__item.is-half { grid-column: span 3; }
@media (min-width: 761px) {
  /* Image on the left, its copy beside it on the right */
  .ow-lab__item--side {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 2.4vw, 44px);
  }
  /* Two halves in one row: matching panels of one height, each piece shown whole inside */
  .ow-lab__item.is-half .ow-lab__media {
    display: grid;
    grid-template-rows: minmax(0, 1fr); /* a fixed row, so a tall image shrinks to fit instead of stretching it */
    place-items: center;
    height: clamp(460px, 45vw, 660px);
    padding: clamp(24px, 2.4vw, 40px);
  }
  .ow-lab__item.is-half .cs-phone__frame { width: auto; height: 100%; }
  .ow-lab__item.is-half .ow-lab__media--sheet img { width: auto; max-width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
}

.ow-lab__media {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 100px rgba(0, 0, 0, 0.3);
}
/* A small credit in the corner, so screenshots of the work still say who made it
   (the "/ ''" keeps screen readers from reading it on every item) */
.ow-lab__media::after {
  content: "Created by Alejandra Anderson" / "";
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.ow-lab__media img,
.ow-lab__media video {
  display: block;
  width: 100%;
  height: auto;
}
/* Render + 3D + motion, side by side at one height */
.ow-lab__media--trio {
  display: grid;
  grid-template-columns: 0.55fr 1.05fr 1.15fr;
  gap: 4px;
  background: #0a0a10;
}
.ow-lab__media--trio > * { height: clamp(260px, 28vw, 520px); object-fit: cover; }
/* Sketch → render → 3D → motion, left to right */
.ow-lab__media--quad {
  display: grid;
  grid-template-columns: 0.52fr 0.5fr 0.95fr 1.05fr;
  gap: 4px;
  background: #0a0a10;
}
.ow-lab__media--quad > * { width: 100%; height: clamp(240px, 24vw, 460px); object-fit: cover; }
/* One lead clip across the top, then three steps in a row under it. The row's columns are the
   pieces' own width-to-height ratios (750×1000, 800×1200, 1133×944), so they share one height */
.ow-lab__media--lead {
  display: grid;
  grid-template-columns: 0.75fr 0.6667fr 1.2fr;
  gap: 4px;
  background: #0a0a10;
}
.ow-lab__media--lead > :first-child { grid-column: 1 / -1; }
.ow-lab__media--stack { display: grid; gap: 4px; background: #0a0a10; }
/* Portrait (1333×2000) beside the three-look set (2000×1848): columns in the images'
   width-to-height ratios keep them one height */
.ow-lab__media--pair {
  display: grid;
  grid-template-columns: 0.667fr 1.082fr;
  gap: 4px;
  background: #0a0a10;
}
.ow-lab__media--pair > * { height: 100%; object-fit: cover; }
/* Three looks, each shown whole and filling the row: the columns are the images' own
   width-to-height ratios (1448×1086, 642×1848, 672×1848), which makes them one height */
.ow-lab__media--looks {
  display: grid;
  grid-template-columns: 1.3333fr 0.3474fr 0.3636fr;
  gap: 4px;
  background: #0a0a10;
}
.ow-lab__media--phone {
  display: grid;
  place-items: center;
  padding: clamp(24px, 2.4vw, 40px) 0;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.ow-lab__media--phone .cs-phone__frame { width: min(70%, 260px); }
/* A tall sheet shown whole, in the same quiet panel as the phone beside it */
.ow-lab__media--sheet {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ow-lab__caption h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(21px, 1.6vw, 30px);
  line-height: 1.26;
  letter-spacing: var(--track-card);
}
.ow-lab__caption .case__body { max-width: 36em; margin: 0; }
.ow-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}
/* Tools are information, not buttons: flat tags (same look as .tag in styles.css) */
.ow-tools span {
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: var(--track-ui);
  color: rgba(255, 255, 255, 0.88);
}

.other-page .foot { margin-top: clamp(80px, 14vh, 160px); }

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  .ow-hero { padding: 0 20px; }
  .ow-switch { bottom: 12px; }
  .ow-switch__item { height: 40px; padding: 0 14px; }
  .ow-switch__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* still read aloud */
  .ow-switch__short { display: inline; }
  .other-page .assistant-fab { bottom: 72px; width: 56px; height: 56px; }
  .ow-hero__word { font-size: 24vw; }
  .ow-hero__sub { font-size: 22px; }

  /* Cards stack vertically on phones (no sideways scroll) */
  .ow-engage__pin { height: auto; overflow: visible; }
  .ow-engage__head { padding: 0 20px; }
  .ow-count { display: none; }
  .ow-track {
    flex-direction: column;
    gap: 20px;
    width: auto;
    padding: 0 20px;
  }
  .ow-card {
    grid-template-columns: 1fr;
    width: auto;
    padding: 14px 14px 20px;
  }

  .ow-lab { padding: 120px 20px 0; }
  .ow-lab__grid { grid-template-columns: 1fr; }
  .ow-lab__item,
  .ow-lab__item.is-half { grid-column: auto; }
  .ow-lab__media--trio { grid-template-columns: 0.8fr 1fr; }
  .ow-lab__media--trio > * { height: 220px; }
  .ow-lab__media--trio > :last-child { grid-column: 1 / -1; height: auto; }
  .ow-lab__media--quad { grid-template-columns: 1fr 1fr; }
  .ow-lab__media--pair { grid-template-columns: 1fr; }
  .ow-lab__media--lead { grid-template-columns: 0.75fr 0.6667fr; }
  .ow-lab__media--lead > :last-child { grid-column: 1 / -1; } /* sketch and design side by side, the 3D clip under them */
  .ow-lab__media--looks { grid-template-columns: 0.9554fr 1fr; } /* same two ratios, scaled so the pair fills the row */
  .ow-lab__media--looks > :first-child { grid-column: 1 / -1; } /* the wide look on top, the two tall ones under it */
  .ow-lab__media--quad > * { height: 240px; }
}
/* This video already carries its generator's logo bottom-right, so the credit sits bottom-left */
.ow-lab__media.is-credit-left::after { right: auto; left: 12px; }

/* ---------- For fun on phones and squarer screens: the text first, the scene below it ---------- */

@media (max-width: 760px), (max-aspect-ratio: 7/5) {
  .ff {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: clamp(100px, 15svh, 160px);
    background: #d61e7c url("../assets/other/forfun/forfun-gradient.webp") left top / cover no-repeat;
  }
  .ff .ow-hero__text { margin-top: 0; }
  .ff .ow-hero__word { font-size: min(17vw, 14svh); }
  .ff-art {
    position: relative;
    top: auto;
    right: auto;
    flex: none;
    align-self: center;
    width: min(118%, calc(70svh * 1712 / 1975));
    aspect-ratio: 1712 / 1975;
    margin: clamp(8px, 2svh, 24px) 0 -12%;
    order: 1; /* below the text (it comes first in the page so the toys sit under the text on desktop) */
    background: url("../assets/other/forfun/forfun-cluster.webp") center / 100% 100% no-repeat;
    /* fully transparent before the image edges, so its lighter background never shows as a box */
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 52%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 52%, #000 62%, transparent 100%);
  }
  .ff-cluster { left: 0; top: 0; width: 100%; height: 100%; }
}

/* ---------- For fun on landscape tablets and squarish windows: still side by side ----------
   Wide enough for two columns but too square for the full desktop scene. The cluster sits on the
   right at a smaller size and the text keeps the left, all inside one screen. Upright tablets and
   phones keep the stacked layout above. */
@media (min-width: 761px) and (min-aspect-ratio: 1/1) and (max-aspect-ratio: 7/5) {
  .ff {
    --ff-art: min(54vw, 71svh); /* the cluster's width: about half the screen, or what the height allows */
    --ff-text: calc(87.5vw - 0.94 * var(--ff-art)); /* from the left margin to where the cluster's objects begin */
    flex-direction: row;
    align-items: center;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding-top: 0;
  }
  .ff .ow-hero__text { margin-top: -2svh; }
  .ff .ow-hero__word { font-size: min(9.5vw, 15.5svh, calc(var(--ff-text) / 4.26)); } /* 4.26em: the title's width */
  .ff .ow-hero__sub { max-width: min(16em, var(--ff-text)); }
  .ff .ow-hero__counts { max-width: var(--ff-text); } /* both buttons on one row when they fit */
  .ff-art {
    position: absolute;
    top: calc(53svh - var(--ff-art) * 0.5768); /* centred a little low (its height is 1.1536 × its width) */
    right: 1vw;
    width: var(--ff-art);
    margin: 0;
    order: 0;
    align-self: auto;
  }
}
