/* Bhuvi Solutions, styled after the owner's reference (b-egg.farm):
   warm paper, tall condensed caps, brush script over it, outlined pills,
   one full-bleed yellow block, dark footer.
   Accent: yellow (ink of the brand card). Brush script is magenta, as on the card.
   Radius rule: interactive things are full pills; panels are 22px. Nothing else. */

:root {
  --paper: #F4F0E6;
  --paper-2: #FBF9F3;
  --ink: #221E1A;
  --ink-2: #5A544C;
  --line: rgba(34, 30, 26, .18);
  --yellow: #FFC72C;
  --yellow-deep: #F2B300;
  --magenta: #D6127A;
  --cyan: #0097D7;

  --r-panel: 22px;
  --pill: 999px;

  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --brush: "Caveat Brush", "Segoe Print", cursive;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.mega {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  line-height: .9; letter-spacing: .005em; color: var(--ink);
}
.mega .line { display: block; }
.mega-sm { font-size: clamp(3rem, 7.4vw, 6.4rem); position: relative; display: inline-block; }
.brush { font-family: var(--brush); color: var(--magenta); line-height: 1; }
.sub { max-width: 52ch; color: var(--ink-2); font-size: 1.125rem; margin-top: 18px; }
.mono-h { font: 500 1.0625rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.mono-note { font: 500 .875rem/1.4 var(--mono); color: var(--magenta); margin: 6px 0 12px; }

/* ---------- Pills (every button) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; white-space: nowrap;
  border-radius: var(--pill); border: 2px solid var(--ink);
  font: 500 .9375rem/1 var(--mono); text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.pill:active { transform: scale(.97); }
.pill-lg { min-height: 56px; padding: 0 30px; font-size: 1rem; }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill-ink:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.pill-line { background: transparent; }
.pill-line:hover { background: var(--ink); color: var(--paper); }
.pill-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.pill-yellow:hover { background: var(--paper-2); border-color: var(--paper-2); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(244, 240, 230, .9); backdrop-filter: blur(10px); transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.brand-word { font: 400 1.75rem/1 var(--display); letter-spacing: .02em; }
.brand-script { font: 1.5rem/1 var(--brush); color: var(--magenta); transform: rotate(-6deg) translateY(2px); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links a:not(.pill) {
  font: 500 .875rem/1 var(--mono); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; padding: 8px 0;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 2px no-repeat; transition: background-size .35s var(--ease);
}
.nav-links a:not(.pill):hover { background-size: 100% 2px; }
.menu-cta { display: none; }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(24px, 5vh, 64px) 0 0; min-height: calc(100dvh - 72px); display: flex; flex-direction: column; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; flex: 1; padding-bottom: 120px; }
.hero h1 { font-size: clamp(3.2rem, 6.4vw, 6.6rem); }
.hero-brush {
  font-size: clamp(2.6rem, 5.4vw, 5rem); transform: rotate(-7deg);
  margin: -.32em 0 0 .8em; width: max-content; position: relative; z-index: 2;
}
.hero-sub { max-width: 40ch; font-size: 1.1875rem; color: var(--ink-2); margin-top: 26px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* load sequence: lines rise, brush paints in, the rest fades up, pieces drop onto the table */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line { animation: rise 1s var(--ease) both; }
  .hero h1 .line:nth-child(2) { animation-delay: .08s; }
  .hero-brush { animation: paint 1.1s var(--ease) .55s both; }
  .hero-sub, .hero-ctas { animation: fade .9s var(--ease) .9s both; }
  .stage .obj { animation: drop 1.2s var(--ease) both; animation-delay: calc(.2s + var(--i, 0) * .09s); }
}
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }
@keyframes paint { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -5% -20% 0); } }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } }
@keyframes drop { from { opacity: 0; translate: 0 -60px; } }

