/* ============================================================
   MotionPotion — Plugin landing pages (plugins.css)
   Loads after experience.css. Uses its design tokens.
   Each page sets --plug on <html> to its accent color.
   ============================================================ */

/* The [hidden] attribute must win over explicit display rules
   (e.g. .plug-cta { display: flex }) so auth-gated buttons stay hidden. */
[hidden] { display: none !important; }

/* ============================================================
   BREWS HUB
   ============================================================ */

.brews-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(7rem, 12vw, 10rem) var(--gutter) 0;
}

.brews-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--flame);
  margin: 0 0 1rem;
}

.brews-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 7.5vw, 6rem);
  letter-spacing: -0.038em;
  line-height: 0.93;
  color: var(--ink);
  margin: 0 0 1.4rem;
}

.brews-lede {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.62;
  color: var(--ink);
  opacity: 0.62;
  max-width: 52ch;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

/* Shared "coming soon" pill — used on the brews hub h1 and on each
   individual tool page's hero, above the waitlist form. */
.plug-soon-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(10,10,10,0.06);
  color: rgba(10,10,10,0.55);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
  margin: 0 0 1.1rem;
}

/* ── Plugin card grid ─────────────────────────────────────── */
.brew-grid {
  display: grid;
  /* auto-fill reserves empty column tracks even when there are only a
     handful of cards, so they bunch up on the left with dead space on
     the right. auto-fit collapses genuinely empty tracks instead. A
     290px minimum still fits 3 columns at this grid's max width, which
     for today's 4 cards (3 shipped + 1 "coming soon") strands the last
     one alone in a mostly-empty row; a wider minimum caps it at 2
     columns so 4 cards form a clean, fully-occupied 2x2. */
  /* min(400px, 100%) instead of a bare 400px — a fixed minimum can't
     shrink below itself, which overflowed narrow viewports */
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
/* At tablet widths a bare 400px minimum can't yet fit two columns, so the
   grid collapses to one — a mobile layout stretched full-bleed across a
   768-1024px viewport. Force 2 columns with a smaller minimum in this
   band so the grid doesn't wait for desktop width to pair up. */
@media (min-width: 640px) and (max-width: 900px) {
  .brew-grid { grid-template-columns: repeat(2, 1fr); }
}

.brew-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--c, var(--flame)) 6%, var(--paper-pure));
  border: 2px solid color-mix(in srgb, var(--c, var(--flame)) 35%, transparent);
  border-radius: 20px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
}
.brew-card:not(.brew-card--soon):hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(10,10,10,0.12), 0 4px 12px rgba(10,10,10,0.08);
}
.brew-card:focus-visible {
  outline: 3px solid var(--c, var(--flame));
  outline-offset: 3px;
}

.brew-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
}
/* Reserve room for the absolutely-positioned corner tag — only needed on
   cards that actually have one (the "soon" card's tag is in-flow above). */
.brew-card:not(.brew-card--soon) .brew-card-head {
  padding-right: clamp(3.25rem, 16vw, 4.75rem);
}
.brew-card-emoji {
  flex: none;
  font-size: 2rem;
  line-height: 1;
}

.brew-card-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text, white);
  background: var(--c, var(--flame));
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  margin: 0;
  width: fit-content;
  pointer-events: none;
}
.brew-card-tag--soon {
  position: relative;
  top: auto;
  right: auto;
  margin: 0 0 0.9rem;
  background: rgba(0,0,0,0.06);
  color: rgba(10,10,10,0.45);
  pointer-events: auto;
}

.brew-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}

.brew-card-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--ink);
  opacity: 0.6;
  flex: 1;
  margin: 0 0 1.6rem;
}

.brew-card-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c, var(--flame));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  transition: gap 0.18s ease;
}
.brew-card:hover .brew-card-link { gap: 0.7rem; }

.brew-card--soon {
  border-style: dashed;
  border-color: rgba(10,10,10,0.15);
  background: rgba(10,10,10,0.02);
  cursor: default;
}
.brew-card--soon .brew-card-emoji,
.brew-card--soon .brew-card-title,
.brew-card--soon .brew-card-desc { opacity: 0.35; }

