/* ============================================================
   niche-tag.css — Niche & Tag landing page styles
   Signature element: "root system" connecting line motif
   linking the hero to the product grid (botanical/clinical id)
   ============================================================ */

@import url('colors.css');

* { box-sizing: border-box; }

body.niche-page, body.tag-page {
  margin: 0;
  font-family: var(--font-body);
  background: var(--surface-bg);
  color: var(--c-ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.np-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HERO
   ============================================================ */
.np-hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
  padding: 72px 0 100px;
}

.np-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.08) 0, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,.06) 0, transparent 50%);
  pointer-events: none;
}

/* Root/vein motif svg sits behind hero text */
.np-hero-veins {
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
}

.np-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .np-hero-inner { grid-template-columns: 1fr; }
}

.np-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(255,255,255,.14);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  opacity: 0;
  animation: npFadeUp var(--dur-slow) var(--ease-out) forwards;
}

.np-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 18px;
  opacity: 0;
  animation: npFadeUp var(--dur-slow) var(--ease-out) .1s forwards;
}

.np-hero .np-tagline {
  font-size: 1.15rem;
  max-width: 56ch;
  color: rgba(255,255,255,.88);
  margin: 0 0 28px;
  opacity: 0;
  animation: npFadeUp var(--dur-slow) var(--ease-out) .2s forwards;
}

.np-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: npFadeUp var(--dur-slow) var(--ease-out) .3s forwards;
}

.np-hero-stat .num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  display: block;
  line-height: 1;
}
.np-hero-stat .lbl {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.7);
}

.np-hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  animation: npFadeIn var(--dur-slow) var(--ease-out) .25s forwards;
  aspect-ratio: 4/3;
}
.np-hero-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.np-hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(17,51,29,.5) 100%);
}

@keyframes npFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes npFadeIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   MAIN LAYOUT — article + aside
   ============================================================ */
.np-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 56px 0 80px;
  position: relative;
}
@media (max-width: 960px) {
  .np-main { grid-template-columns: 1fr; }
}

/* Connecting vein line behind the product grid (signature element) */
.np-main::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  width: 1px; height: 40px;
  background: linear-gradient(180deg, transparent, var(--c-green-200));
  transform: translateX(-50%);
}

.np-section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--c-green-700);
  margin: 0 0 8px;
}
.np-section-sub {
  color: var(--c-ink-500);
  font-size: .98rem;
  margin: 0 0 32px;
  max-width: 60ch;
}

/* ---- Product Grid ---- */
.np-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.np-card {
  background: var(--grad-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med);
  position: relative;
}
.np-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-green-200);
}

.np-card-img {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--c-green-50);
  overflow: hidden;
}
.np-card-img img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform var(--dur-slow) var(--ease-out);
}
.np-card:hover .np-card-img img { transform: scale(1.06); }

.np-card-img .np-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-green-200);
  font-size: 2.4rem;
}

.np-score-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--c-paper-0);
  color: var(--c-green-700);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}
.np-score-badge svg { width: 13px; height: 13px; fill: var(--c-gold-500); }

.np-offer-ribbon {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--grad-clay);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.np-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.np-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
  color: var(--c-ink-900);
  line-height: 1.3;
}

.np-card-tagline {
  font-size: 13px;
  color: var(--c-ink-500);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.np-tag-pill {
  font-size: 10.5px;
  font-weight: 600;
  background: var(--c-green-100);
  color: var(--c-green-700);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.np-card-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--surface-border);
}
.np-price {
  font-weight: 700;
  color: var(--c-green-700);
  font-size: 1.05rem;
}
.np-cta {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--c-clay-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.np-card:hover .np-cta svg { transform: translateX(3px); }
.np-cta svg { width: 13px; height: 13px; transition: transform var(--dur-fast) var(--ease-out); }

.np-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-ink-500);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--surface-border);
}

/* ---- Detail / Additional HTML Section ---- */
.np-detail {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--surface-border);
}
.np-detail h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--c-green-700);
}
.np-detail-content {
  font-size: 15px;
  color: var(--c-ink-700);
}
.np-detail-content img { max-width: 100%; border-radius: var(--radius-md); }
.np-detail-content h2, .np-detail-content h3 { font-family: var(--font-display); color: var(--c-green-700); }
.np-detail-content a { color: var(--c-clay-600); }

/* ============================================================
   ASIDE
   ============================================================ */
.np-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.np-widget {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.np-widget h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--c-green-700);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.np-widget h4 svg { width: 18px; height: 18px; fill: var(--c-green-500); }

.np-related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.np-related-list a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--c-ink-900);
  font-size: 13.5px; font-weight: 500;
  transition: color var(--dur-fast);
}
.np-related-list a:hover { color: var(--c-clay-600); }
.np-related-list img {
  width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: cover;
  border: 1px solid var(--surface-border); flex-shrink: 0;
}

.np-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.np-cloud a {
  font-size: 12px; font-weight: 600;
  background: var(--c-green-50);
  color: var(--c-green-700);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid var(--surface-border);
  transition: all var(--dur-fast);
}
.np-cloud a:hover { background: var(--c-green-500); color: #fff; border-color: var(--c-green-500); }

/* Sticky CTA widget */
.np-widget.np-cta-widget {
  background: var(--grad-hero);
  color: #fff;
  border: none;
  text-align: center;
}
.np-widget.np-cta-widget h4 { color: #fff; }
.np-widget.np-cta-widget p { font-size: 13px; color: rgba(255,255,255,.85); margin: 0 0 16px; }
.np-btn-light {
  display: inline-block;
  background: #fff;
  color: var(--c-green-700);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform var(--dur-fast);
}
.np-btn-light:hover { transform: scale(1.04); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.np-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.np-reveal.np-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .np-reveal, .np-hero h1, .np-hero .np-tagline, .np-hero-stats, .np-eyebrow, .np-hero-media {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .np-card { transition: none; }
}

/* ============================================================
   Breadcrumb nav
   ============================================================ */
.np-breadcrumb {
  font-size: 12.5px;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
  opacity: 0;
  animation: npFadeUp var(--dur-slow) var(--ease-out) 0s forwards;
}
.np-breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.np-breadcrumb a:hover { text-decoration: underline; }
.np-breadcrumb svg { width: 10px; height: 10px; margin: 0 6px; opacity: .6; }
