/* Hexagoned case study pages: shared template.
   Standalone: it does not load styles.css or the morph scripts. Black page, white
   frame, Figtree. Used by the gallery-style case studies (AVA Card, EZPIN,
   Sandirent, CAL-CRETE, Buildator, Rex Fabrics). Waranex and There is NO Store have
   their own stylesheets because they rebuild parts of those sites. */

:root {
  --black: #000;
  --white: #fff;
  --muted: #5b5b5b;
  --font: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --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;
}


.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);
}
/* 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;
}
.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;
}
/* 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;
}

/* 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;
  }
}

/* Accent from the client's brand, set per page with --accent. */
.cs-head .label::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 3px;
  margin-right: 0.6rem;
  vertical-align: middle;
  background: var(--accent, var(--black));
}

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

/* Gallery: full-width figures and two-up rows, each with a caption. */
.gallery {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.gallery-row {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

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

  .gallery-row--wide {
    grid-template-columns: 2fr 1fr;
  }
}

.gallery .shot img {
  border: 0;
}

.gallery .shot--framed img {
  border: 2px solid var(--black);
}

.gallery .shot--tint {
  padding: clamp(1rem, 4vw, 3rem);
  background: var(--tint, #f2f2f2);
}

.gallery .shot--tint img {
  margin: 0 auto;
}

.gallery .phone img {
  max-width: 17rem;
  border: 2px solid var(--black);
  border-radius: 1.25rem;
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services li {
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--black);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* Logos sit small and centred on a framed panel. */
.gallery .shot--logo {
  padding: clamp(2rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem);
  border: 2px solid var(--black);
  background: var(--tint, #fff);
}

.gallery .shot--logo img {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

/* Page changes between the home page and the case studies. The same block is
   in styles.css, work/case.css, work/waranex/work.css and
   work/thereisnostore/work.css; keep them identical. The old page slides up
   and away over the new one. From the work grid the old page is a screen of
   the client's colour (work-grid.js), so the colour lifts off the case study.
   Browsers without cross-document view transitions just load the page. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  z-index: 1;
  mix-blend-mode: normal;
  animation: hx-page-out 0.65s cubic-bezier(0.76, 0, 0.24, 1) both;
}

::view-transition-new(root) {
  mix-blend-mode: normal;
  animation: none;
}

@keyframes hx-page-out {
  to {
    transform: translateY(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