/* 3D print pieces. --px/--py are pointer position (-1..1) set by app.js; --d is depth */
.stage { position: relative; height: min(64vh, 600px); perspective: 1400px; --px: 0; --py: 0; }
.obj {
  position: absolute; transform-style: preserve-3d; --d: 1;
  transform:
    translate3d(calc(var(--px) * var(--d) * 14px), calc(var(--py) * var(--d) * 14px), 0)
    rotateX(calc(var(--py) * -8deg)) rotateY(calc(var(--px) * 10deg)) rotate(var(--r, 0deg));
  transition: transform .6s var(--ease);
}
.book { --r: -6deg; --i: 0; --d: .6; left: 6%; top: 4%; width: 44%; aspect-ratio: 2 / 3; }
.book-cover {
  position: absolute; inset: 0; border-radius: 4px 12px 12px 4px; padding: 10% 10% 12% 16%;
  background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 10px 0 0 rgba(255,255,255,.08), inset 14px 0 0 rgba(0,0,0,.25), 24px 40px 60px rgba(80, 60, 20, .28);
}
.book-title { font: 400 clamp(2rem, 4vw, 3.6rem)/.92 var(--display); text-transform: uppercase; color: var(--yellow); }
.book-brush { font: clamp(1.1rem, 1.8vw, 1.6rem)/1 var(--brush); color: #fff; transform: rotate(-5deg); }
.card { width: 52%; aspect-ratio: 3.5 / 2; border-radius: 10px; }
.card-back { --r: 14deg; --i: 1; --d: 1.1; right: 4%; top: 38%; background: var(--yellow); box-shadow: 18px 30px 50px rgba(80, 60, 20, .22); }
.card-front { --r: -4deg; --i: 2; --d: 1.5; right: 10%; top: 46%; background: var(--paper-2); box-shadow: 18px 34px 56px rgba(80, 60, 20, .3); }
.vc { position: absolute; inset: 0; padding: 7% 8%; display: grid; grid-template-rows: auto 1fr auto auto; font-family: var(--body); }
.vc-top { display: flex; justify-content: space-between; font-size: clamp(.55rem, .9vw, .8rem); }
.vc-top span { font-family: var(--mono); }
.vc-name { align-self: center; font: 400 clamp(1.4rem, 2.8vw, 2.4rem)/1 var(--display); text-transform: uppercase; color: #1D4FA8; }
.vc-strip { display: flex; gap: 3px; margin-bottom: 6px; }
.vc-strip i { width: 22px; height: 7px; }
.vc-strip i:nth-child(1) { background: var(--cyan); } .vc-strip i:nth-child(2) { background: var(--magenta); }
.vc-strip i:nth-child(3) { background: var(--yellow); } .vc-strip i:nth-child(4) { background: var(--ink); }
.vc-addr { font: clamp(.5rem, .8vw, .72rem)/1.2 var(--mono); color: var(--ink-2); }
.sticker {
  --r: 12deg; --i: 3; --d: 2.1; left: 2%; bottom: 2%; width: 30%; aspect-ratio: 1; border-radius: 50%;
  background: var(--magenta); color: #fff; display: grid; place-items: center; text-align: center;
  font: clamp(1.1rem, 2vw, 1.9rem)/1 var(--brush);
  box-shadow: 0 0 0 6px var(--paper-2), 14px 26px 40px rgba(80, 60, 20, .3);
}
.drop { border-radius: 50%; --i: 4; }
.d1 { --d: 2.6; width: 34px; height: 34px; background: var(--cyan); right: 6%; top: 8%; }
.d2 { --d: 1.8; width: 20px; height: 20px; background: var(--yellow); left: 50%; top: 2%; }
.d3 { --d: 3; width: 26px; height: 26px; background: var(--ink); right: 30%; bottom: 6%; }

.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(60px, 9vw, 120px); fill: var(--paper-2); }

/* ---------- What we print: physics cloud ---------- */
.print { background: var(--paper-2); padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); }
.brush-tag { position: absolute; right: -.4em; bottom: -.55em; font-size: .5em; text-transform: none; transform: rotate(-8deg); white-space: nowrap; }
.cloud {
  position: relative; margin-top: clamp(36px, 5vw, 56px);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  padding: 8px 0;
}
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 24px; height: 58px; border-radius: var(--pill);
  border: 2px solid var(--ink); background: var(--paper-2);
  font: 400 clamp(1.15rem, 1.7vw, 1.6rem)/1 var(--display); text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.chip:nth-child(3n+1) { border-color: var(--yellow-deep); }
