@font-face {
  font-family: "Schibsted Grotesk";
  src: url(../media/schibsted-grotesk.woff2) format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

.starve, .starve * { all: unset; box-sizing: border-box; }

.starve {
  --ink: #0a2ccf;
  --paper: #efd9a8;
  --pad: max(clamp(20px, 3.34vw, 48px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  /* Every measure of the ink follows the width of the big name, so the name meets the same dry zone at each width. */
  --name-w: calc(100cqw - 2 * var(--pad));
  --name-h: calc(var(--name-w) * 0.17462);
  --foot: calc(var(--name-w) * 0.40179);
  --top: 56px;
  --ink-w: calc(var(--name-w) * 1.072);
  --ink-x: calc(var(--pad) - var(--name-w) * 0.036);
  --name-bottom: calc(var(--foot) * 0.22);
  --gap: calc(var(--foot) * 0.1);
  --b-stem: calc(var(--name-w) * 0.3828);
  display: block;
  position: relative;
  min-height: calc(var(--top) + var(--foot));
  container-type: inline-size;
  isolation: isolate;
  background-color: var(--head, transparent);
  color: var(--paper);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1;
}

.starve__paper {
  display: block;
  position: absolute;
  inset: var(--top) 0 0 0;
  z-index: -2;
  background-color: var(--paper);
  background-image: url(assets/paper-tand-lit.webp), url(assets/paper-vezel-soft.webp);
  background-size: 652.8px 382.5px, 819.2px 819.2px;
  background-position: left bottom, left top;
  background-repeat: repeat;
  background-blend-mode: multiply, normal;
}

.starve__ink {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    url(assets/ink-foot.webp),
    url(assets/ink-top.webp),
    linear-gradient(var(--ink), var(--ink));
  background-size:
    var(--ink-w) var(--foot),
    2560px var(--top),
    100% calc(100% - var(--top) - var(--foot) + 6px);
  background-position:
    var(--ink-x) bottom,
    left top,
    left calc(var(--top) - 3px);
  background-repeat: no-repeat, repeat-x, no-repeat;
  -webkit-mask-image: url(assets/name.svg), linear-gradient(#000, #000);
  mask-image: url(assets/name.svg), linear-gradient(#000, #000);
  -webkit-mask-size: var(--name-w) var(--name-h), 100% 100%;
  mask-size: var(--name-w) var(--name-h), 100% 100%;
  -webkit-mask-position: var(--pad) calc(100% - var(--name-bottom)), 0 0;
  mask-position: var(--pad) calc(100% - var(--name-bottom)), 0 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* When the block above is the same ink, the sheet has no start edge. */
.starve--flush .starve__ink { background-size: var(--ink-w) var(--foot), 0 0, 100% calc(100% - var(--top) - var(--foot) + 6px); }

.starve__text {
  display: grid;
  grid-template-columns: var(--b-stem) 1fr;
  align-items: baseline;
  position: relative;
  padding: calc(var(--top) + 44px) var(--pad) calc(var(--name-h) + var(--name-bottom) + var(--gap));
}

/* The large name is the link to the home page. Its real text is for screen readers, and the letters are the mask of the ink. */
.starve .starve__name {
  display: block;
  position: absolute;
  z-index: 1;
  left: var(--pad);
  bottom: var(--name-bottom);
  width: var(--name-w);
  height: var(--name-h);
  min-height: 0;
}

.starve__name span {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.starve .starve__name:focus-visible {
  outline: 4px solid var(--paper);
  outline-offset: 2px;
  box-shadow: 0 0 0 8px var(--ink);
}

.starve__nav {
  display: flex;
  justify-content: space-between;
  /* A page with the type system of the home page passes its roles in. Other pages keep the sizes below. */
  font-size: var(--t-heading, clamp(20px, 3.33cqw, 80px));
}

.starve a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) { .starve a:hover { color: #fff3d6; } }

.starve a:focus-visible {
  outline: 4px solid var(--paper);
  outline-offset: 4px;
}

.starve .starve__mail {
  display: flex;
  width: fit-content;
  font-size: var(--t-body, clamp(18px, 1.95cqw, 44px));
  font-weight: 700;
}

@media (max-width: 600px) {
  .starve {
    --name-h: calc(var(--name-w) * 0.50229);
    --foot: calc(var(--name-w) * 1.08571);
    --top: 48px;
    --ink-w: calc(var(--name-w) * 1.15);
    --ink-x: calc(var(--pad) - var(--name-w) * 0.075);
    --name-bottom: calc(var(--foot) * 0.42);
    --gap: 34px;
  }
  .starve__ink {
    background-image:
      url(assets/ink-foot-phone.webp),
      url(assets/ink-top-phone.webp),
      linear-gradient(var(--ink), var(--ink));
    background-size:
      var(--ink-w) var(--foot),
      780px var(--top),
      100% calc(100% - var(--top) - var(--foot) + 6px);
    -webkit-mask-image: url(assets/name-phone.svg), linear-gradient(#000, #000);
    mask-image: url(assets/name-phone.svg), linear-gradient(#000, #000);
  }
  .starve__text {
    display: block;
    padding-top: calc(var(--top) + 26px);
  }
  .starve .starve__mail { font-size: var(--t-body, clamp(18px, 5.4cqw, 26px)); min-height: 44px; }
  .starve__nav {
    display: block;
    margin-top: 18px;
    font-size: var(--t-heading, clamp(38px, 11.8cqw, 60px));
  }
  .starve__nav a { display: flex; width: fit-content; min-height: max(44px, 1.14em); }
}