/* ── "Why Wizard?" panel ──────────────────────────────────────
   Contained rounded ink card in the same language as the brew cards
   above it (not a full-bleed band), with a real CTA button and the
   "more brews" footnote folded in instead of floating below alone. */
.brews-why {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3.5rem, 7vw, 5.5rem);
}
.brews-why-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: clamp(20px, 2.4vw, 28px);
  padding: clamp(2.2rem, 5vw, 4rem) clamp(1.6rem, 4vw, 3.6rem);
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 680px) { .brews-why-card { grid-template-columns: 1fr; } }

.brews-why-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.032em;
  line-height: 1.04;
  margin: 0;
}
.brews-why-h em { font-style: normal; color: var(--gold); }

.brews-why-body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.07rem);
  line-height: 1.65;
}
.brews-why-body > p:first-child { opacity: 0.65; margin: 0; }

.brews-why-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 1.4rem;
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.brews-why-cta:hover { transform: scale(1.04); box-shadow: 3px 5px 0 rgba(0,0,0,0.35); }
.brews-hero-cta {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}


/* ============================================================
   PLUGIN LANDING PAGES (shared)
   ============================================================ */

/* ── Breadcrumb ───────────────────────────────────────────── */
.plug-crumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink);
  opacity: 0.5;
  padding: clamp(5.5rem, 9vw, 7.5rem) var(--gutter) clamp(1.2rem, 2.5vw, 1.8rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.plug-crumbs a { color: inherit; text-decoration: none; }
.plug-crumbs a:hover { opacity: 0.8; text-decoration: underline; }
.plug-crumbs-sep { opacity: 0.4; }

/* ── Hero: 2-col layout ───────────────────────────────────── */
.plug-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 820px) { .plug-hero { grid-template-columns: 1fr; } }

/* Single brand kicker — only on the hero eyebrow, not repeated */
.plug-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plug, var(--flame));
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.plug-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}

.plug-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 6.5vw, 4.8rem);
  letter-spacing: -0.038em;
  line-height: 0.97;
  color: var(--ink);
  margin: 0 0 1.3rem;
  text-wrap: balance;
}
.plug-h1 em { font-style: normal; color: var(--plug, var(--flame)); }

.plug-lede {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.62;
  color: var(--ink);
  opacity: 0.65;
  max-width: 48ch;
  margin: 0 0 2.2rem;
}

.plug-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.plug-cta {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  background: var(--plug, var(--flame));
  color: var(--paper-pure);
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.plug-cta:hover { transform: scale(1.04); box-shadow: 3px 5px 0 rgba(0,0,0,0.25); }
/* Gold page needs ink text for readability */
.plug-page--gold .plug-cta { color: var(--ink); }

.plug-waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
}
.plug-waitlist input[type="email"] {
  flex: 1 1 240px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-pure);
  border: 2px solid rgba(10,10,10,0.15);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
}
.plug-waitlist input[type="email"]::placeholder {
  color: rgba(10,10,10,0.45);
}
.plug-waitlist input[type="email"]:focus-visible {
  outline: 3px solid var(--plug, var(--flame));
  outline-offset: 2px;
}
.plug-waitlist-done {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.plug-waitlist-done .inline-check { width: 0.9em; height: 0.9em; overflow: visible; flex-shrink: 0; display: inline-block; vertical-align: -0.08em; }

.plug-note {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--ink);
  opacity: 0.45;
}

/* The visual demo box */
.plug-demo {
  border-radius: 18px;
  border: 2px solid var(--ink);
  overflow: hidden;
  box-shadow: 7px 9px 0 var(--ink);
  background: #0A0A0A;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.plug-demo svg { display: block; width: 100%; height: 100%; }

/* ── Problem section ─────────────────────────────────────── */
.plug-problem {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}
.plug-problem-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
@media (max-width: 700px) { .plug-problem-inner { grid-template-columns: 1fr; } }

.plug-problem-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--paper);
  margin: 0;
  text-wrap: balance;
}
.plug-problem-h em { font-style: normal; color: var(--plug, var(--gold)); }

