/* visualutopia.ai v2: the one-page version, 2026-10-13.
   Andrea's review: one scrolling page, header links jump to sections, side-scrolling
   galleries, clean transitions, nothing clicked through. Layout only; every color,
   weight and size comes from tokens.css through styles.css. */

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

.one-page [id] { scroll-margin-top: 96px; }

/* ---- Sections ---- */
.one-page .sec { padding: calc(var(--step) * 14) 0 calc(var(--step) * 6); }
.one-page .page-sec { max-width: 1180px; margin: 0 auto; }
.sec-title {
  font-size: clamp(34px, 4.6vw, 68px); font-weight: var(--vu-weight-light);
  letter-spacing: var(--vu-track-caps); text-transform: uppercase; line-height: 1.08;
  margin: 0 0 calc(var(--step) * 6);
}
.one-page .part-title { font-size: clamp(34px, 4.6vw, 68px); margin-top: calc(var(--step) * 2); }
.one-page .part-label { margin-top: calc(var(--step) * 16); }

/* ---- Case studies: words on top, a gallery that scrolls sideways beneath ---- */
.one-page .case { padding: calc(var(--step) * 10) 0 calc(var(--step) * 4); border-top: 0; }
.one-page .case + .case { border-top: var(--vu-border) solid var(--vu-line); }
.one-page .case .claim { font-size: clamp(30px, 3.6vw, 54px); font-weight: var(--vu-weight-medium); line-height: 1.1; margin: calc(var(--step) * 1) 0 calc(var(--step) * 3); max-width: 18em; }
.one-page .case .prose p { font-size: calc(var(--vu-size-body) * 1.2); max-width: 34em; }
.one-page .case .details { columns: 2; column-gap: calc(var(--step) * 8); max-width: 1000px; margin-bottom: calc(var(--step) * 5); }
.one-page .case .details li { break-inside: avoid; }

.gallery {
  display: flex; gap: calc(var(--step) * 2); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px;
  scroll-padding-left: var(--gutter);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: none; height: clamp(280px, min(44vw, 64vh), 640px); scroll-snap-align: start; }
.gallery img { width: auto; display: block; object-fit: cover; }
.gallery .frame { aspect-ratio: 5 / 4; width: auto; }
.gal-nav { display: flex; justify-content: flex-end; gap: calc(var(--step) * 2); margin: calc(var(--step) * 3) 0 0; }
.gal-nav button {
  width: 44px; height: 44px; border-radius: 50%; background: transparent; cursor: pointer;
  border: 2px solid var(--vu-accent); color: var(--vu-accent); font-size: 20px; line-height: 1;
}

/* ---- The turn into Method: one line in the accent, pinned for a moment while it
   comes up to size, then the page moves on. ---- */
