/* De Tijd case study. The layout (sidebar, slides, grid) is shared: case.css and
   case.js. This file holds each slide's backdrop (.stage) and the pieces of the
   site laid out on it: images cut from 2x exports of the Sketch file. The colours
   are the site's own: the masthead navy, the logo blue, the paper cream and the block colours from the stickersheet. */

:root {
  --navy: #001f42;
  --blue: #18457c;
  --teal: #2f82a4;
  --green: #109a29;
  --cream: #fef7ea; /* the site's own paper: crops blend into it */
  --sand: #e5bd73;
  --pad: clamp(20px, 5vw, 64px);
  --lift: 0 30px 80px rgba(0, 12, 30, 0.35), 0 6px 18px rgba(0, 12, 30, 0.2);
}

img {
  -webkit-user-drag: none;
}

/* ── Stages ─────────────────────────────────────────────── */

.stage {
  position: relative;
  overflow: hidden;
  padding: var(--pad);
}

.stage-navy { background: var(--navy); }
.stage-blue { background: var(--blue); }
.stage-cream { background: var(--cream); }
.stage-sand { background: var(--sand); }
.stage-teal { background: var(--teal); }
.stage-beige { background: #e3d7c4; } /* the Net binnen tile's beige */

/* ── Two brands ─────────────────────────────────────────── */

/* both homepages from their navigation down, 1440 × 973 design px, in a
   window with rounded corners, inset on all sides; L'Echo is cut
   along a slanted divider (4% of the width either side of its centre). The
   backdrop is De Tijd's navy and turns to L'Echo's burgundy with the sweep
   (the script mixes it from how much of each brand shows). */
.shot > .stage.brands {
  background: var(--navy);
}

.brand-window {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 973;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 0, 0, 0.18);
}

.brand {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#brand-echo {
  clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%);
}

/* the divider: a white line along the cut, tilted to match it */
.brand-edge {
  position: absolute;
  top: -10%;
  left: 50%;
  z-index: 2;
  width: 3px;
  height: 120%;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.45);
  rotate: 5.67deg;
}

/* ── Interview, desktop and phone ───────────────────────── */

/* a 1440 × 860 design px window, and a phone overlapping its right edge */
.duo {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12% 3% 0;
}

.duo-desktop {
  position: relative;
  aspect-ratio: 1440 / 860;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 30px 80px rgba(77, 50, 20, 0.25), 0 6px 18px rgba(77, 50, 20, 0.14);
}

.duo-page {
  width: 100%;
  will-change: transform;
}

/* the compact navigation stays on top, as on the live blog */
.duo-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.duo .duo-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 19%;
  box-shadow: 0 30px 70px rgba(77, 50, 20, 0.3), 0 6px 16px rgba(77, 50, 20, 0.18);
}

/* ── Article with its cards ─────────────────────────────── */

/* A video of render/article.html: the page's gutter and text column, 1060 × 760
   design px. On phones the slide is square and shows x 80–840 of it, the
   narrow cards and the column. */
.shot-article {
  width: 100%;
  aspect-ratio: 1060 / 760;
}

.shot > .stage.article-stage {
  padding: 0;
  background: var(--cream);
}

.article-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Markets ────────────────────────────────────────────── */

/* the page's header in white straight on the slide (its cream unmixed out, the
   breadcrumb cropped off), then the chart panel as a card; the selected tab in
   the header rises off the panel */
.stock {
  width: 72%;
  margin: 0 auto;
}

.stock-head {
  width: 100%;
}

.stock-panel {
  position: relative;
  overflow: hidden;
  box-shadow: var(--lift);
}

.stock-panel > img:first-child {
  width: 100%;
}

/* the day's line, laid exactly over its empty chart (design px, 908 × 643 panel) */
.stock .stock-chart {
  position: absolute;
  left: calc(37 / 908 * 100%);
  top: calc(99 / 643 * 100%);
  width: calc(830 / 908 * 100%);
}

/* ── Live blog ──────────────────────────────────────────── */

/* A 1440 × 860 design px window onto the page. The pieces are placed in
   design px times --k (the window's width / 1440), set by the script. */
.browser {
  --k: 1;
  position: relative;
  width: 84%;
  margin: 0 auto;
  aspect-ratio: 1440 / 860;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 30px 80px rgba(0, 20, 40, 0.35), 0 6px 18px rgba(0, 20, 40, 0.2);
}

.browser img {
  position: absolute;
  max-width: none;
}

.lb-page {
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

/* the sidebar column: 300 design px wide, 1020 from the left, 435 down the page */
.lb-side {
  left: calc(1020 / 1440 * 100%);
  top: calc(435 / 860 * 100%);
  width: calc(300 / 1440 * 100%);
  will-change: transform;
}

/* the compact navigation is always on top (the page's own logo is painted
   out under it); the update pill pops in once the page scrolls */
.lb-bar {
  top: 0;
  left: 0;
  width: 100%;
}

.lb-pill {
  left: calc(519 / 1440 * 100%);
  top: calc(66 / 860 * 100%);
  width: calc(134 / 1440 * 100%);
  opacity: 0;
}

/* ── Phone (beside the desktop interview) ────────────────── */

.phone {
  position: relative;
  flex: 0 1 22%;
  container-type: inline-size;
  aspect-ratio: 320 / 694;
  border: clamp(4px, 0.6vw, 8px) solid #101114;
  border-radius: clamp(20px, 3vw, 42px);
  overflow: hidden;
  /* cream above the tab bar, navy behind it: no light fringe on the rounded
     corners where the navy is clipped */
  background: linear-gradient(var(--cream) 90%, #001f42 90%);
  box-shadow: 0 30px 70px rgba(90, 60, 10, 0.3), 0 6px 16px rgba(90, 60, 10, 0.18);
}

/* no status bar or browser bar: the page starts under a strip of its own
   cream at the top, and the site's tab bar (nav-mobile) sits at the bottom,
   its navy carried down into the home-indicator area (30 of 694 px) so the
   outer icons clear the rounded corners */
.phone .phone-page {
  position: absolute;
  top: calc(24 / 694 * 100%);
  left: 0;
  width: 100%;
  will-change: transform;
}

.phone .phone-tabs {
  position: absolute;
  left: 0;
  bottom: calc(30 / 694 * 100%);
  z-index: 2;
  width: 100%;
}

.phone::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: calc(30 / 694 * 100% + 1px);
  background: #001f42;
}

/* ── Secondary pages, two-up ────────────────────────────── */

.shot-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.shots .shot > .stage {
  display: grid;
  place-items: center;
  padding: 9%;
}

.tile-blue { background: var(--blue); }
.tile-navy { background: var(--navy); }

.shots .stage img {
  width: 100%;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25), 0 5px 12px rgba(0, 0, 0, 0.12);
}

/* ── Type ───────────────────────────────────────────────── */

/* the specimen is its own cream sheet (1600 × 880) on the same cream: full
   width, centred in whatever height the grid rounds the slide to */
.shot > .stage.type-stage {
  padding: 0;
}

.type-stage img {
  width: 100%;
}

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 699px) {
  .stock { width: 100%; }
  .shot-article { aspect-ratio: 1 / 1; }
  .article-stage video { object-position: 26.7% 0; }
}
