/* marynadesign.com — redesign. Palette, type and the "3D edge" surfaces come from the original Figma site. */

:root {
  --ink: #111111;
  --ink-80: rgba(17, 17, 17, 0.8);
  --muted: #888888;
  --faint: #c3c3c3;
  --line: #dedede;
  --paper: #ffffff;
  --card: #dedede;
  --card-edge: #cfcfcf;
  --tile: #f4f4f4;

  /* outline scale of the pixel icons: the outline is one cell of the art, so an icon's size is its grid times one of
     these. To make the outline of a whole size group thicker or thinner, change its value here. The values come from the
     design's icon frames: s is 24px over the pack's 21 cells, m is the 32px frog.
     s: buttons and links, m: marquee frog and small confetti, l: thumbs, flowers, intro pieces, xl: big flowers and the ground */
  --px-s: calc(24px / 21);
  --px-m: calc(32px / 21);
  --px-l: 3px;
  --px-xl: 4px;
  --lilac: #e7aef7;
  --lilac-edge: #c990d9;
  --green: #7ebc77;
  --green-edge: #619e5a;
  --brown: #5b4e46;
  --brown-edge: #433933;

  --f-display: "Jost", ui-sans-serif, system-ui, sans-serif;
  --f-script: "WindSong", "Brush Script MT", cursive;
  --f-text: "Roboto Flex", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(24px, 5.56vw, 80px); /* 80px at 1440, as in the design */
  --header-h: 85px;
  --t-hero: clamp(58px, 10.42vw, 150px);
  --t-title: clamp(52px, 7.64vw, 110px);
  --t-h2: clamp(28px, 2.6vw, 36px);
  --radius: 24px;
  --edge: 8px;
  --float-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--f-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (hover: hover) and (pointer: fine) {
  body, a, button, [data-drag] { cursor: url("/assets/icons/binoculars.svg") 20 20, auto; }
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
::selection { background: var(--lilac); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lilac-edge); outline-offset: 4px; border-radius: 6px; }

.frame { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.display { font-family: var(--f-display); font-weight: 400; line-height: 1.05; }
.script { font-family: var(--f-script); font-weight: 500; display: inline-block; font-size: 1.08em; line-height: 1.02; font-feature-settings: 'calt' 0; } /* 'calt' adds the font's very long strokes */
.script-ink { display: inline-block; padding: 0.12em 0.18em 0.2em 0.04em; margin: -0.12em -0.18em -0.2em -0.04em; }
.ico { display: block; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px;
}
.skip:focus { top: 16px; }

/* link labels: letters roll up one by one and the same letter rolls in from below */
.ulink { display: inline-block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.roll { display: inline-block; }
.roll-in { display: inline-flex; overflow: hidden; vertical-align: top; }
.rc { display: inline-block; position: relative; transition: transform 0.5s var(--ease-out) calc(var(--i) * 24ms); }
.rc::after { content: attr(data-c); position: absolute; left: 0; top: 100%; color: var(--lilac-edge); }
a:hover .rc, a:focus-visible .rc { transform: translateY(-100%); }
/* the link's icon turns the same pink as the rolled-in text */
.cv .ico, .see-all .ico { color: var(--ink); transition: color 0.3s ease, transform 0.4s var(--ease-spring); }
.cv:hover .ico, .see-all:hover .ico, .cv:focus-visible .ico, .see-all:focus-visible .ico { color: var(--lilac-edge); }

/* ------------------------------------------------------------------ loading screen
   First visit only, about 3s. A huge frog face peeks up from the bottom, blinks, hearts float up, it
   hops and bursts hearts and leaves, then the whole screen breaks into pixels. Pure CSS, transforms and
   opacity only: it finishes and hides itself even if the script never runs. */
.loader { display: none; }
html.has-loader .loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden;
  /* its own brown, gone with the sheet below: iOS Safari tints its bars from a fixed element touching the edge */
  background: var(--brown);
  animation: loader-end 0.01s linear 3.1s both, loader-clear 0.01s linear 1.95s both;
}
/* a solid sheet under the tiles: nothing white can show before they are painted; it goes when they start breaking up */
html.has-loader { background: var(--brown); }
html.has-loader .loader::before { content: ""; position: absolute; inset: -2px; background: var(--brown); animation: loader-end 0.01s linear 1.95s both; }
.loader-tiles { position: absolute; left: 50%; top: 50%; width: 101vmax; height: 101vmax; translate: -50% -50%; display: grid; grid-template-columns: repeat(12, 1fr); }
.lt { display: block; background: var(--brown); scale: 1.03; animation: lt-out 0.4s steps(4) calc(1.95s + var(--d) * 1.3) both; }
.loader-scene { position: absolute; inset: 0; z-index: 2; }
/* its own layer from the first frame, painted before it moves: on pages with heavy images a late paint let the brown show through */
.loader-face { will-change: transform; position: absolute; left: 50%; bottom: 0; width: min(62vmin, 500px); translate: -50% 0; transform-origin: 50% 100%; animation: loader-face 2.3s linear both; }
.loader-face .ico { width: 100%; height: auto; }
.loader-lid { position: absolute; left: 14.3%; top: 10.5%; width: 24.6%; height: 27%; background: linear-gradient(var(--green) 56%, #111 56% 68%, var(--green) 68%); opacity: 0; animation: loader-blink 2.3s linear both; }
.loader-lid-r { left: 61.5%; }
.loader-float { position: absolute; left: calc(50% + (var(--n) - 1.5) * min(15vmin, 120px)); top: 34%; width: calc(15 * var(--px-l)); height: calc(12 * var(--px-l)); background: url("/assets/icons/px-heart.svg") center / contain no-repeat; opacity: 0; animation: loader-float 0.9s var(--ease-out) calc(0.9s + var(--n) * 0.18s) both; }
.loader-bits { position: absolute; z-index: 3; left: 50%; bottom: 35%; width: 0; height: 0; }
.lb { position: absolute; left: calc(-7.5 * var(--px-l)); top: calc(-7.5 * var(--px-l)); width: calc(15 * var(--px-l)); height: calc(15 * var(--px-l)); opacity: 0; background: center / contain no-repeat; animation: lb-burst 1.05s cubic-bezier(0.15, 0.7, 0.3, 1) 1.72s both; }
.lb-h { background-image: url("/assets/icons/px-heart.svg"); }
.lb-l { background-image: url("/assets/icons/px-leaf.svg"); }
@keyframes loader-end { to { visibility: hidden; } }
@keyframes loader-clear { to { background-color: transparent; } }
@keyframes lt-out { to { scale: 0; } }
@keyframes loader-face {
  0% { transform: translateY(105%); animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
  32% { transform: translateY(26%); }
  70% { transform: translateY(26%); }
  76% { transform: translateY(34%) scale(1.1, 0.88); }
  83% { transform: translateY(14%) scale(0.96, 1.08); animation-timing-function: ease-in; }
  100% { transform: translateY(115%); }
}
@keyframes loader-blink { 0%, 34% { opacity: 0; } 35%, 39% { opacity: 1; } 40%, 47% { opacity: 0; } 48%, 52% { opacity: 1; } 53%, 100% { opacity: 0; } }
@keyframes loader-float { 0% { opacity: 0; transform: translateY(30px) scale(0.4); } 25% { opacity: 1; transform: scale(1.1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-130px) scale(0.8); } }
@keyframes lb-burst {
  0% { opacity: 0; transform: scale(0.2); }
  2%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s)); }
}

.meadow-phone { display: none; }
@media (max-width: 768px) { .meadow-phone { display: block; } }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform 0.5s var(--ease-out);
  view-transition-name: site-header;
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-row { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.logo { justify-self: start; width: 97px; height: 37px; }
.logo svg { width: 100%; height: 100%; }
html.js .logo svg { clip-path: inset(0 100% 0 0); }
html.js .loaded .logo svg { clip-path: inset(0 -2% 0 0); transition: clip-path 1.2s var(--ease-out) 0.1s; }
.social { display: flex; align-items: center; gap: 16px; font-weight: 500; }
.heart { width: 16px; height: 16px; }
.social:hover .heart, .footer-links:hover .heart { animation: beat 0.9s ease-in-out infinite; }
.cv { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.cv .ico { width: calc(21 * var(--px-s)); height: calc(21 * var(--px-s)); transition: transform 0.4s var(--ease-spring); transform-origin: 30% 80%; }
.cv:hover .ico { transform: rotate(-12deg) scale(1.12); }

@keyframes beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(0.95); } }

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; display: none; }
.page-case .progress { display: block; }
.progress span { display: block; height: 100%; background: var(--lilac-edge); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ------------------------------------------------------------------ hero */
/* the first screen is exactly one window tall: the title in the middle, the meadow along the bottom */
.first-screen { min-height: max(560px, calc(100svh - var(--header-h))); display: flex; flex-direction: column; }
.hero {
  position: relative; flex: 1;
  display: flex; align-items: center;
  /* shorter windows get less air, not a smaller title; +56px below because the flowers rise above the meadow box */
  padding-block: clamp(56px, 13vh, 120px) calc(clamp(56px, 13vh, 120px) + 56px);
}
.hero-inner { position: relative; width: 100%; }
.hero-title { font-size: var(--t-hero); line-height: 1.06; width: 100%; }
.hero-line { display: block; }
.hero-line-2 { display: flex; justify-content: flex-end; align-items: center; gap: 0.373em; }
.word { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; }

html.js .hero .word { overflow: clip; overflow-clip-margin: 0.2em; padding-bottom: 0.06em; margin-bottom: -0.06em; }
html.js .hero .ch { transform: translateY(135%); }
html.js .loaded .hero .ch { transform: none; transition: transform 1s var(--ease-out) calc(0.15s + var(--i) * 32ms); }
html.js .loaded .hero-designer .ch { transition-delay: calc(0.55s + var(--i) * 32ms); }

html.js .script-ink { clip-path: inset(-100% 100% -100% -60%); }
html.js .in .script-ink {
  clip-path: inset(-100% -20% -100% -60%);
  transition: clip-path 1.05s cubic-bezier(0.3, 0, 0.35, 1) 0.05s;
}
html.js .hero .script-ink { clip-path: inset(-100% 160% -100% -60%); }
html.js .loaded .hero .script-ink {
  clip-path: inset(-100% -20% -100% -60%);
  transition: clip-path 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.7s;
}

.pill-wrap {
  position: absolute; z-index: 2;
  display: flex; flex-direction: column;
  translate: var(--px, 0) var(--py, 0);
}
/* labels as in the design: one above the title on the right, one under the second line on the left */
.pill-wrap-exp { bottom: calc(100% - 2px); right: calc(6% + 6px); align-items: flex-start; }
.pill-wrap-apps { top: calc(100% - 26px); left: calc(4% + 6px); align-items: flex-end; }
.bubble-pad { margin-top: -2px; }
@media (min-width: 1201px) { .pill-wrap-exp { right: calc(6% - 3px); } .pill-wrap-apps { left: calc(4% - 3px); } }
.pill-wrap-exp .bubble-pad { padding-left: 27px; }
.pill-wrap-apps .bubble-pad { padding-right: 27px; }

/* the dark layer is the bubble itself; the light face sits inside it, so there is no seam */
.pill {
  display: block; position: relative;
  font-size: 16px; line-height: 1.7; white-space: nowrap;
  filter: drop-shadow(0 8px 10px rgba(17, 17, 17, 0.16));
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--dr, 0deg));
  touch-action: none; user-select: none; -webkit-user-select: none;
  transition: filter 0.35s ease;
}
.pill-in { display: block; padding: 10px 16px; transition: transform 0.25s var(--ease-out); }
.pill-lilac { background: var(--lilac-edge); padding: 1px 6px 6px 1px; border-radius: 3px 23px 28px 23px; }
.pill-lilac .pill-in { background: var(--lilac); border-radius: 2px 22px 22px 22px; }
.pill-green { background: var(--green-edge); padding: 1px 1px 6px 6px; border-radius: 23px 3px 23px 28px; }
.pill-green .pill-in { background: var(--green); border-radius: 22px 2px 22px 22px; }
.pill:hover { filter: drop-shadow(0 14px 18px rgba(17, 17, 17, 0.22)); }
.pill.is-dragging { transition: filter 0.35s ease; filter: drop-shadow(0 22px 28px rgba(17, 17, 17, 0.24)); }
.pill.is-released { transition: transform 0.9s var(--ease-spring), filter 0.35s ease; }

