/* monocircuit.net (#1672): the brand guidelines' world, full colour plates
   with Jost heavy and tight, "natural." in italic (brand-guidelines.pdf v1.0).
   Text on each plate keeps 4.5:1, large type 3:1:
   dark: banana 10.8, cream 15.3 · violet: white 4.65, banana 3.0 (large only)
   coral: dark 5.7 · banana: dark 10.8, violet 3.0 (large only) */
@font-face {
  font-family: Jost;
  src: url("/fonts/Jost-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Jost;
  src: url("/fonts/Jost-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --dark: #211e1e;
  --banana: #f7cb62;
  --violet: #675ef7;
  --coral: #f76a77;
  --ocean: #519ff7;
  --cream: #fbf6ea;
  --white: #fff;

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 62ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  scrollbar-color: var(--banana) var(--dark);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--dark);
  color: var(--cream);
  font: 400 18px/1.6 Jost, ui-sans-serif, system-ui, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--banana);
  color: var(--dark);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

em {
  font-style: italic;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 2;
  padding: 10px 16px;
  background: var(--banana);
  color: var(--dark);
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The plates: square blocks of colour, flush one under the other */
.plate {
  position: relative;
}

.plate--dark {
  background: var(--dark);
  color: var(--cream);
}

.plate--violet {
  background: var(--violet);
  color: var(--white);
}

.plate--coral {
  background: var(--coral);
  color: var(--dark);
}

.plate--banana {
  background: var(--banana);
  color: var(--dark);
}

.plate--coral ::selection,
.plate--banana ::selection {
  background: var(--dark);
  color: var(--banana);
}

/* Bar */
/* The bar: a grid line across the full width sets it off from the page */
.bar {
  border-bottom: 2px solid rgb(247 203 98 / 0.35);
}

.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px var(--gutter);
}

.wordmark {
  display: block;
}

.wordmark img {
  display: block;
  width: clamp(150px, 22vw, 220px);
  height: auto;
}

.bar__link {
  font-weight: 600;
  font-size: 17px;
  color: var(--banana);
  text-decoration: none;
  padding: 8px 18px;
  border: 2px solid var(--banana);
  border-radius: 999px;
  transition:
    background-color 200ms var(--ease-out),
    color 200ms var(--ease-out);
}

.bar__link:hover {
  background: var(--banana);
  color: var(--dark);
}

/* Hero */
.hero {
  min-height: min(100svh, 900px);
  display: flex;
  flex-direction: column;
}

.hero__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--gutter) clamp(56px, 10vh, 120px);
}

