/* AdNeed Platform (Site 1) — homepage styles (Step 2)
   -------------------------------------------------------------------
   Builds on tokens.css rather than redefining color/type/spacing here.
   Layout concept: the hero pairs the pitch with a literal preview of
   the thing being sold — a single account with a status list of every
   tool, most still off. That's the product's actual differentiator
   (one account, many tools, honest status), not a stock big-number or
   gradient-blob hero.
   ------------------------------------------------------------------- */

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--ink-700);
  background: var(--ink-900);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  text-decoration: none;
  color: var(--text-100);
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--accent-500); }
.wordmark--small { font-size: var(--text-lg); }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.site-header__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-300);
  text-decoration: none;
}
.site-header__link:hover { color: var(--text-100); }

/* The signed-out/signed-in nav groups are toggled via .hidden, but should
   otherwise not form their own layout box — their <a> children need to sit
   as direct flex items of .site-header__nav so the existing gap applies. */
.site-header__nav > span {
  display: contents;
}

/* Mobile hamburger trigger — hidden on desktop, where .site-header__nav
   already renders inline in one row with plenty of room. */
.site-header__menu-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: none; cursor: pointer; padding: 0; border-radius: 8px;
  transition: background .15s ease;
}
.site-header__menu-btn:hover { background: rgba(245,247,250,.08); }
.site-header__menu-btn span {
  display: block; width: 20px; height: 2px; background: var(--text-100); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.site-header__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-header__drawer-head,
.site-header__drawer-close { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.btn--accent {
  background: var(--accent-500);
  color: var(--accent-contrast);
}
.btn--accent:hover { background: var(--accent-400); }
.btn--ghost {
  background: transparent;
  color: var(--text-100);
  border-color: var(--ink-700);
}
.btn--ghost:hover { border-color: var(--ink-600); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-9) 0 var(--space-8);
}
.hero__row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: center;
}
.hero__copy h1 {
  /* Was a flat var(--text-4xl) (58px) at every viewport width — on a
     phone that meant one or two words per line at full desktop size,
     blowing the heading out to 5-6 giant lines. clamp() scales it down
     smoothly instead, with a floor that still reads as a proper hero
     headline rather than shrinking indefinitely on very narrow phones. */
  font-size: clamp(30px, 7.5vw, 58px);
  line-height: 1.15;
  max-width: 15ch;
  margin-bottom: var(--space-5);
}
.hero__lead {
  /* Was var(--text-lg) (19px) — same size as a normal lead paragraph on
     other pages, which read too large/heavy for what's really a short
     supporting line under a big headline. Sized down a step so the
     hierarchy (headline > this > the tool status panel) is clearer. */
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-300);
  max-width: 46ch;
  margin-bottom: var(--space-4);
}
.hero__lead--muted { color: var(--text-500); font-size: var(--text-base); }
.hero__actions { margin-top: var(--space-6); }
/* Kept deliberately quiet — smaller and lighter than .hero__lead — so it
   reads as a trust signal sitting under the CTAs, not a second headline
   competing with them. */
.hero__social-proof {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-500);
}

/* A single, orchestrated entrance for the hero only — not repeated
   per-section, per the "spend motion in one place" principle. Respects
   prefers-reduced-motion globally via tokens.css. */
.hero__copy, .hero__panel-wrap {
  animation: hero-rise 0.6s ease both;
}
.hero__panel-wrap { animation-delay: 0.1s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Panel (product-status mock) ---------- */
.panel {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}
.panel__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--ink-700);
}
.panel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-500);
  margin-top: 6px;
  flex-shrink: 0;
}
.panel__title {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-100);
}
.panel__subtitle {
  font-size: var(--text-sm);
  color: var(--text-500);
  margin-top: 2px;
}
.panel__list { list-style: none; margin: 0; padding: 0; }
.panel__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--ink-700);
}
.panel__row:last-child { border-bottom: none; padding-bottom: 0; }
.panel__row-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-600);
  flex-shrink: 0;
}
.panel__row-status--live { background: var(--success); }
.panel__row-name {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-300);
}

/* ---------- Status tags ---------- */
.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-500);
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}
.tag--live {
  color: var(--success);
  border-color: rgba(63, 191, 127, 0.35);
  background: rgba(63, 191, 127, 0.08);
}
.tag--standalone { margin-bottom: var(--space-3); }

/* ---------- Generic sections ---------- */
.section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--ink-700);
}
.section h2 {
  font-size: var(--text-2xl);
  max-width: 20ch;
  margin-bottom: var(--space-3);
}
.section__lead {
  color: var(--text-300);
  max-width: 60ch;
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}

