/* Tribii website. Warm ivory canvas, near-black type and logo, warm fawn as the accent.
   One clean system sans throughout; dark mode follows the visitor's phone. */
:root {
  --bg: #FAF6EF;            /* warm ivory */
  --bg-deep: #F1E8DA;
  --surface: #FFFDF9;
  --text: #161412;          /* near-black */
  --text-muted: #5E564D;
  --ink: #161412;           /* headings, logo, primary buttons */
  --on-ink: #FAF6EF;
  --fawn: #C9A47E;          /* warm fawn: rules, rings, highlights, icon fills */
  --fawn-strong: #82613F;   /* fawn dark enough for text and links on ivory (AA) */
  --fawn-soft: #EFE3D3;
  --line: #E7DDCD;
  --line-strong: #D6C8B3;
  --radius: 12px;
  --max: 1120px;
  --prose: 720px;
  --gutter: 20px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --bg-deep: #1B1917;
    --surface: #211E1B;
    --text: #F4EEE6;
    --text-muted: #B9AE9F;
    --ink: #F4EEE6;
    --on-ink: #121110;
    --fawn: #D8B791;
    --fawn-strong: #D8B791;
    --fawn-soft: #2C2620;
    --line: #2E2A26;
    --line-strong: #463F38;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
a { color: var(--fawn-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 16px; row-gap: 2px; min-height: 64px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
/* Approved Tribii logo (one colour): the traced symbol and wordmark are drawn through CSS masks,
   so they are near-black on ivory and ivory in dark mode. */
.brand-symbol, .brand-wordmark, .footer-symbol { display: block; flex: none; background: var(--ink); }
.brand-symbol { width: 31px; height: 32px; -webkit-mask: url(/assets/tribii-symbol.svg) center / contain no-repeat; mask: url(/assets/tribii-symbol.svg) center / contain no-repeat; }
.brand-wordmark { height: 22px; aspect-ratio: 524 / 176; -webkit-mask: url(/assets/tribii-wordmark.svg) center / contain no-repeat; mask: url(/assets/tribii-wordmark.svg) center / contain no-repeat; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-symbol { width: 18px; height: 19px; background: var(--text-muted); -webkit-mask: url(/assets/tribii-symbol.svg) center / contain no-repeat; mask: url(/assets/tribii-symbol.svg) center / contain no-repeat; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 560px) {
  .nav { gap: 16px; flex-wrap: wrap; row-gap: 0; }
  .nav .nav-secondary { display: none; } /* in the footer on phones */
}

/* ---------- Shared type ---------- */
h1, h2, h3 { color: var(--ink); }
h2 { font-weight: 700; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 14px; }
.section-kicker, .eyebrow { color: var(--fawn-strong); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12.5px; margin: 0 0 12px; }
.body-lg { font-size: 18px; color: var(--text-muted); max-width: 46ch; margin: 0; }
section { padding-block: 64px; }
@media (min-width: 900px) { section { padding-block: 88px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--ink); color: var(--on-ink); font-size: 16px; }
.btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--fawn)); color: var(--on-ink); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--fawn-soft); color: var(--ink); }
.wa-icon { width: 20px; height: 20px; flex: none; }
.contact-actions, .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 56px; overflow: hidden; position: relative; }
.hero-grid { display: grid; gap: 44px; position: relative; }
@media (min-width: 900px) { .hero { padding-block: 72px 96px; } .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-dot { width: 22px; height: 2px; background: var(--fawn); }
.hero h1 { font-weight: 800; font-size: clamp(40px, 7.6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; margin: 18px 0 18px; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--fawn-strong); }
.lead { font-size: clamp(18px, 2.1vw, 20px); color: var(--text-muted); max-width: 44ch; margin: 0 0 26px; }
.hero-actions { margin: 0 0 26px; }
.promise { margin: 0 0 10px; font-weight: 800; font-size: 14px; letter-spacing: 0.16em; color: var(--ink); }
.tagline { display: inline-block; margin: 0 0 14px; font-weight: 700; font-size: 17px; color: var(--ink); border-left: 3px solid var(--fawn); padding: 2px 0 2px 12px; }
.tagline span { color: var(--fawn-strong); }
.launch { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Collage (owner-supplied and licensed photos — illustration only) ---------- */
.collage { position: relative; min-height: 480px; max-width: 440px; width: 100%; margin: 0 auto 28px; }
@media (min-width: 900px) { .collage { min-height: 540px; } }
.tile { position: absolute; margin: 0; background: var(--surface); border-radius: var(--radius); padding: 6px; box-shadow: 0 18px 40px -24px rgba(22, 20, 18, 0.45); }
.tile img { display: block; width: 100%; height: auto; border-radius: 8px; object-fit: cover; background: var(--bg-deep); }
.tile-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 6px 3px; }
.tile-a { width: 56%; left: 0; top: 64px; transform: rotate(-1.5deg); }
.tile-a img { aspect-ratio: 4 / 5; }
.tile-b { width: 46%; right: 0; top: 66px; transform: rotate(2deg); }
.tile-b img { aspect-ratio: 1; }
.tile-c { width: 52%; right: 2%; bottom: 56px; transform: rotate(-0.75deg); }
.tile-c img { aspect-ratio: 16 / 11; }
.stories { position: absolute; left: 0; top: 0; display: flex; gap: 8px; z-index: 2; }
.story { width: 48px; height: 48px; border-radius: 50%; padding: 2px; background: var(--fawn); display: inline-block; }
.story img { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid var(--bg); object-fit: cover; display: block; background: var(--bg-deep); }
.profile-chip { position: absolute; left: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 7px 10px 7px 7px; box-shadow: 0 14px 34px -20px rgba(22, 20, 18, 0.5); font-size: 14px; line-height: 1.25; color: var(--ink); }
.profile-chip small { color: var(--text-muted); font-size: 12px; }
.profile-chip .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--fawn); }
.profile-chip .follow { background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12.5px; margin-left: 6px; }
.collage-note { position: absolute; right: 0; bottom: -26px; font-size: 11.5px; color: var(--text-muted); }