/* cursor tip touches the bubble's sharp corner, as in the design */
.hero-cursor { position: relative; width: 32px; height: 32px; z-index: 3; pointer-events: none; }
.hero-cursor img { position: absolute; inset: -0.59px -3.67px -8.59px -3.67px; width: auto; height: auto; max-width: none; }
.pill-wrap-apps .hero-cursor { transform: scaleX(-1); }

html.js .pill-wrap { opacity: 0; scale: 0.5; }
html.js .loaded .pill-wrap { opacity: 1; scale: 1; transition: opacity 0.4s ease 1.1s, scale 0.9s var(--ease-spring) 1.1s; }
html.js .loaded .pill-wrap-apps { transition-delay: 1.3s, 1.3s; }


/* ------------------------------------------------------------------ skills marquee */
.skills { border-block: 1px solid var(--line); padding-block: 18px; overflow: hidden; }
.marquee { display: flex; width: max-content; will-change: transform; }
.marquee-track { list-style: none; display: flex; align-items: center; gap: 16px; padding-right: 16px; animation: marquee 48s linear infinite; }
html.js .marquee-track { animation: none; }
.marquee-track li { display: flex; align-items: center; gap: 16px; font: 400 28px/1.2 var(--f-display); white-space: nowrap; }
.frog { width: 32px; height: 32px; display: block; transition: transform 0.5s var(--ease-spring); }
.frog svg { width: 100%; height: 100%; }
.marquee-track li:hover .frog { animation: hop 0.7s var(--ease-out); }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes hop { 0% { transform: none; } 40% { transform: translateY(-14px) rotate(-12deg); } 70% { transform: translateY(0) rotate(6deg) scaleY(0.9); } 100% { transform: none; } }

