/* Buttermax recreation — #FFD600 field, ink type, liquid cursor */

:root {
  --yellow: #FFD600;
  --ink: #101010;
  --white: #ffffff;
  --font: "Archivo", system-ui, sans-serif;
  --script: "Pacifico", cursive;
  --ease: cubic-bezier(.22, .84, .26, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: pan-y pinch-zoom;
  overflow-x: hidden;
  max-width: 100%;
}
html, body { min-height: 100%; }
body.is-desktop { cursor: none; }
body.is-desktop a, body.is-desktop button { cursor: none; }
img { max-width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
button, a { font: inherit; color: inherit; }
button { background: none; border: 0; }
ul { list-style: none; }
html.is-locked, html.is-locked body { overflow: hidden; }

/* Hide Netlify chrome if a badge ever appears */
[data-netlify-badge],
#netlify-badge,
.netlify-badge,
iframe[title*="Netlify"],
iframe[src*="netlify.com/badge"] { display: none !important; }

/* Page colors live behind the ink; content lives above it */
.scene-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--yellow);
}
.scene-bg-footer {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 100%;
  background: var(--ink);
}
.blob-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  touch-action: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.15rem 1.6rem;
  pointer-events: none;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.site-header > * { pointer-events: auto; }
.mark-x {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  justify-self: start;
}
.mark-x svg { width: 100%; height: 100%; fill: currentColor; }
.mark-oval {
  width: 3.4rem;
  display: grid;
  place-items: center;
}
.mark-oval svg { width: 100%; height: auto; overflow: visible; }
.site-nav {
  justify-self: end;
  display: flex;
  gap: 0.45rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid currentColor;
  border-radius: 999px;
  padding: 0.32rem 0.85rem 0.28rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.site-header .pill:hover, .site-header .pill:focus-visible {
  /* Yellow fill + ink type, then differenced: reads as a black pill with yellow type */
  background: var(--yellow);
  color: var(--ink);
  outline: none;
}
.pill:hover, .pill:focus-visible {
  background: var(--ink);
  color: var(--yellow);
  outline: none;
}
.pill-solid {
  background: var(--ink);
  color: var(--yellow);
  margin-top: 1.5rem;
}

/* Header colour over the footer is handled by mix-blend-mode: difference */



/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6.5rem 4vw 2.2rem;
  overflow: hidden;
}
.hero-type {
  position: relative;
  z-index: 2;
  padding-left: 1vw;
  max-width: 100%;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.wordmark {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  line-height: 0.78;
  color: inherit;
  font-weight: 400;
  max-width: 100%;
  overflow: visible;
}
.butter {
  font-family: var(--font);
  font-weight: 900;
  font-stretch: 85%;
  font-size: clamp(4.6rem, 16vw, 13.5rem);
  letter-spacing: -0.055em;
  line-height: 0.78;
}
.max {
  font-family: var(--script);
  font-size: clamp(3.6rem, 13vw, 10.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-left: -0.06em;
  line-height: 0.7;
  transform: translateY(0.04em) rotate(-3deg);
  transform-origin: left baseline;
  display: inline-block;
}
.tagline {
  position: absolute;
  left: 1vw;
  top: calc(100% + 0.15rem);
  font-size: clamp(0.48rem, 0.7vw, 0.68rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  max-width: 42vw;
  white-space: nowrap;
}

.hero-device {
  position: relative;
  z-index: 3;
  width: min(78vw, 920px);
  margin: -10vw auto 0;
  transform-origin: center center;
  will-change: transform;
  perspective: 900px;
}
.hero-device-inner {
  transform-origin: center center;
  will-change: transform;
  transform-style: preserve-3d;
}
.hero-device img {
  width: 100%;
  height: auto;
  background: transparent;
}
.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  margin-top: -0.4rem;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.dots {
  position: absolute;
  left: 1vw;
  width: 10px;
  height: 10px;
  background:
    radial-gradient(circle, currentColor 1.15px, transparent 1.25px) 0 0 / 6px 6px,
    radial-gradient(circle, currentColor 1.15px, transparent 1.25px) 6px 6px / 12px 12px;
  width: 12px;
  height: 12px;
  opacity: 0.9;
}
.down {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  opacity: 0.9;
  animation: bob 2.2s var(--ease) infinite;
}
.down svg { width: 100%; height: 100%; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Smear between hero and about ---------- */
.smear-band {
  height: 26vh;
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: transparent;
}
.smear-color {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(110deg,
      #FFD600 0%,
      #ff7a18 18%,
      #c43b00 32%,
      #1a1a1a 42%,
      #6ad26a 58%,
      #d8ff6a 72%,
      #FFD600 100%);
  background-size: 220% 100%;
  filter: blur(18px) contrast(1.15) saturate(1.2);
  transform: scaleY(1.4) skewX(-8deg);
  opacity: 0.95;
}

/* ---------- About ---------- */
.about {
  position: relative;
  z-index: 2;
  padding: 10vh 6vw 2vh;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  column-gap: 1.2rem;
  align-items: start;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.eyebrow {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 0.55em;
}
.manifesto {
  font-weight: 800;
  font-stretch: 80%;
  font-size: clamp(1.85rem, 4.8vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 22ch;
}

/* ---------- Works grid ---------- */
.works {
  position: relative;
  padding: 4vh 6vw 12vh;
  overflow: hidden;
}
.spill-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.spill {
  position: absolute;
  width: 42vw;
  height: 42vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 47% 53% 58% 42% / 42% 48% 52% 58%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35);
  transition: opacity 0.45s var(--ease), transform 0.7s var(--ease), background 0.4s ease;
  filter: blur(0.5px);
  will-change: transform, opacity, left, top;
}
.spill-b {
  width: 28vw; height: 28vw;
  max-width: 380px; max-height: 380px;
  border-radius: 58% 42% 44% 56% / 52% 38% 62% 48%;
  transition-delay: 0.04s;
}
.spill-c {
  width: 18vw; height: 18vw;
  max-width: 240px; max-height: 240px;
  border-radius: 40% 60% 55% 45% / 60% 40% 50% 50%;
  transition-delay: 0.08s;
}
.works.is-spilling .spill { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5vw 3vw;
}
.work-hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: center;
  color: inherit;
}
.visual {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}
.visual img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 18px 18px rgba(16,16,16,0.08));
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.work:hover .visual img,
.work.is-on .visual img {
  transform: scale(1.05);
  filter: drop-shadow(0 22px 22px rgba(16,16,16,0.14));
}
.badge {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  background: #ff4d3a;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 0.22rem 0.45rem 0.18rem;
  border-radius: 4px 10px 4px 10px;
  z-index: 2;
  box-shadow: 2px 3px 0 rgba(16,16,16,0.25);
}
.meta {
  display: inline-flex;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.ico {
  width: 0.85rem;
  height: 0.85rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.ico-note {
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='5' cy='12' r='2.4'/><circle cx='12' cy='10.2' r='2.4'/><path d='M7.4 12V4.2l7-1.2V10.2' fill='none' stroke='black' stroke-width='1.6'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='5' cy='12' r='2.4'/><circle cx='12' cy='10.2' r='2.4'/><path d='M7.4 12V4.2l7-1.2V10.2' fill='none' stroke='black' stroke-width='1.6'/></svg>") center / contain no-repeat;
}
.ico-patreon { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: currentColor; }
.ico-diamond {
  width: 0.7rem; height: 0.7rem;
  background: currentColor;
  transform: rotate(45deg);
}
.ico-tri {
  width: 0;
  height: 0;
  border-left: 0.38rem solid transparent;
  border-right: 0.38rem solid transparent;
  border-bottom: 0.66rem solid currentColor;
}
.ico-g { font-weight: 800; font-size: 0.78rem; letter-spacing: 0; }
.ico-plane {
  width: 0.9rem; height: 0.9rem;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 8 L14 3 L10 8 L14 13 Z' fill='black'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 8 L14 3 L10 8 L14 13 Z' fill='black'/></svg>") center / contain no-repeat;
}
.ico-atlas {
  width: 0.72rem; height: 0.72rem;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 80%, 0 80%);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: transparent;
  color: var(--yellow);
  min-height: 100svh;
  padding: 10vh 6vw 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* On phone (no ink canvas) paint the footer itself so we don't rely on the bg layer */
body:not(.is-desktop) .footer { background: var(--ink); }
.reach { position: relative; }
.reach-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 2vw;
  font-weight: 800;
  font-stretch: 80%;
  font-size: clamp(3.2rem, 12vw, 11rem);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 0.8;
  color: var(--yellow);
}
.reach-type > span {
  position: relative;
  z-index: 2;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.gauntlet {
  width: auto;
  height: 1.25em;
  margin: 0 -0.12em;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  animation: hand-bob 4.5s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes hand-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
.mail {
  display: block;
  position: relative;
  z-index: 2;
  text-align: right;
  margin-top: 0.6rem;
  margin-right: 8vw;
  font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--yellow);
  text-decoration: none;
  mix-blend-mode: difference;
}
.mail:hover { text-decoration: underline; }
.footer-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
}
.copy {
  position: relative;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  mix-blend-mode: difference;
}
.socials { display: flex; gap: 0.4rem; position: relative; z-index: 3; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 1.45rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

/* ---------- Panels ---------- */
.panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  isolation: isolate;
  background: var(--yellow);
  color: var(--ink);
  overflow: auto;
  touch-action: pan-y;
  padding: 7rem 8vw 4rem;
}
.panel[hidden] { display: none; }
.panel-inner { max-width: 52rem; }
.panel-close {
  position: fixed;
  top: 1.15rem;
  left: 1.6rem;
  width: 1.55rem;
  height: 1.55rem;
  z-index: 121;
}
.panel-close svg { width: 100%; height: 100%; fill: currentColor; }
.about .manifesto { max-width: none; }
.manifesto-sm { max-width: 16ch; margin: 0.4rem 0 1.4rem; }
.panel-body {
  max-width: 36rem;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
}
.panel-visual {
  margin-top: 2.5rem;
  max-width: 28rem;
}
.panel-visual img { width: 100%; background: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-header { padding: 0.95rem 1rem; }
  .hero { padding: 5.2rem 5vw 1.6rem; justify-content: center; }
  .tagline { white-space: normal; max-width: 80vw; }
  .hero-device { width: min(100%, 640px); margin-top: -6vw; }
  .about { grid-template-columns: 1fr; padding: 8vh 6vw 3vh; }
  .eyebrow { margin-bottom: 0.8rem; }
  .manifesto { max-width: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 8vw 5vw; }
  .spill { width: 70vw; height: 70vw; }
  .mail { text-align: center; margin-right: 0; }
  .footer-bar { padding: 1rem 1.1rem; }
  .footer { min-height: 100svh; }
}
@media (max-width: 620px) {
  .mark-oval { display: none; }
  .site-header { grid-template-columns: auto 1fr; }
  .site-nav { justify-self: end; }
  .site-nav .pill { padding: 0.28rem 0.55rem; font-size: 0.55rem; letter-spacing: 0.1em; }
  .butter { font-size: clamp(3.2rem, 20vw, 5.2rem); }
  .max { font-size: clamp(2.4rem, 16.5vw, 4.1rem); }
  .wordmark { padding-right: 0.2em; }
  .tagline { font-size: 0.48rem; letter-spacing: 0.1em; }
  .hero { justify-content: center; padding-top: 5.5rem; }
  .grid { grid-template-columns: 1fr; gap: 3.2rem; }
  .works { padding: 3vh 8vw 10vh; }
  .reach-type { font-size: clamp(2.4rem, 15.5vw, 4.4rem); padding: 0 4vw; }
  .gauntlet { height: 1.15em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
