/* Geelong Rural Trades — "soil + wheat"
   Dark soil hero w/ contour signature, light photo-led card body.
   Display: Space Grotesk · Body: Public Sans · Tags: IBM Plex Mono */

:root {
  --soil: #3B2113;
  --soil-2: #4A2B18;
  --soil-3: #5C3720;
  --paddock: #F7F2E8;
  --card: #FFFFFF;
  --ink: #2E1B10;
  --muted: #7A6353;
  --line: #E4D9C6;
  --gold: #C98A3D;
  --gold-dark: #A66E2A;
  --wheat: #E9B84F;
  --ochre: #D9A441;
  --rust: #9C3B1E;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(59, 33, 19, 0.06), 0 8px 24px rgba(59, 33, 19, 0.07);
  --shadow-lift: 0 2px 4px rgba(59, 33, 19, 0.08), 0 14px 34px rgba(59, 33, 19, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paddock);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }

a { color: var(--gold-dark); }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(59, 33, 19, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark-icon {
  height: 38px;
  width: auto;
  display: block;
}
.mark-wordmark {
  height: 40px;
  width: auto;
  display: block;
}
.mark-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #FBF6EC;
  letter-spacing: -0.01em;
}
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #E8DCC6;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.site-nav a:last-child {
  background: var(--wheat);
  color: var(--soil);
  font-weight: 600;
}
.site-nav a:last-child:hover { background: #F2CB6E; opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 75% -10%, rgba(233, 184, 79, 0.10), transparent 60%),
    linear-gradient(175deg, var(--soil) 0%, var(--soil-2) 100%);
  padding: 78px 0 90px;
}
.hero-contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wheat);
  margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.5vw, 3.9rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: #FBF6EC;
  margin: 0 0 16px;
  max-width: 16ch;
}
.hero-sub {
  color: #D2BFA4;
  font-size: 1.08rem;
  max-width: 52ch;
  margin: 0 0 34px;
}

/* Hero search */
.hero-search {
  display: flex;
  gap: 8px;
  background: var(--card);
  padding: 8px;
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  max-width: 720px;
}
.hero-search input, .hero-search select {
  font-family: var(--body);
  font-size: 0.95rem;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 12px 14px;
  outline-offset: -2px;
}
.hero-search input { flex: 1 1 auto; min-width: 0; }
.hero-search select {
  border-left: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  max-width: 175px;
}
.hero-search button {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 26px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.hero-search button:hover { background: var(--gold-dark); }

/* Category tiles */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  color: #E8DCC6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: rgba(255,255,255,0.14); color: #fff; }
.chip-active {
  background: var(--wheat);
  border-color: var(--wheat);
  color: var(--soil);
  font-weight: 600;
}

/* ---------- Directory ---------- */
.directory { padding: 44px 0 64px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  margin: 0;
}
.result-count {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* Secondary filter bar (kept for region + refine) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.filter-bar input, .filter-bar select {
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}
.filter-bar input { flex: 1 1 220px; }
.filter-bar button {
  font-family: var(--display);
  font-weight: 600;
  background: var(--soil);
  color: #FBF6EC;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
}
.filter-bar button:hover { background: var(--soil-3); }

/* Listing cards */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.loading, .empty { color: var(--muted); font-style: italic; }
.empty-state { grid-column: 1 / -1; padding: 36px 0; text-align: center; }
.empty-hint { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }

.row {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.row:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

.row-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--soil-2), var(--soil-3));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-thumb .thumb-initials {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  color: rgba(244, 248, 238, 0.42);
  letter-spacing: 0.02em;
}

.row-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.row-name { margin: 0; font-size: 1.08rem; }
.row-link {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-link:hover { color: var(--gold-dark); }
.row-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.row-desc {
  margin: 6px 0 0;
  color: #6B5747;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-other-trades {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--body);
  font-style: italic;
  font-size: 0.8rem;
}
.row-contact {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gold-dark);
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.row-contact a { position: relative; z-index: 1; }

/* Free tier: shorter blurb, and contact details live on the detail page
   rather than on the card. Featured listings keep the full description
   and tap-to-call / website links inline. */
.row-desc-free {
  -webkit-line-clamp: 1;
}
.row-contact-free .view-details {
  color: var(--muted);
  font-weight: 500;
}
.row:hover .row-contact-free .view-details { color: var(--gold-dark); }

.badge-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ochre);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
}
.row-featured { outline: 2px solid var(--ochre); outline-offset: -2px; }
.badge-new {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--wheat);
  color: var(--soil);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 2px;
}
.badge-verified {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid currentColor;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* ---------- Pricing / get listed ---------- */
.pricing { padding: 24px 0 64px; }
.pricing .section-head { margin-bottom: 6px; }
.pricing-sub { color: var(--muted); margin: 0 0 24px; max-width: 56ch; }
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.tier {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 26px 28px;
}
.tier-feat { outline: 2px solid var(--ochre); outline-offset: -2px; position: relative; }
.tier h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 2px;
}
.tier-price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
.tier-price span { font-family: var(--body); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.tier ul { margin: 0 0 20px; padding-left: 18px; color: #6B5747; font-size: 0.93rem; }
.tier li { margin-bottom: 6px; }
.tier .contact-btn { display: inline-block; }

/* ---------- Listing form ---------- */
.list-business { background: var(--card); border-top: 1px solid var(--line); padding: 56px 0 72px; }
.list-business h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.7rem;
  margin: 0 0 6px;
}
.list-business > .wrap > p { color: var(--muted); }
.listing-form { margin-top: 26px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.grid2 label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B5747;
  gap: 7px;
}
.grid2 .full { grid-column: 1 / -1; }
.grid2 input, .grid2 select, .grid2 textarea {
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paddock);
  color: var(--ink);
}
.listing-form button {
  margin-top: 20px;
  font-family: var(--display);
  font-weight: 600;
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 10px;
  cursor: pointer;
}
.listing-form button:hover { background: var(--gold-dark); }
.form-note { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Listing detail page ---------- */
.listing-page { padding: 44px 0 72px; }
.crumb { font-family: var(--mono); font-size: 0.78rem; margin: 0 0 26px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.detail-head h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 6px 0 0;
  line-height: 1.08;
}
.detail-badge { position: static; }

.gallery { display: grid; gap: 12px; margin: 26px 0; }
.gallery-full { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.gallery-single { grid-template-columns: 1fr; max-width: 540px; }
.gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: var(--shadow);
}
/* Portrait-oriented photos get a taller box instead of a hard 4:3 crop,
   so faces/work aren't cut off top and bottom. Detected in listing.js
   after the image loads (naturalHeight > naturalWidth). */
.gallery img.is-portrait {
  aspect-ratio: 3 / 4;
}

.detail-desc { font-size: 1.06rem; max-width: 64ch; margin: 24px 0; }

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 28px;
}
.detail-facts div {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px 18px;
  margin: 0;
}
.detail-facts dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-facts dd { margin: 3px 0 0; font-weight: 600; font-size: 0.96rem; }

