/* =========================================================================
   plugbloom — design system
   Concept: an engineered herbarium of WordPress plugins. Porcelain paper,
   evergreen ink, a mint "grow/live" signal (shared with the products), and a
   pollen accent used sparingly. Each plugin is a specimen on a plate.
   Palette  porcelain #F3F5F1 · evergreen #0C1A14 · mint #16E2A0 · pollen #F2A93B
   Type     Fraunces (display) · Hanken Grotesk (body) · JetBrains Mono (data)
   ========================================================================= */

:root {
  /* paper / ink */
  --paper:      #F3F5F1;
  --paper-2:    #EAEEE7;
  --paper-3:    #E0E7D9;
  --paper-4:    #D4DDC9;
  --ink:        #0C1A14;
  --ink-soft:   #14241C;   /* lifted panel on dark sections */
  --ink-2:      #44544B;   /* secondary text on paper */
  --ink-3:      #74837A;   /* captions / meta on paper */

  /* lines */
  --line:       #D7DECF;
  --line-2:     #C6D0B9;

  /* accents */
  --mint:       #16E2A0;   /* bright signal — dots, on-dark text, fills */
  --mint-ink:   #0A8F62;   /* legible mint for links/labels on paper */
  --mint-deep:  #07623F;
  --pollen:     #F2A93B;
  --pollen-deep:#CC8313;

  /* fonts */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* type scale */
  --fs-hero:  clamp(2.85rem, 6.2vw, 5.5rem);
  --fs-h2:    clamp(2rem, 3.6vw, 3.1rem);
  --fs-h3:    clamp(1.35rem, 2.2vw, 1.8rem);
  --fs-lead:  clamp(1.12rem, 1.55vw, 1.32rem);
  --fs-body:  1.0625rem;
  --fs-sm:    0.9375rem;
  --fs-mono:  0.74rem;

  /* structure */
  --container: 1200px;
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --r-sm:  8px;
  --r:     14px;
  --r-lg:  24px;
  --r-plate: 6px;        /* squarer — reads as a specimen plate */
  --shadow:   0 1px 2px rgba(12,26,20,.05), 0 18px 40px -22px rgba(12,26,20,.22);
  --shadow-lift: 0 2px 4px rgba(12,26,20,.06), 0 34px 60px -28px rgba(12,26,20,.34);
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; padding: 0; }
::selection { background: var(--mint); color: var(--ink); }

/* ----------------------------------------------------------------- type */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.015em; }
.serif { font-family: var(--font-display); }
.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.5; }
strong { font-weight: 600; }
em.mint { font-style: normal; color: var(--mint-ink); }

/* mono eyebrow — the field-guide voice */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-mono); font-size: var(--fs-mono);
  font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(22,226,160,.16); }
.eyebrow--pollen .dot { background: var(--pollen); box-shadow: 0 0 0 4px rgba(242,169,59,.18); }

.meta {
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}

/* ----------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section__head { max-width: 56ch; }
.section__head .eyebrow { margin-bottom: 1.1rem; }
.section__head h2 { font-size: var(--fs-h2); }
.section__head .lead { margin-top: 1.1rem; }

/* stem divider — a hairline with a bloom node; structural, not decorative */
.bloom-divider { display: flex; align-items: center; gap: .9rem; color: var(--line-2); }
.bloom-divider::before, .bloom-divider::after { content: ""; height: 1px; background: currentColor; flex: 1; }
.bloom-divider .node { width: 9px; height: 9px; flex: none; border-radius: 50%; border: 1.5px solid var(--mint-ink); position: relative; }
.bloom-divider .node::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--pollen); }

/* ----------------------------------------------------------------- bloom mark */
.bloom { display: inline-flex; line-height: 0; color: var(--ink); }
.bloom svg { width: 100%; height: 100%; overflow: visible; }
.bloom .petal { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linejoin: round; }
.bloom__core { fill: var(--pollen); }
.bloom--solid .petal { fill: currentColor; stroke: none; }