/* ---------- Discover · Connect · Earn ---------- */
.how { border-top: 1px solid var(--line); }
.flow { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 28px; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.flow li { border-top: 2px solid var(--fawn); padding-top: 18px; }
.flow .num { color: var(--fawn-strong); font-size: 13px; font-weight: 800; letter-spacing: 0.16em; }
.flow h3 { margin: 6px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.flow p { margin: 0; color: var(--text-muted); }

/* ---------- Who it's for ---------- */
.audiences { background: var(--bg-deep); }
.audience-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .audience-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.audience h3 { font-size: 22px; margin: 0 0 8px; letter-spacing: -0.01em; }
.audience > p { color: var(--text-muted); margin: 0 0 18px; max-width: 44ch; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; font-size: 16.5px; color: var(--ink); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--fawn-soft); box-shadow: inset 0 0 0 1.5px var(--fawn); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 10px; width: 8px; height: 5px; border-left: 2px solid var(--fawn-strong); border-bottom: 2px solid var(--fawn-strong); transform: rotate(-45deg); }
.fine { margin: 18px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---------- Trust ---------- */
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .trust-list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.trust-list li { color: var(--text-muted); }
.trust-list b { color: var(--ink); }

/* ---------- Contact ---------- */
.contact-section { padding-top: 0; }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 48px; }
.contact h2 { margin-bottom: 4px; }
.contact p { margin: 0; color: var(--text-muted); }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: var(--prose); padding: 48px 0 72px; }
.prose h1 { font-weight: 800; font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.02em; margin: 0 0 6px; line-height: 1.15; }
.prose .updated { color: var(--text-muted); margin: 0 0 28px; font-size: 15px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); }
.note { background: var(--fawn-soft); border-left: 3px solid var(--fawn); padding: 14px 16px; border-radius: 6px; font-size: 15px; }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.placeholder { background: var(--bg-deep); border: 1px dashed var(--line-strong); border-radius: 4px; padding: 0 4px; font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--text-muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
