/* ============================================================
   Gybio — themes/blockparty.css   (V2.5 "Block Party")
   A PLAYFUL evolution of Brickyard: a celebration of stacked
   colour blocks. Tilted colour-block bands, abstract rows of
   rounded "blocks" as section toppers, a colourful tile wall,
   fat pill buttons that pop, and stud-dot motifs everywhere.
   Everything scoped under .v-blockparty so it can't leak.
   No LEGO trade dress — abstract rounded rects + plain circles
   + bright colours only. Text stays upright and AA-legible.
   ============================================================ */

/* ---------- tokens: palette, shape, type ---------- */
.v-blockparty {
  /* core */
  --bg:        #FFFFFF;
  --bg-alt:    #FFFFFF;
  --ink:       #111111;
  --muted:     #44474F;        /* darker than base for AA on white cards */
  --card:      #FFFFFF;
  --line:      rgba(17,17,17,.12);

  /* bright primaries (used as full colour blocks + bands) */
  --red:    #E3000B;
  --yellow: #FFD400;
  --blue:   #0057B8;
  --green:  #00A651;

  /* default brand colour = the joyful red */
  --primary:   #E3000B;
  --primary-d: #B80009;
  --on-primary:#FFFFFF;
  --accent-1:  #E3000B;
  --accent-2:  #00A651;
  --accent-3:  #FFD400;

  /* fat, toy-like shapes */
  --radius:      28px;
  --radius-sm:   20px;
  --radius-pill: 999px;

  /* heavy rounded geometric system stack + big weights */
  --font-head: "Avenir Next Rounded", "Hiragino Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-body: "Avenir Next Rounded", "Hiragino Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --weight-head: 900;
  --tracking-head: -0.03em;
  --h1: clamp(2.7rem, 8vw, 4.6rem);
  --h2: clamp(2rem, 5vw, 3.2rem);

  /* reusable chunky "toy" shadow (offset block + soft drop) */
  --toy-shadow: 0 8px 0 rgba(17,17,17,.16), 0 16px 30px rgba(17,17,17,.14);
  /* abstract stacked-block band: rows of bright rounded blocks */
  --party-band:
    repeating-linear-gradient(90deg,
      var(--red)    0  56px, transparent 56px 64px,
      var(--yellow) 64px 120px, transparent 120px 128px,
      var(--blue)   128px 184px, transparent 184px 192px,
      var(--green)  192px 248px, transparent 248px 256px);
}

/* ---------- focus: bold, always visible ---------- */
.v-blockparty :focus-visible {
  outline: 4px solid #111;
  outline-offset: 3px;
  border-radius: 8px;
}
/* On dark/saturated section backgrounds, switch the ring to white */
.v-blockparty .section--problem :focus-visible,
.v-blockparty .section--how :focus-visible,
.v-blockparty .section--why :focus-visible,
.v-blockparty .section--cta :focus-visible,
.v-blockparty .footer :focus-visible {
  outline-color: #fff;
}

/* ---------- type ---------- */
.v-blockparty h1, .v-blockparty h2, .v-blockparty h3 { font-weight: 900; }
.v-blockparty .eyebrow { color: inherit; opacity: .85; letter-spacing: .14em; }

/* ============================================================
   NAV — chunky uppercase wordmark + revealed tagline
   ============================================================ */
.v-blockparty .nav {
  background: #fff;
  border-bottom: 3px solid #111;
  backdrop-filter: none;
}
/* "Letter tiles" logo (V1): each letter in its own coloured block with a stud.
   The <a> keeps aria-label="Gybio home" so the link stays accessible. */
