/* ============================================================
   THRYVE SUPPLY — wholesale distributor site
   Design system tokens + reusable component classes.
   Font: Inter only. Motif: spec-sheet data rows, hairline
   dividers, structured grids — no lifestyle photography,
   no card-kit shadows, no centered hero cliché.
   ============================================================ */

:root {
  --ink: #141414;
  --gold: #b8912e;
  --paper: #faf8f4;
  --paper-2: #f1ede3;
  --text: #3a3a3a;
  --text-muted: #6b6b63;
  --line: #e4dfd3;
  --white: #ffffff;

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 3px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}

h4 { font-weight: 700; letter-spacing: -0.005em; }

p { margin: 0 0 1em; max-width: 68ch; color: var(--text); }
p:last-child { margin-bottom: 0; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ================= UTILITY BAR ================= */
.util-bar {
  background: var(--ink);
  color: rgba(250, 248, 244, 0.82);
}
.util-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 38px;
  font-size: 0.82rem;
  gap: 20px;
}
.util-bar a { color: inherit; }
.util-bar a:hover { color: var(--gold); }
.util-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.util-list li { display: flex; align-items: center; gap: 6px; }

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-right: auto;
}
.brand img { height: 44px; width: 44px; }

.main-nav { display: flex; gap: clamp(14px, 2.2vw, 28px); }
.main-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-color: var(--gold); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; color: var(--ink); font-weight: 600; font-size: 0.88rem; }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 6px var(--gutter) 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.mobile-nav a.btn { margin-top: 14px; padding: 14px 26px; border-bottom: none; color: var(--paper); }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-gold-line { border-color: var(--gold); color: var(--ink); background: transparent; }
.btn-gold-line:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* ================= SECTION SCAFFOLD ================= */
.section { padding: clamp(52px, 7vw, 96px) 0; }
.section-alt { background: var(--paper-2); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink h1, .section-ink h2, .section-ink h3, .section-ink h4 { color: var(--paper); }
.section-ink p { color: rgba(250, 248, 244, 0.75); }

.label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 1.02rem; }

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ================= HERO ================= */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
  padding-top: clamp(48px, 7vw, 90px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  max-width: 15ch;
  margin-bottom: 20px;
}
.hero .lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* snapshot panel: spec-sheet style, replaces hero photography */
.snapshot {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(26px, 3vw, 36px);
  border-radius: var(--radius);
}
.snapshot .snapshot-head {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(250, 248, 244, 0.16);
}
.spec-rows { display: grid; }
.spec-row {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(250, 248, 244, 0.12);
  font-size: 0.95rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt { color: rgba(250, 248, 244, 0.55); font-weight: 500; min-width: 0; }
.spec-row dd { margin: 0; color: var(--paper); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* light variant, used on paper background (about.html quick facts etc) */
.spec-rows.light .spec-row { border-bottom-color: var(--line); }
.spec-rows.light .spec-row dt { color: var(--text-muted); }
.spec-rows.light .spec-row dd { color: var(--ink); }

/* trust list: checklist variant of the snapshot panel */
.trust-list { display: grid; list-style: none; padding: 0; margin: 0; }
.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(250, 248, 244, 0.12);
  font-size: 0.95rem;
  color: rgba(250, 248, 244, 0.88);
  line-height: 1.45;
}
.trust-list li:last-child { border-bottom: none; }
.trust-check {
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  margin-top: 1px;
}

/* ================= FEATURE GRID (why work with us) ================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature {
  padding: 30px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature h3 { font-size: 1.08rem; margin-bottom: 10px; }
.feature p { color: var(--text-muted); font-size: 0.96rem; }
.feature .tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ================= BRAND STRIP ================= */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: 30px 0;
}
.brand-strip .brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.brand-strip .brand-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ================= CTA BANNER ================= */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
}
.cta-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 44px var(--gutter);
}
.cta-banner h2 { color: var(--paper); font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 22ch; }
.cta-banner p { color: rgba(250, 248, 244, 0.72); margin-top: 8px; }
.cta-banner .btn-primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.cta-banner .btn-primary:hover { background: #cba546; }

/* ================= CATEGORY BLOCKS (products.html) ================= */
.category-block {
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 36px);
  margin-bottom: 24px;
}
.category-block h3 { font-size: 1.35rem; margin-bottom: 10px; }
.category-block > p { color: var(--text-muted); margin-bottom: 18px; }
.subtype-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 24px;
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.subtype-list li {
  font-size: 0.94rem;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}
