/* ResellOS homepage — dark, teal/amber, Bricolage Grotesque + IBM Plex Mono */

:root {
  --bg: #070809;
  --bg-raised: #0b0d10;
  --surface: #0f1216;
  --surface-2: #13171c;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f4f3;
  --muted: #9aa1ab;
  --faint: #6b7280;
  --teal: #4fd1b5;
  --teal-deep: #2fa88f;
  --amber: #f6bd60;
  --danger: #ef7a84;
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(79, 209, 181, 0.08), transparent 62%),
    radial-gradient(820px 520px at 4% 12%, rgba(114, 167, 255, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.home-loading { opacity: 0; }
body.home-loading.js-ready { opacity: 1; transition: opacity 0.35s ease; }

.mono { font-family: "IBM Plex Mono", monospace; }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 16px; background: var(--teal); color: #06231d;
  border-radius: 8px; font-weight: 700; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- loading progress ---- */
.home-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
  background: transparent; pointer-events: none;
}
.home-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 0.3s ease;
}
.home-progress.active span { width: 72%; }
.home-progress.done span { width: 100%; opacity: 0; transition: width 0.3s ease, opacity 0.4s ease 0.2s; }

/* ---- buttons ---- */
.button {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 10px;
  font-family: "Bricolage Grotesque", sans-serif; font-size: 15px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.button .ico { width: 17px; height: 17px; }
.button.primary {
  background: var(--teal); color: #06231d;
  box-shadow: 0 6px 24px rgba(79, 209, 181, 0.18);
}
.button.primary:hover { background: #66dcbf; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(79, 209, 181, 0.28); }
.button.ghost {
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.button.ghost:hover { border-color: rgba(79, 209, 181, 0.5); color: var(--teal); transform: translateY(-1px); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  max-width: var(--max); margin: 0 auto;
  padding: 18px 28px;
  background: rgba(7, 8, 9, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, padding 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); padding-block: 12px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #06231d; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 14px rgba(79, 209, 181, 0.25);
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }

.site-nav { display: flex; gap: 4px; margin: 0 auto; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 8px; transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-signin { padding: 9px 15px; font-size: 14px; }
.header-cta { padding: 9px 16px; font-size: 14px; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: transparent; border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 10px; cursor: pointer;
}
.menu-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; position: fixed; top: 64px; left: 12px; right: 12px; z-index: 49;
  flex-direction: column; gap: 4px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: var(--text); text-decoration: none; padding: 11px 12px; border-radius: 9px; font-weight: 600; }
.mobile-nav a:hover { background: rgba(255, 255, 255, 0.05); }
.mobile-nav a.button { justify-content: center; margin-top: 6px; }

/* ---- hero ---- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 64px 28px 40px;
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal);
}
.eyebrow .ico { width: 15px; height: 15px; }

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.2vw, 62px);
  line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--teal) 10%, var(--amber) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-lede {
  margin: 0 0 30px; max-width: 560px;
  color: var(--muted); font-size: 17.5px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-actions .button { padding: 13px 22px; font-size: 15.5px; }
.hero-actions .button.ghost { border-color: var(--border-strong); }

.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hero-trust li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; }
.hero-trust .ico { width: 16px; height: 16px; color: var(--teal); }

/* ---- product stage mockup ---- */
.product-stage { position: relative; }
.stage-window {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(79, 209, 181, 0.05), 0 0 90px rgba(79, 209, 181, 0.06);
}
.window-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.traffic { display: flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; background: #3a4048; }
.traffic i:nth-child(1) { background: #ef7a84; }
.traffic i:nth-child(2) { background: var(--amber); }
.traffic i:nth-child(3) { background: var(--teal); }
.window-title { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--faint); }
.window-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600;
  color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em;
}
.window-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.window-body { display: grid; grid-template-columns: 46px 1fr; min-height: 350px; }
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 0; background: var(--surface-2); border-right: 1px solid var(--border);
}
.rail-logo {
  width: 26px; height: 26px; border-radius: 7px; margin-bottom: 6px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #06231d; font-weight: 800; font-size: 14px;
}
.rail-item {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--faint);
}
.rail-item.active { background: rgba(79, 209, 181, 0.12); color: var(--teal); }
.rail-item .ico { width: 15px; height: 15px; }

.stage-main { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stage-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 3px;
}
.mini-label { font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.mini-card strong { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.mini-trend { font-size: 10.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.mini-trend .ico { width: 12px; height: 12px; }
.mini-trend.up { color: var(--teal); }

.mini-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 108px; padding: 14px 12px 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.mini-chart span {
  flex: 1; height: var(--h); min-height: 6px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(79, 209, 181, 0.85), rgba(79, 209, 181, 0.22));
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready .product-stage.in .mini-chart span { transform: scaleY(1); }
.mini-chart span:nth-child(1) { transition-delay: 0.03s; }
.mini-chart span:nth-child(2) { transition-delay: 0.07s; }
.mini-chart span:nth-child(3) { transition-delay: 0.11s; }
.mini-chart span:nth-child(4) { transition-delay: 0.15s; }
.mini-chart span:nth-child(5) { transition-delay: 0.19s; }
.mini-chart span:nth-child(6) { transition-delay: 0.23s; }
.mini-chart span:nth-child(7) { transition-delay: 0.27s; }
.mini-chart span:nth-child(8) { transition-delay: 0.31s; }
.mini-chart span:nth-child(9) { transition-delay: 0.35s; }
.mini-chart span:nth-child(10) { transition-delay: 0.39s; }
.mini-chart span:nth-child(11) { transition-delay: 0.43s; }
.mini-chart span:nth-child(12) { transition-delay: 0.47s; }

.mini-orders { display: flex; flex-direction: column; gap: 6px; }
.mini-order {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 12px;
}
.order-id { color: var(--faint); font-size: 11px; flex: 1; }
.mini-order strong { font-size: 12.5px; }
.order-badge {
  font-family: "IBM Plex Mono", monospace; font-size: 9.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em;
}
.order-badge.paid { background: rgba(79, 209, 181, 0.12); color: var(--teal); }
.order-badge.review { background: rgba(246, 189, 96, 0.12); color: var(--amber); }
.order-badge.done { background: rgba(114, 167, 255, 0.12); color: #72a7ff; }

.stage-caption {
  display: flex; align-items: center; gap: 9px;
  margin: 14px 4px 0; color: var(--faint); font-size: 13px;
}
.stage-caption .ico { width: 14px; height: 14px; color: var(--teal); }

/* ---- stats band ---- */
.stats-band {
  max-width: var(--max); margin: 0 auto; padding: 44px 28px 54px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  gap: 26px;
}
.stat strong {
  display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px;
  font-family: "IBM Plex Mono", monospace;
  background: linear-gradient(100deg, var(--teal), var(--amber));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat span { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: block; max-width: 230px; }

/* ---- sections ---- */
.section-shell, .pricing-shell, .trust-shell {
  max-width: var(--max); margin: 0 auto; padding: 88px 28px;
}
.pricing-shell { max-width: none; background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pricing-shell > *:not(.section-heading) { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section-heading { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-heading .eyebrow { justify-content: center; }
.section-heading h2 {
  margin: 0 0 14px; font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.12; letter-spacing: -0.025em; font-weight: 800;
}
.section-lede { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.65; }

/* ---- steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  position: relative; padding: 26px 24px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.step:hover { border-color: rgba(79, 209, 181, 0.35); transform: translateY(-3px); }
.step-index {
  display: inline-block; margin-bottom: 18px;
  font-size: 13px; font-weight: 600; color: var(--teal);
  padding: 4px 10px; border: 1px solid rgba(79, 209, 181, 0.3); border-radius: 6px;
}
.step h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---- feature grid ---- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-tile {
  position: relative; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature-tile:hover { border-color: rgba(79, 209, 181, 0.4); background: var(--surface-2); transform: translateY(-3px); }
.tile-ico {
  width: 30px; height: 30px; padding: 7px; margin-bottom: 16px;
  color: var(--teal); background: rgba(79, 209, 181, 0.09);
  border-radius: 9px; box-sizing: content-box;
}
.feature-tile h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.feature-tile p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---- tier table ---- */
.tier-table {
  border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.tier-row {
  display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 0.8fr; gap: 14px;
  padding: 17px 24px; align-items: center;
  border-bottom: 1px solid var(--border); font-size: 15px;
}
.tier-row:last-child { border-bottom: none; }
.tier-row span { color: var(--muted); }
.tier-row strong { color: var(--text); font-size: 17px; margin-right: 10px; }
.tier-row small { color: var(--faint); font-size: 11.5px; }
.tier-row.featured {
  background: linear-gradient(90deg, rgba(79, 209, 181, 0.07), rgba(246, 189, 96, 0.05));
  box-shadow: inset 3px 0 0 var(--teal);
}
.tier-row.featured strong { color: var(--teal); }
.tier-head {
  background: var(--surface-2); font-family: "IBM Plex Mono", monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint) !important;
}
.tier-head span { color: var(--faint); font-weight: 600; }
.pricing-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 18px 4px 0; color: var(--faint); font-size: 13px; max-width: 640px;
}
.pricing-note .ico { width: 15px; height: 15px; color: var(--amber); margin-top: 3px; }

/* ---- trust ---- */
.trust-shell { max-width: var(--max); }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trust-item {
  padding: 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.2s ease;
}
.trust-item:hover { border-color: rgba(246, 189, 96, 0.35); }
.trust-item .ico { width: 22px; height: 22px; color: var(--amber); }
.trust-item h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.trust-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* ---- faq ---- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: rgba(79, 209, 181, 0.35); }
.faq-item summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 700; font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico {
  width: 17px; height: 17px; color: var(--faint);
  transition: transform 0.2s ease;
}
.faq-item[open] summary .ico { transform: rotate(180deg); color: var(--teal); }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ---- cta band ---- */
.cta-band {
  max-width: var(--max); margin: 0 auto 88px; padding: 54px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 36px;
  background:
    radial-gradient(600px 220px at 12% 0%, rgba(79, 209, 181, 0.1), transparent 60%),
    radial-gradient(600px 220px at 88% 100%, rgba(246, 189, 96, 0.08), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong); border-radius: 20px;
}
.cta-band .eyebrow { margin-bottom: 12px; }
.cta-band h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.025em; font-weight: 800; line-height: 1.15; }
.cta-band p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 460px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-actions .button { padding: 13px 22px; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-raised);
  padding: 44px 28px 30px;
}
.site-footer > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-brand p { margin: 0; color: var(--faint); font-size: 13.5px; max-width: 460px; }
.footer-links { display: flex; justify-content: center; gap: 6px 22px; flex-wrap: wrap; margin-block: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--teal); }
.footer-legal {
  display: block; text-align: center;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--faint);
}

/* ---- scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
  .hero, .stats-band, .section-shell, .pricing-shell, .trust-shell, .faq-shell, .cta-band, .site-footer {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .hero.in, .stats-band.in, .section-shell.in, .pricing-shell.in, .trust-shell.in, .faq-shell.in, .cta-band.in, .site-footer.in {
    opacity: 1; transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .stats-band, .section-shell, .pricing-shell, .trust-shell, .faq-shell, .cta-band, .site-footer { opacity: 1; transform: none; }
  .mini-chart span { transform: scaleY(1); }
  .home-loading { opacity: 1; }
}

/* ---- responsive ---- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 48px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .steps, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
}

@media (max-width: 720px) {
  .site-header { padding: 14px 18px; }
  .site-nav, .header-signin, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .hero { padding: 36px 18px 30px; }
  .hero h1 { font-size: 36px; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr; padding-block: 34px; }
  .stage-metrics { grid-template-columns: 1fr; }
  .tier-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 15px 18px; }
  .tier-row span:nth-child(3), .tier-row span:nth-child(4) { font-size: 13px; }
  .tier-head { display: none; }
  .section-shell, .pricing-shell, .trust-shell { padding: 64px 18px; }
  .trust-grid { grid-template-columns: 1fr; }
  .cta-band { margin: 0 18px 56px; padding: 34px 26px; }
  .window-body { grid-template-columns: 40px 1fr; min-height: 320px; }
}
