/* ================================================================
   new-addon-v4.css
   Registration / onboarding page  (/new/)
   ---------------------------------------------------------------
   Tokens, base components, and page-level layouts shared across
   all three registration groups.

   Follows the v4 CSS architecture:
   - Uses only CSS custom properties defined in custom-v4.css
   - No jQuery, no external dependencies
   - Mobile-first
   - WCAG 2.1 AA colour contrast maintained throughout
   - em-dashes never used in comments

   Sections:
   25-A. Intro band (.nw-intro-band)
   25-B. Group sections (.nw-group)
   25-C. Group header (.nw-group__header)
   25-D. Card grid (.nw-grid)
   25-E. Registration card (.nw-card)
   25-F. Badge variants (.nw-badge)
   25-G. Help / contact band (.nw-help-band)
   25-R. Responsive
================================================================ */


/* ── 25-A. INTRO BAND ── */
/*
   Sits directly below the page hero.
   Dark violet background matches the hero bleed for a seamless
   transition; content then lifts to light on group sections below.
*/
.nw-intro-band {
  background: var(--dv);
  border-bottom: 1px solid rgba(246,238,39,.12);
  padding: 40px 0;
}
.nw-intro-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* Stat block — total listing count */
.nw-intro-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
}
.nw-intro-stat__n {
  font-family: var(--ff-h);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--ye);
  letter-spacing: -.03em;
}
.nw-intro-stat__l {
  font-family: var(--ff-h);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.45);
  margin-top: 6px;
  line-height: 1.35;
}

/* Vertical divider between stat and text */
.nw-intro-divider {
  width: 1px;
  height: 56px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}

/* Body copy */
.nw-intro-text {
  flex: 1;
  min-width: 200px;
}
.nw-intro-text p {
  font-family: var(--ff-s);
  font-size: .95rem;
  line-height: 1.75;
  color: rgba(255,255,255,.6);
  margin: 0;
}

/* Trust items — right-hand cluster */
.nw-intro-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.nw-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-h);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.55);
}
.nw-trust-item i {
  color: var(--gr);
  font-size: .9rem;
  flex-shrink: 0;
}


/* ── 25-B. GROUP SECTIONS ── */
/*
   Group 1 (Subscriber): dark violet — signals commercial priority
   Groups 2 & 3 (Courtesy, Contributions): light surface
*/
.nw-group {
  padding: 72px 0 80px;
}
.nw-group--dark {
  background: var(--dv);
}
.nw-group--light {
  background: var(--wh);
  border-top: 1px solid var(--rule);
}
/* Alternate light groups for visual rhythm */
.nw-group--light:nth-of-type(even) {
  background: var(--wh2);
}


/* ── 25-C. GROUP HEADER ── */
.nw-group__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.nw-group__header-left {
  flex: 1;
  min-width: 200px;
}

/* H2 inside dark group */
.nw-group--dark .nw-group__title {
  font-family: var(--ff-h);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.025em;
  text-transform: uppercase;
  color: #fff;
  margin: .5rem 0 .75rem;
  line-height: 1.05;
}

/* H2 inside light group */
.nw-group--light .nw-group__title {
  font-family: var(--ff-h);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.025em;
  text-transform: uppercase;
  color: var(--dv);
  margin: .5rem 0 .75rem;
  line-height: 1.05;
}

/* Description paragraph */
.nw-group--dark .nw-group__desc {
  font-family: var(--ff-s);
  font-size: .95rem;
  line-height: 1.75;
  color: rgba(255,255,255,.55);
  max-width: 640px;
  margin: 0;
}
.nw-group--light .nw-group__desc {
  font-family: var(--ff-s);
  font-size: .95rem;
  line-height: 1.75;
  color: var(--mu);
  max-width: 640px;
  margin: 0;
}

