/* ==========================================================================
   Online Barter System — marketing site
   Design concept: the "trade ticket" — a claim-check / swap-tag aesthetic
   grounded in Baguio market-stall signage. Deep pine grounds bookend warm
   kraft-paper content sections; gold marks the one interactive accent.
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- tokens ---------- */
:root {
  /* pine — dark grounds & primary brand */
  --pine-950: #12261d;
  --pine-900: #17332a;
  --pine-700: #1f4d3a;
  --pine-500: #2e6b4f;

  /* gold — the one accent, split for contrast-safe use */
  --gold-500: #e3a73b;   /* fills: buttons, icons, badges on dark */
  --gold-600: #c98a22;   /* hover state for gold fills */
  --gold-700: #96650e;   /* text use on light/paper backgrounds */

  /* paper — warm kraft ground for content sections */
  --paper: #f5f0e4;
  --paper-2: #ece3cd;

  /* ink — text, biased warm-green to match the pine family */
  --ink: #1b241d;
  --ink-soft: #51604f;

  /* clay — chosen neutral: grey with a warm hue bias */
  --clay-200: #ddd3ba;
  --clay-400: #8c7a5e;

  /* semantic — separate hue from the gold accent */
  --good-600: #2f7a4c;
  --good-100: #e1efe2;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --header-h: 64px;
}

/* ---------- base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2.5px solid var(--gold-500);
  outline-offset: 2px;
}

/* icon sprite: hidden but usable via <use> across browsers */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; }
.icon {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.2em; flex-shrink: 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-700); margin: 0 0 10px;
}
.eyebrow .icon { width: 1em; height: 1em; }
.eyebrow-light { color: var(--gold-500); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.35rem); text-transform: uppercase; letter-spacing: 0.01em; }
.on-dark { color: var(--paper); }

.section { padding-block: 64px; }
.section-dark { background: var(--pine-950); color: var(--paper); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 6px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1.5px solid transparent; transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 1.05em; height: 1.05em; }

.btn-gold { background: var(--gold-500); color: var(--pine-950); }
.btn-gold:hover { background: var(--gold-600); }

.btn-ghost { border-color: rgba(245,240,228,0.45); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(245,240,228,0.08); }

.btn-outline { border-color: var(--pine-700); color: var(--pine-700); background: #fff; }
.btn-outline:hover { background: var(--paper-2); }

.btn-ghost-dark { border-color: var(--clay-200); color: var(--ink-soft); }
.btn-ghost-dark:hover { border-color: var(--clay-400); color: var(--ink); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 0.85rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18,38,29,0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(245,240,228,0.08);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold-500); color: var(--pine-950);
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-mark .icon { width: 17px; height: 17px; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.brand-name-thin { font-weight: 500; color: var(--gold-500); text-transform: lowercase; }

.main-nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  background: var(--pine-950);
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 20px 22px;
  border-bottom: 1px solid rgba(245,240,228,0.1);
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav a {
  color: var(--paper); font-weight: 600; padding: 12px 4px;
  border-bottom: 1px solid rgba(245,240,228,0.08);
}
.main-nav a.is-active { color: var(--gold-500); }
.main-nav .nav-cta {
  margin-top: 10px; padding: 12px 16px; border: 0;
  background: var(--gold-500); color: var(--pine-950);
  border-radius: 6px; text-align: center; font-weight: 700;
}

.nav-toggle { color: var(--paper); padding: 6px; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static; inset: auto; flex-direction: row; align-items: center;
    background: none; border: 0; padding: 0; gap: 28px;
    opacity: 1; visibility: visible; transform: none;
  }
  .main-nav a { padding: 0; border: 0; font-size: 0.95rem; }
  .main-nav .nav-cta {
    margin: 0; padding: 10px 18px; border-radius: 6px;
  }
}

/* ---------- hero ---------- */
.hero { background: var(--pine-950); color: var(--paper); padding-block: 56px 72px; }
.hero-inner { display: grid; gap: 44px; }

.hero-title {
  font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 0.98;
  text-transform: uppercase; color: var(--paper); margin-bottom: 20px;
}
.hero-sub { max-width: 46ch; color: rgba(245,240,228,0.82); font-size: 1.05rem; margin-bottom: 30px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-actions .btn { width: 100%; }

/* the trade ticket */
.hero-visual { display: flex; justify-content: center; }
.ticket {
  width: 100%; max-width: 420px;
  background: var(--paper); color: var(--ink);
  border-radius: 14px; padding: 22px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
  position: relative;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 22px; height: 22px;
  background: var(--pine-950); border-radius: 50%; top: 50%; transform: translateY(-50%);
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }

.ticket-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1.5px dashed var(--clay-200);
}
.ticket-status { color: var(--good-600); font-weight: 600; }

.ticket-body { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; }
.ticket-item { display: flex; flex-direction: column; gap: 5px; text-align: center; }
.ticket-item-cat {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold-700);
}
.ticket-item-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.05; }
.ticket-item-cond { font-size: 0.82rem; color: var(--ink-soft); }

