/* The Dog-Sitter: a kitchen. Apricot plaster, enamel white, paper, ink, tape. */

@font-face {
  font-family: "Pen";
  src: url("../fonts/nanum-pen-script-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Felt";
  src: url("../fonts/gochi-hand-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Saira";
  src: url("../fonts/saira-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --wall: #eba98b;
  --ink: #26170f;
  --pen: #1f3b8f;
  --felt: #1c1c1c;
  --paper: #fffef9;
  --rule: #c9d9ec;
  --tape: #1b1c1f;
  --tape-text: #f5f5f1;
  --fridge: #f6f7f4;
  --stamp: #c23a2c;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 18px/1.5 "Saira", system-ui, sans-serif;
}

a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* The top line sits at the top of the page and scrolls away with it. */
.top {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  gap: 0.8em;
  padding: 14px 18px;
  font-size: 15px;
}
.top a { font-weight: 650; text-decoration: none; }
.top a:hover { text-decoration: underline; }

main { display: block; }

/* ---- the scene ------------------------------------------------------------ */
.scene { position: relative; }
.stage { position: relative; }
.world { display: block; width: 100%; height: 100%; }

html.js .scene { height: 800svh; }
html.js .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
html.js .world { position: absolute; inset: 0; }
html.js .panel { position: absolute; }
html.js .opening,
html.js .captions li { position: absolute; margin: 0; }

.panel { color: var(--ink); }

.opening h1 {
  margin: 0;
  color: var(--pen);
  font: 400 calc(var(--title, 34px) * 1.42) / 0.98 "Pen", cursive;
  letter-spacing: 0.005em;
}
.opening .becomes {
  margin: 0.55em 0 0;
  font-size: var(--cap, 20px);
  font-weight: 640;
  line-height: 1.25;
}
.opening .intro {
  margin: 0.35em 0 0;
  font-size: var(--cap, 20px);
  line-height: 1.3;
}

.captions { margin: 0; padding: 0; list-style: none; }
.captions li {
  font-size: var(--cap, 20px);
  font-weight: 460;
  line-height: 1.3;
  text-wrap: pretty;
}
html.js .captions li { opacity: 0; }

/* Priya's phone: away from the kitchen, in the panel */
.phone {
  display: none;
  padding: calc(var(--pw, 200px) * 0.06);
  border-radius: 16% / 8.5%;
  background: #1d1e22;
  box-shadow: 0 10px 22px rgba(60, 25, 10, 0.22), 0 0 0 calc(var(--flash, 0) * 7px) rgba(216, 67, 47, 0.35);
}
html.js .phone { position: absolute; display: block; opacity: 0; }
.phone-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35em;
  height: 100%;
  padding: calc(var(--pw, 200px) * 0.09) calc(var(--pw, 200px) * 0.075);
  border-radius: 10% / 5%;
  background: #f3f5f9;
  color: #1d1e22;
  font-size: max(11px, calc(var(--pw, 200px) * 0.09));
  line-height: 1.2;
}
.phone-title { font-weight: 700; }
.phone-big {
  white-space: nowrap;
  font-weight: 720;
  font-size: 2em;
  font-stretch: 85%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.phone-sub { color: #3a3d44; }
.phone.drafted { background: transparent; box-shadow: none; outline: 3px dashed rgba(38, 23, 15, 0.55); outline-offset: -3px; }
.phone.drafted .phone-screen { background: rgba(255, 255, 255, 0.35); }
.phone.drafted .phone-screen > * { opacity: 0.6; }

/* The films' end card (capture only) */
.endcard { display: none; }
html[data-capture] .endcard {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4vh;
  background: var(--fridge);
  opacity: 0;
}
.endcard-note {
  display: grid;
  justify-items: center;
  gap: 1vh;
  padding: 5vh 7vh 6vh;
  background: var(--paper);
  box-shadow: 0 6px 16px rgba(60, 25, 10, 0.16);
  transform: rotate(-1.5deg);
  border-top: 2.2vh solid #c83d34;
}
.endcard-mark { font-weight: 720; font-size: 9vh; line-height: 1; letter-spacing: -0.01em; }
.endcard-line { color: var(--pen); font: 400 7vh/1 "Pen", cursive; }
.endcard-url { font-weight: 600; font-size: 3.6vh; }

/* ---- the note, with its week inside ---------------------------------------- */
.kept {
  width: min(1000px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 110px) 0 72px;
}
.sheet {
  padding: clamp(20px, 4vw, 44px);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(60, 25, 10, 0.14);
  transform: rotate(-0.4deg);
}
.sheet h2 {
  margin: 0 0 0.8em;
  color: var(--pen);
  font: 400 clamp(34px, 6vw, 52px) / 1 "Pen", cursive;
}
.log { width: 100%; border-collapse: collapse; }
.log thead th {
  padding: 0.35em 0.5em;
  background: var(--tape);
  color: var(--tape-text);
  font-size: clamp(12px, 1.9vw, 15px);
  font-weight: 640;
  font-stretch: 68%;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  border-right: 3px solid var(--paper);
}
.log tbody th,
.log td {
  padding: 0.45em 0.5em 0.3em;
  border-bottom: 2px solid var(--rule);
  color: var(--felt);
  font: 400 clamp(18px, 3vw, 24px) / 1.15 "Felt", cursive;
  text-align: left;
  vertical-align: top;
}
.log .aside { display: block; font-size: 0.72em; }

.closing {
  max-width: 38em;
  margin: clamp(40px, 7vw, 64px) 0 0;
  font-size: 18px;
}
.film { margin: clamp(36px, 6vw, 56px) 0 0; }
.film video {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--fridge);
}
.film figcaption { margin-top: 0.6em; font-size: 16px; }
.back { margin: 40px 0 0; font-weight: 650; }

/* ---- reduced motion: the story as stills ---------------------------------- */
.stills {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
  padding: 72px 0 24px;
}
.stills .opening { margin-bottom: 40px; --title: 34px; --cap: 20px; }
html.js .stills .opening { position: static; }
.still { margin: 0 0 44px; }
.still-stage { position: relative; width: 100%; background: var(--wall); }
.still-stage svg { display: block; width: 100%; height: 100%; }
.still figcaption { margin-top: 0.6em; font-size: 19px; font-weight: 460; }

/* ---- capture mode: only the stage, filling the frame ------------------------ */
html[data-capture] .opening .becomes,
html[data-capture] .opening .intro { font-size: calc(var(--cap) * 0.72); }
html[data-capture] body { overflow: hidden; }
html[data-capture] .top,
html[data-capture] .kept { display: none; }
html[data-capture] .scene { height: 100vh; }
html[data-capture] .stage { position: fixed; inset: 0; height: 100vh; }

@media (max-width: 520px) {
  .top { font-size: 14px; padding: 12px 14px; }
}
