/* Shared with goodenoughlabs.com: tokens, paper, nav, footer, buttons, stickers, motion. */

:root {
  --paper: #e8efe1;
  --grid: #dfe8d6;
  --card: #f8fbf4;
  --ink: #1e221c;
  --pencil: #5f675a;
  --line: #cfdcc3;
  --stamp: #4b2fd1;
  --violet: #7560ee;
  --violet-soft: #ded8ff;
  --butter: #ffd76a;
  --lime: #d4f26a;
  --on-pastel: #1e221c;
  --footer: #1e221c;
  --on-footer: #e2ead9;
  --radius: 28px;
  --shadow: 0 1px 0 rgb(30 34 28 / 0.04), 0 12px 32px -16px rgb(30 34 28 / 0.18);
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  --marker: rgb(212 242 106 / 0.85);
  --accent: #ffb547;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151913;
    --grid: #1a1f17;
    --card: #1e241b;
    --ink: #e2ead9;
    --pencil: #9aa391;
    --line: #2c3528;
    --stamp: #a898ff;
    --violet-soft: #2e2757;
    --footer: #0e110d;
    --shadow: 0 12px 32px -16px rgb(0 0 0 / 0.6);
    --marker: rgb(117 96 238 / 0.55);
    color-scheme: dark;
  }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

::selection {
  background: var(--stamp);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.mono {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pencil);
}

/* Navigation: the studio's pill. */

.top {
  padding-top: 16px;
  position: relative;
  z-index: 5;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 650 16px/1 var(--mono);
  font-stretch: 112.5%;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.links {
  display: flex;
  gap: 24px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
}

.links a {
  text-decoration: none;
  color: var(--pencil);
}

.links a:hover {
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn.dark {
  background: var(--ink);
  color: var(--paper);
}

.btn.butter {
  background: var(--butter);
  border-color: var(--butter);
  color: var(--on-pastel);
}

.btn.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* Stickers and tags */

.sticker {
  display: inline-block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 3px 10px;
  border-radius: 8px;
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--on-pastel);
  background: var(--butter);
  transform: rotate(-6deg);
  box-shadow: 0 6px 14px -8px rgb(30 34 28 / 0.4);
  vertical-align: middle;
}

.sticker.violet {
  background: var(--violet);
  color: #fff;
}

.sticker.lime {
  background: var(--lime);
}

/* A glint crosses the stickers every few seconds, like foil catching the light. */
.sticker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgb(255 255 255 / 0.75) 44%,
    rgb(222 216 255 / 0.6) 50%,
    rgb(255 236 170 / 0.6) 56%,
    transparent 70%
  );
  background-size: 260% 100%;
  background-position: 130% 0;
  mix-blend-mode: soft-light;
}

.stuck {
  position: relative;
  display: inline-block;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.02em;
  background: rgb(255 255 255 / 0.72);
  color: var(--on-pastel);
}

.bar {
  flex: none;
  color: var(--stamp);
}

.card {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

/* Footer */

.footer {
  margin-top: 96px;
  padding: 64px 0 32px;
  background: var(--footer);
  color: var(--on-footer);
}

.cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.footer-brand p {
  margin-top: 14px;
  color: #9aa391;
  font-size: 14px;
}

.footer h3 {
  margin: 0 0 12px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9aa391;
}

.footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.footer ul a {
  text-decoration: none;
}

.footer ul a:hover {
  text-decoration: underline;
  text-decoration-color: #a898ff;
  text-underline-offset: 3px;
}

.fine {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #2c3528;
  font: 400 11px/1.6 var(--mono);
  color: #9aa391;
}

/* Motion: the HTML is the end state; site.js rewinds it only without reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  .pending .hero .rv {
    opacity: 0;
    animation: reveal-anyway 0s 2.5s forwards;
  }

  .sticker::after {
    animation: glint 5.5s ease-in-out infinite;
  }

  .sticker.violet::after {
    animation-delay: 1.4s;
  }

  .sticker.lime::after {
    animation-delay: 2.6s;
  }
}

@keyframes reveal-anyway {
  to {
    opacity: 1;
  }
}

@keyframes glint {
  0%,
  62% {
    background-position: 130% 0;
  }

  88%,
  100% {
    background-position: -30% 0;
  }
}

.motion .rv {
  opacity: 0;
  translate: 0 22px;
  scale: 0.965;
  transition:
    opacity 0.55s var(--ease) var(--rd, 0s),
    translate 0.7s var(--ease) var(--rd, 0s),
    scale 0.7s var(--ease) var(--rd, 0s);
}

.motion .rv.is-in {
  opacity: 1;
  translate: none;
  scale: none;
}

/* A marker stroke under the phrase that matters; it swipes in after its block arrives. */
.hl {
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 88% / 100% 36%;
  padding-inline: 0.06em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 0.8s var(--ease) calc(var(--rd, 0s) + 0.5s);
}

.motion .rv:not(.is-in) .hl {
  background-size: 0% 36%;
}

@media (max-width: 760px) {
  .links {
    display: none;
  }

  .nav {
    justify-content: space-between;
  }

  .lockup span {
    font-size: 14px;
  }

  .cols {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 400px) {
  .nav {
    padding-left: 14px;
    gap: 12px;
  }

  .lockup {
    gap: 8px;
  }

  .lockup span {
    font-size: 13px;
  }
}

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

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