/* bloom open-on-load (echoes the product gauge filling) */
.bloom--anim .petal { transform-box: view-box; transform-origin: 24px 24px; transform: scale(.12); opacity: 0; }
.bloom--anim .bloom__core { transform-box: view-box; transform-origin: 24px 24px; transform: scale(0); opacity: 0; }
body.bloomed .bloom--anim .petal { animation: petalIn .8s var(--ease) forwards; }
body.bloomed .bloom--anim .bloom__core { animation: petalIn .5s var(--ease) .42s forwards; }
.bloom--anim .bloom__petals > g:nth-child(1) .petal { animation-delay: .02s; }
.bloom--anim .bloom__petals > g:nth-child(2) .petal { animation-delay: .09s; }
.bloom--anim .bloom__petals > g:nth-child(3) .petal { animation-delay: .16s; }
.bloom--anim .bloom__petals > g:nth-child(4) .petal { animation-delay: .23s; }
.bloom--anim .bloom__petals > g:nth-child(5) .petal { animation-delay: .30s; }
.bloom--anim .bloom__petals > g:nth-child(6) .petal { animation-delay: .37s; }
@keyframes petalIn { to { transform: scale(1); opacity: 1; } }

/* wordmark lockup */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand .bloom { width: 28px; height: 28px; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -0.02em; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm);
  padding: .82em 1.4em; border-radius: 100px; border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease), color .2s, border-color .2s;
  white-space: nowrap;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn--mint { background: var(--mint); color: var(--ink); }
.btn--mint:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(10,143,98,.6); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn--lg { padding: 1em 1.7em; font-size: var(--fs-body); }
.btn--block { width: 100%; }
/* on dark */
.on-ink .btn--ghost, .btn--ghost.on-ink { color: var(--paper); border-color: rgba(255,255,255,.22); }
.on-ink .btn--ghost:hover, .btn--ghost.on-ink:hover { border-color: var(--mint); background: rgba(255,255,255,.04); }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--mint-ink); }
.link-arrow .arr { transition: transform .25s var(--ease); }
.link-arrow:hover .arr { transform: translateX(3px); }

/* ----------------------------------------------------------------- header / nav */
.site-header { position: sticky; top: 0; z-index: 50; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-block: .9rem; margin-top: .6rem; border-radius: 100px;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
}
.site-header.is-scrolled .site-header__inner {
  background: rgba(243,245,241,.82); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -24px rgba(12,26,20,.4);
  padding-inline: 1.2rem;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links a { font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); transition: color .2s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1.5px; background: var(--mint-ink); transition: right .3s var(--ease); }