/* ------------------------------------------------------------------ section titles */
.section-title, .page-title { font-size: var(--t-title); line-height: 1.02; }
/* the script word's tall line box must not push what follows: titles keep the design's 112px */
@media (min-width: 769px) { .section-title, .page-title { height: 1.02em; } .footer-title { height: 1.02em; line-height: 1.02; } }
.section-title, .page-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 16px; }
#cases-title, #list-title { gap: 0 10px; }
.cases-head .section-title { justify-content: flex-start; }

/* ------------------------------------------------------------------ why me */
.scene { position: relative; }

.why { position: relative; z-index: 1; }
.why-stage { position: relative; height: 280vh; margin-top: 70px; } /* the first screen has no bottom padding (its meadow is the edge) */
/* the section as in the design (70px above and below), held in the middle of the screen while pinned */
.why-panel {
  position: sticky; top: var(--panel-top, 0px);
  display: flex; flex-direction: column; align-items: center;
  padding: 70px 0;
}
.why .section-title { text-align: center; position: relative; z-index: 4; line-height: 1.02; }
.why-stack {
  position: relative; z-index: 5;
  width: 100%;
  display: grid; place-items: center;
  min-height: 501px; margin-top: 40px; padding: 0 64px;
}
.why-stack .why-card { grid-area: 1 / 1; width: min(632px, 100%); }
.why-card {
  position: relative;
  background: var(--edge-c);
  padding: 1px 12px 12px 1px;
  border-radius: 23px 23px 28px 23px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
  will-change: transform;
  backface-visibility: hidden;
  transform-origin: 50% 80%;
}
.why-card:hover { z-index: 3; }
.why-card:hover .thumb-up svg { animation: thumb-bump 0.6s var(--ease-spring); }
.why-card:hover .thumb-down svg { animation: thumb-shake 0.6s var(--ease-out); }
@keyframes thumb-bump { 40% { transform: translateY(-6px) rotate(-10deg) scale(1.12); } }
@keyframes thumb-shake { 25% { transform: rotate(-12deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } }
.why-inner { background: var(--face); border-radius: 22px; padding: 40px; }
.tone-lilac { --face: var(--lilac); --edge-c: var(--lilac-edge); }
.tone-brown { --face: var(--brown); --edge-c: var(--brown-edge); color: #fff; }
.tone-green { --face: var(--green); --edge-c: var(--green-edge); }
.why-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.why-row + .why-row { margin-top: 40px; padding-top: 40px; border-top: 1px solid rgba(17, 17, 17, 0.14); }
.tone-brown .why-row + .why-row { border-top-color: rgba(255, 255, 255, 0.16); }
.why-row h3 { font: 400 28px/1.12 var(--f-display); margin-bottom: 12px; }
.why-row p { opacity: 0.8; max-width: 44ch; }
.thumb { flex: none; width: 64px; height: 64px; display: grid; place-items: center; }
/* the box is 21 cells tall, so both thumbs share one cell and one outline width */
.thumb-up svg { width: calc(100% * 17 / 21); height: calc(100% * 20 / 21); }
.thumb-down svg { width: calc(100% * 19 / 21); height: 100%; }
.why-card.is-front .thumb-down svg { animation: thumb-shake 0.7s var(--ease-out) 0.1s; }
.why-card.is-front .thumb-up svg { animation: thumb-bump 0.7s var(--ease-spring) 0.3s; }
@keyframes thumb-bump { 40% { transform: translateY(-6px) rotate(-10deg) scale(1.12); } }
@keyframes thumb-shake { 25% { transform: rotate(-12deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } }

/* pixel hearts and leaves burst in from both screen edges whenever a card flies off */
.confetti { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; left: 0; top: 0; display: block; will-change: transform, opacity; }
.confetti svg { display: block; width: 100%; height: auto; }

/* pixel meadow: hills, grass and flowers */
/* the same meadow on the first screen, right on top of the marquee, fully opaque */
.meadow.meadow-hero { height: 96px; opacity: 1; z-index: 1; overflow-x: clip; }
.meadow { position: relative; flex: none; align-self: stretch; z-index: 2; height: 96px; pointer-events: none; opacity: 0.5; }


.meadow .ground { position: absolute; left: 50%; bottom: 0; translate: -50% 0; z-index: 2; max-width: none; image-rendering: pixelated; }
.flora { position: absolute; left: 50%; bottom: 0; width: 0; height: 100%; }
.plant { position: absolute; z-index: 1; display: block; transform-origin: 50% 100%; rotate: var(--bend, 0deg); }
.plant svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.plant-grow, .plant-sway { display: block; transform-origin: 50% 100%; }
.plant-sway { animation: sway 6s ease-in-out infinite; animation-delay: calc(var(--k) * -0.7s); }
@keyframes sway { 0%, 100% { rotate: -2deg; } 50% { rotate: 2deg; } }
html.js .meadow .plant-grow { transform: scaleY(0); }
html.js .meadow.in .plant-grow { transform: none; transition: transform 0.9s var(--ease-spring) var(--d, 0ms); }

/* ------------------------------------------------------------------ cases */
.cases-home { padding-block: 70px; }
.cases-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.see-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; padding-bottom: 14px; }
.see-all .ico { width: calc(20 * var(--px-s)); height: calc(12 * var(--px-s)); }
.see-all:hover .ico { animation: blink 0.5s ease; }
@keyframes blink { 50% { transform: scaleY(0.1); } }

.rail-track {
  display: flex; gap: 16px;
  overflow: auto hidden; overscroll-behavior-x: contain;
  padding: 4px max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter))) 16px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter)));
  scrollbar-width: none;
  cursor: grab;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track.is-grabbing { cursor: grabbing; }
