/* ============================================================
   Vancouver Trades Directory — Main Stylesheet
   Aesthetic: Refined editorial. DM Serif Display headlines,
   DM Sans body. Forest green + warm cream + copper accents.
   ============================================================ */

:root {
  --forest:    #1a3a2a;
  --forest-mid:#2d5c44;
  --forest-lt: #4a8c6a;
  --copper:    #b5622a;
  --copper-lt: #d4845a;
  --cream:     #f7f3ec;
  --cream-dark:#ede8df;
  --white:     #ffffff;
  --ink:       #1c1c1c;
  --ink-mid:   #4a4a4a;
  --ink-lt:    #7a7a7a;
  --border:    #d8d2c8;
  --gold-bg:   #fef9ec;
  --gold-border:#c89a2a;
  --gold-text: #7a5c10;
  --silver-bg: #f0f4f8;
  --silver-border:#7090b0;
  --silver-text:#3a5070;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 2px 12px rgba(26,58,42,0.08);
  --shadow-lg: 0 8px 40px rgba(26,58,42,0.14);
  --transition: 0.18s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; display: block; }
a { color: var(--forest-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--copper); }

/* ── Container ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }
p  { color: var(--ink-mid); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--transition); white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--forest); color: var(--cream);
  border-color: var(--forest);
}
.btn-primary:hover { background: var(--forest-mid); color: var(--white); border-color: var(--forest-mid); }
.btn-outline {
  background: transparent; color: var(--forest);
  border-color: var(--forest);
}
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink-lt); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); }
.btn-copper {
  background: var(--copper); color: var(--white);
  border-color: var(--copper);
}
.btn-copper:hover { background: var(--copper-lt); border-color: var(--copper-lt); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Header ── */
.site-header {
  background: var(--forest);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--cream); text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { font-family: var(--sans); font-size: 1rem; font-weight: 300; color: rgba(247,243,236,0.8); }
.logo-text strong { font-weight: 600; color: var(--cream); }
.main-nav {
  display: flex; gap: 6px; margin-left: 8px; flex: 1;
}
.main-nav a {
  color: rgba(247,243,236,0.75); font-size: 0.88rem; font-weight: 400;
  padding: 6px 10px; border-radius: 6px;
  transition: all var(--transition);
}
.main-nav a:hover { color: var(--cream); background: rgba(255,255,255,0.08); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-actions .btn-outline {
  color: rgba(247,243,236,0.85); border-color: rgba(247,243,236,0.3);
}
.header-actions .btn-outline:hover { color: var(--forest); background: var(--cream); border-color: var(--cream); }
.header-actions .btn-primary { background: var(--copper); border-color: var(--copper); color: var(--white); }
.header-actions .btn-primary:hover { background: var(--copper-lt); }
.header-actions .btn-ghost { color: rgba(247,243,236,0.6); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; }

/* ── Hero ── */
.hero {
  background: var(--forest);
  padding: 80px 0 72px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(181,98,42,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; }
.hero-label {
  display: inline-block;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--copper-lt); margin-bottom: 20px;
}
.hero h1 { color: var(--cream); margin-bottom: 20px; }
.hero h1 em { color: var(--copper-lt); font-style: italic; }
.hero p { color: rgba(247,243,236,0.75); font-size: 1.1rem; max-width: 540px; margin-bottom: 36px; }

.search-bar {
  display: flex; gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
}
.search-bar input {
  flex: 1; padding: 16px 20px;
  border: none; outline: none;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: transparent;
}
.search-bar input::placeholder { color: var(--ink-lt); }
.search-bar select {
  padding: 16px 14px; border: none; border-left: 1px solid var(--border);
  background: var(--cream-dark); color: var(--ink-mid);
  font-family: var(--sans); font-size: 0.9rem; cursor: pointer; outline: none;
}
.search-bar button {
  padding: 16px 24px;
  background: var(--copper); color: var(--white);
  border: none; cursor: pointer; font-family: var(--sans);
  font-size: 0.95rem; font-weight: 500; transition: background var(--transition);
}
.search-bar button:hover { background: var(--copper-lt); }

.hero-stats {
  display: flex; gap: 36px; margin-top: 40px;
}
.hero-stat .num { font-family: var(--serif); font-size: 1.8rem; color: var(--cream); line-height: 1; }
.hero-stat .lbl { font-size: 0.82rem; color: rgba(247,243,236,0.55); margin-top: 2px; }

/* ── Section layouts ── */
.section { padding: 72px 0; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-header p { margin-top: 12px; }
.section-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--copper); display: block; margin-bottom: 10px;
}

