/* itsdelma.com — built from Figma "itsdelma.com 2026" / Desktop (729:542) */

:root {
  --ink: #3a3530;
  --divider: #ece6df;
  --muted: #c5bfb4;
  --plastic-edge: #cadcef;
  --page: #fdf9f5;
  --label: #fff9ed;
  --sticker-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  --custom-shadow: 0 2px 10px -2px rgba(35, 31, 26, 0.25);
  --font: "Roboto", system-ui, sans-serif;
  --font-slab: "Roboto Slab", Georgia, serif;
  --stage: 1280px;
  --section-gap: 96px; /* hero → Experience → first case study → next case study */
}

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

html {
  /* Safari colours the area outside the page (toolbar strip, overscroll) from the root and body
     background *colours* blended together. So neither carries the cream: the root colour is the
     soft green at the bottom of the paper + mesh wash, and the cream is an image sized to the page. */
  background: #e2ebe0 linear-gradient(var(--page), var(--page)) no-repeat;
  /* Nothing should ever make the page pan sideways (iOS needs this on the root, not just body). */
  overflow-x: hidden;
}

body {
  position: relative;
  /* Own stacking context so the paper shader (z-index: -1) paints above the body colour. */
  isolation: isolate;
  margin: 0;
  padding-top: 40px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Shader surfaces ---------- */

canvas.page-paper,
canvas.page-mesh,
.label canvas,
.hero-frost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-paper,
.page-mesh {
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}
.page-paper.is-rendered {
  opacity: 1;
}
/* Colour wash over the paper, as in Figma (Mesh gradient fill at 10%). */
.page-mesh.is-rendered {
  opacity: 0.1;
}

.stage {
  position: relative;
  width: 100%;
  max-width: var(--stage);
  margin: 0 auto;
}

.rule {
  height: 4px;
  margin: 0;
  border: 0;
  background: #000;
  opacity: 0.9;
}

/* ---------- Hero: photo under frosted plastic ---------- */

.hero {
  height: 784px;
}

.hero-sleeve {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 40px;
  filter: blur(1px);
  box-shadow: 0 4px 11.8px rgba(8, 12, 32, 0.25);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: hard-light;
  background: linear-gradient(180deg,
    rgba(73, 150, 238, 0.337) 0%,
    rgba(71, 145, 229, 0.225) 8.6538%,
    rgba(73, 150, 238, 0.045) 35.096%,
    rgba(73, 150, 238, 0.045) 70.192%,
    rgba(73, 150, 238, 0.225) 91.827%,
    rgba(73, 150, 238, 0.337) 100%);
}

.hero-frost {
  opacity: 0;
}
.hero-frost.is-rendered {
  opacity: 1;
}

/* Without WebGPU the frosted-plastic shader can't run; keep the photo legible but soft. */
.no-webgpu .hero-photo {
  filter: blur(6px);
  transform: scale(1.03);
}
.no-webgpu .hero-tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(202, 220, 239, 0.28);
}

.hero-inset {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 10px 18.5px rgba(0, 0, 0, 0.5);
}

.hero-edge {
  position: absolute;
  top: 18.4px;
  left: 14.4px;
  width: calc(100% - 28.8px);
  height: calc(100% - 35.8px);
  pointer-events: none;
}

/* ---------- Headline label (paper card) ---------- */

.label {
  position: absolute;
  left: min(80px, 6.25vw);
  top: 91px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 521px;
  height: 602px;
  padding: 40.5px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--label);
  box-shadow: var(--sticker-shadow);
  color: #000;
}

.label .label-coarse {
  opacity: 0.2;
}

.label > :not(canvas) {
  position: relative;
  opacity: 0.9;
}

.label-name {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.8px;
}

.label > .rule {
  opacity: 0.9;
  margin-top: 15px;
}

.label-title {
  /* Auto margin here and on the bottom rule splits the free space evenly,
     centring the headline + paragraph between the two rules. */
  margin: auto 0 0;
  font-family: var(--font-slab);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.4px;
}

.label-body {
  margin: 39px 0 0;
  line-height: 1.6;
}

.label > .label-rule-bottom {
  margin-top: auto;
}

.label-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 19px;
  color: var(--ink);
  line-height: 1;
}

/* ---------- Stickers ---------- */