/* Count pill — top-right of header */
.nw-group__count {
  font-family: var(--ff-h);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(246,238,39,.12);
  color: var(--ye);
  border: 1px solid rgba(246,238,39,.2);
  border-radius: 24px;
  padding: 6px 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nw-group--light .nw-group__count {
  background: rgba(89,45,140,.08);
  color: var(--mv);
  border-color: rgba(89,45,140,.15);
}


/* ── 25-D. CARD GRID ── */
/*
   Responsive grid that adapts column count to item count.
   Group 1 has 7 items  => 4 col desktop, 2 col tablet, 1 col mobile
   Group 2 has 4 items  => 4 col desktop, 2 col tablet, 1 col mobile
   Group 3 has 2 items  => 2 col desktop, 2 col tablet, 1 col mobile

   The modifier class .nw-grid--Ncol is derived from PHP $nCardCount
   but capped at 4 at the CSS level. Any count above 4 also uses 4 col.
*/
.nw-grid {
  display: grid;
  gap: 24px;
}

/* 2-column option (Group 3) */
.nw-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

/* 3-column option */
.nw-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

/* 4 columns and anything higher — cap at 4 */
.nw-grid--4col,
.nw-grid--5col,
.nw-grid--6col,
.nw-grid--7col,
.nw-grid--8col {
  grid-template-columns: repeat(4, 1fr);
}


/* ── 25-E. REGISTRATION CARD (.nw-card) ── */
/*
   Flex column card: image strip / body / footer CTA.
   Footer CTA is pushed to the bottom via flex layout.
   Dark group cards invert background; light group cards use white.
*/
.nw-card {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
  position: relative;
}
.nw-group--dark .nw-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.nw-group--light .nw-card {
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 12px rgba(35,15,66,.04);
}
.nw-card:hover {
  transform: translateY(-4px);
}
.nw-group--dark .nw-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  border-color: rgba(246,238,39,.25);
}
.nw-group--light .nw-card:hover {
  box-shadow: 0 12px 32px rgba(35,15,66,.12);
  border-color: rgba(89,45,140,.2);
}

/* Image strip */
.nw-card__img {
  position: relative;
  width: 100%;
  padding-top: 56.25%;   /* 16:9 aspect — consistent across all cards */
  overflow: hidden;
  background: var(--dv); /* Fallback while image loads */
  flex-shrink: 0;
}
.nw-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.nw-card:hover .nw-card__img img {
  transform: scale(1.06);
}

/* Card body */
.nw-card__body {
  padding: 20px 20px 12px;
  flex: 1;
}
.nw-card__title {
  font-family: var(--ff-h);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 10px;
}
.nw-group--dark .nw-card__title {
  color: #fff;
}
.nw-group--light .nw-card__title {
  color: var(--dv);
}
.nw-card__desc {
  font-family: var(--ff-s);
  font-size: .85rem;
  line-height: 1.65;
  margin: 0;

  /* Clamp to 3 lines to keep grid rows aligned */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nw-group--dark .nw-card__desc {
  color: rgba(255,255,255,.5);
}
.nw-group--light .nw-card__desc {
  color: var(--mu);
}

/* Card footer */
.nw-card__footer {
  padding: 12px 20px 20px;
  border-top: 1px solid transparent;
  margin-top: auto;
}
.nw-group--dark .nw-card__footer {
  border-top-color: rgba(255,255,255,.08);
}
.nw-group--light .nw-card__footer {
  border-top-color: var(--rule);
}

/* CTA link */
.nw-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-h);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap .18s ease, color .18s ease;
}
.nw-group--dark .nw-card__cta {
  color: var(--ye);
}
.nw-group--light .nw-card__cta {
  color: var(--mv);
}
.nw-card:hover .nw-card__cta {
  gap: 12px;
}
.nw-group--dark .nw-card:hover .nw-card__cta {
  color: #fff;
}
.nw-group--light .nw-card:hover .nw-card__cta {
  color: var(--dv);
}


/* ── 25-F. BADGE VARIANTS (.nw-badge) ── */
/*
   Positioned in top-left corner of .nw-card__img.
   Colour-coded by group to reinforce category distinction at a glance.
*/
.nw-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  line-height: 1.4;
}

/* Group 1 — Subscriber (yellow on dark) */
.nw-badge--subscriber {
  background: var(--ye);
  color: var(--dv);
}

/* Group 2 — Courtesy / Free (green on dark) */
.nw-badge--courtesy {
  background: var(--gr);
  color: #1A3A00;
}

/* Group 3 — Contributor (medium violet on light) */
.nw-badge--contributor {
  background: var(--mv);
  color: #fff;
}

/* Fallback */
.nw-badge--default {
  background: rgba(255,255,255,.15);
  color: #fff;
}