.rail-track.is-grabbing .case-card { pointer-events: none; }
.rail-track .case-card { flex: 0 0 clamp(280px, 36.4vw, 524px); }
/* cards rise in one after another, once; only opacity and translate, so it stays on the compositor */
html.js .rail-track .case-card { opacity: 0; translate: 0 48px; }
html.js .rail:not(.is-done) .case-card { will-change: opacity, translate; }
html.js .rail.is-in .case-card {
  opacity: 1; translate: 0 0;
  transition: opacity 0.7s ease calc(var(--i, 0) * 90ms), translate 0.9s var(--ease-out) calc(var(--i, 0) * 90ms);
}
.rail-bar { margin-top: 24px; }
.rail-line { position: relative; height: 24px; }
.rail-line::before { content: ""; position: absolute; left: 20px; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--line); }
.rail-frog { position: absolute; z-index: 1; left: 0; top: 0; width: calc(21 * var(--px-s)); height: calc(21 * var(--px-s)); transform: scaleX(-1); transform-origin: 50% 100%; }
.rail-frog svg { width: 100%; height: 100%; }
/* the tongue: a pink bar with its own dark layer, length = how far the rail has been read */
.rail-tongue {
  position: absolute; left: 12px; top: 9px; width: calc((100% - 12px) * var(--tl, 0));
  background: var(--lilac-edge); padding: 1px 2px 2px 1px; border-radius: 4px;
}
.rail-tongue span { display: block; height: 4px; border-radius: 2px; background: var(--lilac); }