.turn-wrap { height: 170vh; margin: calc(var(--step) * 14) calc(50% - 50vw) 0; }
.turn {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--vu-accent); color: var(--vu-accent-on); padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.turn h2 { font-size: clamp(40px, 6.4vw, 96px); font-weight: var(--vu-weight-medium); line-height: 1.02; margin: 0; will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { .turn-wrap { height: auto; } .turn { position: static; height: 60vh; } }

/* ---- Method blocks breathe more on one page ---- */
.one-page .block { padding: calc(var(--step) * 10) 0; }
.one-page .strip-nav { margin-bottom: calc(var(--step) * 4); }

/* ---- About and the way in ---- */
.one-page .way-in { padding-bottom: calc(var(--step) * 16); }

@media (max-width: 760px) {
  .one-page .case .details { columns: 1; }
  .gallery > * { height: clamp(240px, 78vw, 420px); }
}

/* ---- Method: picture and words trade sides down the page ---- */
@media (min-width: 761px) {
  .one-page .page-sec .block:nth-of-type(even) .prose { order: 2; }
}

/* ---- The way in closes the page, centered ---- */
.one-page .way-in { text-align: center; padding-top: calc(var(--step) * 14); }
.one-page .way-in .prose { margin: 0 auto; }
.one-page .way-in .prose p { margin-left: auto; margin-right: auto; }
.one-page .way-in .claim { font-size: clamp(34px, 4.6vw, 68px); font-weight: var(--vu-weight-medium); line-height: 1.05; }
.one-page .way-in .email { font-size: clamp(20px, 2.2vw, 32px); }

/* ---- 2026-10-13, third pass, after scoutmotors.com (Andrea's reference): each case study
   opens on a full-screen picture that holds still while the page moves, so the next one
   is cut in from underneath, and its words fade into the picture. ---- */
.one-page .sec#work { padding-bottom: 0; }
.one-page .case { padding: 0; }
.one-page .case + .case { border-top: 0; }
.peel { position: relative; height: 140vh; margin: 0 calc(50% - 50vw); clip-path: inset(0); }
.peel-pane { position: fixed; inset: 0; background: #0c0c0e; }
.peel-pane > img, .peel-pane > video, .peel-pane > .frame { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto; }
.peel-pane::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top right, rgba(12, 12, 14, .72), rgba(12, 12, 14, .18) 55%, rgba(12, 12, 14, 0));
}
.peel-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 12vh; z-index: 2; color: #fff; max-width: 40em; opacity: 0; will-change: opacity, transform; }
.one-page .peel-copy .case-name { color: rgba(255, 255, 255, .8); }
.one-page .case .peel-claim { font-size: clamp(38px, 5.4vw, 84px); font-weight: var(--vu-weight-medium); line-height: 1.02; margin: calc(var(--step) * 1) 0 calc(var(--step) * 3); max-width: 12em; color: #fff; }
.one-page .peel-copy .prose p { color: #fff; font-size: calc(var(--vu-size-body) * 1.2); max-width: 30em; margin: 0; }
.case-body { padding: calc(var(--step) * 10) 0 calc(var(--step) * 12); background: var(--page); position: relative; }
@media (prefers-reduced-motion: reduce) {
  .peel { height: 90vh; } .peel-pane { position: absolute; } .peel-copy { opacity: 1; }
}
@media (max-width: 760px) { .peel { height: 125vh; } .peel-copy { bottom: 14vh; } }

/* ---- 2026-10-13, Andrea: the strip "looks like an old Lightroom gallery page."
   Now large and edge to edge, drifting, with each title in the border under its picture. ---- */
.one-page .work-title { margin: 0 0 calc(var(--step) * 5); }
.one-page .strip {
  margin: 0 calc(50% - 50vw); padding: 0 var(--gutter) 4px; gap: 10px;
  scroll-snap-type: none; align-items: flex-start;
}
.one-page .strip figure { margin: 0; flex: none; }
.one-page .strip img { height: clamp(340px, 66vh, 760px); width: auto; display: block; transition: filter .5s ease; }
.one-page .strip figcaption {
  font-size: var(--vu-size-small); font-weight: var(--vu-weight-medium); letter-spacing: var(--vu-track-caps);
  text-transform: uppercase; padding: calc(var(--step) * 1.5) 0 0; color: var(--vu-ink);
}
.one-page .strip:hover img { filter: brightness(.82); }
.one-page .strip figure:hover img { filter: none; }
.one-page .strip-nav { display: none; }
@media (max-width: 760px) { .one-page .strip img { height: clamp(300px, 58vh, 520px); } }

/* ---- 2026-10-13, the real pictures and clips go in ---- */
.gallery video { width: auto; display: block; background: #0c0c0e; }
.peel-copy.copy-right { left: auto; right: var(--gutter); text-align: right; }
.peel-copy.copy-right .peel-claim, .peel-copy.copy-right .prose p { margin-left: auto; }
.peel-pane:has(.copy-right)::after { background: linear-gradient(to top left, rgba(12, 12, 14, .72), rgba(12, 12, 14, .18) 55%, rgba(12, 12, 14, 0)); }
.m-img { width: 100%; height: auto; display: block; }
.m-img.wide { aspect-ratio: 16 / 9; object-fit: cover; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--step) * 1.5); align-items: start; }
.pair img, .pair .frame { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.trio { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: calc(var(--step) * 1.5); align-items: end; }
.trio img { width: 100%; height: auto; display: block; }

/* ---- 2026-10-13, evening. Case studies as a grid (Andrea, after Jeanée's critique that the
   scroll forced a visitor through every case study). After the Apple tile layout he sent, in
   our own corners: a large clip with its head over it, a smaller box for the deck. Two case
   studies at a time, pinned; the pairs trade places on the scroll. ---- */
.one-page .sec#work { padding: calc(var(--step) * 8) 0 0; }
.bento-wrap { height: 250vh; }
.bento-stage { position: sticky; top: 0; height: 100vh; padding-top: 104px; box-sizing: border-box; display: flex; flex-direction: column; }
.bento-stage .section-head { margin-bottom: calc(var(--step) * 2); flex: none; }
.bento-box { position: relative; flex: 1 1 auto; min-height: 0; margin-bottom: calc(var(--step) * 4); }
.bento {
  position: absolute; inset: 0; display: grid; gap: calc(var(--step) * 2);
  grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas: "a db" "a b" "da b"; will-change: opacity, transform;
}
.t-a { grid-area: a; } .t-b { grid-area: b; } .t-da { grid-area: da; } .t-db { grid-area: db; }
.tile { position: relative; display: block; overflow: hidden; text-decoration: none; color: inherit; background: var(--vu-surface); min-height: 0; }
.tile.big { background: #0c0c0e; }
.tile.big video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tile.big:hover video { transform: scale(1.03); }
.tile.big::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(12, 12, 14, .7), rgba(12, 12, 14, 0) 55%); }
.c-head {
  position: absolute; left: calc(var(--step) * 4); right: calc(var(--step) * 4); bottom: calc(var(--step) * 3.5); z-index: 2; color: #fff;
  font-size: clamp(22px, 2.5vw, 40px); font-weight: var(--vu-weight-medium); letter-spacing: var(--vu-track-caps);
  text-transform: uppercase; line-height: 1.08;
}
.tile.deck { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--step) * 4); }
.tile.deck p { font-size: clamp(18px, 1.75vw, 28px); font-weight: var(--vu-weight-medium); line-height: 1.25; margin: 0 0 calc(var(--step) * 2); max-width: 22em; }
.tile.deck .more { font-size: var(--vu-size-small); font-weight: var(--vu-weight-medium); letter-spacing: var(--vu-track-caps); text-transform: uppercase; color: var(--vu-accent); }
.tile.deck:hover .more { text-decoration: underline; }