/* ── Trade cards (homepage) ── */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.trade-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none; color: var(--ink);
  display: block;
}
.trade-card:hover {
  border-color: var(--forest-lt);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px); color: var(--ink);
}
.trade-card .icon { font-size: 2rem; margin-bottom: 12px; }
.trade-card h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--forest); margin-bottom: 4px; }
.trade-card .count { font-size: 0.82rem; color: var(--ink-lt); }

/* ── Listing cards ── */
.listings-grid {
  display: flex; flex-direction: column; gap: 16px;
}
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex; gap: 20px; align-items: flex-start;
  transition: all var(--transition);
  text-decoration: none; color: inherit;
  position: relative;
}
.listing-card:hover { border-color: var(--forest-lt); box-shadow: var(--shadow); }
.listing-card.is-gold { border-color: var(--gold-border); background: var(--gold-bg); }
.listing-card.is-silver { border-color: var(--silver-border); }

.listing-logo {
  width: 64px; height: 64px; border-radius: var(--radius);
  object-fit: cover; border: 1px solid var(--border); flex-shrink: 0;
  background: var(--cream-dark); display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem;
}
.listing-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.listing-body { flex: 1; min-width: 0; }
.listing-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.listing-name { font-family: var(--serif); font-size: 1.2rem; color: var(--forest); }
.listing-areas { font-size: 0.82rem; color: var(--ink-lt); margin-bottom: 8px; }
.listing-desc { font-size: 0.9rem; color: var(--ink-mid); margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-meta { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.listing-rating { display: flex; align-items: center; gap: 5px; font-size: 0.88rem; }
.stars { color: #c89a2a; letter-spacing: 1px; }
.listing-phone { font-size: 0.88rem; color: var(--forest-mid); font-weight: 500; }

.listing-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-gold { background: var(--gold-bg); color: var(--gold-text); border: 1px solid var(--gold-border); }
.badge-silver { background: var(--silver-bg); color: var(--silver-text); border: 1px solid var(--silver-border); }
.badge-free { background: var(--cream-dark); color: var(--ink-lt); border: 1px solid var(--border); }

/* ── Pricing cards ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px; align-items: start;
}
.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
}
.pricing-card.is-featured {
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(181,98,42,0.08);
  position: relative;
}
.pricing-card.is-featured::before {
  content: 'Most Popular';
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--copper); color: var(--white);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px;
}
.pricing-tier { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); margin-bottom: 12px; }
.pricing-price { font-family: var(--serif); font-size: 3rem; color: var(--forest); line-height: 1; }
.pricing-price sup { font-size: 1.4rem; vertical-align: super; }
.pricing-price sub { font-size: 0.9rem; color: var(--ink-lt); font-family: var(--sans); }
.pricing-desc { font-size: 0.88rem; color: var(--ink-lt); margin: 12px 0 28px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 32px; }
.pricing-features li { padding: 8px 0; border-bottom: 1px solid var(--cream-dark); font-size: 0.9rem; color: var(--ink-mid); }
.pricing-features li::before { content: '✓ '; color: var(--forest-mid); font-weight: 600; }
.pricing-features li.no::before { content: '✗ '; color: var(--border); }
.pricing-features li.no { color: var(--ink-lt); }

/* ── Forms ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  max-width: 520px; margin: 0 auto;
  box-shadow: var(--shadow);
}
.form-title { font-family: var(--serif); font-size: 1.9rem; color: var(--forest); margin-bottom: 6px; }
.form-subtitle { font-size: 0.9rem; color: var(--ink-lt); margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--ink-mid); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
textarea, select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  background: var(--white); outline: none;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--forest-mid); }
textarea { resize: vertical; min-height: 100px; }
.field-hint { font-size: 0.78rem; color: var(--ink-lt); margin-top: 4px; }
.form-divider { text-align: center; color: var(--ink-lt); font-size: 0.85rem; margin: 24px 0; position: relative; }
.form-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.form-divider span { background: var(--white); padding: 0 12px; position: relative; }

/* Flash messages */
.flash {
  padding: 14px 20px; border-radius: var(--radius);
  margin-bottom: 24px; font-size: 0.9rem;
}
.flash-success { background: #f0faf4; color: #1a5c34; border: 1px solid #a3d9b8; }
.flash-error   { background: #fdf2f2; color: #7a1c1c; border: 1px solid #f0a3a3; }
.flash-info    { background: #f0f6ff; color: #1a3a6c; border: 1px solid #a3c4f0; }

/* ── Dashboard ── */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 48px 0; }
.dash-sidebar { position: sticky; top: 90px; align-self: start; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--ink-mid); font-size: 0.9rem;
  transition: all var(--transition); text-decoration: none;
}
.dash-nav a:hover, .dash-nav a.active { background: var(--cream-dark); color: var(--forest); font-weight: 500; }
.dash-content h2 { margin-bottom: 24px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.stat-card .val { font-family: var(--serif); font-size: 2rem; color: var(--forest); }
.stat-card .lbl { font-size: 0.8rem; color: var(--ink-lt); margin-top: 2px; }

/* ── Profile page ── */
.profile-hero {
  background: var(--forest); padding: 48px 0 40px;
}
.profile-inner { display: flex; gap: 28px; align-items: flex-start; }
.profile-logo {
  width: 88px; height: 88px; border-radius: var(--radius-lg);
  background: var(--cream-dark); border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; flex-shrink: 0; overflow: hidden;
}
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-meta h1 { color: var(--cream); font-size: 2rem; margin-bottom: 6px; }
.profile-meta .badges { display: flex; gap: 8px; margin-bottom: 10px; }
.profile-meta .tagline { color: rgba(247,243,236,0.7); font-size: 0.95rem; }

/* ── Review form / cards ── */
.review-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 14px;
}
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-author { font-weight: 500; font-size: 0.9rem; }
.review-date { font-size: 0.8rem; color: var(--ink-lt); }
.review-stars { color: #c89a2a; margin-bottom: 6px; }
.review-text { font-size: 0.9rem; color: var(--ink-mid); }

/* ── Footer ── */
.site-footer {
  background: var(--forest);
  padding-top: 64px;
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 48px;
}
.footer-brand p { color: rgba(247,243,236,0.55); font-size: 0.88rem; margin-top: 12px; }
.footer-links h4 { font-family: var(--sans); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(247,243,236,0.45); margin-bottom: 14px; }
.footer-links a { display: block; color: rgba(247,243,236,0.7); font-size: 0.88rem; padding: 4px 0; }
.footer-links a:hover { color: var(--cream); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; }
.footer-bottom p { color: rgba(247,243,236,0.35); font-size: 0.82rem; }

/* ── Utility ── */
.text-center { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.gap-12 { gap: 48px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.page-body { padding: 56px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--forest); padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .hero { padding: 48px 0; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .search-bar { flex-direction: column; border-radius: var(--radius); }
  .search-bar select, .search-bar button { border-radius: 0; border-left: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .form-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .listing-actions { flex-direction: row; }
  .profile-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
}