.chip.dot { width: 58px; padding: 0; font: 400 1.6rem/1 var(--brush); }
.chip.dot.c { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.chip.dot.m { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.chip.dot.y { background: var(--yellow); border-color: var(--yellow); }
.chip.dot.k { background: var(--ink); color: var(--paper); }
/* physics on: app.js positions each chip */
.cloud.physics { display: block; height: clamp(360px, 34vw, 440px); padding: 0; touch-action: pan-y; }
.cloud.physics .chip { position: absolute; left: 0; top: 0; will-change: transform; cursor: grab; }
.cloud.physics .chip:active { cursor: grabbing; }
.hint { text-align: center; margin-top: 22px; font: 500 .875rem/1.4 var(--mono); color: var(--ink-2); text-transform: uppercase; }

/* ---------- Halftone headline + presses ---------- */
.presses { background: var(--paper-2); padding: 0 0 clamp(64px, 8vw, 110px); }
.halftone { font: 400 clamp(4.6rem, 16vw, 15rem)/.86 var(--display); text-transform: uppercase; color: var(--ink); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .halftone {
    color: transparent;
    background-image:
      radial-gradient(circle, var(--magenta) 32%, transparent 36%),
      radial-gradient(circle, var(--cyan) 32%, transparent 36%),
      radial-gradient(circle, var(--ink) 44%, transparent 48%);
    background-size: 11px 11px, 11px 11px, 9px 9px;
    background-position: 0 0, 4px 3px, 0 0;
    background-blend-mode: multiply;
    -webkit-background-clip: text; background-clip: text;
  }
}
/* dots grow as the word scrolls through the screen (Chrome/Edge; others get static dots) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .halftone { animation: dots linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
  }
}
@keyframes dots { from { background-size: 4px 4px, 4px 4px, 3px 3px; } to { background-size: 13px 13px, 13px 13px, 10px 10px; } }

.press-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px 48px; margin-top: clamp(36px, 5vw, 60px); padding-top: 28px; border-top: 2px solid var(--ink); }
.press-col > p:last-child { color: var(--ink-2); max-width: 40ch; }
.press-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.press-ask > p:first-child { color: var(--ink); font-weight: 500; max-width: 34ch; }

/* ---------- Order strip ---------- */
.order { padding: clamp(64px, 8vw, 110px) 0; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 26%); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: clamp(32px, 4vw, 48px) var(--gutter) 16px;
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding-left: var(--edge); scroll-padding-inline: var(--edge);
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip li {
  scroll-snap-align: start; border-radius: var(--r-panel); padding: 28px 28px 32px;
  background: var(--paper-2); border: 2px solid var(--ink); min-height: 300px;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), background-color .3s;
}
.strip li:hover { transform: translateY(-6px) rotate(-1deg); background: var(--yellow); }
.num { font: 400 clamp(4rem, 7vw, 6rem)/.8 var(--display); color: var(--magenta); margin-bottom: auto; }
.strip h3 { font: 400 1.75rem/1 var(--display); text-transform: uppercase; margin: 28px 0 10px; }
.strip p { color: var(--ink-2); }
.strip li:hover p { color: var(--ink); }

/* ---------- Software (yellow) ---------- */
.software { background: var(--yellow); padding: clamp(72px, 9vw, 120px) 0; position: relative; overflow: hidden; }
.software .mega-sm { font-size: clamp(3.6rem, 9vw, 8rem); }
.sw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.sw-brush { font-size: clamp(2.2rem, 4.4vw, 3.8rem); color: var(--ink); transform: rotate(-6deg); margin: -.35em 0 28px .6em; width: max-content; }
.acc { display: grid; gap: 12px; }
.acc details { border: 2px solid var(--ink); border-radius: 30px; background: rgba(255,255,255,.18); transition: background-color .3s; }
.acc details[open] { background: var(--paper-2); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px 14px 24px; font: 400 clamp(1.35rem, 2.2vw, 1.85rem)/1.1 var(--display); text-transform: uppercase;
}
.acc summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 30px; height: 30px; flex: none; border: 2px solid var(--ink); border-radius: 50%; transition: background-color .2s; }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); translate: -50% -50%; }
.plus::after { rotate: 90deg; transition: rotate .4s var(--ease); }
details[open] .plus { background: var(--ink); }
details[open] .plus::before { background: var(--yellow); }
details[open] .plus::after { rotate: 0deg; background: var(--yellow); }
.acc-body { padding: 0 24px 24px; }
.acc-body p:not(.mono-note) { max-width: 52ch; margin-bottom: 18px; }
@media (prefers-reduced-motion: no-preference) {
  details[open] .acc-body { animation: fade .5s var(--ease) both; }
}

