/* Hexagoned case study page: Waranex.
   Standalone: it does not load styles.css or the morph scripts. Black page, white
   frame, Figtree, square-edged panels, no shadows, no glow. The Waranex panels use
   Waranex's own palette and Archivo, because they show that site's real design. */

@font-face {
  font-family: "Archivo";
  src: url("/work/waranex/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --muted: #5b5b5b;
  --font: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wx-green: #89c335;
  --wx-green-bright: #a6d665;
  --wx-navy: #243143;
  --wx-ink: #182130;
  --wx-floor: #111823;
  --wx-mist: #bcc5d1;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --measure: 38rem;
}

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

html {
  background: var(--black);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--black);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* Top bar on the black page -------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
  color: var(--white);
}

.top-logo {
  display: block;
  width: clamp(7.5rem, 14vw, 10.5rem);
  aspect-ratio: 462.5 / 133.9;
  background: var(--white);
  -webkit-mask: url("/hexagoned-logo.svg") left center / contain no-repeat;
  mask: url("/hexagoned-logo.svg") left center / contain no-repeat;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 1rem;
  font-weight: 700;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.top-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.top-cta::before {
  content: "";
  width: 0.7rem;
  height: 1.2rem;
  background: currentColor;
  -webkit-mask: url("/cta-mark.svg") center / contain no-repeat;
  mask: url("/cta-mark.svg") center / contain no-repeat;
  transform: scaleX(-1);
}

/* The white frame ------------------------------------------------------------ */

.frame {
  margin: 0 clamp(0.75rem, 1.6vw, 1.5rem) clamp(0.75rem, 1.6vw, 1.5rem);
  padding: 0 var(--gutter);
  background: var(--white);
  border-radius: clamp(1.25rem, 2.4vw, 2rem);
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
}

.sec {
  padding: var(--section) 0 0;
}

.sec:last-child {
  padding-bottom: var(--section);
}

.label {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
}

.h2 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  max-width: 30ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1.375rem, 2vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.text {
  max-width: var(--measure);
  margin: 1rem 0 0;
  font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
  line-height: 1.62;
  color: #2b2b2b;
}

.text a {
  text-underline-offset: 0.2em;
}

/* Header of the case study --------------------------------------------------- */

.cs-head {
  padding-top: clamp(3rem, 7vw, 6rem);
}

.cs-title {
  margin: 0;
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.cs-head .lede {
  max-width: 24ch;
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.75rem 2rem;
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  padding: 1.5rem 0 0;
  border-top: 2px solid var(--black);
}

.meta dt {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
}

.meta dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
}

.visit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

.visit:hover {
  border-bottom-width: 4px;
}

/* Waranex poster panel (static) ---------------------------------------------- */

.stage {
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
}

.stage figcaption,
.shot figcaption,
.cap {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}

.wx {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  background: var(--wx-green);
  color: var(--wx-ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

.wx--poster {
  aspect-ratio: 16 / 9;
}

.wx-copy {
  position: absolute;
  left: 5cqw;
  top: 9cqw;
  width: 46cqw;
}

.wx-h {
  margin: 0;
  font-size: 6.4cqw;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  line-height: 0.95;
  letter-spacing: -0.032em;
}

.wx-sub {
  max-width: 24cqw;
  margin: 3.4cqw 0 0;
  font-size: max(11px, 1.45cqw);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.wx-foot {
  position: absolute;
  left: 5cqw;
  right: 5cqw;
  top: 49cqw;
  display: flex;
  justify-content: space-between;
  padding-top: 1.1cqw;
  border-top: 0.35cqw solid var(--wx-ink);
  font-size: max(10px, 1.1cqw);
  font-weight: 600;
}

.wx-o {
  position: absolute;
  left: calc(var(--x) * 1cqw);
  top: calc(var(--y) * 1cqw);
  width: 19cqw;
  height: 19cqw;
  transform: scale(var(--s, 1));
  filter: blur(calc(var(--b, 0) * 1px));
  opacity: var(--o, 1);
}

.wx-o img {
  width: 100%;
  height: 100%;
}

.wx-ring {
  position: absolute;
  left: 74cqw;
  top: 29cqw;
  width: 14cqw;
  height: 14cqw;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 0.4cqw solid var(--wx-ink);
}

.wx-ring img {
  width: 7.6cqw;
  height: auto;
  margin-left: 0.15cqw;
}

/* orbit positions: landscape */
.wx-o--front { --x: 66.52; --y: 28.27; --s: 1.1; z-index: 4; }
.wx-o--right { --x: 80.09; --y: 15.9; --s: 0.86; z-index: 3; }
.wx-o--left { --x: 48.91; --y: 23.1; --s: 0.86; z-index: 3; }
.wx-o--back { --x: 62.48; --y: 10.73; --s: 0.62; --b: 2; --o: 0.8; z-index: 1; }
.wx-ring { z-index: 2; }

@media (max-width: 700px) {
  .wx--poster {
    aspect-ratio: 4 / 5;
  }

  .wx-copy {
    left: 5cqw;
    top: 91cqw;
    width: 90cqw;
  }

  .wx-h {
    font-size: 9.2cqw;
  }

  .wx-sub,
  .wx-foot {
    display: none;
  }

  .wx--poster::after {
    content: "";
    position: absolute;
    left: 5cqw;
    right: 5cqw;
    top: 86cqw;
    height: 0.8cqw;
    background: var(--wx-ink);
  }

  .wx-o {
    width: 34cqw;
    height: 34cqw;
  }

  .wx-ring {
    left: 50cqw;
    top: 44cqw;
    width: 28cqw;
    height: 28cqw;
    border-width: 0.8cqw;
  }

  .wx-ring img {
    width: 15cqw;
  }

  .wx-o--front { --x: 36.82; --y: 43.56; }
  .wx-o--right { --x: 62.23; --y: 20.25; }
  .wx-o--left { --x: 3.77; --y: 33.75; }
  .wx-o--back { --x: 29.18; --y: 10.44; }
}

/* Two-column sections --------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

.points {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  padding: 1.25rem 0;
  border-top: 2px solid var(--black);
}

.points li:last-child {
  border-bottom: 2px solid var(--black);
}

.points strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.points span {
  color: #2b2b2b;
}

/* The idea -------------------------------------------------------------------- */

.statement {
  max-width: 24ch;
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.idea-name {
  display: inline-block;
  margin: 2rem 0 0;
  padding: 0.5rem 0.9rem;
  background: var(--wx-green);
  color: var(--wx-ink);
  font-family: "Archivo", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
}

.quote {
  max-width: 22ch;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 3px solid var(--wx-ink);
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

.idea-side {
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--wx-green);
  color: var(--wx-ink);
}

/* Decisions ------------------------------------------------------------------- */

.decisions {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: d;
}

.decision {
  display: grid;
  gap: 1.5rem;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 2px solid var(--black);
  counter-increment: d;
}

.decision:last-child {
  border-bottom: 2px solid var(--black);
}

@media (min-width: 62rem) {
  .decision {
    grid-template-columns: 5fr 7fr;
    gap: clamp(2rem, 5vw, 4rem);
  }
}

.decision-title {
  margin: 0;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.decision-title::before {
  content: counter(d, decimal-leading-zero);
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.decision .text {
  margin-top: 0.9rem;
}

.spec {
  align-self: start;
  min-width: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

/* swatches */
.swatches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.swatch {
  display: flex;
  min-height: 9rem;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.swatch b {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
}

.swatch--green { background: var(--wx-green); color: var(--wx-ink); }
.swatch--navy { background: var(--wx-navy); color: var(--white); }
.swatch--ink { background: var(--wx-ink); color: var(--white); }
.swatch--white { background: var(--white); color: var(--wx-ink); box-shadow: inset 0 0 0 2px var(--wx-ink); }

/* type specimen */
.type {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--wx-green);
  color: var(--wx-ink);
}

.type-aa {
  margin: 0;
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 800;
  font-variation-settings: "wdth" 106;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.type-line {
  margin: 1.25rem 0 0;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  line-height: 0.97;
  letter-spacing: -0.032em;
}

.type-body {
  max-width: 34ch;
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.type-nums {
  display: flex;
  gap: 1.5rem;
  margin: 1.25rem 0 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  line-height: 0.9;
  letter-spacing: -0.032em;
  font-variant-numeric: tabular-nums;
}

.type-cap {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* orbit demo */
.orb {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--wx-green);
}

.orb .wx-o {
  width: 34cqw;
  height: 34cqw;
  will-change: transform;
}

.orb-ring {
  position: absolute;
  left: 50cqw;
  top: 37cqw;
  z-index: 2;
  width: 22cqw;
  height: 22cqw;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 0.55cqw solid var(--wx-ink);
}

.orb-ring img {
  width: 12cqw;
  height: auto;
}

.orb-note {
  position: absolute;
  left: 4cqw;
  bottom: 3cqw;
  margin: 0;
  color: var(--wx-ink);
  font-size: max(12px, 2.1cqw);
  font-weight: 600;
}

/* Screenshots ----------------------------------------------------------------- */

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  border: 2px solid var(--black);
}

.shots {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.shots--two {
  align-items: start;
}

@media (min-width: 48rem) {
  .shots--two {
    grid-template-columns: 1fr 1fr;
  }
}

.phones {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
}

.phones .shot {
  flex: 1 1 0;
  min-width: 0;
  max-width: 17rem;
}

.phones .shot img {
  border-radius: 1.25rem;
}

/* Bilingual ------------------------------------------------------------------- */

.pair {
  display: grid;
}

@media (min-width: 48rem) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }
}

.pair-card {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

.pair-card--en { background: var(--wx-green); color: var(--wx-ink); }
.pair-card--es { background: var(--wx-navy); color: var(--white); }

.pair-lang {
  font-size: 0.9375rem;
  font-weight: 700;
}

.pair-line {
  margin: 2rem 0 0;
  font-size: clamp(1.625rem, 2.9vw, 2.5rem);
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  line-height: 0.97;
  letter-spacing: -0.032em;
}

.pair-card--es .pair-lang {
  color: var(--wx-green);
}

/* Build facts ------------------------------------------------------------------ */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--black);
}

.facts li {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 2px solid var(--black);
}

.facts b {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.facts + .text {
  margin-top: 2rem;
}

.facts span {
  display: block;
  max-width: 20ch;
  margin-top: 0.5rem;
  font-weight: 500;
  color: #2b2b2b;
}

/* Close ------------------------------------------------------------------------ */

.close {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.6rem;
  background: var(--black);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--black);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.btn:hover {
  background: var(--white);
  color: var(--black);
}

.close a:not(.btn) {
  font-weight: 800;
  text-underline-offset: 0.25em;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem) 1.75rem;
  color: #cfcfcf;
  font-size: 0.9375rem;
}

.foot a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.top-nav a {
  white-space: nowrap;
}

@media (max-width: 30rem) {
  .top-nav a:not(.top-cta) {
    display: none;
  }
}