/* ── 25-G. HELP / CONTACT BAND ── */
/*
   Full-bleed bottom CTA strip.
   Provides an escape hatch for visitors who are unsure which
   listing type applies to them.
*/
.nw-help-band {
  background: var(--wh2);
  border-top: 1px solid var(--rule);
  padding: 40px 0;
}
.nw-help-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.nw-help-text {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 200px;
}
.nw-help-icon {
  font-size: 1.6rem;
  color: var(--mv);
  flex-shrink: 0;
  margin-top: 2px;
}
.nw-help-text strong {
  font-family: var(--ff-h);
  font-size: .95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--dv);
  display: block;
  margin-bottom: 4px;
}
.nw-help-text p {
  font-family: var(--ff-s);
  font-size: .88rem;
  color: var(--mu);
  margin: 0;
  line-height: 1.6;
}


/* ── 25-R. RESPONSIVE ── */

/* Large screens — 4-col grids may show as 3 if cards are wide */
@media (max-width: 1200px) {
  .nw-grid--4col,
  .nw-grid--5col,
  .nw-grid--6col,
  .nw-grid--7col,
  .nw-grid--8col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .nw-intro-inner         { gap: 24px; }
  .nw-intro-divider       { display: none; }
  .nw-intro-trust         { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }

  .nw-group               { padding: 56px 0 64px; }
  .nw-group__header       { flex-direction: column; align-items: flex-start; }
  .nw-group__count        { align-self: flex-start; }

  .nw-grid--2col          { grid-template-columns: repeat(2, 1fr); }
  .nw-grid--3col          { grid-template-columns: repeat(2, 1fr); }
  .nw-grid--4col,
  .nw-grid--5col,
  .nw-grid--6col,
  .nw-grid--7col,
  .nw-grid--8col          { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .nw-intro-trust         { flex-direction: column; }
  .nw-intro-stat          { flex-direction: row; align-items: baseline; gap: 10px; }

  /* All grids go single column on small mobile */
  .nw-grid--2col,
  .nw-grid--3col,
  .nw-grid--4col,
  .nw-grid--5col,
  .nw-grid--6col,
  .nw-grid--7col,
  .nw-grid--8col          { grid-template-columns: 1fr; }

  /* Cards go horizontal on mobile for better scannability */
  .nw-card                { flex-direction: row; }
  .nw-card__img           {
    width: 120px;
    min-width: 120px;
    padding-top: 0;
    height: 120px;
  }
  .nw-card__img img       {
    position: static;
    width: 100%;
    height: 100%;
  }
  .nw-badge               { top: 8px; left: 8px; font-size: 8px; padding: 3px 7px; }
  .nw-card__body          { padding: 14px 14px 8px; }
  .nw-card__title         { font-size: .85rem; }
  .nw-card__desc          { -webkit-line-clamp: 2; }
  .nw-card__footer        { padding: 8px 14px 14px; border-top: none; }

  .nw-help-inner          { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .nw-card                { flex-direction: column; }
  .nw-card__img           {
    width: 100%;
    padding-top: 56.25%;
    height: auto;
  }
  .nw-card__img img       {
    position: absolute;
    width: 100%;
    height: 100%;
  }
}


/* ── 25-H. FORM PAGE COMPONENTS ── */
/*
   Used exclusively in _new_form_body.php.
   Two components only: a slim context band between the hero
   and the iframe, and the iframe container itself.
   Deliberately minimal — the Zoho form is the page.
*/

/* Context band */
.nw-form-band {
  background: var(--dv);
  border-bottom: 1px solid rgba(246,238,39,.12);
  padding: 14px 0;
}
.nw-form-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nw-form-band__text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-s);
  font-size: .88rem;
  color: rgba(255,255,255,.6);
}
.nw-form-band__text i {
  color: var(--ye);
  flex-shrink: 0;
}
.nw-form-band__back {
  font-family: var(--ff-h);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s;
  flex-shrink: 0;
}
.nw-form-band__back:hover { color: var(--ye); }

/* Iframe container */
.nw-form-section {
  display: block;
  width: 100%;
  background: var(--wh);
}
.nw-form-iframe {
  display: block;
  width: 100%;
  min-height: 100vh;
  border: none;
}

@media (max-width: 680px) {
  .nw-form-band__inner { flex-direction: column; align-items: flex-start; }
}