.v-blockparty .wordmark { gap: 5px; }
.v-blockparty .wordmark__name { display: inline-flex; gap: 5px; }
.v-blockparty .wordmark__name > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}
/* subtle stud on each tile */
.v-blockparty .wordmark__name > span::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 20%;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}
/* per-letter colours (G Y B I O) */
.v-blockparty .wordmark__name > span:nth-child(1) { background: var(--red); }
.v-blockparty .wordmark__name > span:nth-child(2) { background: var(--yellow); color: #111; }
.v-blockparty .wordmark__name > span:nth-child(2)::before { background: rgba(0, 0, 0, .22); }
.v-blockparty .wordmark__name > span:nth-child(3) { background: var(--blue); }
.v-blockparty .wordmark__name > span:nth-child(4) { background: var(--green); }
.v-blockparty .wordmark__name > span:nth-child(5) { background: var(--red); }
/* tagline revealed under the logo */
.v-blockparty .brand { gap: 2px; }
.v-blockparty .brand__tag {
  display: block;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--blue);
  text-transform: none;
}
/* the single stud-dot is replaced by the letter-tiles logo */
.v-blockparty .wordmark__dot { display: none; }
.v-blockparty .nav__links > a:not(.btn):hover { color: var(--red); }
.v-blockparty .nav__mobile { background: #fff; border-bottom: 3px solid #111; }

/* ============================================================
   BUTTONS — fat pills with a chunky shadow, playful pop on hover
   ============================================================ */
.v-blockparty .btn {
  font-weight: 800;
  border-radius: var(--radius-pill);
  border: 3px solid #111;
  padding: 16px 28px;
}
.v-blockparty .btn--lg { padding: 18px 34px; font-size: 1.1rem; }
.v-blockparty .btn--sm { padding: 11px 18px; border-width: 2.5px; }
.v-blockparty .btn--primary {
  background: var(--red); color: #fff;
  box-shadow: 0 6px 0 #111;
}
.v-blockparty .btn--primary:hover { background: var(--primary-d); }
.v-blockparty .btn--ghost {
  background: #fff; color: #111;
  box-shadow: 0 6px 0 #111;
}
.v-blockparty .btn--ghost:hover { background: var(--yellow); }
/* spring press: button nudges up then drops onto its shadow */
@media (prefers-reduced-motion: no-preference) {
  .v-blockparty .btn { transition: transform .14s cubic-bezier(.34,1.56,.64,1), background .15s ease, box-shadow .14s ease; }
  .v-blockparty .btn:hover { transform: translateY(-3px) rotate(-1deg); }
  .v-blockparty .btn:active { transform: translateY(4px) rotate(0); box-shadow: 0 2px 0 #111; }
}

/* ============================================================
   SECTION COLOUR BLOCKS + TILTED PARTY BANDS
   Each major section is a solid primary block. A decorative
   stacked-block band sits at the top of each block as a topper,
   and a subtle tilt/skew gives the "block party" energy.
   Text stays upright and legible (only decoration tilts).
   ============================================================ */

/* Decorative stacked-block topper shared by coloured sections.
   A thin row of bright rounded blocks, gently tilted. */
.v-blockparty .section--problem,
.v-blockparty .section--how,
.v-blockparty .section--why,
.v-blockparty .section--who,
.v-blockparty .section--cta,
.v-blockparty .section--faq {
  position: relative;
  overflow: hidden;
}
.v-blockparty .section--problem::before,
.v-blockparty .section--how::before,
.v-blockparty .section--why::before,
.v-blockparty .section--who::before,
.v-blockparty .section--cta::before,
.v-blockparty .section--faq::before {
  content: "";
  position: absolute;
  top: -14px; left: -6%;
  width: 112%;
  height: 26px;
  background: var(--party-band);
  background-size: 256px 26px;
  border-radius: 8px;
  transform: rotate(-1.6deg);
  opacity: .9;
  pointer-events: none;
  z-index: 1;
}
/* keep readable content above the decorative band */
.v-blockparty .section .container { position: relative; z-index: 2; }

/* Hero — white with a giant abstract stud-dot backdrop +
   a tilted stacked-block band behind the copy. */
.v-blockparty .section--hero {
  background: #fff;
  position: relative;
  overflow: hidden;
}
.v-blockparty .section--hero::before,
.v-blockparty .section--hero::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0;
  pointer-events: none;
}
.v-blockparty .section--hero::before {
  width: 360px; height: 360px; top: -120px; right: -80px;
  background: var(--yellow);
}
.v-blockparty .section--hero::after {
  width: 200px; height: 200px; bottom: -70px; left: -60px;
  background: rgba(0,87,184,.18);
}
.v-blockparty .section--hero .container { position: relative; z-index: 1; }
.v-blockparty .section--hero .eyebrow { color: var(--blue); }
.v-blockparty .hero__note, .v-blockparty .reveal-name { color: var(--muted); }
/* Hero copy gets a faint stacked-block band behind it for party energy */
.v-blockparty .hero__copy {
  position: relative;
  padding-top: 26px;
}
.v-blockparty .hero__copy::before {
  content: "";
  position: absolute;
  top: -2px; left: -8px;
  width: min(320px, 80%);
  height: 18px;
  background: var(--party-band);
  background-size: 256px 18px;
  border-radius: 6px;
  transform: rotate(-2deg);
  opacity: .85;
  z-index: -1;
}

/* Problem — RED block, white text */
.v-blockparty .section--problem { background: var(--red); color: #fff; }
.v-blockparty .section--problem h2 { color: #fff; }
.v-blockparty .section--problem .prose { color: rgba(255,255,255,.92); }
.v-blockparty .section--problem .prose em { color: var(--yellow); }

/* How — BLUE block, white headings, white step cards */
.v-blockparty .section--how { background: var(--blue); color: #fff; }
.v-blockparty .section--how h2 { color: #fff; }

/* Why — GREEN block, white headings, white cards */
.v-blockparty .section--why { background: var(--green); color: #fff; }
.v-blockparty .section--why h2 { color: #fff; }

/* Who — YELLOW block, near-black ink text */
.v-blockparty .section--who { background: var(--yellow); color: #111; }
.v-blockparty .section--who h2 { color: #111; }

/* Early access — RED block, white text */
.v-blockparty .section--cta { background: var(--red); color: #fff; }
.v-blockparty .section--cta h2 { color: #fff; }
.v-blockparty .section--cta .prose { color: rgba(255,255,255,.92); }
.v-blockparty .section--cta .prose em { color: var(--yellow); }

/* FAQ — YELLOW block, near-black ink */
.v-blockparty .section--faq { background: var(--yellow); color: #111; }
.v-blockparty .section--faq h2 { color: #111; }

/* ============================================================
   WHITE CONTENT CARDS — chunky tiles that sit like a block wall
   ============================================================ */
.v-blockparty .step,
.v-blockparty .card,
.v-blockparty .tile,
.v-blockparty .faq details,
.v-blockparty .result-card {
  background: #fff;
  color: #111;
  border: 3px solid #111;
  border-radius: var(--radius);
  box-shadow: var(--toy-shadow);
}
.v-blockparty .step p,
.v-blockparty .card p,
.v-blockparty .tile span,
.v-blockparty .faq details p { color: var(--muted); }
.v-blockparty .step h3,
.v-blockparty .card h3 { color: #111; }

/* Steps sit at a slight playful tilt, alternating direction —
   like blocks stacked just a little crooked. Text stays upright. */
.v-blockparty .step:nth-child(odd)  { transform: rotate(-1deg); }
.v-blockparty .step:nth-child(even) { transform: rotate(1deg); }

/* Step number — bold blue circular stud with a glossy ring */
.v-blockparty .step__num {
  background: var(--blue); color: #fff;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.28);
}
/* Why card icons — playful circular stud chips */
.v-blockparty .card__icon {
  background: var(--yellow); color: #111;
  border-radius: 50%;
  border: 3px solid #111;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.35);
}
.v-blockparty .card__greys .swatch { border: 2px solid #111; }

/* ============================================================
   WHO TILES — a colourful block wall in the four primaries
   ============================================================ */
.v-blockparty .tile {
  border-radius: var(--radius-sm);
  border-top-width: 3px;
  color: #111;
}
.v-blockparty .tile strong { color: inherit; }
/* Fill each tile with a primary so the whole row reads as a wall.
   White ink on red/blue/green, near-black ink on yellow (AA). */
.v-blockparty .tile:nth-child(1) { background: var(--red);    color: #fff; }
.v-blockparty .tile:nth-child(2) { background: var(--blue);   color: #fff; }
.v-blockparty .tile:nth-child(3) { background: var(--green);  color: #fff; }
.v-blockparty .tile:nth-child(4) { background: var(--yellow); color: #111; }
.v-blockparty .tile:nth-child(1) span,
.v-blockparty .tile:nth-child(2) span,
.v-blockparty .tile:nth-child(3) span { color: rgba(255,255,255,.92); }
.v-blockparty .tile:nth-child(4) span { color: rgba(17,17,17,.78); }

/* FAQ details — chunky pill cards, ink markers */
.v-blockparty .faq details { border-radius: var(--radius-sm); }
.v-blockparty .faq summary { color: #111; font-weight: 800; }
.v-blockparty .faq summary::after { color: var(--red); font-weight: 900; }

/* Waitlist input on the red CTA block */
.v-blockparty .waitlist input {
  background: #fff; color: #111;
  border: 3px solid #111;
  border-radius: var(--radius-pill);
}
.v-blockparty .waitlist input:focus-visible { border-color: #111; }
.v-blockparty .waitlist__msg[data-state="ok"]  { color: var(--yellow); }
.v-blockparty .waitlist__msg[data-state="err"] { color: #fff; }

/* ---------- hero phone mockup: chunky toy framing ---------- */
.v-blockparty .phone {
  border-radius: 46px;
  border: 4px solid #111;
  box-shadow: var(--toy-shadow);
}
.v-blockparty .result-card__box {
  background: linear-gradient(135deg, var(--red), #ff5a62);
  border: 2px solid #111;
}
.v-blockparty .qty {
  background: var(--green); color: #fff;
  font-weight: 800;
}

/* ============================================================
   FOOTER — solid ink block with a stacked-block top stripe
   ============================================================ */
.v-blockparty .footer {
  background: #111; color: #fff;
  border-top: 0;
  position: relative;
}
/* footer topper = the full party band (no tilt, full-bleed) */
.v-blockparty .footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;
  background: var(--party-band);
  background-size: 256px 12px;
}
.v-blockparty .footer__inner,
.v-blockparty .footer__legal { border-color: rgba(255,255,255,.18); }
.v-blockparty .footer .wordmark { color: #fff; }
.v-blockparty .footer__tag,
.v-blockparty .footer .disclaimer,
.v-blockparty .footer .attribution,
.v-blockparty .footer .copyright { color: rgba(255,255,255,.75); }
.v-blockparty .footer__links a { color: #fff; }
.v-blockparty .footer__links a:hover { color: var(--yellow); }

/* ============================================================
   MOTION — party energy: blocks pop, bands drift gently.
   All animation gated behind no-preference; reduced motion
   keeps the fixed small tilts but drops all movement.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .v-blockparty .reveal {
    opacity: 0;
    transform: translateY(26px) scale(.94);
    transition: opacity .5s ease, transform .55s cubic-bezier(.34,1.56,.64,1);
  }
  .v-blockparty .reveal.is-visible { opacity: 1; transform: none; }

  /* cards/steps/tiles pop up + straighten on hover */
  .v-blockparty .step,
  .v-blockparty .card,
  .v-blockparty .tile {
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
  }
  .v-blockparty .card:hover,
  .v-blockparty .tile:hover {
    transform: translateY(-6px) rotate(-1.2deg);
    box-shadow: 0 14px 0 rgba(17,17,17,.16), 0 22px 40px rgba(17,17,17,.18);
  }
  /* steps already tilt — pop straight up to "snap into place" */
  .v-blockparty .step:hover {
    transform: translateY(-6px) rotate(0deg);
    box-shadow: 0 14px 0 rgba(17,17,17,.16), 0 22px 40px rgba(17,17,17,.18);
  }

  /* the topper bands drift sideways a touch — a slow party shimmy */
  .v-blockparty .footer::before {
    animation: bp-band-drift 9s linear infinite;
  }
}
@keyframes bp-band-drift {
  from { background-position: 0 0; }
  to   { background-position: 256px 0; }
}

/* Reduced motion: calm cross-fade, fixed tilts kept (not animated) */
@media (prefers-reduced-motion: reduce) {
  .v-blockparty .reveal {
    opacity: 0; transform: none;
    transition: opacity .4s ease;
  }
  .v-blockparty .reveal.is-visible { opacity: 1; }
  .v-blockparty .btn,
  .v-blockparty .step,
  .v-blockparty .card,
  .v-blockparty .tile { transition: background .2s ease, color .2s ease; }
}

/* ---- animated brick backdrop (pile → ordered grid) ----
   Stacked-block silhouettes, kept faint so hero copy stays AA-legible. */
.v-blockparty .brickfield { display: block; opacity: .18; }
.v-blockparty .bf-piece { border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .v-blockparty .brickfield { opacity: .22; } }

/* ---- hero demo: the phone "shows the app working" (driven by app.js) ---- */
/* brick colour is set per-cycle via CSS vars so the studs (pseudo-elements)
   inherit the same colour as the brick body. */
.v-blockparty .brick { background: var(--bk, linear-gradient(180deg, #d8dce1, #b4babf)); transition: transform .35s ease; }
.v-blockparty .brick::before,
.v-blockparty .brick::after { background: var(--bk-stud, linear-gradient(180deg, #e2e5e9, #c2c7cc)); }

/* reticle: locks onto the brick on capture */
.v-blockparty .reticle { transition: width .35s ease, height .35s ease, border-color .35s ease; }
.v-blockparty .reticle.is-lock { width: 106px; height: 78px; border-color: #00A651; box-shadow: 0 0 0 9999px rgba(0,0,0,.28), 0 0 0 3px rgba(0,166,81,.5); }

/* "Captured ✓" bar reads as success */
.v-blockparty .viewfinder__bar { transition: background .25s ease; }

/* capture flash */
.v-blockparty .viewfinder.is-capture::after { content: ""; position: absolute; inset: 0; background: #fff; pointer-events: none; }
.v-blockparty .viewfinder.is-capture .brick { transform: scale(.94); }

/* result card slides up from the bottom on a match.
   Hidden state only applies once JS marks the demo active (.bp-demo on <body>),
   so with JS disabled the card just shows normally. */
.v-blockparty.bp-demo .result-card { transform: translateY(135%); opacity: 0; transition: transform .55s cubic-bezier(.2,.85,.25,1), opacity .4s ease; }
.v-blockparty.bp-demo .result-card.is-in { transform: none; opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .v-blockparty .reticle.is-steady { animation: bp-pulse 1s ease-in-out infinite; }
  .v-blockparty .viewfinder.is-capture::after { animation: bp-flash .45s ease forwards; }
}
@keyframes bp-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes bp-flash { from { opacity: .85; } to { opacity: 0; } }

/* reduced motion: result is shown settled, no slide/flash/pulse */
@media (prefers-reduced-motion: reduce) {
  .v-blockparty .result-card { transition: none; transform: none; opacity: 1; }
  .v-blockparty .viewfinder.is-capture::after { display: none; }
}