.plug-problem-copy {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.25vw, 1.06rem);
  line-height: 1.68;
  opacity: 0.62;
}
.plug-problem-copy p + p { margin-top: 1rem; }

/* ── Features: editorial roll list (no numbered cards) ────── */
.plug-features {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}

.plug-features-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}

/* Feature roll: name on left, description on right, dividers between */
.plug-feat-roll {
  margin: 0;
  padding: 0;
  border-top: 2px solid rgba(10,10,10,0.1);
}

.plug-feat-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.2rem, 2.5vw, 1.8rem) 0;
  border-bottom: 1px solid rgba(10,10,10,0.08);
  align-items: baseline;
}
@media (max-width: 560px) {
  .plug-feat-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

.plug-feat-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  letter-spacing: -0.015em;
  color: var(--plug, var(--flame));
  margin: 0;
}

.plug-feat-body {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.62;
  color: var(--ink);
  opacity: 0.65;
  margin: 0;
  max-width: 56ch;
}

/* ── Use cases ───────────────────────────────────────────── */
.plug-uses {
  border-top: 2px solid rgba(10,10,10,0.08);
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}
.plug-uses-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.plug-uses-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.028em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}
.plug-uses-h em { font-style: normal; color: var(--plug, var(--flame)); }

.plug-use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 3rem);
}
@media (max-width: 680px) { .plug-use-grid { grid-template-columns: 1fr; } }

/* No side-stripe — accent lives in the title color */
.plug-use-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.012em;
  color: var(--plug, var(--flame));
  margin: 0 0 0.45rem;
}
.plug-use-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  opacity: 0.6;
  margin: 0;
}

/* ── Bottom CTA ──────────────────────────────────────────── */
.plug-cta-block {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background: var(--plug, var(--flame));
}
.plug-cta-block-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.plug-cta-block h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: #fff;
  margin: 0 0 1rem;
  text-wrap: balance;
}
/* Gold needs ink text for contrast */
.plug-page--gold .plug-cta-block h2 { color: var(--ink); }
.plug-page--gold .plug-cta-block p { color: rgba(10,10,10,0.65); }

.plug-cta-block p {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  color: rgba(255,255,255,0.72);
  margin: 0 0 2rem;
  line-height: 1.55;
}

.plug-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: transparent;
  border: 2.5px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  padding: 0.9rem 1.9rem;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.plug-ghost-btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.85); }
.plug-page--gold .plug-ghost-btn { color: var(--ink); border-color: rgba(10,10,10,0.35); }
.plug-page--gold .plug-ghost-btn:hover { background: rgba(0,0,0,0.08); }

/* ── PAGE-LOAD ENTRANCE: hero sequence ───────────────────────
   Fires on load — no IntersectionObserver needed (hero is always above fold).
   Scoped to .js (experience.js adds that class to <html>).
   ─────────────────────────────────────────────────────────── */
@keyframes plug-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes plug-from-right {
  from { opacity: 0; transform: translateX(30px) scale(0.975); }
  to   { opacity: 1; transform: none; }
}

/* Plugin landing pages */
.js .plug-h1      { animation: plug-rise        720ms var(--ease)  60ms both; }
.js .plug-lede    { animation: plug-rise        640ms var(--ease) 170ms both; }
.js .plug-actions { animation: plug-rise        640ms var(--ease) 280ms both; }
.js .plug-demo    { animation: plug-from-right  780ms var(--ease) 120ms both; }

/* Brews hub hero */
.js .brews-eyebrow { animation: plug-rise 640ms var(--ease)  40ms both; }
.js .brews-h1      { animation: plug-rise 760ms var(--ease) 120ms both; }
.js .brews-lede    { animation: plug-rise 640ms var(--ease) 230ms both; }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .brew-card { transition: none; }
  .plug-cta  { transition: none; }
  .plug-ghost-btn { transition: none; }
  .js .plug-h1,
  .js .plug-lede,
  .js .plug-actions,
  .js .plug-demo,
  .js .brews-eyebrow,
  .js .brews-h1,
  .js .brews-lede { animation: none; }
}