.case-card { display: block; }
.case-media {
  display: block; position: relative;
  background: var(--card-edge);
  padding: 1px 12px 12px 1px;
  border-radius: 23px 23px 28px 23px;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.case-media-in { display: block; overflow: hidden; border-radius: 22px; }
/* the photo rests slightly enlarged and eases back on hover, like the photos in a case */
.case-media img { width: 100%; transform: scale(1.06); transition: transform 0.7s var(--ease-out); }
.case-card:hover .case-media img, .case-card:focus-visible .case-media img { transform: none; }
.case-card:hover .case-media, .case-card:focus-visible .case-media {
  background: var(--faint);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
}
.case-card:active .case-media { box-shadow: 0 4px 10px rgba(17, 17, 17, 0.14); }
.case-tags { display: block; margin-top: 16px; color: var(--muted); }
.case-title { display: block; font: 400 28px/1.12 var(--f-display); margin-top: 8px; }

/* brown "scroll sideways" cursor over the cases rail */
.drag-cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 109px; height: 109px; margin: -54px 0 0 -54px;
  background: var(--brown-edge);
  padding: 1px 8px 8px 1px; border-radius: 47px 47px 53px 47px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
  translate: var(--cx, -300px) var(--cy, -300px);
  scale: 0; transition: scale 0.35s var(--ease-spring);
}
.drag-cursor span { display: grid; place-items: center; width: 100px; height: 100px; border-radius: 46px; background: var(--brown); }
.drag-cursor svg { width: 48px; height: 48px; transition: transform 0.3s var(--ease-out); }
.drag-cursor.is-on { scale: 1; }
.drag-cursor.is-down { scale: 0.9; }
.drag-cursor.is-down svg { transform: scaleX(1.15); }
@media (hover: hover) and (pointer: fine) { .rail-track, .rail-track * { cursor: none; } }