.sw-facts { position: relative; min-height: 420px; }
.facts { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 12px; }
.facts li {
  padding: 14px 22px; border-radius: var(--pill); background: var(--paper-2); border: 2px solid var(--ink);
  font: 400 clamp(1.1rem, 1.7vw, 1.5rem)/1 var(--display); text-transform: uppercase;
  opacity: 0; transform: translateY(24px) rotate(var(--rot, 0deg)) scale(.9);
  transition: opacity .45s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--n, 0) * 45ms);
}
.facts li:nth-child(odd) { --rot: -3deg; }
.facts li:nth-child(3n) { --rot: 4deg; background: var(--ink); color: var(--yellow); }
.facts.is-on li { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)) scale(1); }
.facts:not(.is-on) { visibility: hidden; transition: visibility 0s .5s; }
.facts.is-on { visibility: visible; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--paper); padding: clamp(64px, 8vw, 110px) 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.foot-h { color: var(--paper); font-size: clamp(3.4rem, 7.4vw, 6.8rem); }
.foot-sub { color: #C9C2B6; max-width: 38ch; margin: 22px 0 30px; font-size: 1.125rem; }
.foot-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 28px; }
.foot-list dt { font: 500 .8125rem/1 var(--mono); text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; letter-spacing: .04em; }
.foot-list dd { margin: 0; font: 400 1rem/1.5 var(--mono); }
.foot-list dd span { display: block; color: #A49C8F; font-size: .875rem; }
.foot-list a { text-decoration: none; }
.foot-list a:hover { color: var(--yellow); }
.foot :focus-visible { outline-color: var(--yellow); }
.foot-base { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 36px; margin-top: clamp(56px, 7vw, 90px); padding-top: 24px; border-top: 1px solid rgba(244, 240, 230, .16); font: 400 .8125rem/1.4 var(--mono); color: #A49C8F; }
.foot-base .brand { margin-right: auto; }
.brand-light .brand-word { color: var(--paper); }

/* ---------- Scroll reveal (app.js adds .reveal, then .in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .press-grid { grid-template-columns: 1fr 1fr; }
  .press-ask { grid-column: 1 / -1; }
  .strip { grid-auto-columns: minmax(260px, 40%); }
}
@media (max-width: 860px) {
  .nav-cta { display: none; }
  .burger {
    display: inline-grid; place-content: center; gap: 7px; margin-left: auto;
    width: 48px; height: 48px; border: 0; background: none; cursor: pointer; padding: 0;
  }
  .burger span { display: block; width: 30px; height: 3px; background: var(--ink); border-radius: 3px; transition: transform .35s var(--ease), width .35s var(--ease); }
  .burger span:last-child { width: 20px; justify-self: start; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { width: 30px; transform: translateY(-5px) rotate(-45deg); }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; height: calc(100dvh - 72px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px;
    padding: 0 var(--gutter) 60px; background: var(--paper);
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .5s var(--ease), visibility 0s .5s;
  }
  .nav-links.open { clip-path: inset(0); visibility: visible; transition: clip-path .5s var(--ease); }
  .nav-links a:not(.pill) { font: 400 2.6rem/1 var(--display); letter-spacing: .01em; }
  .menu-cta { display: inline-flex; margin-top: 12px; }

  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 90px; }
  .stage { height: 82vw; max-height: 440px; }
  .sw-grid, .foot-grid { grid-template-columns: 1fr; }
  .sw-facts { min-height: 0; }
  .facts { position: static; justify-content: flex-start; }
  .facts:not(.is-on) { display: none; }
}
@media (max-width: 560px) {
  .press-grid { grid-template-columns: 1fr; }
  .strip { grid-auto-columns: 82%; }
  .foot-list { grid-template-columns: 1fr; }
  .chip { height: 48px; padding: 0 18px; }
  .cloud.physics { height: 600px; }
  .chip.dot { width: 48px; }
  .brush-tag { position: static; display: block; margin-top: 6px; font-size: .55em; }
  .hero-brush { margin-left: .3em; }
}
