/* ==========================================================================
   CrewMiners — public.css
   Public-facing styles: navbar, landing page, content pages.
   Loaded after app.css — inherits all design tokens from :root.
   ========================================================================== */

/* ── SHARED NAVBAR (both auth pages and public pages) ────────────────────── */
.pub-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg); border-bottom: 1px solid var(--hair);
}
/* .toast-wrap (app.css) defaults to top:18px, which sits right under this
   sticky 60px-tall nav — push it below the nav on public/auth pages, same
   idea as admin's own toast-wrap override for its topbar. */
.toast-wrap { top: 78px; }
.pub-nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 60px; gap: 8px;
}
.pub-nav__brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; flex-none;
}
.pub-nav__mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); display: grid; place-items: center;
  color: var(--accent-ink); font-weight: 700; font-size: 17px; flex-none;
  box-shadow: 0 0 0 1px var(--accent-soft), 0 4px 16px -6px var(--accent);
}
.pub-nav__wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.pub-nav__name { font-weight: 700; font-size: 15px; letter-spacing: -.02em; color: var(--text); }
.pub-nav__sub  { font-size: 9px; color: var(--text-3); letter-spacing: .16em; font-weight: 600; }

.pub-nav__links {
  display: flex; align-items: center; gap: 2px; margin-left: 20px;
}
.pub-nav__link {
  padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: color .15s, background .15s; text-decoration: none;
}
.pub-nav__link:hover { color: var(--text); background: var(--surface-2); }
.pub-nav__link.is-active { color: var(--accent-line); background: var(--accent-soft); }

.pub-nav__spacer { flex: 1; }

.pub-nav__actions { display: flex; align-items: center; gap: 8px; }

/* Color picker */
.nav-accent-wrap { position: relative; width: 28px; height: 28px; }
.nav-accent-swatch {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); border: 2px solid var(--border);
  cursor: pointer; display: block; transition: border-color .15s, box-shadow .15s;
}
.nav-accent-swatch:hover { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-soft); }
.nav-accent-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: none;
}

/* Theme toggle */
.nav-theme-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); display: grid; place-items: center;
  cursor: pointer; transition: all .15s;
}
.nav-theme-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

/* Auth links in navbar */
.nav-auth-link {
  padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: all .15s;
}
.nav-auth-link--ghost {
  color: var(--text-2); border: 1px solid var(--border);
}
.nav-auth-link--ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.nav-auth-link--cta {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 4px 14px -6px var(--accent);
}
.nav-auth-link--cta:hover { opacity: .9; }

/* Hamburger */
.pub-nav__burger {
  display: none; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-2); cursor: pointer; align-items: center; justify-content: center;
}
.pub-nav__mobile {
  display: none; flex-direction: column; padding: 10px 16px 14px;
  border-top: 1px solid var(--hair); gap: 2px;
}
.pub-nav__mobile.is-open { display: flex; }
.pub-nav__mobile .pub-nav__link { padding: 10px 12px; display: block; }
.pub-nav__mobile-actions {
  display: flex; align-items: center; gap: 8px; padding-top: 12px;
  border-top: 1px solid var(--hair); margin-top: 6px;
}

@media (max-width: 840px) {
  .pub-nav__links { display: none; }
  .pub-nav__actions .nav-auth-link { display: none; }
  .pub-nav__burger { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────────────────────── */
.pub-hero {
  padding: 100px 24px 90px; text-align: center;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, var(--accent-soft) 0%, transparent 72%);
  border-bottom: 1px solid var(--hair);
}
/* An uploaded hero photo always sits under a dark overlay (see home.blade.php),
   so force light text here regardless of the visitor's light/dark theme —
   otherwise --text/--text-2 could render as dark, illegible text in light mode. */
.pub-hero--has-image .pub-hero__title,
.pub-hero--has-image .pub-stat__val { color: #fff; }
.pub-hero--has-image .pub-hero__sub,
.pub-hero--has-image .pub-stat__label { color: rgba(255,255,255,.72); }
.pub-hero__inner { max-width: 800px; margin: 0 auto; }
.pub-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-line); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px; margin-bottom: 24px;
}
.pub-hero__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-line); animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }
.pub-hero__title {
  font-size: clamp(32px, 6vw, 60px); font-weight: 700; line-height: 1.07;
  letter-spacing: -.03em; color: var(--text); margin-bottom: 20px;
}
.pub-hero__title em { color: var(--accent-line); font-style: normal; }
.pub-hero__sub {
  font-size: clamp(15px, 2.2vw, 18px); color: var(--text-2); max-width: 560px;
  margin: 0 auto 36px; line-height: 1.65;
}
.pub-hero__ctas {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.pub-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 11px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .15s; border: none; cursor: pointer;
  font-family: inherit;
}
.pub-btn--cta {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 8px 24px -8px var(--accent);
}
.pub-btn--cta:hover {
  opacity: .9; transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 14px 32px -8px var(--accent);
}
.pub-btn--outline {
  background: transparent; color: var(--text-2); border: 1px solid var(--border-2);
}
.pub-btn--outline:hover { color: var(--text); border-color: var(--text-3); background: var(--surface); }

