/*
Theme Name: GroupRFQ Platform
Theme URI: https://grouprfq.com
Author: Fountain of Science LLC
Author URI: https://grouprfq.com
Description: The main grouprfq.com platform theme. Explains group pooling for buyers and suppliers, and shows a live ladder of active pools, each linking to its own subdomain (e.g. novapore.grouprfq.com). Deals are managed as a "Group Deals" post type in wp-admin.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: grouprfq
*/

:root {
  --ink: #0d1b16;
  --ink-soft: #43554c;
  --ink-faint: #6b7d74;
  --paper: #fbfdfc;
  --card: #ffffff;
  --line: #e3ebe6;
  --accent: #0e9f6e;
  --accent-deep: #0a7f57;
  --accent-tint: #e6f6ef;
  --amber: #b45309;
  --amber-tint: #fef3e2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(13, 27, 22, .04), 0 12px 32px rgba(13, 27, 22, .07);
  --shadow-lift: 0 2px 4px rgba(13, 27, 22, .05), 0 24px 56px rgba(13, 27, 22, .12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 253, 252, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.brand .rfq { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: color .15s; }
.main-nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.nav-cta { padding: 9px 18px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 88px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(720px 460px at 12% -8%, rgba(14, 159, 110, .13), transparent 62%),
    radial-gradient(640px 480px at 92% 4%, rgba(56, 189, 248, .10), transparent 60%),
    radial-gradient(560px 520px at 55% 110%, rgba(250, 204, 21, .08), transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-tint);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
h1.hero-title {
  font-size: clamp(38px, 5.4vw, 62px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.06; margin-bottom: 22px;
}
.hero-title .grad {
  background: linear-gradient(92deg, var(--accent) 10%, #0d9488 55%, #0369a1 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 19px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--ink-faint); }

/* Hero price-drop demo card */
.demo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 28px; max-width: 440px; margin-left: auto;
}
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.demo-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.demo-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-deep); }
.demo-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.demo-product { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.demo-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.demo-price { font-size: 44px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.demo-unit { font-size: 14px; color: var(--ink-faint); }
.demo-was { font-size: 14px; color: var(--ink-faint); text-decoration: line-through; margin-bottom: 18px; }
.demo-bar { height: 10px; background: var(--accent-tint); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.demo-fill { height: 100%; width: 20%; background: linear-gradient(90deg, var(--accent), #0d9488); border-radius: 999px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.demo-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.demo-tiers { display: flex; gap: 8px; margin-top: 18px; }
.demo-tier {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-soft); transition: .3s;
}
.demo-tier strong { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.demo-tier.unlocked { border-color: var(--accent); background: var(--accent-tint); }
.demo-tier.unlocked strong { color: var(--accent-deep); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: #f4f8f6; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 12px; }
h2.section-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin-bottom: 14px; }
.section-sub { font-size: 17px; color: var(--ink-soft); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); position: relative;
}
.step-num {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-deep); font-weight: 800; font-size: 17px; margin-bottom: 18px;
}
.step h3 { font-size: 18.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.step p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Active pools ladder ---------- */
.ladder { position: relative; display: grid; gap: 20px; }
.rung {
  display: grid; grid-template-columns: 96px 1.3fr 1fr auto; gap: 26px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.rung:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(14, 159, 110, .35); }
.rung-img {
  width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden;
  background: #f0f5f2; display: flex; align-items: center; justify-content: center;
}
.rung-img img { width: 100%; height: 100%; object-fit: cover; }
.rung-img svg { width: 44px; height: 44px; }
.rung-cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.rung-name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.rung-deadline { font-size: 13.5px; color: var(--ink-soft); }
.rung-deadline.urgent { color: var(--amber); font-weight: 600; }
.rung-prices { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.rung-now { font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rung-unit { font-size: 13px; color: var(--ink-faint); }
.rung-next {
  font-size: 12.5px; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-tint); padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.rung-bar { height: 8px; background: #edf3f0; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.rung-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #0d9488); border-radius: 999px; }
.rung-progress { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rung-cta { justify-self: end; }
.rung-cta .btn { white-space: nowrap; }
.ladder-empty {
  text-align: center; padding: 56px 24px; border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--ink-soft);
}
.ladder-foot { margin-top: 26px; text-align: center; font-size: 14px; color: var(--ink-faint); }

/* ---------- Buyers / Suppliers split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.audience {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.audience.suppliers { background: linear-gradient(180deg, #10231b, #0d1b16); border-color: #1d3a2d; color: #eef6f1; }
.audience-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
  background: var(--accent-tint); color: var(--accent-deep);
}
.audience.suppliers .audience-tag { background: rgba(14, 159, 110, .22); color: #6ee7b7; }
.audience h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.audience > p { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 24px; }
.audience.suppliers > p { color: #b8cfc3; }
.audience ul { list-style: none; display: grid; gap: 14px; margin-bottom: 30px; }
.audience li { display: flex; gap: 12px; font-size: 15px; align-items: flex-start; }
.audience li svg { flex-shrink: 0; margin-top: 3px; }
.audience .btn { align-self: flex-start; margin-top: auto; }
.audience.suppliers .btn-ghost { background: transparent; color: #eef6f1; border-color: #2c4a3b; }
.audience.suppliers .btn-ghost:hover { border-color: #6ee7b7; }

/* ---------- Trust ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.trust-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.trust h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.trust p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Final CTA ---------- */
.cta-band {
  background: linear-gradient(115deg, #0d1b16 0%, #103123 60%, #0a5c3f 100%);
  border-radius: 24px; padding: 64px 56px; color: #fff; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr auto; gap: 40px; align-items: center;
}
.cta-band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle, rgba(110, 231, 183, .22), transparent 65%);
}
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.cta-band p { font-size: 16.5px; color: #c4dbcf; max-width: 48ch; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta-band .btn-ghost:hover { border-color: #fff; }
.cta-band .btn-accent { background: #fff; color: var(--ink); }
.cta-band .btn-accent:hover { background: #e6f6ef; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 88px; background: #f4f8f6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 14px; color: var(--ink-soft); max-width: 32ch; margin-top: 12px; }
.footer-col h4 { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent-deep); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-faint); flex-wrap: wrap; gap: 10px; }

/* ---------- Inner pages ---------- */
.page-hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(640px 380px at 20% -20%, rgba(14, 159, 110, .12), transparent 60%);
}
.page-hero h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.03em; }
.page-content { max-width: 760px; padding-bottom: 88px; }
.page-content p, .page-content ul, .page-content ol { margin-bottom: 18px; font-size: 16.5px; color: var(--ink-soft); }
.page-content h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 40px 0 14px; color: var(--ink); }
.page-content h3 { font-size: 20px; font-weight: 700; margin: 30px 0 10px; color: var(--ink); }
.page-content li { margin-bottom: 8px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .demo-card { margin: 0 auto; }
  .steps, .trust-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 72px 1fr; gap: 16px; }
  .rung-img { width: 72px; height: 72px; }
  .rung-tiers-col { grid-column: 1 / -1; }
  .rung-cta { grid-column: 1 / -1; justify-self: stretch; }
  .rung-cta .btn { width: 100%; }
  .cta-band { grid-template-columns: 1fr; padding: 44px 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav {
    position: fixed; inset: 64px 0 auto 0; background: var(--paper);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 20px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:last-of-type { border-bottom: 0; }
  .nav-cta { margin-top: 12px; justify-content: center; }
  .nav-toggle { display: block; }
  .hero { padding: 64px 0 60px; }
  .section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Ladder search & show-3 ---------- */
.ladder-toolbar {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin: 0 auto 30px; max-width: 640px;
}
.pool-search {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 17px 26px; color: var(--ink-faint); cursor: text;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.pool-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 159, 110, .14), var(--shadow);
  color: var(--accent-deep);
}
.pool-search-icon { flex: 0 0 auto; width: 20px; height: 20px; }
.pool-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-family: var(--font); font-size: 17px; color: var(--ink);
}
.pool-search input::placeholder { color: var(--ink-faint); }
.pool-search input::-webkit-search-cancel-button { cursor: pointer; }
.ladder-showing { font-size: 13.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; text-align: center; }
.rung[hidden] { display: none; }
.ladder-more { margin-top: 22px; text-align: center; }
@media (max-width: 720px) {
  .pool-search { padding: 14px 20px; }
  .pool-search input { font-size: 16px; }
}

/* Buyers card: paired action buttons */
.audience-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.audience-actions .btn { align-self: auto; margin-top: 0; }

/* ---------- All Pools catalog filters ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center;
  justify-content: center; margin-bottom: 26px;
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); margin-right: 2px;
}
.chip {
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--ink-faint); }
.chip.active { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-deep); }
.filter-sort select {
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer;
}
.filter-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