@media (hover: none), (pointer: coarse) { .drag-cursor { display: none; } }

/* ------------------------------------------------------------------ listing */
.crumbs { line-height: 1.5; display: flex; justify-content: center; gap: 8px; font-weight: 500; color: var(--lilac-edge); padding-top: 70px; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--faint); }
.listing .page-title, .case-head .page-title { text-align: center; margin: 16px 0 70px; }
.listing, .case { padding-bottom: 70px; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
.case-grid .case-media { padding: 1px 14px 14px 1px; border-radius: 25px 25px 30px 25px; }
.case-grid .case-media-in { border-radius: 24px; }

/* ------------------------------------------------------------------ case page */
/* the text column and the side navigation, with the original's sizes and gaps */
.case-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 632px) minmax(0, 1fr);
  align-items: start;
}
.case-main { grid-column: 2; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.toc { grid-column: 3; justify-self: end; width: 183px; position: sticky; top: calc(var(--header-h) + 24px); }
.toc ol { list-style: none; display: grid; gap: 12px; }
.toc a { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; line-height: 1.76; transition: color 0.2s ease; }
.toc a::before { content: ""; flex: none; box-sizing: border-box; width: 24px; height: 4px; border-radius: 2px; background: var(--line); transition: background 0.2s ease; }
.toc a:hover { color: var(--ink); }
.toc a:hover::before { background: var(--lilac-edge); }
.toc a.is-active { color: var(--ink); }
/* active: the pink bar with its dark layer, like the frog's tongue */
.toc a.is-active::before { height: 7px; border-radius: 4px; background: var(--lilac); border: solid var(--lilac-edge); border-width: 1px 2px 2px 1px; }

.shot { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.shot-frame { background: var(--card-edge); padding: 1px 14px 14px 1px; border-radius: 25px 25px 30px 25px; }
.shot-frame-in { overflow: hidden; border-radius: 24px; }
.shot-frame img { width: 100%; }
.shot figcaption { display: grid; gap: 8px; color: var(--ink-80); }
html.js .shot[data-reveal] .shot-frame img { transform: scale(1.06); transition: transform 1.4s var(--ease-out); }
html.js .shot[data-reveal].in .shot-frame img { transform: none; }

.case-section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 110px; }
.case-section h2 { font: 400 28px/1.12 var(--f-display); }
.case-section p, .case-section li { color: var(--ink-80); }
.case-section > .shot { margin-top: 8px; } /* 16 + 8: 24px around images, as in the original */
/* as in the original: runs of images without text sit 16px apart, the text after such a run 24px below it */
.case-section > .shot:not(:has(figcaption)) + .shot { margin-top: 0; }
.case-section > .shot:not(:has(figcaption)) + .shot figcaption { margin-top: 8px; }
/* consecutive plain paragraphs sit 8px apart */
.case-section > div:has(> p:only-child) + div:has(> p:only-child) { margin-top: -8px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field h3 { font: 400 19px/1.18 var(--f-display); color: var(--ink); }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.case-section ul, .case-section ol { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.case-section li { position: relative; }
/* bullets: small pixel squares */
.case-section ul li { padding-left: 24px; }
.case-section ul li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 7px; height: 7px; background: var(--lilac-edge); }
/* numbers: plain pink digits */
.case-section ol { counter-reset: n; }
.case-section ol li { counter-increment: n; padding-left: 24px; }
.case-section ol li::before { content: counter(n) "."; position: absolute; left: 0; top: 0; color: var(--lilac-edge); font-weight: 500; }

/* Project overview facts: cards with the site's dark under-layer */
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.meta-item { background: var(--card-edge); padding: 1px 8px 8px 1px; border-radius: 19px 19px 22px 19px; }
.meta-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.meta-in { height: 100%; background: var(--tile); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.meta-in h3 { font: 400 19px/1.18 var(--f-display); color: var(--ink); }

/* ------------------------------------------------------------------ footer */
.site-footer { padding-bottom: 56px; text-align: center; } /* no outer space on top: the block above brings its own, 70px on desktop and 32px on phones */
.footer-inner { padding-top: 56px; }
.footer-title { font-size: var(--t-title); line-height: 1.02; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 16px; }
.wave { display: inline-block; }
.footer-links { margin-top: 36px; display: flex; justify-content: center; align-items: center; gap: 16px; font-weight: 500; }
.magnet { transition: translate 0.4s var(--ease-out); translate: var(--mx, 0) var(--my, 0); }

/* ------------------------------------------------------------------ reveal */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); }
html.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 0.8s ease var(--d, 0ms), transform 1s var(--ease-out) var(--d, 0ms);
}
html.js .case-card[data-reveal-card] { opacity: 0; transform: translateY(40px) rotate(1.5deg); }
html.js .case-card[data-reveal-card].in { opacity: 1; transform: none; transition: opacity 0.8s ease var(--d, 0ms), transform 1.1s var(--ease-out) var(--d, 0ms); }
html.js .shot[data-reveal] { transform: none; }

