/* ==========================================================================
   LYSOVARA — Home V04 refinement layer
   Scope: presentation only (layout / spacing / motion).
   NOT touched: catalog data, inquiry logic, WhatsApp/email links, lead capture.
   All rules are additive overrides on top of style.css — deleting this file
   reverts the homepage to the V03 baseline.
   ========================================================================== */

body:has(.hero) { background: #fffaf8; }
.hero { background: #fff8f7; }

/* --------------------------------------------------------------------------
   P0-1  HERO — controlled two-column layout
   Root cause of the old problem: the art box carried `aspect-ratio: .94`,
   so at 1440+ it grew taller than the copy column and the portrait was cut
   off by the viewport. V04 drives the art box with a height budget instead:
   the grid row height (from the copy column) + a hard max-height clamp.
   -------------------------------------------------------------------------- */
.hero-inner {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: clamp(28px, 4.4vw, 76px);
  padding-block: clamp(44px, 4.6vw, 74px);
  align-items: center;
}
.hero-copy { min-width: 0; max-width: 620px; }

.hero .eyebrow { display: inline-block; }
.hero .h-display {
  font-size: clamp(2.9rem, 4.9vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -.045em;
  max-width: 11ch;
  margin: 16px 0 20px;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.hero .lead {
  color: #665d60;
  font-size: clamp(.98rem, 1.15vw, 1.14rem);
  max-width: 40ch;
  line-height: 1.7;
  margin: 0;
}
.hero-cta { margin-top: 30px; gap: 14px; }

/* Height-budgeted art box: fills the grid row but never exceeds the clamp. */
.hero-art {
  position: relative;
  border-radius: 10px;
  box-shadow: none;
  background: #fff2f4;
  border: 1px solid rgba(255, 32, 138, .10);
  aspect-ratio: auto;
  height: 100%;
  min-height: 380px;
  max-height: clamp(420px, 58vh, 620px);
  overflow: hidden;
}
.hero-ip-stage { position: absolute; inset: 0; overflow: hidden; background: #fff2f4; }
.hero-ip-stage:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 247, 242, .22), transparent 30%, rgba(255, 32, 138, .03));
  pointer-events: none;
}
/* `contain` keeps the head, face and puppy fully inside the frame; the box
   background blends with the illustration's own backdrop. Position is tuned
   to hold the face in the upper third instead of cropping the chin. */
.hero-ip-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(.96) contrast(1.02);
}
.hero-float { display: none; }
.hero-doodle[hidden], .hero-stats { display: none !important; }

/* --------------------------------------------------------------------------
   SECTION RHYTHM — one vertical scale for the whole page (V05c).
   --sp-gap is the VISIBLE whitespace between any two neighbouring blocks.
   Every block contributes exactly half of it as its own padding, so any
   pair of adjacent sections always reads as --sp-gap apart, regardless of
   which classes they carry (fixes the old .section vs .section-sm mismatch
   that produced 150-192px gaps).
   Supersedes: the clamp() paddings below and the 46px/26px mobile overrides
   further down (those remain but are no longer reached). ---------- */
.section,
.section-sm { padding-top: var(--sp-half); padding-bottom: var(--sp-half); }
/* The trust strip is a band attached under the hero; it joins the same
   rhythm so hero->trust and trust->next both read as --sp-gap. */
.trust-strip { padding-top: var(--sp-half); padding-bottom: var(--sp-half); }
.section-head { margin-bottom: var(--sp-head); }
.section-head .h2 { letter-spacing: -.037em; }

/* --------------------------------------------------------------------------
   TRUST STRIP — light editorial band that answers the first B2B objections
   -------------------------------------------------------------------------- */
.trust-strip { background: #fff; border-bottom: 1px solid #f3e5e7; }
.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #f3e5e7;
  border-left: 1px solid #f3e5e7;
  border-right: 1px solid #f3e5e7;
}
.trust-strip-item {
  background: #fff;
  padding: 26px 26px 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trust-strip-item svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: #FF208A; }
.trust-strip-item b { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 4px; color: #241c18; }
.trust-strip-item p { font-size: .83rem; color: #7b7176; line-height: 1.55; margin: 0; }

/* --------------------------------------------------------------------------
   FEATURED / MORE PRODUCTS
   -------------------------------------------------------------------------- */
#bestsellers { background: #fff; }
#bestsellers .sourcing-grid,
#sourcing .sourcing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
#bestsellers .sourcing-card,
#sourcing .sourcing-card { border-radius: 10px; border: 1px solid #eee3e4; box-shadow: none; }
#bestsellers .sourcing-card:hover,
#sourcing .sourcing-card:hover { transform: translateY(-3px); }
.sourcing-section { background: #fff8f7; }

/* --------------------------------------------------------------------------
   P0-2  CATEGORY GRID — true 4 x 2 matrix (8 cells, no orphan card)
   Root cause of the old problem: only 7 categories exist in CATEGORY_META and
   the grid was `repeat(3)`, which produced 3 + 3 + 1 and left a wide gap under
   the last row. V04 pairs the 7 real categories with one navigation-only card
   (cell 8 -> shop.html) and locks the desktop grid to 4 columns.
   -------------------------------------------------------------------------- */
.cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.cat-card {
  border-radius: 10px;
  border: 1px solid #eee3e4;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cat-art { aspect-ratio: 1.18; background: #faf1f2; overflow: hidden; flex: none; }
.cat-art img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}
.cat-card:hover .cat-art img { transform: scale(1.05); }
.cat-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}
.cat-body .h3 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.cat-body .link-arrow { margin: 0; white-space: nowrap; font-size: .84rem; }

/* Navigation-only card: no SKU, no inventory, just a route into the catalog. */
.cat-card.cat-card-nav { background: #241c18; border-color: #241c18; }
.cat-card.cat-card-nav .cat-art {
  background: radial-gradient(ellipse at 52% 38%, #3a2c2c 0%, #241c18 72%);
  display: grid;
  place-items: center;
}
.cat-card.cat-card-nav .cat-art-icon {
  width: 62px;
  height: 62px;
  color: #FFD84D;
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}
.cat-card.cat-card-nav:hover .cat-art-icon { transform: scale(1.09); }
.cat-card.cat-card-nav .cat-body .h3 { color: #fff; }
.cat-card.cat-card-nav .cat-body .cat-nav-note {
  font-size: .8rem;
  color: rgba(255, 255, 255, .62);
  line-height: 1.5;
  margin: 0;
}
.cat-card.cat-card-nav .cat-body .link-arrow { color: #FFD84D; }

/* --------------------------------------------------------------------------
   B2B BAND
   -------------------------------------------------------------------------- */
.b2b-band { border-radius: 12px; }
.home-inquiry-panel { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 220px; }
.home-inquiry-panel p { max-width: 31ch; line-height: 1.65; margin: 0; }

/* --------------------------------------------------------------------------
   P0-3  MOTION — subtle, opt-out respected
   -------------------------------------------------------------------------- */
/* Reveal is opt-in: styles only hide content when JS has flagged readiness
   (html.js-v04). Without JS — or if the observer never fires — everything
   stays visible. A 2.5s JS failsafe also force-reveals everything. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: v04Rise .72s cubic-bezier(.22, .61, .36, 1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .07s; }
  .hero-copy > *:nth-child(3) { animation-delay: .14s; }
  .hero-copy > *:nth-child(4) { animation-delay: .21s; }
  .hero-art { animation: v04Fade 1s cubic-bezier(.22, .61, .36, 1) both; }

  .js-v04 .v04-reveal { opacity: 0; transform: translateY(16px); transition: opacity .62s ease, transform .62s cubic-bezier(.22, .61, .36, 1); }
  .js-v04 .v04-reveal.is-in { opacity: 1; transform: none; }
  .js-v04 .v04-reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .62s ease, transform .62s cubic-bezier(.22, .61, .36, 1); }
  .js-v04 .v04-reveal-stagger.is-in > * { opacity: 1; transform: none; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(2) { transition-delay: .06s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(3) { transition-delay: .12s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(4) { transition-delay: .18s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(5) { transition-delay: .06s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(6) { transition-delay: .12s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(7) { transition-delay: .18s; }
  .js-v04 .v04-reveal-stagger.is-in > *:nth-child(8) { transition-delay: .24s; }
}
@keyframes v04Rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes v04Fade { from { opacity: 0; } to { opacity: 1; } }

/* Hover polish on product + CTA buttons */
.hero .btn, .btn-primary, .btn-purple { transition: transform .24s ease, box-shadow .24s ease, background-color .24s ease; }
.hero .btn:hover { transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .cat-grid { gap: 16px; }
  .cat-body { padding: 16px 18px 18px; }
  .cat-body .h3 { font-size: 1.02rem; }
}

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 44px 48px; }
  .hero .h-display { font-size: clamp(2.5rem, 5.6vw, 3.9rem); }
  .hero-art { min-height: 340px; max-height: 480px; }
  #bestsellers .sourcing-grid, #sourcing .sourcing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  /* Copy first, illustration underneath — the layout the brief asked for. */
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 34px 40px; align-items: start; }
  .hero-copy { max-width: 100%; }
  .hero .h-display { font-size: clamp(2.4rem, 8.4vw, 3.4rem); max-width: 14ch; }
  .hero .lead { max-width: 46ch; }
  .hero-cta { margin-top: 24px; }
  .hero-art { min-height: 0; height: auto; max-height: 440px; aspect-ratio: 1.24; }
  .hero-ip-image { object-position: 50% 18%; }
  .cat-grid { gap: 14px; }
}

@media (max-width: 760px) {
  /* Section spacing now comes from --sp-gap / --sp-head tokens (V05c). */
  .cat-body { padding: 14px 15px 16px; }
  .cat-body .h3 { font-size: .98rem; }
  .cat-body .link-arrow { font-size: .78rem; }
  .cat-art img { padding: 12px; }
  #bestsellers .sourcing-grid, #sourcing .sourcing-grid { gap: 12px; }
  .trust-strip-item { padding: 18px 18px 20px; gap: 11px; }
  .trust-strip-item svg { width: 19px; height: 19px; }
  .trust-strip-item b { font-size: .89rem; }
  .trust-strip-item p { font-size: .78rem; }
}

@media (max-width: 560px) {
  .hero-art { max-height: 360px; aspect-ratio: 1.1; }
  .trust-strip-grid { grid-template-columns: 1fr; }
  .trust-strip-item { padding: 16px 16px 18px; }
}

@media (max-width: 420px) {
  .hero .h-display { font-size: clamp(2.05rem, 9.6vw, 2.7rem); }
  .cat-grid { gap: 10px; }
  .cat-art { aspect-ratio: 1.02; }
  .cat-art img { padding: 9px; }
  .cat-body .h3 { font-size: .9rem; }
  .cat-body .link-arrow { font-size: .72rem; }
}

/* ==========================================================================
   HOME V05 — premium refinement layer (additive, on top of V04)
   Scope: typography / color / spacing / radius / border / shadow / CTA / motion.
   NOT touched: catalog data, inquiry logic, WhatsApp/email links, robots/noindex.
   ========================================================================== */

/* V05 tokens — one source of truth for the refinement pass */
:root {
  --v05-radius: 10px;
  --v05-border: #eee3e4;
  --v05-border-strong: #f0cdd8;
  --v05-ink: #241c18;
  --v05-muted: #8a7a80;
  --v05-pink: #FF208A;
  --v05-pink-soft: #fff1f5;
  --v05-shadow-hover: 0 10px 24px rgba(255, 32, 138, .07);
  --v05-ease: cubic-bezier(.22, .61, .36, 1);

  /* V05c vertical rhythm — --sp-gap is the VISIBLE whitespace between two
     neighbouring blocks; --sp-half is what each block contributes, so that
     padB(a) + padT(b) == --sp-gap for every adjacent pair. Changing --sp-gap
     here retunes the entire homepage; no per-section values exist anywhere. */
  --sp-gap: 32px;                          /* desktop */
  --sp-half: calc(var(--sp-gap) / 2);
  --sp-head: 32px;                         /* section heading -> its content */
  --sp-footer: 40px;                       /* dark footer band (intentional full gap) */
}
@media (max-width: 1080px) {
  :root { --sp-gap: 24px; --sp-head: 26px; --sp-footer: 32px; }   /* tablet */
}
@media (max-width: 760px) {
  :root { --sp-gap: 18px; --sp-head: 20px; --sp-footer: 28px; }   /* mobile */
}

/* ---------- A. View-all link: one arrow, transform-only micro-motion ----------
   Root cause of the old double arrow was hardcoded '→' in the index.html
   templates (fixed there, not hidden here). The base sheet animates `gap`
   on hover, which is a layout property — replaced with a transform nudge. */
.link-arrow:hover { gap: 6px; }
.link-arrow::after { transition: transform .2s var(--v05-ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.cat-body .link-arrow,
.section-head .link-arrow { color: var(--v05-pink); font-weight: 650; }

/* ---------- B. Category cards: unified hover language ----------
   V05d: the hairline is softened one step (#eee3e4 -> #f1e8e9) so the cells
   read as a quiet grid rather than eight boxed frames, and the nav card now
   uses exactly the same hairline as its seven siblings (the old pink
   --v05-border-strong frame made it look like a different component). --- */
.cat-card {
  border-color: #f1e8e9;
  transition: transform .3s var(--v05-ease), border-color .3s ease, box-shadow .3s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--v05-border-strong);
  box-shadow: var(--v05-shadow-hover);
}

/* ---------- C. Navigation card (cell 8): light pink / cream, single CTA.
   Replaces the old black + gold variant so all 8 cells share one system:
   same radius, same border, same art-box ratio, same CTA color. ---------- */
.cat-card.cat-card-nav { background: #fff8f7; border-color: #f1e8e9; }
.cat-card.cat-card-nav .cat-art {
  background: linear-gradient(160deg, #fff1f5 0%, #ffe4ee 100%);
  display: grid;
  place-items: center;
}
.cat-card.cat-card-nav .cat-art-icon {
  width: 54px;
  height: 54px;
  color: var(--v05-pink);
  opacity: .9;
  transition: transform .4s var(--v05-ease);
}
.cat-card.cat-card-nav:hover .cat-art-icon { transform: scale(1.06); }
.cat-card.cat-card-nav .cat-body .h3 { color: var(--v05-ink); }
.cat-card.cat-card-nav .cat-body .link-arrow { color: var(--v05-pink); }

/* "102 formats" note: caption inside the art panel (not the body), so the
   nav card body matches the seven sibling cards exactly -> equal rows. */
.cat-card.cat-card-nav .cat-art { position: relative; overflow: hidden; }
.cat-card.cat-card-nav .cat-art .cat-nav-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  font-size: .74rem;
  line-height: 1.45;
  color: var(--v05-muted);
  text-align: center;
}
@media (max-width: 767px) {
  /* Art box is too small on phones; the shop page shows the real count. */
  .cat-card.cat-card-nav .cat-art .cat-nav-note { display: none; }
}

/* Brand-owned SVG fallback (rights gate): fills the same art box as photos,
   so the nails cell keeps the grid rhythm without any third-party asset. */
.cat-art.cat-art-brand { background: #faf1f2; }
.cat-art.cat-art-brand svg { border-radius: 0; }

/* ---------- D. Product cards: same hover shadow language ---------- */
#bestsellers .sourcing-card:hover,
#sourcing .sourcing-card:hover {
  border-color: var(--v05-border-strong);
  box-shadow: var(--v05-shadow-hover);
}

/* ---------- F. Vertical rhythm: header -> hero -> sections -> footer ----------
   Two problems fixed here, both measured before the change:
   1. Header -> Hero read as ~180-210px of empty gradient. Root cause: the
      desktop hero reserved a viewport-height band (min-height:100svh) and
      vertically centred its content (align-items:center), so the copy was
      pushed ~130px past the 54px top padding. The hero is now content-sized
      and top-aligned: illustration and copy start directly under the nav.
   2. Hero -> next section is carried by --sp-gap like every other seam. --- */
.hero { min-height: 0; }
.hero > .wrap.hero-inner {
  min-height: 0;
  align-items: start;
  padding-top: 0;                    /* Header -> Hero: 0px */
  padding-bottom: var(--sp-half);    /* Hero -> trust strip: --sp-gap */
}
/* Dark footer band: one full gap inside the band (not half) so the last
   content block breathes before the ink-coloured footer. Documented
   exception to the strict --sp-gap seam rule. */
.footer { padding-top: var(--sp-footer); }

/* ---------- E. Reduced motion: kill decorative movement entirely ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-art { animation: none; }
  .cat-card, .cat-art img, .cat-card.cat-card-nav .cat-art-icon,
  .hero .btn, .btn-primary, .btn-purple,
  #bestsellers .sourcing-card, #sourcing .sourcing-card {
    transition: none;
  }
  .cat-card:hover,
  #bestsellers .sourcing-card:hover,
  #sourcing .sourcing-card:hover { transform: none; }
  .cat-card:hover .cat-art img { transform: none; }
  .link-arrow:hover::after { transform: none; }
}
