/* -------- START Group Buy Section 2026 ---------*/
/* M134: local font instead of chained Google Fonts @import */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/wp-content/themes/hns-core/assets/fonts/space-grotesk-latin.woff2') format('woff2');
}

.grp-buy-ghb-main {
  --grp-accent: #ff6a2b;
  --grp-accent-light: #ff9457;
  max-width: 700px;
  margin: 40px auto;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(165deg, #16161a 0%, #0a0a0c 100%);
  color: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Hero ---------- */

.grp-buy-ghb-hero {
  position: relative;
}

.grp-buy-ghb-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  display: block;
}

.grp-buy-ghb-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0) 45%, rgba(10, 10, 12, 0.85) 100%);
}

.grp-buy-ghb-tag {
  position: absolute;
  bottom: 16px;
  left: 20px;
  background: linear-gradient(135deg, var(--grp-accent), var(--grp-accent-light));
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(255, 106, 43, 0.4);
  z-index: 2;
}

.grp-buy-ghb-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #8cffb4;
  z-index: 2;
}

/* ---------- Top intro ---------- */

.grp-buy-ghb-top {
  padding: 24px 20px 8px;
}

.grp-buy-ghb-top h2 {
  font-size: clamp(20px, 5vw, 25px);
  line-height: 1.35;
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 600;
  text-wrap: balance;
}

.grp-buy-ghb-top h2 span {
  font-weight: 800;
  display: inline-block;
  color: var(--grp-accent-light);
}

.grp-buy-ghb-top p {
  font-size: 14px;
  line-height: 1.6;
  color: #b7b7bd;
  margin: 0 0 20px;
  text-wrap: pretty;
}

/* ---------- Highlight chips ---------- */

.grp-buy-highlights {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.grp-buy-highlight-item {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e6e6e9;
}

.grp-buy-highlight-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 106, 43, 0.15);
  color: var(--grp-accent-light);
}

.grp-buy-highlight-icon svg {
  width: 15px;
  height: 15px;
}

/* ---------- Accordion ---------- */

.grp-buy-ghb-accordion {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
}

.grp-buy-accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.grp-buy-accordion-item:last-child {
  border-bottom: none;
}

.grp-buy-accordion-header {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 16px 8px;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  border-radius: 10px;
  transition: background-color 0.25s ease;
}

.grp-buy-accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.grp-buy-accordion-header.active {
  background-color: rgba(255, 106, 43, 0.08);
}

.grp-buy-accordion-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
}

.grp-buy-accordion-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: linear-gradient(135deg, rgba(255, 106, 43, 0.25), rgba(255, 106, 43, 0.05));
  border: 1px solid rgba(255, 106, 43, 0.25);
  transition: transform 0.35s ease, background 0.35s ease;
}

.grp-buy-accordion-header.active .grp-buy-accordion-icon {
  transform: scale(1.08);
  background: linear-gradient(135deg, var(--grp-accent), var(--grp-accent-light));
  border-color: transparent;
}

.grp-buy-accordion-title {
  line-height: 1.4;
}

.grp-buy-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #b7b7bd;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.grp-buy-arrow svg {
  width: 13px;
  height: 13px;
}

.grp-buy-accordion-header.active .grp-buy-arrow {
  transform: rotate(180deg);
  background: var(--grp-accent);
  color: #fff;
}

.grp-buy-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13.5px;
  line-height: 1.65;
  color: #aeaeb4;
}

.grp-buy-accordion-content p {
  margin: 0;
  padding: 0 8px 18px 56px;
}

.grp-buy-accordion-content.open {
  max-height: 600px;
}

.grp-buy-accordion-content strong {
  color: #f3f3f5;
}

/* ---------- CTA ---------- */