/* view transitions between pages */
::view-transition-old(root) { animation: 0.35s var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 0.6s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-24px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(40px); } }

/* ------------------------------------------------------------------ responsive */
@media (min-width: 769px) and (max-width: 1200px) { .pill-wrap-apps { top: calc(100% - 4px); left: 0; } }

@media (max-width: 1180px) {
  .case-layout { grid-template-columns: minmax(0, 1fr); }
  .case-main { grid-column: 1; max-width: 632px; margin-inline: auto; width: 100%; }
  /* the same text list as on the desktop, as a strip pinned to the bottom of the screen; the line sits on its bottom edge */
  .page-case { padding-bottom: 50px; }
  .toc {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 50; width: auto; justify-self: stretch;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); /* as the header */
    border-top: 1px solid var(--line);
  }
  /* slides sideways; the edges fade only where there is more to scroll to (--fade-l and --fade-r come from the script) */
  .toc-scroll {
    position: relative; padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent);
  }
  .toc-scroll::-webkit-scrollbar { display: none; }
  .toc ol { display: flex; gap: 20px; width: max-content; margin-inline: auto; }
  .toc a { position: relative; display: block; padding-block: 11px; white-space: nowrap; line-height: 1.6; }
  .toc a::before { position: absolute; left: 0; right: 0; bottom: 0; width: auto; opacity: 0; }
  .toc a.is-active::before { opacity: 1; height: 4px; border: solid var(--lilac-edge); border-width: 0 0 2px; border-radius: 2px; background: var(--lilac); }
}