.display {
  margin: 0;
  max-width: 11ch;
  color: var(--banana);
  font-size: clamp(3.25rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.display em {
  font-weight: 600;
  letter-spacing: -0.03em;
  /* The one moment: natural. is underlined as the page arrives */
  background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 92% / 100% 0.09em;
  animation: underline 1100ms var(--ease-out) 350ms both;
}

@keyframes underline {
  from {
    background-size: 0% 0.09em;
  }
}

.hero__lead {
  max-width: 34ch;
  margin: clamp(28px, 4vh, 40px) 0 0;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.45;
  color: var(--cream);
}

/* Products, coral: a heading, then each product as a grid of boxes */
.product {
  padding: clamp(80px, 12vw, 150px) 0;
}

.product__title {
  margin: 0 0 clamp(32px, 5vw, 56px);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

/* The grid lines are the dark plate showing through 2px gaps */
.cells {
  display: grid;
  gap: 2px;
  background: var(--dark);
  border: 2px solid var(--dark);
}

@media (min-width: 900px) {
  .cells {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

.cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: clamp(24px, 3.5vw, 44px);
  background: var(--coral);
}

.cell--name {
  min-height: clamp(200px, 24vw, 300px);
}

.cell--go {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
}

.cell p {
  margin: 0;
}

.cell__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cell__text {
  max-width: var(--measure);
  font-size: 19px;
}

/* vita's own mark, the V, in the plate's ink beside its name */
.product__brand {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 2.5vw, 32px);
}

.product__mark {
  flex: none;
  width: clamp(3.5rem, 12vw, 6.5rem);
  height: auto;
  /* sits on the baseline of the name, not its descenders */
  margin-bottom: 0.1em;
  fill: currentColor;
}

.product__name {
  margin: 0;
  font-size: clamp(5rem, 18vw, 9.5rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
  /* the italic of the tagline, set heavy */
  font-style: italic;
}

.product__claim {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* The status: a dot that pulses while the product is under way */
.state {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.state__dot {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dark);
}

.state__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--dark);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .state__dot::after {
    animation: pulse 2s var(--ease-out) infinite;
  }

  @keyframes pulse {
    from {
      transform: scale(1);
      opacity: 0.7;
    }
    to {
      transform: scale(2.6);
      opacity: 0;
    }
  }
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 26px;
  background: var(--dark);
  color: var(--banana);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px -10px rgb(33 30 30 / 0.55);
  transition:
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.go svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--ease-out);
}

.go:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgb(33 30 30 / 0.6);
}

.go:hover svg {
  transform: translateX(4px);
}

/* The second way in: the same shape, drawn in line */
.go--line {
  background: transparent;
  color: var(--dark);
  box-shadow: inset 0 0 0 2px var(--dark);
}

.go--line:hover {
  box-shadow: inset 0 0 0 2px var(--dark);
}

.go:focus-visible {
  outline-color: var(--dark);
}

/* Contact, banana */
.contact {
  padding: clamp(80px, 12vw, 150px) 0 clamp(64px, 9vw, 110px);
}

.contact__title {
  margin: 0;
  color: var(--violet);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.contact__text {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  font-weight: 500;
}

.contact__mail {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 0.07em;
  transition: text-underline-offset 200ms var(--ease-out);
}

.contact__mail:hover {
  text-underline-offset: 0.28em;
}

/* Footer */
.foot {
  padding: 40px 0 48px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.foot__mark {
  width: 36px;
  height: auto;
}

.foot__tag {
  margin: 0;
  color: var(--banana);
  font-weight: 600;
  font-size: 18px;
}

.foot__links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 16px;
}

.foot__links a {
  color: var(--cream);
}

.foot__links a:hover,
.foot__links a[aria-current="page"] {
  color: var(--banana);
}

/* Legal pages, dark and quiet */
.legal {
  padding: clamp(40px, 8vw, 96px) 0 clamp(64px, 10vw, 120px);
}

.legal .wrap > * {
  max-width: var(--measure);
}

.legal h1 {
  margin: 0 0 12px;
  color: var(--banana);
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.legal .meta {
  margin: 0 0 48px;
  color: #cfc8b8;
}

.legal h2 {
  margin: 48px 0 12px;
  color: var(--banana);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.legal p,
.legal ul,
.legal address {
  margin: 0 0 14px;
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--banana);
}

/* Scroll choreography (#1672): CSS scroll-driven animations, no script.
   Browsers without them, and reduced motion, get the page at rest. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* The promise drifts up and away as the violet plate covers it */
    .hero {
      view-timeline: --hero;
    }

    .hero__body > * {
      animation: drift linear both;
      animation-timeline: --hero;
      animation-range: exit 0% exit 100%;
    }

    @keyframes drift {
      to {
        transform: translateY(-18vh);
        opacity: 0;
      }
    }

    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 35%;
    }

    @keyframes rise {
      from {
        opacity: 0;
        transform: translateY(56px);
      }
    }

    /* vita gains weight and slides into place as it crosses the screen */
    .product__name {
      animation: heavy linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 50%;
    }

    @keyframes heavy {
      from {
        font-weight: 200;
        transform: translateX(-12%);
        letter-spacing: 0;
      }
    }

    .contact__title {
      animation: hello linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    @keyframes hello {
      from {
        font-weight: 300;
        letter-spacing: 0.12em;
        opacity: 0;
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.foot--ruled .foot__row {
  padding-top: 32px;
  /* the rule spans the content, not the gutters */
  background: linear-gradient(#4a4444, #4a4444) no-repeat var(--gutter) 0 /
    calc(100% - 2 * var(--gutter)) 1px;
}