.grp-buy-ghb-cta {
  text-align: center;
  padding: 32px 20px 36px;
  background: linear-gradient(180deg, rgba(255, 106, 43, 0.1) 0%, rgba(255, 106, 43, 0) 60%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.grp-buy-trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.grp-buy-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #d6d6da;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  border-radius: 999px;
}

.grp-buy-trust-item svg {
  width: 14px;
  height: 14px;
  color: var(--grp-accent-light);
  flex-shrink: 0;
}

.grp-buy-cta-heading {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 20px;
  color: #fff;
  text-wrap: balance;
}

.grp-buy-cta-heading strong {
  font-size: 20px;
  display: inline-block;
  margin-bottom: 4px;
  color: #fff;
}

.grp-buy-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.grp-buy-buttons a {
  flex: 0 1 auto;
  min-width: 150px;
}

/* CTA buttons — standalone so they work in form/confirmed states too */
.grp-buy-btn-primary,
.grp-buy-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.grp-buy-btn-primary {
  background: linear-gradient(135deg, var(--grp-accent), #ff8c42);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 106, 43, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grp-buy-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 106, 43, 0.5);
  color: #fff;
}

.grp-buy-btn-primary:focus-visible {
  outline: 2px solid var(--grp-accent-light);
  outline-offset: 3px;
}

.grp-buy-btn-secondary {
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.grp-buy-btn-secondary:hover {
  border-color: var(--grp-accent-light);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  color: #fff;
}

.grp-buy-btn-secondary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.grp-buy-ghb-cta small {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: #888890;
}

.grp-buy-ghb-cta small strong {
  color: #d6d6da;
}

/* ---------- Responsive ---------- */

/* ── Touch devices: bigger tap targets regardless of screen size ── */
@media (pointer: coarse) {
  .grp-buy-accordion-header {
    padding-top: 18px;
    padding-bottom: 18px;
    min-height: 56px;
  }

  .grp-buy-btn-primary,
  .grp-buy-btn-secondary {
    padding: 15px 20px;
    min-height: 48px;
  }
}

/* ── Mobile: ≤540px covers phones and small phablets ── */
@media (max-width: 540px) {
  .grp-buy-ghb-main {
    margin: 3px -12px;
    border-radius: 14px;
  }

  /* Taller hero for more visual impact on small screens */
  .grp-buy-ghb-hero img {
    aspect-ratio: 16 / 9;
  }

  /* Highlights: 2-column grid */
  .grp-buy-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .grp-buy-highlight-item {
    flex: unset;
  }

  /* Trust row: auto-fit so items wrap gracefully */
  .grp-buy-trust-row {
    gap: 6px;
  }

  .grp-buy-trust-item {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Accordion: preserve a small left indent on mobile */
  .grp-buy-accordion-content p {
    padding-left: 8px;
  }

  /* Stack CTA buttons vertically, full width */
  .grp-buy-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .grp-buy-buttons a,
  .grp-buy-buttons button {
    width: 100%;
    min-width: unset;
  }

}

/* ── Extra-small: ≤360px (Galaxy A-series, older iPhones) ── */
@media (max-width: 360px) {
  .grp-buy-ghb-top {
    padding: 18px 16px 8px;
  }

  .grp-buy-ghb-accordion {
    padding: 4px 8px;
  }

  .grp-buy-ghb-cta {
    padding: 24px 16px 28px;
  }

  /* Trust items wrap to 2 per row with auto sizing */
  .grp-buy-trust-item {
    font-size: 10px;
    padding: 5px 8px;
  }
}

.grp-buy-accordion-header:focus-visible {
  outline: 2px solid var(--grp-accent-light);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .grp-buy-accordion-content,
  .grp-buy-accordion-icon,
  .grp-buy-arrow,
  .grp-buy-btn-primary,
  .grp-buy-btn-secondary {
    transition: none;
  }
  .grp-buy-btn-primary:hover,
  .grp-buy-btn-secondary:hover {
    transform: none;
  }
}

/* -------- Inline form (new) ---------*/

.grp-buy-section-form {
  text-align: left;
  animation: grpBuySectionFade 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes grpBuySectionFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.grp-buy-section-form-intro {
  font-size: 13px;
  color: #c4cad8;
  line-height: 1.6;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.grp-buy-section-field {
  margin-bottom: 12px;
  text-align: left;
}

.grp-buy-section-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #ccd0dc;
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grp-buy-section-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.grp-buy-section-field input:focus {
  outline: none;
  border-color: var(--grp-accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 43, 0.15);
}

.grp-buy-section-field input::placeholder {
  color: #6a7290;
}

.grp-buy-section-field select {
  width: 100%;
  padding: 12px 36px 12px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background-color: rgba(255, 255, 255, 0.07);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ccd0dc' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.grp-buy-section-field select option {
  color: #14171f;
}

.grp-buy-section-field select:focus {
  outline: none;
  border-color: var(--grp-accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 43, 0.15);
}

.grp-buy-section-err {
  color: #ff9b8e;
  font-size: 11.5px;
  margin-top: 4px;
  display: none;
}

.grp-buy-section-consent {
  font-size: 11px;
  color: #9faabe;
  margin: 8px 0 14px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.grp-buy-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.grp-buy-btn-full {
  width: 100%;
  display: block;
  text-align: center;
}

/* -------- Sending / confirmed / joined states (new) ---------*/

.grp-buy-section-sending {
  font-size: 14px;
  color: #9aa3b8;
  padding: 12px 0;
  text-align: center;
}

.grp-buy-section-confirmed {
  animation: grpBuySectionFade 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}

.grp-buy-section-confirmed-text {
  font-size: 14px;
  color: #fff;
  line-height: 1.65;
  margin: 0 0 14px;
}

.grp-buy-callbtn {
  text-decoration: none;
  margin-top: 4px;
}

.grp-buy-joined-banner {
  background: rgba(95, 227, 163, 0.12);
  border: 1px solid rgba(95, 227, 163, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #5fe3a3;
  text-align: center;
  margin-bottom: 12px;
}

.grp-buy-buttons--joined {
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .grp-buy-section-form,
  .grp-buy-section-confirmed {
    animation: none;
  }
}

/* -------- END Group Buy Section 2026 ---------*/