.subtype-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1.5px;
  background: var(--gold);
}

/* ================= BRAND CATALOG TABLES ================= */
.catalog-brand {
  margin-bottom: 40px;
}
.catalog-brand-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 4px;
}
.catalog-brand-head h3 { font-size: 1.3rem; }
.catalog-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.catalog-status.stocked { background: var(--ink); color: var(--paper); }
.catalog-status.pipeline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.catalog-brand > p { color: var(--text-muted); }

.inquiry-note {
  margin-top: 12px;
  padding: 20px 24px;
  border: 1px dashed var(--line);
  font-size: 0.94rem;
  color: var(--text-muted);
}
.inquiry-note strong { color: var(--ink); }

/* ================= QUICK FACTS (about.html) ================= */
.facts-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}

/* ================= FOUNDER PAGE ================= */
.headshot-frame {
  aspect-ratio: 4 / 5;
  border: 1.5px dashed var(--line);
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.headshot-frame span {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ================= FORMS ================= */
.form-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field.two-col { grid-template-columns: 1fr 1fr; display: grid; gap: 18px; margin-bottom: 0; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.field input, .field textarea, .field select {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-success {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.form-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 3px solid #b23b3b;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.form-error a { color: var(--ink); text-decoration: underline; }

.info-panel {
  background: var(--paper-2);
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
}
.info-panel h3 { font-size: 1rem; margin-bottom: 18px; }

/* ================= FOOTER ================= */
.site-footer { background: var(--ink); color: var(--paper); }
.footer-top { padding-top: clamp(48px, 6vw, 72px); padding-bottom: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand .brand { color: var(--paper); margin-bottom: 14px; }
.footer-brand p { color: rgba(250, 248, 244, 0.62); font-size: 0.92rem; }
.footer-grid h4 { font-size: 0.82rem; color: rgba(250, 248, 244, 0.9); margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { font-size: 0.92rem; color: rgba(250, 248, 244, 0.68); }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(250, 248, 244, 0.14);
  padding-top: 20px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(250, 248, 244, 0.5);
}

/* ================= PAGE HEADER (interior pages) ================= */
.page-head {
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--line);
}
.page-head .breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; }
.page-head .breadcrumb a:hover { color: var(--gold); }
.page-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); max-width: 22ch; }
.page-head .lede { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; margin-top: 12px; }

/* ================= LOADER ================= */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#site-loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-boxes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fall-box {
  position: absolute;
  top: -60px;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  opacity: 0.28;
  animation: box-fall linear infinite;
}
.loader-mark { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.loader-word { display: flex; overflow: hidden; }
.loader-word span {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  color: var(--paper);
  letter-spacing: -0.02em;
  display: inline-block;
  transform: translateY(110%);
  animation: loader-rise 0.55s cubic-bezier(.2,.8,.2,1) forwards;
}
.loader-rule {
  height: 2px;
  width: 0%;
  background: var(--gold);
  animation: loader-line 0.55s ease forwards;
  animation-delay: 0.95s;
}
.loader-sub {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(250, 248, 244, 0.62);
  opacity: 0;
  animation: loader-fade 0.55s ease forwards;
  animation-delay: 1.5s;
}
.loader-enter {
  margin-top: 10px;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--paper);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 30px;
  border-radius: var(--radius);
  opacity: 0;
  animation: loader-fade 0.55s ease forwards;
  animation-delay: 2.05s;
  pointer-events: none;
}
.loader-enter.ready { pointer-events: auto; }
.loader-enter:hover { background: var(--gold); color: var(--ink); }
@keyframes loader-rise {
  to { transform: translateY(0); }
}
@keyframes loader-line {
  to { width: 100%; }
}
@keyframes loader-fade {
  to { opacity: 1; }
}
@keyframes box-fall {
  from { transform: translateY(-10vh) rotate(0deg); }
  to { transform: translateY(110vh) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .loader-word span, .loader-rule, .loader-sub, .loader-enter {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    width: 100% !important;
  }
  .loader-enter { pointer-events: auto; }
  .loader-boxes { display: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .facts-layout, .form-layout { grid-template-columns: 1fr; }
  .field.two-col { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .util-bar { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-header .wrap { height: 72px; }
  .header-actions a.btn { display: none; }
  .cta-banner .wrap { flex-direction: column; align-items: flex-start; }
  .footer-bottom { justify-content: center; text-align: center; padding-bottom: 96px; }
}