.pub-hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 48px;
  margin-top: 60px; flex-wrap: wrap; padding-top: 48px;
  border-top: 1px solid var(--hair);
}
/* 4 items at 48px gap don't fit one row under ~420px and wrap unevenly
   (3 then 1) — a deliberate 2x2 grid reads far cleaner on phones. */
@media (max-width: 640px) {
  .pub-hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}
.pub-stat { text-align: center; }
.pub-stat__val {
  font-size: 28px; font-weight: 700; letter-spacing: -.03em;
  font-family: var(--mono); color: var(--text);
}
.pub-stat__val em { color: var(--accent-line); font-style: normal; }
.pub-stat__label { font-size: 12px; color: var(--text-3); margin-top: 3px; letter-spacing: .04em; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.pub-section { padding: 80px 24px; }
.pub-section--alt { background: var(--bg-2); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.pub-container { max-width: 1200px; margin: 0 auto; }

.pub-section-header { margin-bottom: 48px; }
.pub-section-header.centered { text-align: center; }
.pub-section-header.centered .pub-section-sub { margin-left: auto; margin-right: auto; }
.pub-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-line); margin-bottom: 10px;
}
.pub-section-title {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 700;
  letter-spacing: -.025em; color: var(--text); line-height: 1.15; margin-bottom: 12px;
}
.pub-section-sub {
  font-size: 15px; color: var(--text-2); max-width: 520px; line-height: 1.65;
}

/* ── FEATURE CARDS ───────────────────────────────────────────────────────── */
.pub-feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .pub-feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pub-feat-grid { grid-template-columns: 1fr; } }

.pub-feat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 28px; transition: border-color .2s, box-shadow .2s;
}
.pub-feat-card:hover {
  border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-lg);
}
.pub-feat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-soft); display: grid; place-items: center;
  color: var(--accent-line); font-size: 24px; margin-bottom: 18px;
}
.pub-feat-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.pub-feat-body  { font-size: 14px; color: var(--text-2); line-height: 1.65; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────────── */
.pub-steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
@media (max-width: 700px) { .pub-steps-grid { grid-template-columns: 1fr; gap: 28px; } }

.pub-step { display: flex; flex-direction: column; gap: 14px; }
.pub-step__num {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--accent-line); color: var(--accent-line);
  font-weight: 700; font-size: 14px; font-family: var(--mono);
  display: grid; place-items: center; flex-none;
}
.pub-step__title { font-size: 16px; font-weight: 700; color: var(--text); }
.pub-step__body  { font-size: 14px; color: var(--text-2); line-height: 1.65; }

