/* Trade Circle public pages. Mobile-first; widens to a centered column on larger screens. */
:root {
  --bg: #faf3e3;
  --card: #fffdf6;
  --text: #33241a;
  --muted: #77644f;
  --line: #e3d3ae;
  --brown: #4a2f1b;
  --brown-dark: #3a2413;
  --gold: #f2c230;
  --yellow: #ffb800;
  --hero-band: #ffb800;
  --ok: #4a2f1b;
  --warn: #9a5b00;
  --bad: #b3261e;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241a10;
    --card: #33241a;
    --text: #f7efdb;
    --muted: #c4ab84;
    --line: #57432c;
    --brown: #d9a45b;
    --brown-dark: #b57f3e;
    --ok: #d9a45b;
    --warn: #e5a73b;
    --bad: #f07b72;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.celebration {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #fff4cc;
  color: #4a3b00;
  font-weight: 600;
  text-align: center;
}

.hero {
  margin: 12px -16px 0;
  padding: 28px 20px 24px;
  background: var(--brand);
  color: var(--brand-text);
}

.hero h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; }
.hero .trade { margin: 4px 0 0; font-weight: 600; opacity: 0.9; }
.hero .tagline { margin: 10px 0 0; font-size: 1.05rem; }

@media (min-width: 720px) {
  .hero { margin: 16px 0 0; border-radius: var(--radius); }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
}

.badge-insurance_verified { color: var(--ok); border-color: currentColor; }
.badge-insurance_pending, .badge-unverified { color: var(--warn); border-color: currentColor; }
.badge-insurance_expired, .badge-cert_lapsed { color: var(--bad); border-color: currentColor; }
/* The two earned trust marks (trust build): the verified seal is SOLID —
   filled, white on green — and the document-on-file mark is an outline
   with a dashed edge and no fill. Different shapes and different words,
   on every surface, forever (scope §3.1). */
.badge-verified { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge-docfile { background: transparent; border-style: dashed; color: var(--muted); }
.trust-line { margin: 10px 0 0; font-size: 0.95rem; }
.showcase-entry { border-top: 1px solid var(--line, #ddd); padding: 12px 0; }
.showcase-doc { max-width: 100%; max-height: 320px; border: 1px solid var(--line, #ddd); border-radius: 6px; }
.showcase-expired { color: var(--bad); }
.badge-availability_available { color: var(--ok); border-color: currentColor; }
.badge-availability_booked { color: var(--bad); border-color: currentColor; }
.badge-availability_vacation { color: var(--warn); border-color: currentColor; }
.availability { margin: 10px 0 0; }

.actions {
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 12px;
  white-space: nowrap;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--brand); color: var(--brand-text); }
.btn[hidden] { display: none; }

.card {
  margin: 16px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card h2 { margin: 0 0 12px; font-size: 1.15rem; }

.photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .photos { grid-template-columns: repeat(3, 1fr); }
}

.photos img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--line);
}

.photos span { display: block; margin-top: 4px; font-size: 0.85rem; color: var(--muted); }

.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .badge, .list .muted { margin-left: 6px; }

.prose { white-space: pre-line; margin: 0; }
.muted { color: var(--muted); }

.quote-form { display: grid; gap: 12px; }
.quote-form label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95rem; }

.quote-form input,
.quote-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* stops iOS zooming into the field */
}

.quote-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--bad); }

.more, .back { margin: 20px 0 0; text-align: center; font-weight: 600; }
.back { text-align: left; }