.ticket-divider { display: flex; justify-content: center; }
.ticket-divider .icon {
  width: 34px; height: 34px; padding: 8px; border-radius: 50%;
  background: var(--pine-700); color: var(--paper); stroke-width: 1.8;
}

.ticket-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--clay-200);
}
.ticket-note { font-size: 0.8rem; color: var(--ink-soft); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
}
.chip .icon { width: 0.95em; height: 0.95em; }
.chip-good { background: var(--good-100); color: var(--good-600); }

@media (min-width: 1080px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 24px; position: relative; }
  .hero-inner::before {
    content: ""; position: absolute; left: 50%; top: 4%; bottom: 4%;
    border-left: 2px dashed rgba(245,240,228,0.22);
  }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
  .ticket-body { grid-template-columns: 1fr auto 1fr; }
  .ticket-item:last-child { text-align: right; align-items: flex-end; }
}

/* ---------- category strip ---------- */
.cat-strip { padding-block: 30px 8px; background: var(--paper); }
.cat-strip .eyebrow { margin-bottom: 16px; }
.cat-scroll { overflow-x: auto; scrollbar-width: none; padding-bottom: 22px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-track { display: flex; gap: 10px; padding-inline: 20px; width: max-content; }
.cat-chip {
  font-size: 0.88rem; font-weight: 600; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--clay-200); color: var(--ink);
}

/* ---------- steps ---------- */
.steps { display: grid; gap: 18px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--clay-200);
  border-radius: 10px; padding: 26px 22px 22px; overflow: hidden;
}
.step-num {
  position: absolute; top: -6px; right: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 3.6rem;
  color: var(--paper-2); line-height: 1; z-index: 0;
}
.step-icon {
  position: relative; z-index: 1; display: inline-flex; width: 42px; height: 42px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--pine-700); color: var(--paper); margin-bottom: 14px;
}
.step h3 { position: relative; z-index: 1; font-size: 1.1rem; text-transform: uppercase; margin-bottom: 8px; }
.step p { position: relative; z-index: 1; color: var(--ink-soft); font-size: 0.95rem; }

@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- feature browser ---------- */
.feature-browser { display: flex; flex-direction: column; gap: 22px; }

.feature-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 4px; margin: 0 -20px; padding-inline: 20px;
}
.feature-tabs::-webkit-scrollbar { display: none; }
.feature-tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 16px; border-radius: 6px; font-size: 0.88rem; font-weight: 600;
  background: rgba(245,240,228,0.06); border: 1px solid rgba(245,240,228,0.16);
  color: rgba(245,240,228,0.75); flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.feature-tab .icon { color: var(--gold-500); }