/* A case study, opened over the page */
.sheet-layer { position: fixed; inset: 0; z-index: 350; background: var(--page); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-layer[hidden] { display: none; }
.sheet-close { position: fixed; top: 14px; right: 18px; z-index: 360; width: 48px; height: 48px; border: 0; cursor: pointer; background: rgba(12, 12, 14, .55); color: #fff; font-size: 30px; line-height: 1; }
.sheets .case { display: none; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sheets .case.open { display: block; }
.sheets .peel { height: 84vh; clip-path: none; }
.sheets .peel-pane { position: absolute; }
.sheets .peel-copy { opacity: 1 !important; transform: none !important; }
.sheets .case-body { opacity: 1; transform: none; }

@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .bento-wrap { height: auto; }
  .bento-stage { position: static; height: auto; padding-top: 0; display: block; }
  .bento-box { margin-bottom: 0; }
  /* On a phone each deck stays joined to its clip, as one unit. */
  .bento { position: static; display: flex; flex-direction: column; gap: 0; opacity: 1; transform: none; }
  .tile.big { aspect-ratio: 4 / 3; }
  .tile.deck { margin-bottom: calc(var(--step) * 4); }
  .t-a { order: 1; } .t-da { order: 2; } .t-b { order: 3; } .t-db { order: 4; }
}

/* ---- 2026-10-14: Method is a door on the main page; the full section is method.html ---- */
.method-door .door { max-width: 44em; margin: 0 auto; text-align: center; padding: calc(var(--step) * 12) 0 calc(var(--step) * 4); }
.method-door .door .lede { margin: 0 auto calc(var(--step) * 5); }

/* ---- 2026-10-16 (Jeanée): A-heads 20% smaller, "Selected work" on one line on a phone. ---- */
.sec-title, .one-page .part-title { font-size: clamp(24px, 3.7vw, 54px); }

/* "Where do we start?" is a call to action to the Process page, on a ribbon: no pin, no tall box. */
.turn-wrap.ribbon { height: auto; }
.turn-wrap.ribbon .turn { position: static; height: auto; padding: calc(var(--step) * 5) var(--gutter); }
.turn-wrap.ribbon .turn h2 { font-size: clamp(28px, 4vw, 56px); }
.turn h2 a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.turn h2 a:hover, .turn h2 a:focus-visible { color: #BFE6EF; } /* a very light shade of the accent blue (Jeanée, 2026-10-16) */

/* Phone: about 30% less space above and below the ribbon (Jeanée, 2026-10-16). Desktop unchanged. */
#selected-work { scroll-margin-top: calc(var(--nav-h, 64px) + 16px); }
@media (max-width: 760px) {
  .turn-wrap.ribbon { margin-top: calc(var(--step) * 14 * 0.7); }
  .turn-wrap.ribbon .turn { padding-top: calc(var(--step) * 5 * 0.7); padding-bottom: calc(var(--step) * 5 * 0.7); }
  .method-door + .page-sec, .method-door + .sec { padding-top: calc(var(--step) * 14 * 0.7); }
}
.one-page .strip video.strip-clip { height: clamp(340px, 66vh, 760px); width: auto; display: block; transition: filter .5s ease; }
@media (max-width: 760px) { .one-page .strip video.strip-clip { height: clamp(300px, 58vh, 520px); } }
.one-page .strip:hover video.strip-clip { filter: brightness(.82); }
.one-page .strip figure:hover video.strip-clip { filter: none; }
/* The ribbon line can run to two lines on a phone; keep them even (2026-10-19). */
.turn h2 { text-wrap: balance; }