.sticker {
  position: absolute;
  z-index: 5;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.sticker-body {
  position: relative;
  width: 100%;
  height: 100%;
  rotate: var(--r, 0deg);
}

.sticker-face {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Hero stickers: while one wraps over the lid's curved edge, a level canvas replaces the face. */
.sticker-wrap {
  position: absolute;
  display: none;
  pointer-events: none;
  transform: rotate(calc(-1 * var(--r, 0deg)));
}
.sticker.is-wrapping .sticker-wrap {
  display: block;
}
.sticker.is-wrapping .sticker-face {
  visibility: hidden;
}

.sticker.is-lifted {
  cursor: grabbing;
  filter: drop-shadow(0 12px 14px rgba(35, 31, 26, 0.28));
  transform: translateY(-3px) scale(1.03);
}

.sticker:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 8px;
  border-radius: 12px;
}

.sticker-flap {
  position: absolute;
  inset: 0;
  display: none;
  transform-origin: 0 0;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(35, 31, 26, 0.35));
}

.sticker-back {
  position: absolute;
  inset: 0;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Desktop positions in the hero (1280 frame), arranged to the right of the card. */
.sticker--westcoast {
  left: 77.34%;
  top: 270px;
  width: min(220px, 17.1875vw);
  aspect-ratio: 1;
}
.sticker--sardinas {
  left: 70.94%;
  top: 497px;
  width: min(329.54px, 25.745vw);
  aspect-ratio: 329.54 / 227.295;
}
.sticker--square {
  --r: 6.52deg;
  left: 59.22%;
  top: 343px;
  width: min(171.747px, 13.418vw);
  aspect-ratio: 171.747 / 175.684;
}
.sticker--square .sticker-face,
.sticker--square .sticker-wrap {
  filter: drop-shadow(var(--sticker-shadow));
}
.sticker--kickstarter {
  --r: -11.19deg;
  left: 65.78%;
  top: 140px;
  width: min(162.864px, 12.724vw);
  aspect-ratio: 162.864 / 183.809;
}
.sticker--metalab {
  left: 82.42%;
  top: 74px;
  width: min(178px, 13.906vw);
  aspect-ratio: 178 / 172;
}

/* ---------- Experience ---------- */

.experience {
  position: relative;
  margin-top: var(--section-gap);
}

.experience-list {
  width: 62.5%;
  max-width: 800px;
  margin: 0 auto;
}

.section-heading {
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 4px solid rgba(0, 0, 0, 0.9);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.jobs {
  display: grid;
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.jobs li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.jobs strong {
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.job-desc,
.job-years {
  line-height: 1.6;
  opacity: 0.9;
}

.job-years {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Work: device mockups + pill buttons ---------- */

.work {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--section-gap) 16px 61px;
}

.work-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border-radius: 24px;
  transition: transform 0.3s ease;
}
.work-item--ipad {
  max-width: 963px;
}
.work-item--safari {
  max-width: 947px;
}
.work-item + .work-item {
  margin-top: var(--section-gap);
}
.work-item:hover {
  transform: translateY(-4px);
}
.work-item:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 8px;
}
/* Case studies are switched off for now: links keep their URL in data-href instead of href. */
.work-item:not([href]) {
  cursor: default;
}
.work-item:not([href]):hover {
  transform: none;
}

/* Caption under each mockup: icon, company, description, status. */
.work-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  align-self: stretch;
  min-height: 56px;
  margin-top: 16px;
  padding: 8px 16px;
  color: var(--ink);
  line-height: 1.4;
}
.work-caption strong {
  font-weight: 600;
  white-space: nowrap;
}
.work-caption span {
  line-height: 1.6;
  opacity: 0.9;
}
.work-caption .work-caption-status {
  margin-left: auto;
  color: #000;
}
.work-item:hover .work-caption-status,
.work-item:focus-visible .work-caption-status {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.device {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.device-scale {
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
}

/* iPad Pro 11 — authored portrait, rotated to landscape like the Figma instance. */
.device--ipad {
  max-width: 963px;
  aspect-ratio: 963 / 696;
}
.device--ipad .device-scale {
  width: 963px;
  height: 696px;
}

.ipad {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 696px;
  height: 963px;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.ipad > img {
  position: absolute;
}

.ipad-device {
  top: 0;
  left: -0.76px;
  width: 696.14px;
  height: 964.35px;
}

.ipad-camera {
  top: 12.34px;
  left: 320.38px;
  width: 35.96px;
  height: 9.77px;
}

.ipad-screen {
  position: absolute;
  top: 33.61px;
  left: 33.62px;
  width: 626.19px;
  height: 895.78px;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
  -webkit-mask: url("../assets/ipad-screen-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../assets/ipad-screen-mask.svg") 0 0 / 100% 100% no-repeat;
}

.ipad-screen-rot {
  position: relative;
  flex: none;
  width: 100cqh;
  height: 100cqw;
  overflow: hidden;
  rotate: 90deg;
}

.ipad-screen-rot img {
  position: absolute;
  top: 0;
  left: 0.05%;
  width: 111.91%;
  max-width: none;
  height: 100%;
}

.ipad-outline {
  top: 34.48px;
  left: 33.7px;
  width: 627.21px;
  height: 895.49px;
}

/* Safari browser */
.device--safari {
  max-width: 947px;
  aspect-ratio: 947 / 698;
}
.device--safari .device-scale {
  width: 947px;
  height: 698px;
}

.safari,
.safari-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.safari > img {
  position: absolute;
}

.safari-screen {
  position: absolute;
  top: 26px;
  left: 0;
  width: 947px;
  height: 673px;
  overflow: hidden;
  -webkit-mask: url("../assets/safari-screen-mask.svg") 0 0 / 947px 672px no-repeat;
  mask: url("../assets/safari-screen-mask.svg") 0 0 / 947px 672px no-repeat;
}

.safari-screen img {
  position: absolute;
  top: -0.01%;
  left: -10.8%;
  width: 121.62%;
  max-width: none;
  height: 100%;
}

.safari-outline {
  top: -0.75px;
  left: -0.76px;
  width: 948.5px;
  height: 699.5px;
}

.safari-buttons {
  top: 9.11px;
  left: 9.12px;
  width: 35.04px;
  height: 8.73px;
}

/* Pill buttons */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin-top: 40px;
  padding: 8px 24px;
  border-radius: 24px;
  background: var(--divider);
  line-height: 1.4;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.pill:hover {
  background: #e5ded5;
  transform: translateY(-1px);
}
.pill:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 4px;
}
.pill strong {
  font-weight: 600;
  white-space: nowrap;
}
.pill span {
  line-height: 1.6;
  opacity: 0.9;
}

.pill-icon {
  flex: none;
}
.pill-icon--square {
  width: 40px;
  height: 41px;
  margin: -0.5px 0;
  filter: drop-shadow(var(--sticker-shadow));
}
.pill-icon--kickstarter {
  width: 32.247px;
  height: 36.395px;
  margin: 1px 1.13px;
  rotate: -3.65deg;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 96px 16px 48px;
}

/* Same width as the widest mockup (the iPad) so the rule lines up with it. */
.site-footer-inner {
  max-width: 963px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  border-top: 4px solid rgba(0, 0, 0, 0.9);
}

.site-footer-name {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.6;
}

.site-footer-links a {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  opacity: 0.9;
  cursor: pointer;
  text-underline-offset: 4px;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.site-footer-links a:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 4px;
}

/* ---------- Case study (placeholder template) ---------- */

.case-hero {
  height: 700px;
}

.case-hero .label {
  height: auto;
  min-height: 0;
  top: 80px;
}

.label-back {
  display: inline-block;
  transition: opacity 0.2s;
}
.label-back:hover {
  opacity: 0.6;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.label-kicker {
  margin: 48px 0 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

.case-hero .label-title {
  margin-top: 8px;
}

.case-hero .label > .label-rule-bottom {
  margin-top: 40px;
}

.case-hero .sticker--case {
  left: 68%;
  top: 200px;
  width: min(230px, 18vw);
}

body[data-project="square"] [data-show="kickstarter"],
body[data-project="kickstarter"] [data-show="square"] {
  display: none;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 120px;
  padding: 0 80px;
}

.facts p {
  margin: 16px 0 0;
  line-height: 1.6;
  opacity: 0.9;
}

.case-device {
  padding-bottom: 0;
}

.chapters {
  padding: 0 80px;
}

.chapter {
  display: grid;
  grid-template-columns: 320px minmax(0, 800px);
  padding-top: 120px;
}

.chapter-num {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-slab);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.chapter-body > p {
  max-width: 640px;
  margin: 24px 0 0;
  line-height: 1.6;
  opacity: 0.9;
}

.chapter-body > .chapter-lede {
  font-family: var(--font-slab);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.placeholder-img {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin: 32px 0 0;
  padding: 16px;
  border: 1.5px dashed var(--muted);
  border-radius: 16px;
  background: rgba(255, 249, 237, 0.7);
  color: var(--ink);
  font-size: 14px;
  text-align: center;
}
.placeholder-img span {
  opacity: 0.6;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.placeholder-grid .placeholder-img {
  aspect-ratio: 1;
}

.jobs.outcomes {
  margin-top: 32px;
}

.case-nav {
  padding-bottom: 0;
}

.case-nav-label {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.case-nav .pill {
  margin-top: 16px;
}

.back-home {
  margin-top: 32px;
  opacity: 0.7;
}
.back-home:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1023px) {
  .case-hero {
    height: auto;
  }
  .case-hero .label {
    top: auto;
  }
  .case-hero .sticker--case {
    left: 50%;
    top: auto;
    bottom: 48px;
    width: 180px;
    translate: -50% 0;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    margin-top: 72px;
    padding: 0 16px;
  }
  .chapters {
    padding: 0 16px;
  }
  .chapter {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }
  .chapter-num {
    margin-bottom: 16px;
    font-size: 28px;
  }
  .chapter-body > .chapter-lede {
    font-size: 20px;
  }
  .placeholder-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Narrow screens: stack the composition ---------- */

@media (max-width: 1023px) {
  :root {
    --section-gap: 72px;
  }

  /* Hero runs edge to edge: flush with the top, square corners, no plastic edge line. */
  body {
    padding-top: 0;
  }
  .hero-sleeve {
    border-radius: 0;
  }
  .hero-edge {
    display: none;
  }
  /* Stickers near the screen edge wrap out of sight; never let them widen the page. */
  .hero {
    overflow-x: clip;
  }

  /* The photo runs up under the iPhone status bar (viewport-fit=cover); the safe-area inset
     keeps the card where it was, just below it. */
  .hero {
    height: auto;
    padding: calc(48px + env(safe-area-inset-top, 0px)) 40px 500px;
  }

  .label {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 521px;
    height: auto;
    padding: 40px 24px;
  }

  .label-title {
    margin-top: 40px;
    font-size: clamp(30px, 8vw, 40px);
  }

  .label > .label-rule-bottom {
    margin-top: 40px;
  }

  .sticker--westcoast {
    left: 60%;
    top: auto;
    bottom: 38px;
    width: 160px;
  }
  .sticker--sardinas {
    left: 6%;
    top: auto;
    bottom: 26px;
    width: 230px;
  }

  .experience {
    padding: 0 16px;
    min-height: 0;
  }
  .sticker--square {
    left: 37.7%;
    top: auto;
    bottom: 200px;
    width: 120px;
  }
  .sticker--kickstarter {
    left: 69%;
    top: auto;
    bottom: 231px;
    width: 110px;
  }
  .sticker--metalab {
    left: 8%;
    top: auto;
    bottom: 241px;
    width: 120px;
  }

  .experience-list {
    width: 100%;
    margin-left: 0;
  }

  .jobs {
    gap: 24px;
  }
  .jobs li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
  }
  .jobs strong {
    white-space: normal;
  }
  /* Description sits under the company name and stops where the dates begin. */
  .job-desc {
    grid-column: 1;
    grid-row: 2;
  }

  .site-footer {
    padding: 72px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer-links {
    flex-direction: column;
  }
  /* No logo on phones. Row 1: company · Coming soon. Row 2: description, stopping where
     "Coming soon" begins. */
  .work-caption {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }
  .work-caption .pill-icon {
    display: none;
  }
  .work-caption > span:not(.work-caption-status) {
    grid-column: 1;
    grid-row: 2;
  }
  .work-caption .work-caption-status {
    margin-left: 0;
  }
  .pill {
    gap: 4px 12px;
    padding: 8px 20px;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticker,
  .work-item,
  .pill {
    transition: none;
  }
}