.feature-tab:hover { border-color: rgba(245,240,228,0.4); color: var(--paper); }
.feature-tab.is-active { background: var(--paper); color: var(--pine-950); border-color: var(--paper); }
.feature-tab.is-active .icon { color: var(--gold-700); }

.feature-panel {
  background: rgba(245,240,228,0.05); border: 1px solid rgba(245,240,228,0.14);
  border-radius: 12px; padding: 26px 24px;
}
.feature-panel h3 { color: var(--paper); text-transform: uppercase; font-size: 1.2rem; margin-bottom: 16px; }
.feature-list { display: grid; gap: 12px; }
.feature-list li {
  position: relative; padding-left: 22px; color: rgba(245,240,228,0.85); font-size: 0.97rem;
}
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 9px; height: 9px; border-radius: 2px; background: var(--gold-500); transform: rotate(45deg);
}

@media (min-width: 900px) {
  .feature-tabs { flex-wrap: wrap; overflow: visible; margin: 0; padding-inline: 0; }
  .feature-list { grid-template-columns: repeat(2, 1fr); column-gap: 28px; }
}

/* ---------- local grounding ---------- */
.local-inner { display: grid; gap: 30px; }
.local-copy p { color: var(--ink-soft); max-width: 56ch; }
.local-spots { display: flex; flex-wrap: wrap; gap: 10px; }
.spot-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  background: #fff; border: 1px solid var(--clay-200); color: var(--pine-700);
}
.spot-chip .icon { color: var(--gold-700); }

@media (min-width: 900px) { .local-inner { grid-template-columns: 1.2fr 1fr; align-items: center; } }

/* ---------- roadmap ---------- */
.roadmap-list { display: grid; gap: 14px; }
.roadmap-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-left: 3px dashed var(--clay-400);
  background: var(--paper-2); border-radius: 0 8px 8px 0;
  color: var(--ink-soft); font-size: 0.95rem;
}
.roadmap-list .icon { color: var(--gold-700); }

@media (min-width: 900px) { .roadmap-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- join / CTA ---------- */
.join-inner { text-align: center; }
.join-inner .section-head { margin-inline: auto; }

.join-toggle {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(245,240,228,0.08); margin-bottom: 26px; flex-wrap: wrap; justify-content: center;
}
.toggle-btn {
  padding: 9px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  color: rgba(245,240,228,0.7);
}
.toggle-btn.is-active { background: var(--gold-500); color: var(--pine-950); }

.join-blurb { color: rgba(245,240,228,0.8); max-width: 48ch; margin: 0 auto 22px; }
.join-fields {
  display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin-inline: auto;
}
.join-fields input {
  padding: 13px 16px; border-radius: 6px; border: 1.5px solid rgba(245,240,228,0.25);
  background: rgba(245,240,228,0.06); color: var(--paper);
}
.join-fields input::placeholder { color: rgba(245,240,228,0.5); }
.join-msg { min-height: 1.4em; margin-top: 14px; font-size: 0.9rem; color: var(--gold-500); font-weight: 600; }

@media (min-width: 640px) {
  .join-fields { flex-direction: row; }
  .join-fields input { flex: 1; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--pine-950); color: rgba(245,240,228,0.75); padding-top: 52px; }
.footer-inner { display: grid; gap: 34px; padding-bottom: 34px; }
.footer-brand p { margin-top: 12px; max-width: 32ch; font-size: 0.92rem; color: rgba(245,240,228,0.6); }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold-500); margin-bottom: 12px;
}
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  border-top: 1px solid rgba(245,240,228,0.1); padding-block: 18px;
  font-size: 0.82rem; color: rgba(245,240,228,0.55);
}

@media (min-width: 700px) { .footer-inner { grid-template-columns: 1.4fr repeat(3, 1fr); } }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-500); color: var(--pine-950);
  display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- generic section max-widths on larger screens ---------- */
@media (min-width: 900px) {
  .section { padding-block: 88px; }
  .hero { padding-block: 88px 96px; }
}