/* ---------- Live spotlight ---------- */
.live-spotlight {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.live-spotlight__text h2 { margin-top: var(--space-2); }

/* ---------- Tool grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tool-card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.tool-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.tool-card p {
  color: var(--text-300);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ---------- Product hub grid (Step 10 — app-hub homepage) ----------
   Cards for every AdNeed product, live or coming-soon. Live cards are a
   real link (or button, for QR Code Maker's same-origin route); Coming Soon
   cards render a disabled button — never a clickable link to nothing. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
}
.product-card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card--live {
  border-color: rgba(242, 118, 43, 0.35);
  background: linear-gradient(180deg, rgba(242, 118, 43, 0.06), var(--ink-800) 55%);
}
.product-card--live:hover {
  border-color: var(--accent-500);
  transform: translateY(-2px);
}
.product-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-500);
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  margin-bottom: var(--space-1);
}
.product-card__icon svg { width: 22px; height: 22px; }
.product-card--live .product-card__icon {
  color: var(--accent-400);
  background: rgba(242, 118, 43, 0.12);
  border-color: rgba(242, 118, 43, 0.3);
}
.product-card .tag { align-self: flex-start; }
.product-card h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-1);
}
.product-card p {
  color: var(--text-300);
  font-size: var(--text-sm);
  flex-grow: 1;
  margin-bottom: var(--space-3);
}
.product-card__cta {
  width: 100%;
  justify-content: center;
}
.product-card__cta:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.product-card__cta:disabled:hover { border-color: var(--ink-700); }

/* Compact "coming soon" strip — see the HTML comment above the markup
   for why these are chips, not full product-card__cta cards: same
   visual weight as the 6 live tools was reading as "unfinished
   product" to a cold visitor. */
.coming-soon-strip { margin-top: var(--space-8); }
.coming-soon-strip__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-500);
  margin-bottom: var(--space-3);
}
.coming-soon-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.coming-soon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ink-700);
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--text-500);
  background: transparent;
}
.coming-soon-chip svg { width: 14px; height: 14px; flex-shrink: 0; }

@media (max-width: 880px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- AdCredits band ---------- */
.credits-band {
  background: linear-gradient(135deg, var(--ink-900), var(--ink-800));
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.credits-band h2 { margin-top: var(--space-2); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink-700);
  padding: var(--space-6) 0;
}
.site-footer__row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.site-footer__link {
  color: var(--text-300);
  font-size: var(--text-sm);
  text-decoration: none;
}
.site-footer__link:hover { color: var(--text-100); }
.site-footer__copy {
  color: var(--text-500);
  font-size: var(--text-xs);
  margin-left: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero__row { grid-template-columns: 1fr; }
  .hero__copy h1 { max-width: none; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tool-grid { grid-template-columns: 1fr; }
  .site-footer__copy { margin-left: 0; width: 100%; }

  /* Header: was wrapping the wordmark, nav links, credits pill, and
     button onto 2-3 stacked lines (too many items for one narrow row).
     Fix: nav becomes a slide-out drawer (same hamburger-drawer pattern
     already used on the dashboard/tool pages), so the header itself
     stays a single row — just wordmark + hamburger. */
  .site-header__row { flex-wrap: nowrap; height: 60px; padding: 0; }
  .site-header__menu-btn { display: flex; }

  .site-header__nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: 78%; min-width: 240px; max-width: 320px;
    background: var(--ink-900); border-left: 1px solid var(--ink-700);
    box-shadow: -8px 0 24px rgba(0,0,0,.35);
    flex-direction: column; align-items: stretch; gap: 0;
    transform: translateX(100%); transition: transform .25s ease;
    z-index: 201; overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .site-header__nav.open { transform: translateX(0); }
  .site-header__nav > span { display: flex; flex-direction: column; align-items: stretch; }

  .site-header__drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--ink-700); margin-bottom: var(--space-2);
  }
  .site-header__drawer-head span {
    font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
    color: var(--text-500); text-transform: uppercase; letter-spacing: .6px;
  }
  .site-header__drawer-close {
    display: block; background: none; border: none; cursor: pointer;
    font-size: 20px; line-height: 1; color: var(--text-300); padding: 4px; border-radius: 6px;
  }
  .site-header__drawer-close:hover { background: rgba(245,247,250,.08); }

  .site-header__nav .site-header__link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }
  .site-header__nav .topbar-credits { margin: var(--space-2) var(--space-4); align-self: flex-start; }
  .site-header__nav .btn { margin: var(--space-2) var(--space-4); justify-content: center; }

  .site-header__backdrop {
    position: fixed; top:0; right:0; bottom:0; left:0; background: rgba(7,11,18,.6); opacity: 0; pointer-events: none;
    transition: opacity .2s ease; z-index: 200;
  }
  .site-header__backdrop.open { opacity: 1; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }

  /* The desktop clamp() (30px floor) was still too large on phones —
     "Your business. Everything you need. One account." was landing as
     3-4 short lines instead of reading like a proper hero line. Lower
     the floor further here so it settles into ~2 lines, and let the
     browser balance the wrap points instead of leaving an orphan word
     on its own line (text-wrap: balance; no-op in browsers that don't
     support it yet, harmless fallback to normal wrapping). */
  .hero__copy h1 {
    font-size: clamp(22px, 6.4vw, 27px);
    line-height: 1.22;
    max-width: 21ch;
    text-wrap: balance;
  }
}

/* AdCredits pill in the signed-in nav — CP4: the AdCredits balance must
   be visible on every page at all times, including the marketing
   homepage's own nav. Self-contained (hardcoded colors, not this file's
   --ink/--accent tokens) because it's copied verbatim from the
   dashboard's existing pill (css/dashboard.css) so both pills always
   look identical rather than drifting into two "AdCredits badge"
   designs. Font stays 'Sora' to match the dashboard pill even though
   the homepage's own headings use Fraunces — see the added Sora weight
   in index.html's Google Fonts link. */
.topbar-credits {
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
  background: #FDF3DF; border: 1px solid #F0DBA0; border-radius: 999px;
  padding: 5px 10px 5px 6px; flex-shrink: 0;
}
.topbar-coin { width: 16px; height: 16px; flex-shrink: 0; display: block; }
.topbar-credits span {
  font-family:'AdNeedRupee','Sora', sans-serif; font-weight: 800; font-size: 12.5px; color: #8A4B0A; white-space: nowrap;
}