.nav__links a:hover::after { right: 0; }
.nav__cta { display: flex; align-items: center; gap: .75rem; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 16px; height: 1.6px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle span::before { position: absolute; transform: translateY(-5px); }
.nav-toggle span::after { position: absolute; transform: translateY(5px); }
.nav-toggle span { position: relative; }

/* ----------------------------------------------------------------- specimen plate */
.plate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.plate {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-plate);
  padding: 1.5rem 1.5rem 1.35rem; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.plate::before { /* accent hairline that draws on hover */
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--plate-accent, var(--mint)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
a.plate:hover, .plate--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
a.plate:hover::before, .plate--link:hover::before { transform: scaleX(1); }
.plate__index { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .14em; color: var(--ink-3); }
.plate__thumb {
  height: 132px; margin: 1rem -1.5rem; background: var(--ink); border-block: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.plate__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.plate__thumb--budding { background: var(--paper-2); }
.plate__name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em; margin-top: .2rem; }
.plate__latin { font-family: var(--font-display); font-style: italic; font-size: .98rem; color: var(--ink-3); margin-top: .1rem; }
.plate__desc { color: var(--ink-2); font-size: var(--fs-sm); margin-top: .7rem; flex: 1; }
.plate__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .34em .6em; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.status { display: inline-flex; align-items: center; gap: .45em; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .1em; text-transform: uppercase; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.status--live { color: var(--mint-ink); }
.status--live .dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(22,226,160,.18); animation: pulse 2.4s var(--ease) infinite; }
.status--soon { color: var(--ink-3); }
.status--soon .dot { background: var(--pollen); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(22,226,160,.18); } 50% { box-shadow: 0 0 0 6px rgba(22,226,160,0); } }

/* ----------------------------------------------------------------- dark section */
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .eyebrow { color: rgba(243,245,241,.6); }
.section--ink .lead { color: rgba(243,245,241,.72); }
.section--ink .bloom-divider { color: rgba(255,255,255,.16); }
.section--ink .meta { color: rgba(243,245,241,.55); }
.section--ink h2, .section--ink h3 { color: var(--paper); }

/* ----------------------------------------------------------------- newsletter */
.subscribe { display: flex; gap: .6rem; max-width: 460px; flex-wrap: wrap; }
.subscribe input[type=email] {
  flex: 1; min-width: 220px; font: inherit; font-size: var(--fs-sm); padding: .9em 1.1em;
  border-radius: 100px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.subscribe input[type=email]:focus-visible { outline: none; border-color: var(--mint-ink); box-shadow: 0 0 0 4px rgba(22,226,160,.16); }
.section--ink .subscribe input[type=email] { background: var(--ink-soft); border-color: rgba(255,255,255,.16); color: var(--paper); }
.subscribe-note { font-size: var(--fs-sm); color: var(--ink-3); margin-top: .8rem; min-height: 1.2em; }
.subscribe-note[data-state=ok] { color: var(--mint-ink); }
.subscribe-note[data-state=error] { color: #C2492E; }
.section--ink .subscribe-note[data-state=ok] { color: var(--mint); }
.subscribe.is-done input { opacity: .55; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: rgba(243,245,241,.7); padding-block: clamp(3.5rem,7vw,6rem) 2.5rem; }
.site-footer .brand__name, .site-footer h4 { color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem 2rem; }
.site-footer .bloom { color: var(--paper); }
.footer-col h4 { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,245,241,.5); margin-bottom: 1rem; }
.footer-col a { display: block; padding: .3rem 0; color: rgba(243,245,241,.72); font-size: var(--fs-sm); transition: color .2s; }
.footer-col a:hover { color: var(--mint); }
.footer-tagline { margin-top: 1.1rem; max-width: 32ch; font-size: var(--fs-sm); color: rgba(243,245,241,.55); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .meta { color: rgba(243,245,241,.45); }

/* ----------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .bloom--anim .petal, .bloom--anim .bloom__core { opacity: 1; transform: none; animation: none !important; }
  .status--live .dot { animation: none; }
}

/* ----------------------------------------------------------------- a11y */
:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 3px; border-radius: 3px; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .6em 1em; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav__links, .nav .nav__cta-inline { display: none; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px);
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.5rem;
    background: var(--paper); padding: 6rem 2rem 2rem; box-shadow: var(--shadow-lift);
    transform: translateX(100%); transition: transform .4s var(--ease); z-index: 60;
  }
  .nav__links { flex-direction: column; align-items: flex-start; gap: 1.1rem; font-size: 1.2rem; }
  .nav__links a { font-size: 1.15rem; color: var(--ink); }
  body.nav-open .nav { transform: none; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 600px) {
  /* keep big display type from overflowing narrow phones */
  :root { --fs-hero: clamp(2.1rem, 8.6vw, 3rem); --fs-h2: clamp(1.7rem, 6.6vw, 2.4rem); }
  .eyebrow { flex-wrap: wrap; letter-spacing: .13em; line-height: 1.55; }
  h1, h2, h3 { overflow-wrap: break-word; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .plate-grid { grid-template-columns: 1fr; }
}