.detail-contact { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.contact-btn:hover { background: var(--gold-dark); }
.contact-btn.secondary {
  background: var(--card);
  color: var(--gold-dark);
  box-shadow: inset 0 0 0 1.5px var(--gold-dark);
}
.contact-btn.secondary:hover { background: #F3EADA; }

.detail-note {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 18px;
}

/* "Report incorrect details" — deliberately understated so it reads as a
   quiet utility link, not a call to action competing with the contact buttons. */
.report-link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.report-link:hover { color: var(--gold-dark); }
.report-box {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 14px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.report-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B5747;
  margin-bottom: 10px;
}
.report-box select, .report-box textarea {
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paddock);
  color: var(--ink);
}
.report-box button { border: none; cursor: pointer; align-self: flex-start; }
.report-box button:disabled { opacity: 0.6; cursor: default; }

.upgrade-box {
  margin-top: 42px;
  padding: 26px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--ochre);
}
.upgrade-box h2 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin: 0 0 6px; }
.upgrade-box p { margin: 0 0 16px; font-size: 0.95rem; max-width: 54ch; color: #6B5747; }
.upgrade-box button { border: none; cursor: pointer; }
.upgrade-box button:disabled { opacity: 0.6; cursor: default; }

.upgrade-banner {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--gold);
  color: #fff;
  padding: 13px 18px;
  border-radius: 10px;
  margin: 0 0 24px;
}

/* ---------- Category cross-links ---------- */
.cat-links {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cat-links .row-meta { width: 100%; margin: 0 0 8px; position: static; }
.cat-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--gold-dark);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 8px 16px;
}
.cat-links a:hover { box-shadow: var(--shadow-lift); }

/* ---------- Admin ---------- */
.admin-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B5747;
  margin-bottom: 10px;
}
.admin-panel input, .admin-panel select {
  font-family: var(--body);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paddock);
  color: var(--ink);
}
.admin-panel button { border: none; cursor: pointer; align-self: flex-start; }
.admin-panel button:disabled { opacity: 0.6; cursor: default; }

.category-checkboxes { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0; }
.cat-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0 !important;
  cursor: pointer;
}
.cat-checkbox input[type="checkbox"] { width: auto; cursor: pointer; }
.cat-checkbox input[type="checkbox"]:disabled + span { opacity: 0.4; }
.category-limit-note { font-size: 0.78rem; color: var(--muted); margin: 0 0 4px; }

.admin-photo { margin: 0; position: relative; }
.admin-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: block;
}
.photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--rust);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}

.review-card { align-items: stretch; }
.review-actions { display: flex; gap: 10px; margin-top: 16px; }
.review-actions .approve-btn { background: var(--gold); color: #fff; border: none; cursor: pointer; }
.review-actions .approve-btn:hover { background: var(--gold-dark); }
.review-actions .reject-btn {
  background: transparent;
  color: var(--rust);
  box-shadow: inset 0 0 0 1.5px var(--rust);
  border: none;
  padding: 13px 22px;
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
}
.review-actions .reject-btn:hover { background: rgba(163, 68, 36, 0.07); }
.status-note { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-foot { background: var(--soil); padding: 26px 0; }
.site-foot p {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #C0A88C;
  margin: 0;
}

/* Category links in the footer sit on the dark soil background, so this is
   a deliberately separate style from .cat-links (used on category pages,
   which have a light background) rather than a shared class. */
.footer-cat-links {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.footer-cat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #C0A88C;
  width: 100%;
  margin: 0 0 8px;
}
.footer-cat-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--soil);
  background: var(--wheat);
  border-radius: 999px;
  padding: 8px 16px;
}
.footer-cat-links a:hover { opacity: 0.9; }

/* ---------- A11y & responsive ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--wheat);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
  .hero { padding: 54px 0 64px; }
  .hero-search { flex-wrap: wrap; }
  .hero-search select { border-left: none; max-width: none; flex: 1 1 45%; }
  .hero-search button { flex: 1 1 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
  .detail-contact .contact-btn { flex: 1 1 100%; text-align: center; }
  .site-nav a:not(:last-child) { display: none; }
  .site-nav a:last-child {
    font-size: 0.8rem;
    padding: 9px 14px;
    white-space: nowrap;
  }
}