/* The landing page's way into the full profile: button + tappable avatar. */
.profile-cta { display: flex; align-items: center; justify-content: center; gap: 12px; }
.profile-cta .btn { flex: none; padding: 0 28px; }
.avatar-link { display: inline-flex; border-radius: 50%; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-initials {
  background: var(--brand);
  color: var(--brand-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* The public pages' language selector: a slim bar above everything,
   the same four languages as the app's switcher. */
.lang-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
  padding: 8px 16px;
  background: var(--bg, #faf3e3);
  border-bottom: 2px solid var(--yellow, #ffb800);
  font-size: 0.85rem;
}
.lang-bar a { color: var(--text, #33241a); text-decoration: none; }
.lang-bar a:hover { text-decoration: underline; }
.lang-bar .lang-current { font-weight: 700; color: var(--text, #33241a); }
/* The language links are small text; padding gives them a thumb-sized
   target without changing the bar's slim look. */
.lang-bar a, .lang-bar .lang-current { display: inline-block; padding: 8px 2px; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px 32px;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a { padding: 10px 6px; }

/* --- payment page --- */
.pay-hero { text-align: center; }
.pay-to { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.pay-card { text-align: center; }
.pay-label { margin: 0; color: var(--muted); font-weight: 600; }
.pay-amount { margin: 4px 0 8px; font-size: clamp(2.6rem, 12vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.pay-note { margin: 8px 0 0; font-style: italic; }
.pay-form { display: grid; gap: 12px; margin-top: 16px; text-align: left; }
.pay-form .field { display: grid; gap: 4px; font-weight: 600; }
.pay-form input[name="amount"] { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 1.3rem; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; border: 0; }
.pay-methods legend { width: 100%; margin-bottom: 6px; font-weight: 600; }
.pay-methods label, .pay-form .check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 1.05rem; }
.pay-methods input, .pay-form .check input { width: 22px; height: 22px; }
.pay-button { min-height: 64px; font-size: 1.35rem; }
.small { font-size: 0.85rem; }
.notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.notice-ok { border-color: var(--ok); color: var(--ok); }
.notice-error { border-color: var(--bad); color: var(--bad); }

/* --- lead marketplace --- */
.quote-form select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.quote-form .check-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.quote-form .check-line input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.bid { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bid:last-child { border-bottom: 0; }
.bid form { margin-top: 8px; display: flex; }

/* --- front door (home page) --- */
/* Dark wood grain, shared by the site header and the brand stripe: plank
   tones in dark browns with darker streak lines running along the grain. */
.wood-grain {
  background-image:
    repeating-linear-gradient(93deg, rgba(0, 0, 0, 0.20) 0 2px, transparent 2px 29px),
    repeating-linear-gradient(93deg, rgba(255, 243, 214, 0.06) 0 1px, transparent 1px 19px),
    repeating-linear-gradient(93deg, #3e2716 0 46px, #4a2f1b 46px 92px, #46311e 92px 138px, #3a2413 138px 184px);
}
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 12px;
  color: #fff3d6;
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 243, 214, 0.25);
}
.wordmark { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 8px; }
.site-nav .btn { flex: none; min-height: 44px; padding: 0 18px; }
/* On the wood header the nav buttons are work yellow with brown text. */
.site-header .btn { background: var(--yellow); color: #33241a; border-color: rgba(0, 0, 0, 0.25); }
.home-hero h1 { font-size: 2rem; }

/* The brand stripe: a dark wood-grain band over a thin gold line. One class,
   reused under the site header and at the front-door hero's foot. The grain
   layers are sized to the top 8px; the gold shows through underneath. */
.brand-stripe {
  height: 11px;
  background-color: var(--gold);
  background-image:
    repeating-linear-gradient(93deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 23px),
    repeating-linear-gradient(93deg, rgba(255, 243, 214, 0.06) 0 1px, transparent 1px 15px),
    repeating-linear-gradient(93deg, #3e2716 0 18px, #4a2f1b 18px 36px, #46311e 36px 54px, #3a2413 54px 72px);
  background-size: 100% 8px;
  background-repeat: repeat-x;
  background-position: top left;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
/* The front-door hero is a bold work-yellow band with dark brown text,
   whatever the platform brand color is doing elsewhere on the page. The
   crew illustration sits inside it as a faded backdrop, behind the words
   and both call-to-action buttons; the copy layer rides above it. */
.home-hero { position: relative; overflow: hidden; background: var(--hero-band); color: var(--text); }
.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.22;
  pointer-events: none;
}
.home-hero .hero-copy { position: relative; z-index: 1; }
.home-hero .brand-stripe { position: relative; z-index: 1; margin: 24px -20px -24px; }
@media (min-width: 720px) {
  .home-hero .brand-stripe { border-radius: 0 0 var(--radius) var(--radius); }
}
/* The feature illustrations are light decoration, never the main event:
   small thumbnail spots inside their cards. */
.feature-art {
  display: block;
  width: 112px;
  height: auto;
  border-radius: 10px;
  margin: 0 0 10px;
}
/* The "What you get" grid is grouped by plan; the group heading carries the
   tier, so features need no per-card plan badges. */
.feature-group { margin: 20px 0 10px; font-size: 1.12rem; }
.feature-group:first-of-type { margin-top: 8px; }
.feature-grid { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature-grid h3 { margin: 0 0 4px; font-size: 1.02rem; }
.feature-grid h3 .badge { margin-left: 6px; vertical-align: 2px; }
.feature-grid p { margin: 0; color: var(--muted); }
@media (min-width: 560px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.price-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.plan h3 { margin: 0; font-size: 1.05rem; }
.plan .price { margin: 4px 0 8px; font-size: 1.6rem; font-weight: 800; }
.plan .texts { margin: 10px 0 0; font-size: 0.9rem; }
.copyright { margin: 24px 0 0; text-align: center; font-size: 0.85rem; color: var(--muted); }

/* --- customer reviews --- */
.stars { color: #d98e04; letter-spacing: 0.08em; }
.review-summary { margin: 0 0 4px; }
.review-response { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--bg); }
.review-response .prose { margin: 0; }
.review-form { gap: 10px; margin-top: 12px; text-align: left; }
.bid form.review-form { display: grid; }
.review-form .star-choice { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; min-height: 44px; font-size: 1.1rem; }
.review-form textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.review-shown { margin-top: 12px; }

/* --- legal pages (/privacy, /terms) --- */
/* Long-form reading inside the front-door card: roomier leading, headings
   that carry the section structure, and nothing wider than the column. */
.legal-doc { line-height: 1.65; overflow-wrap: break-word; }
.legal-doc h1 { margin: 0 0 14px; font-size: 1.55rem; line-height: 1.25; }
.legal-doc h2 { margin: 26px 0 8px; font-size: 1.18rem; }
.legal-doc h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul { margin: 0 0 12px; padding-left: 22px; }
.legal-doc li { margin: 0 0 6px; }
.legal-doc hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* --- mobile polish: narrow phones ---
   Buttons carry white-space: nowrap so a short label never breaks mid-word
   on desktop; on a phone that same rule lets a long (or translated) label
   spill out of its button. Below 560px the button rows stack full-width —
   the thumb-friendly pattern — and labels may wrap inside their button. */
@media (max-width: 560px) {
  .actions { flex-direction: column; }
  .btn { white-space: normal; text-align: center; }
  .site-header { flex-wrap: wrap; row-gap: 8px; }
  .site-nav { flex-wrap: wrap; justify-content: flex-end; }
  .site-nav .btn { padding: 0 12px; }
  .profile-cta { flex-wrap: wrap; }
  .hero h1 { overflow-wrap: break-word; }
}