@media (max-width: 768px) {
  :root { --header-h: 72px; --radius: 20px; --edge: 6px; --gutter: 16px; --px-l: 2.55px; --t-title: 40px; }
  .section-title, .page-title, .footer-title { gap: 0 8px; }
  #cases-title, #list-title { gap: 0 4px; }
  .section-title .script, .page-title .script, .footer-title .script { font-size: 1em; }
  /* a regular block, not a full screen. One gap everywhere: logo to label, label to title, title to label, label to the
     tallest flower. A label counts with its cursor (88px and 78px tall). 67px and -6px are the logo's and the flower's
     offsets from the edges of this block */
  .first-screen { --hero-gap: 60px; --hero-gap-apps: 30px; min-height: 0; } /* the green label's cursor sits to the side, so its pill matches the pink one's distance from the title */
  .first-screen .hero { flex: none; display: block; padding-block: calc(67px + 2 * var(--hero-gap)) calc(80px + var(--hero-gap) + var(--hero-gap-apps)); }
  .meadow-wide { display: none; }
  .social { display: none; }
  .header-row { grid-template-columns: 1fr 1fr; }
  .logo { width: 76px; height: 29px; }
  .hero-line-2 { justify-content: flex-end; }
  .pill-wrap-exp { top: auto; bottom: calc(100% + var(--hero-gap)); left: auto; right: 0; }
  .pill-wrap-apps { top: calc(100% + var(--hero-gap-apps)); bottom: auto; left: 0; }
  .marquee-track li { font-size: 24px; }
  .why-card { padding: 1px 8px 8px 1px; border-radius: 23px 23px 26px 23px; }
  .why-inner { padding: 24px; }
  .meta { gap: 8px; }
  .case-media, .shot-frame { padding: 1px 8px 8px 1px; }
  .shot-frame { border-radius: 23px 23px 26px 23px; }
  .shot-frame-in { border-radius: 22px; }
  .why-row { flex-direction: column-reverse; align-items: flex-start; gap: 16px; }
  .why-stage { height: auto; margin-top: 32px; }
  .why-panel { position: relative; padding: 32px 0; }
  .why-stack { gap: 8px; padding: 0 16px; margin-top: 24px; min-height: 0; place-items: stretch; }
  .why-stack .why-card { width: 100%; }
  .why-inner { display: block; padding: 24px; background: var(--face); transform: none; }
  .why-row { flex-direction: column-reverse; align-items: flex-start; padding: 0; background: none; transform: none; border-left: 0; }
  .why-row + .why-row { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(17, 17, 17, 0.14); border-left: 0; transform: none; }
  .why-row { backface-visibility: visible; -webkit-backface-visibility: visible; border-radius: 0; min-height: 0; }
  .why-row h3 { font-size: 24px; line-height: 1.08; margin-bottom: 8px; }
  .why .section-title { font-size: 40px; line-height: 1.02; }
  .why-row p { font-size: 16px; line-height: 1.65; max-width: none; }
  .why-row .thumb { width: calc(21 * var(--px-l)); height: calc(21 * var(--px-l)); justify-items: start; } /* the phone lawn's 0.85 applies to the whole l group */
  .tone-brown .why-row + .why-row { border-top-color: rgba(255, 255, 255, 0.16); }
  .why-stack .why-card { grid-area: auto; }
  .meadow { height: 90px; margin-top: 24px; }
  .meadow.meadow-hero { height: 125px; margin-top: 0; }
  .meadow.meadow-hero .flora, .meadow.meadow-hero .ground { scale: 0.85; }
  .meadow .flora, .meadow .ground { scale: 0.62; transform-origin: 50% 100%; }
  .meadow .flora { translate: 0 0; }
  .cases-home { padding-block: 32px; }
  .cases-head { margin-bottom: 20px; }
  .see-all { padding-bottom: 0; }
  .rail-track { gap: 8px; }
  .rail-track .case-card { flex-basis: calc(100vw - 47px); }
  .rail-bar { margin-top: 8px; }
  .case-media img { transform: none; }
  .case-tags { margin-top: 12px; line-height: 1.65; }
  .case-title { margin-top: 6px; line-height: 1.08; }
  .case-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .case-grid .case-media { padding: 1px 8px 8px 1px; border-radius: 23px 23px 26px 23px; }
  .case-grid .case-media-in { border-radius: 22px; }
  .listing .page-title, .case-head .page-title { margin: 12px 0 32px; } /* the block spacing: 70px on desktop, 32px here */
  .crumbs { padding-top: 32px; }
  .case-title { font-size: 24px; }
  .site-footer { padding-bottom: 40px; }
  .listing, .case { padding-bottom: 32px; }
  .footer-inner { padding-top: 40px; }
  .footer-links { flex-wrap: wrap; gap: 12px; margin-top: 24px; }
}

/* tablets: the script word sits closer to the word beside it */
@media (min-width: 769px) and (max-width: 1200px) {
  .section-title, .page-title, .footer-title { gap: 0 10px; }
}

/* tablets in portrait: a 2-up list and a rail card that leaves the next one in view */
@media (min-width: 601px) and (max-width: 768px) {
  .rail-track .case-card { flex-basis: 56vw; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
}

@media (max-width: 420px) {
  :root { --t-hero: clamp(42px, 13.4vw, 60px); }
}

/* the smallest phones: keeps "My cases" on one line beside "See all" */
@media (max-width: 340px) {
  .cases-head .section-title { white-space: nowrap; }
}

/* touch: a taller hit area on the small text links, the layout stays as it is */
@media (pointer: coarse) {
  .footer-links a, .crumbs a, .cv { padding-block: 10px; margin-block: -10px; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .why-stage { height: auto; margin-top: 32px; }
  .why-panel { position: relative; top: auto; height: auto; max-height: none; }
  .why-stack { gap: 24px; }
  .why-stack .why-card { grid-area: auto; transform: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js [data-reveal], html.js .case-card[data-reveal-card] { opacity: 1; transform: none; }
  html.js .hero .ch { transform: none; }
  html.js .script-ink, html.js .logo svg { clip-path: none; }
  html.js .rail-track .case-card { opacity: 1; translate: none; }
  html.has-loader .loader { display: none; }
  html.has-loader { background: none; }
  html.js .pill-wrap { opacity: 1; scale: 1; }
  html.js .shot[data-reveal] .shot-frame img { transform: none; }
  .marquee { flex-wrap: wrap; width: auto; }
  .marquee-track { flex-wrap: wrap; justify-content: center; }
  .marquee-track[aria-hidden] { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
