/* CMPLT Labs: coming-soon site.
   One family (Archivo, variable width + weight), black and white like the packaging. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

/* Same file under a second name with font-display: block, used only by the wordmark.
   Its animation is tuned to Archivo's letter widths, so it shouldn't flash a fallback face. */
@font-face {
  font-family: "Archivo Wordmark";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 75% 125%;
  font-display: block;
}

:root {
  --black: #000;
  --white: #fff;
  --text: #b5b5b5;
  --muted: #8f8f8f;
  --line: #2a2a2a;
  --error: #ff9b8f;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1480px;
  --step-lede: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-title: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);

  color-scheme: dark;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft-touch matte finish: a faint grain over the black, like uncoated pouch stock. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.08;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--white);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

::selection {
  background: var(--white);
  color: var(--black);
}

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

/* Hairline inset to the content column (a border on .wrap would run into the gutters). */
.ruled {
  position: relative;
}

.ruled::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 10;
  padding: 10px 14px;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 20px;
  font-size: 0.9375rem;
}

.topbar-name {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.topbar-status {
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  /* Mid-animation the wordmark's unscaled layout box is wider than the screen. */
  overflow-x: hidden; /* Safari < 16 */
  overflow-x: clip;
  padding-block: clamp(20px, 5vh, 64px) clamp(48px, 8vh, 96px);
}

.wordmark-frame {
  container-type: inline-size;
}

/* The ink of C-M-P-L-T at width 125 / weight 900 spans 4.417em, so this font size makes
   the word exactly as wide as the column. The line box hugs the capitals (0.8em). */
.wordmark {
  height: 0.8em;
  margin: 0;
  color: var(--white);
  font-family: "Archivo Wordmark", "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 18vw;
  font-size: calc(100cqi / 4.417);
  font-weight: 900;
  font-stretch: 125%;
  font-kerning: none;
  font-variant-ligatures: none;
  letter-spacing: 0;
  line-height: 0.8;
  white-space: nowrap;
}

.wordmark-word {
  display: inline-block;
  margin-left: -0.045em; /* C's left side bearing: puts its ink on the column edge */
  transform-origin: 0.045em 0.734em; /* left ink edge, on the baseline */
}

/* COMPLETE minus what you don't need. The vowels rest collapsed; the motion block below
   starts them open and closes them up. */
.wordmark-drop {
  display: inline-block;
  max-width: 0;
}

.wordmark-drop > span {
  display: inline-block;
  opacity: 0;
}

.wordmark-o {
  --w: 1.008em;
}

.wordmark-e {
  --w: 0.86em;
}

/* The font kerns L-T by -0.16em when they touch; separate spans lose that, so add it back. */
.wordmark-kern {
  margin-right: -0.16em;
}

@media (prefers-reduced-motion: no-preference) {
  .wordmark-word {
    animation: cmplt-grow 900ms linear 1150ms both;
  }

  .wordmark-drop {
    animation: cmplt-close 900ms cubic-bezier(0.65, 0, 0.35, 1) 1150ms both;
  }

  .wordmark-kern {
    animation-name: cmplt-close-kern;
  }

  .wordmark-drop > span {
    animation: cmplt-fall 400ms cubic-bezier(0.55, 0, 0.75, 0.2) 850ms both;
  }
}

@keyframes cmplt-fall {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(0.12em);
  }
}

@keyframes cmplt-close {
  from {
    max-width: var(--w);
  }
  to {
    max-width: 0;
  }
}

@keyframes cmplt-close-kern {
  from {
    max-width: var(--w);
    margin-right: 0;
  }
  to {
    max-width: 0;
    margin-right: -0.16em;
  }
}

/* Keeps the word's ink exactly column-wide while the vowels close up: derived from the
   letter widths and the cmplt-close easing, interpolated linearly between stops. */
@keyframes cmplt-grow {
  0% { transform: scale(0.6063); }
  5% { transform: scale(0.6068); }
  10% { transform: scale(0.6085); }
  15% { transform: scale(0.6115); }
  20% { transform: scale(0.6164); }
  25% { transform: scale(0.6237); }
  30% { transform: scale(0.6344); }
  35% { transform: scale(0.65); }
  40% { transform: scale(0.6731); }
  45% { transform: scale(0.7074); }
  50% { transform: scale(0.7549); }
  55% { transform: scale(0.8093); }
  60% { transform: scale(0.8593); }
  65% { transform: scale(0.9002); }
  70% { transform: scale(0.932); }
  75% { transform: scale(0.9561); }
  80% { transform: scale(0.9737); }
  85% { transform: scale(0.9862); }
  90% { transform: scale(0.9942); }
  95% { transform: scale(0.9986); }
  100% { transform: none; }
}

/* minmax(0, 1fr) rather than the implicit auto track: otherwise the email input's intrinsic
   width (~340px) props the column open on small phones and .hero's clip hides the overflow. */
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: clamp(28px, 4.5vw, 64px);
}

.tagline-frame {
  container-type: inline-size;
}

/* "Everything you need." measures 11.13em at these settings; sizing by the column keeps it
   on one line at every width instead of orphaning "need." */
.tagline {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  font-size: min(100cqi / 11.4, 3.5rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1;
}

.tagline span {
  display: block;
}

.lede {
  max-width: 36em;
  margin: 0 0 32px;
  font-size: var(--step-lede);
}

@media (min-width: 880px) {
  .hero-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: clamp(40px, 6vw, 120px);
    align-items: start;
  }
}

