  /* Project page: same type and scale as the front page (1rem = 16 design px at 2560 wide) */
  :root {
    --black: #050505;
    --white: #fff;
    --grey: #6b6b6b;
    --line: rgba(0, 0, 0, .12);
    --serif: "Libre Baskerville", Georgia, serif;
    --display: "Zen Dots", system-ui, sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --edge: 9rem;
    --wide: min(150rem, 100% - 2 * var(--edge));
  }
  html { font-size: max(calc(100vw / 160), 9.5px); scroll-behavior: smooth; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { background: var(--white); color: #000; font-family: var(--serif); -webkit-font-smoothing: antialiased; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  img { display: block; max-width: 100%; }

  .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
  .reveal.in, html:not(.js) .reveal { opacity: 1; transform: none; }

  .logo {
    position: fixed; z-index: 10; top: 3.4rem; left: 3.5rem;
    font-family: var(--display); font-size: 3.75rem; line-height: 1;
    color: var(--white); mix-blend-mode: difference;
  }

  /* ---------- Top: the project's slide from the front page ---------- */
  /* Same heading and spacing as the Verkefni section on the front page */
  .p-hero { padding: 13rem var(--edge) 12rem; }
  .p-head { font-size: 9rem; line-height: .9; font-weight: 700; }
  .p-head a { transition: opacity .3s; }
  .p-head a:hover { opacity: .6; }
  .p-hero-inner { margin-top: 7rem; display: grid; grid-template-columns: 76rem 1fr; gap: 8rem; align-items: center; }
  .p-shot { aspect-ratio: 16 / 10; }
  .p-shot > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .p-domain { font-family: var(--display); font-size: 1.5rem; }
  .p-info h1 { margin-top: 1.5rem; font-size: 6rem; line-height: 1.1; font-weight: 700; }
  .p-intro { margin-top: 2.5rem; max-width: 60rem; font-size: 1.875rem; line-height: 2.875rem; }
  .p-intro p + p { margin-top: 1.25rem; }  /* the page intro can run to several paragraphs */

  .pills { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; list-style: none; }
  .pills li {
    padding: .35rem 1.1rem .45rem; border: 1px solid #000; border-radius: 99rem;
    font-family: var(--display); font-size: 1rem; line-height: 1.5; white-space: nowrap;
  }

  /* Device mockups: MacBook, iPad and iPhone laid over each other, each screen scrolling its site */
  .p-shot.devices { position: relative; overflow: visible; background: none; }
  .devices .screen { position: relative; overflow: hidden; background: #fff; container-type: size; }
  .devices .screen img {
    display: block; width: 100%; height: auto;
    animation: device-scroll var(--dur, 24s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
  }
    @keyframes device-scroll {
    0%, 8% { transform: translateY(0); }
    92%, 100% { transform: translateY(calc(-100% + 100cqh)); }
  }

  .mac { position: absolute; left: 0; top: 2%; width: 76%; z-index: 1; }
  .mac-lid {
    position: relative; padding: 2.4% 2.4% 3.2%; background: #0c0c0c;
    border-radius: 2.2% / 3.4%; box-shadow: 0 0 0 .15rem #c7c8ca, 0 0 0 .3rem #e4e5e7;
  }
  .mac-lid::before {  /* camera notch */
    content: ""; position: absolute; z-index: 2; left: 50%; top: 2.4%; width: 9%; height: 3.2%;
    transform: translateX(-50%); background: #0c0c0c; border-radius: 0 0 .5rem .5rem;
  }
  .mac .screen { aspect-ratio: 16 / 10; border-radius: .3rem; }
  .mac .screen img { --dur: 26s; }
  .mac-base {
    position: relative; width: 112%; margin-left: -6%; height: 1.4rem;
    background: linear-gradient(#e9eaec, #c3c4c7 70%, #9fa0a3); border-radius: 0 0 1.4rem 1.4rem / 0 0 1.2rem 1.2rem;
    box-shadow: 0 1.5rem 2.5rem -1rem rgba(0, 0, 0, .35);
  }
  .mac-base::before {  /* thumb scoop */
    content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 45%;
    transform: translateX(-50%); background: #b9babd; border-radius: 0 0 .8rem .8rem;
  }

  .ipad {
    position: absolute; right: 2%; bottom: 0; width: 28%; z-index: 2;
    padding: 1.1rem; background: #111; border-radius: 2.2rem;
    box-shadow: 0 0 0 .15rem #c7c8ca, 0 2.5rem 4rem -1.5rem rgba(0, 0, 0, .45);
  }
  .ipad .screen { aspect-ratio: 820 / 1180; border-radius: 1.1rem; }
  .ipad .screen img { --dur: 30s; --delay: -6s; }

  .iphone {
    position: absolute; left: 56%; bottom: -2%; width: 13.5%; z-index: 3;
    padding: .55rem; background: #111; border-radius: 2.4rem;
    box-shadow: 0 0 0 .15rem #c7c8ca, 0 2.5rem 3.5rem -1.5rem rgba(0, 0, 0, .5);
  }
  .iphone::before {  /* dynamic island */
    content: ""; position: absolute; z-index: 2; left: 50%; top: 1.3rem; width: 32%; height: .95rem;
    transform: translateX(-50%); background: #111; border-radius: 1rem;
  }
  .iphone .screen { aspect-ratio: 390 / 844; border-radius: 1.9rem; }
  .iphone .screen img { --dur: 20s; --delay: -10s; }
  .more {
    display: inline-flex; align-items: center; gap: 1.5rem; margin-top: 3rem;
    font-family: var(--display); font-size: 1.875rem;
  }
  .more svg { width: 2.5625rem; height: auto; transition: transform .4s var(--ease); }
  .more:hover svg { transform: translateX(.5rem); }


  /* ---------- Sections ---------- */
  .p-body { width: var(--wide); margin: 0 auto; padding-bottom: 6rem; }
  .p-body > * + * { margin-top: 14rem; }
  .p-body > .p-row + .p-text { margin-top: 5rem; }  /* text that belongs to the images above it */

  /* 1, 2 or 3 images side by side */
  .p-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4rem; align-items: start; }
  .p-body figure img, .p-split figure img { width: 100%; height: auto; border-radius: .75rem; box-shadow: 0 0 0 1px var(--line), 0 2rem 4rem -2.5rem rgba(0, 0, 0, .35); }
  .zoom { display: block; cursor: zoom-in; }
  .zoom img { transition: transform .8s var(--ease); }
  .zoom:hover img { transform: translateY(-.5rem); }
  figcaption { margin-top: 1.75rem; font-family: var(--display); font-size: 1.125rem; line-height: 1.6; color: var(--grey); }

  /* Before and after: an arrow drawn across the gap, a little over both images */
  .p-img { position: relative; }
  .p-arrow { position: absolute; z-index: 2; top: 50%; right: -10rem; width: 16rem; transform: translateY(-50%); pointer-events: none; }
  .p-row figure:last-child .p-arrow { display: none; }
  .p-arrow svg { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .p-arrow .halo { stroke: var(--white); stroke-width: 11; opacity: 0; transition: opacity .4s .5s; }
  .p-arrow .line, .p-arrow .head { stroke: #000; stroke-width: 3.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
  .p-row.in .p-arrow .halo, html:not(.js) .p-arrow .halo { opacity: 1; }
  html:not(.js) .p-arrow .line, html:not(.js) .p-arrow .head { stroke-dashoffset: 0; }
  .p-row.in .p-arrow .line { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease) .6s; }
  .p-row.in .p-arrow .head { stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--ease) 1.4s; }
  .p-row.in .p-arrow svg { animation: nudge 2.4s var(--ease) 2.2s infinite; }
  @keyframes nudge { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(1.25rem); } }

  .p-text { max-width: 76rem; }
  .p-text p, .p-split-text p { font-size: 1.875rem; line-height: 2.875rem; }
  .p-text p + p, .p-split-text p + p { margin-top: 1.5rem; }

  /* 50/50: image on one side, headline and text on the other */
  .p-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10rem; align-items: center; }
  .p-split.is-right figure { order: 2; }
  .p-split-text h2 { margin-bottom: 3rem; font-size: 5rem; line-height: 1.1; font-weight: 700; }

  .p-back { width: var(--wide); margin: 10rem auto 0; padding: 4rem 0 10rem; border-top: 1px solid #000; }
  .p-back a { display: inline-flex; align-items: center; gap: 1.5rem; font-family: var(--display); font-size: 1.875rem; }
  .p-back svg { width: 2.5625rem; height: auto; transition: transform .4s var(--ease); }
  .p-back a:hover svg { transform: translateX(-.5rem); }

  /* Click an image to see it larger */
  .lightbox { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 5rem; background: rgba(5, 5, 5, .92); cursor: zoom-out; animation: fade .3s var(--ease); }
  .lightbox[hidden] { display: none; }
  .lightbox img { max-width: 100%; max-height: calc(100vh - 10rem); border-radius: .5rem; }
  .lightbox button { position: absolute; top: 2.5rem; right: 3.5rem; color: var(--white); font-size: 4rem; line-height: 1; }
  @keyframes fade { from { opacity: 0; } }

  /* ---------- Footer ---------- */
  .site-footer {
    display: flex; align-items: center; gap: 5rem; padding: 4.5rem 3.5rem;
    background: var(--black); color: var(--white); font-family: var(--display); font-size: 1.5rem;
  }
  .footer-logo { font-size: 3.75rem; line-height: 1; margin-right: auto; }
  .site-footer a:not(.footer-logo) { transition: opacity .3s; }
  .site-footer a:not(.footer-logo):hover { opacity: .6; }

  /* ---------- Small screens ---------- */
  @media (max-width: 1100px) {
    html { font-size: 8px; }
    :root { --edge: 2rem; }
    .logo { position: absolute; top: 3.5rem; left: 2rem; }
    .p-hero { padding: 13rem 2rem 10rem; }
    .p-head { font-size: 7rem; }
    .p-hero-inner { margin-top: 5rem; }
    .p-hero-inner { grid-template-columns: 1fr; gap: 6rem; }
    .p-info h1 { font-size: 6rem; }
    .p-intro, .p-text p, .p-split-text p { font-size: 2.125rem; line-height: 3.25rem; }
    .pills li { font-size: 1.375rem; }
    .more, .p-back a { font-size: 2.25rem; }
    .p-body > * + * { margin-top: 10rem; }
    .p-row { grid-auto-flow: row; gap: 5rem; }
    /* Stacked: the arrow points down to the next image */
    .p-arrow { top: auto; right: auto; left: 50%; bottom: -6.25rem; width: 14rem; transform: translateX(-50%) rotate(90deg); }
    figcaption { font-size: 1.5rem; }
    .p-split { grid-template-columns: 1fr; gap: 5rem; }
    .p-split.is-right figure { order: 0; }
    .p-split-text h2 { font-size: 4.5rem; margin-bottom: 2.5rem; }
    .lightbox { padding: 2rem; }
    .site-footer { flex-wrap: wrap; gap: 2rem 4rem; padding: 5rem 2rem; font-size: 2rem; }
    .footer-logo { flex-basis: 100%; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .devices .screen img { animation: none !important; }
    .p-arrow svg { animation: none !important; }
  }