/* ── CTA BAND ────────────────────────────────────────────────────────────── */
.pub-cta-band {
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 75%);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  text-align: center;
}
.pub-cta-band__title {
  font-size: clamp(24px, 4vw, 40px); font-weight: 700;
  letter-spacing: -.025em; color: var(--text); margin-bottom: 12px; line-height: 1.1;
}
.pub-cta-band__sub {
  font-size: 16px; color: var(--text-2); margin-bottom: 32px; max-width: 520px;
  margin-left: auto; margin-right: auto;
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.pub-footer {
  background: var(--bg-2); border-top: 1px solid var(--hair);
  padding: 56px 24px 24px;
}
.pub-footer__inner { max-width: 1200px; margin: 0 auto; }
.pub-footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.pub-footer__tagline {
  font-size: 13px; color: var(--text-3); margin-top: 12px;
  max-width: 200px; line-height: 1.55;
}
.pub-footer__col-title {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 14px;
}
.pub-footer__links { display: flex; flex-direction: column; gap: 10px; }
.pub-footer__link {
  font-size: 13px; color: var(--text-2); text-decoration: none; transition: color .15s;
}
.pub-footer__link:hover { color: var(--text); }
.pub-footer__bottom {
  padding-top: 20px; border-top: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.pub-footer__copy { font-size: 12px; color: var(--text-3); }
.pub-footer__legal { display: flex; gap: 20px; }
.pub-footer__legal a { font-size: 12px; color: var(--text-3); text-decoration: none; }
.pub-footer__legal a:hover { color: var(--text-2); }

@media (max-width: 900px) {
  .pub-footer__top { grid-template-columns: 1fr 1fr; }
  .pub-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pub-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ── PAGE HERO (about / terms / privacy etc.) ────────────────────────────── */
.pub-page-hero {
  padding: 64px 24px 48px; border-bottom: 1px solid var(--hair);
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
}
.pub-page-hero__inner { max-width: 1200px; margin: 0 auto; }
.pub-page-hero__breadcrumb {
  font-size: 12px; color: var(--text-3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}
.pub-page-hero__breadcrumb a { color: var(--text-3); text-decoration: none; }
.pub-page-hero__breadcrumb a:hover { color: var(--text-2); }
.pub-page-hero__title {
  font-size: clamp(28px, 5vw, 48px); font-weight: 700;
  letter-spacing: -.03em; color: var(--text); line-height: 1.1; margin-bottom: 10px;
}
.pub-page-hero__meta { font-size: 13px; color: var(--text-3); }

/* ── CONTENT WRAPPER ─────────────────────────────────────────────────────── */
.pub-content-wrap {
  max-width: 760px; margin: 0 auto; padding: 52px 24px 80px;
}
.pub-content {
  color: var(--text-2); line-height: 1.8; font-size: 15px;
}
.pub-content h2 {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin-top: 44px; margin-bottom: 12px; letter-spacing: -.02em;
}
.pub-content h3 {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-top: 28px; margin-bottom: 8px;
}
.pub-content p { margin-bottom: 16px; }
.pub-content ul, .pub-content ol { padding-left: 24px; margin-bottom: 16px; }
.pub-content li { margin-bottom: 8px; }
.pub-content a { color: var(--accent-line); text-decoration: underline; }
.pub-content a:hover { opacity: .8; }
.pub-content strong { color: var(--text); font-weight: 600; }
.pub-content blockquote {
  border-left: 3px solid var(--accent-line); padding: 4px 0 4px 18px;
  margin: 24px 0; color: var(--text-3); font-style: italic;
}
.pub-content hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

/* ── FAQ ACCORDION ───────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  transition: border-color .2s;
}
.faq-item.is-open { border-color: var(--accent); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; background: var(--surface);
  font-size: 15px; font-weight: 600; color: var(--text);
  border: none; width: 100%; text-align: left; gap: 12px;
}
.faq-q:hover { background: var(--surface-2); }
.faq-q__chevron {
  flex-none; transition: transform .25s; color: var(--text-3);
  display: grid; place-items: center;
}
.faq-item.is-open .faq-q__chevron { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 20px 20px; font-size: 14px;
  color: var(--text-2); line-height: 1.7; background: var(--surface);
}
.faq-item.is-open .faq-a { display: block; }

/* ── CONTACT ─────────────────────────────────────────────────────────────── */
.pub-contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto; padding: 52px 24px 80px; align-items: start;
}
@media (max-width: 700px) { .pub-contact-grid { grid-template-columns: 1fr; } }

.pub-contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
}
.pub-contact-card__title {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.pub-contact-card__sub {
  font-size: 14px; color: var(--text-2); margin-bottom: 24px; line-height: 1.6;
}
.pub-contact-info { display: flex; flex-direction: column; gap: 16px; }
.pub-contact-info-item { display: flex; align-items: center; gap: 12px; }
.pub-contact-info-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); display: grid; place-items: center;
  color: var(--accent-line); flex-none; font-size: 18px;
}
.pub-contact-info-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.pub-contact-info-value { font-size: 14px; color: var(--text); font-weight: 500; margin-top: 1px; }

/* ── AUTH LAYOUT MODS (slim navbar on auth pages) ────────────────────────── */
.auth-with-nav { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-with-nav main.auth {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px;
}

/* ── HOMEPAGE MARKETPLACE PREVIEW ────────────────────────────────────────── */
/* Explicit column counts (not auto-fit) so this always reads as a real grid,
   including on phones — auto-fit with a 260px minimum was collapsing to a
   single stacked column on any screen under ~550px. */
.pub-miner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 900px) {
  .pub-miner-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.pub-miner-card {
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pub-miner-card:hover { border-color: var(--accent-line); box-shadow: 0 4px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.pub-miner-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pub-miner-card__model { font-size: 14px; font-weight: 700; color: var(--text); }
.pub-miner-card__meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pub-miner-card__badge {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.pub-miner-card__badge--online { color: var(--up); background: var(--up-soft); }
.pub-miner-card__badge--offline { color: var(--warn); background: var(--warn-soft); }
.pub-miner-card__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pub-miner-card__bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pub-miner-card__bar-fill { height: 100%; background: var(--accent-line); border-radius: 2px; }
.pub-miner-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pub-miner-card__price { font-size: 18px; font-weight: 800; color: var(--accent-line); }
.pub-miner-card__cta { font-size: 13px; font-weight: 600; color: var(--text-2); }
.pub-miner-card__cta .cta-full { display: inline; }
.pub-miner-card__cta .cta-short { display: none; }

/* Two cards per row at any width means each card can be under 180px on a
   phone — compact every element so nothing wraps or overlaps at that size. */
@media (max-width: 560px) {
  .pub-miner-card { padding: 12px; }
  .pub-miner-card__head { flex-wrap: wrap; gap: 6px 8px; }
  .pub-miner-card__head > div:first-child { min-width: 0; flex: 1 1 100%; }
  .pub-miner-card__model { font-size: 12.5px; }
  .pub-miner-card__meta { font-size: 9.5px; }
  .pub-miner-card__badge { font-size: 9px; padding: 2px 7px; }
  .pub-miner-card__foot { margin-top: 12px; padding-top: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .pub-miner-card__price { font-size: 14px; }
  .pub-miner-card__cta { font-size: 11px; align-self: flex-end; }
  .pub-miner-card__cta .cta-full { display: none; }
  .pub-miner-card__cta .cta-short { display: inline; }
}