/* ---------- Sign-up form ---------- */

.signup {
  max-width: 34rem;
}

.signup-label {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-weight: 700;
}

.signup-row {
  display: flex;
}

.signup-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--white);
  border-right: 0;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
}

.signup-input::placeholder {
  color: #8a8a8a;
  opacity: 1;
}

.signup-input[aria-invalid="true"] {
  border-color: var(--error);
}

.signup-button {
  flex: none;
  height: 56px;
  margin: 0;
  padding: 0 26px;
  border: 2px solid var(--white);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-weight: 800;
  font-stretch: 112%;
  cursor: pointer;
}

.signup-button:hover,
.signup-button[aria-disabled="true"] {
  border-color: #d9d9d9;
  background: #d9d9d9;
}

.signup-button[aria-disabled="true"] {
  cursor: progress;
}

@media (max-width: 359px) {
  .signup-input {
    padding-inline: 12px;
  }

  .signup-button {
    padding-inline: 16px;
  }
}

/* Honeypot: off-screen and hidden from assistive tech; only bots fill it in. */
.signup-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-status {
  margin: 0;
  color: var(--white);
  font-weight: 600;
}

.signup-status:not(:empty) {
  margin-top: 14px;
}

.signup-status:focus {
  outline: none;
}

.signup[data-state="error"] .signup-status {
  color: var(--error);
}

.signup[data-state="done"] .signup-label,
.signup[data-state="done"] .signup-row {
  display: none;
}

.signup[data-state="done"] .signup-status {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.signup-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.signup-note a {
  color: var(--text);
}

/* ---------- Lineup ---------- */

.lineup {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding-block: clamp(48px, 6vw, 96px) clamp(64px, 8vw, 120px);
}

@media (min-width: 880px) {
  .lineup {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    column-gap: clamp(48px, 8vw, 160px);
    align-items: start;
  }
}

.section-title {
  max-width: 15ch;
  margin: 0 0 24px;
  color: var(--white);
  font-size: var(--step-title);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1;
  text-wrap: balance;
}

.lineup-copy p,
.partners p {
  max-width: 34em;
  margin: 0 0 20px;
  font-size: var(--step-lede);
}

.lineup-copy strong {
  color: var(--white);
  font-weight: 700;
}

/* The lineup as a back-of-pack Nutrition Facts panel: white stock, black rules,
   heavy condensed title, 10px and 5px bars between groups, hairlines between rows. */
.facts {
  width: 100%;
  max-width: 430px;
  padding: 14px 17px 16px;
  outline: 1px solid var(--black);
  outline-offset: -7px;
  background: var(--white);
  color: var(--black);
  font-size: 0.9375rem;
  line-height: 1.25;
}

.facts p,
.facts ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts-title {
  margin: 0;
  font-size: clamp(2.25rem, 1.9rem + 1.4vw, 2.875rem);
  font-weight: 900;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  line-height: 1;
}

.facts-meta {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid;
}

.facts-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 3px 0;
  border-top: 1px solid;
}

.facts-row > :last-child {
  text-align: right;
}

.facts-row--flush {
  border-top: 0;
}

.facts-strong {
  font-weight: 800;
}

.facts-small {
  font-size: 0.8125rem;
  font-weight: 800;
}

.facts-big {
  align-items: flex-end;
  padding: 0 0 4px;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.facts-big-value {
  font-size: 2.75rem;
  line-height: 0.85;
}

/* Bar weights go last so they override the hairline on .facts-row. */
.facts-bar {
  border-top: 10px solid;
}

.facts-bar-mid {
  border-top: 5px solid;
}

.facts-flavors li {
  padding: 3px 0 3px 18px;
  border-top: 1px solid;
}

/* Redaction bars. The real names aren't in the page source at all: each bar holds only the
   word "Redacted", pushed out of view, for screen readers and copy-paste. */
.redact {
  display: inline-block;
  height: 0.95em;
  overflow: hidden;
  vertical-align: -0.17em;
  background: var(--black);
  text-indent: 50em;
  white-space: nowrap;
}

.redact--1 { width: 3.6em; }
.redact--2 { width: 5.4em; }
.redact--3 { width: 7.2em; }
.redact--4 { width: 9em; }
.redact--5 { width: 10.8em; }

.facts-foot {
  padding-top: 6px;
  border-top: 5px solid;
  font-size: 0.75rem;
  line-height: 1.35;
}

/* High-contrast modes drop background colors; draw the bars in the system text color instead. */
@media (forced-colors: active) {
  .redact {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

/* ---------- Partners ---------- */

.partners {
  padding-block: clamp(56px, 7vw, 104px);
}

.partners-email {
  display: inline-block;
  margin-top: 8px;
  color: var(--white);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 32px;
  padding-block: 28px 40px;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer a {
  color: var(--text);
}

/* ---------- Inner pages (privacy, 404, subscribed) ---------- */

.page {
  max-width: 42em;
  padding-block: clamp(40px, 8vw, 112px) clamp(64px, 9vw, 128px);
}

.page p,
.page ul {
  margin: 0 0 16px;
}

.page ul {
  padding-left: 1.2em;
}

.page li {
  margin-bottom: 6px;
}

.page h2 {
  margin: 40px 0 10px;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 112%;
}

.page-lede {
  font-size: var(--step-lede);
}

.page-meta {
  color: var(--muted);
  font-size: 0.9375rem;
}
