/* ============================================
   United Lone Enterprises — Global Stylesheet
   ============================================ */

:root {
  --ink:        #0a0a0a;
  --ink-soft:   #1d1d1d;
  --paper:      #ffffff;
  --paper-warm: #f5f3ee;
  --rule:       #d8d6d0;
  --muted:      #6b6b6b;
  --accent:     #b8843a;   /* heritage gold */
  --accent-dk:  #8a5f24;

  --speedfast:  #E31837;   /* Speed Red — matches speedfast.store brand */
  --medicine:   #2a6f97;   /* clinical blue */
  --pharma:     #3f7d57;   /* apothecary green */
  --paper-pulp: #5a4a36;   /* kraft brown */

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h4 { font-size: 1.15rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

p { margin: 0 0 1em 0; }
p.lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.55; max-width: 64ch; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1.25rem;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(64px, 9vw, 130px) 0;
}

.section--warm  { background: var(--paper-warm); }
.section--ink   { background: var(--ink); color: var(--paper); }
.section--ink .eyebrow { color: rgba(255,255,255,0.55); }
.section--ink p { color: rgba(255,255,255,0.78); }

.grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.92rem;
}
.nav__brand .mark {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 10px;
  margin-right: 6px;
  letter-spacing: 0.18em;
}
.nav__brand .lone { padding: 6px 4px; letter-spacing: 0.18em; }

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 0.93rem;
  font-weight: 500;
}
.nav__links a {
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--ink);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 820px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { display: block; padding: 14px var(--gutter); border-top: 1px solid var(--rule); }
  .nav__toggle { display: inline-block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: transparent; color: var(--paper); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: gap 0.2s ease;
}
.arrow-link:hover { gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(60px, 10vw, 120px);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 { margin-bottom: 24px; }
.hero p.lead { max-width: 50ch; }

.hero__meta {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
  font-size: 0.92rem;
  color: var(--muted);
}
.hero__meta dt { font-weight: 700; color: var(--ink); margin-top: 18px; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }
.hero__meta dt:first-child { margin-top: 0; }
.hero__meta dd { margin-top: 4px; }

/* ---------- Section header ---------- */
.section-head {
  max-width: 800px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head h2 { margin-bottom: 18px; }

/* ---------- Division cards ---------- */
.division-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
@media (max-width: 880px) { .division-grid { grid-template-columns: 1fr; } }

.division-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(32px, 4vw, 56px);
  background: var(--paper);
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.division-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color, var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}
.division-card:hover { background: var(--paper-warm); }
.division-card:hover::before { transform: scaleY(1); }

.division-card .num {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.division-card h3 { margin-bottom: 12px; }
.division-card p { color: var(--muted); margin-bottom: 28px; }
.division-card .arrow-link { margin-top: auto; }

.division-card[data-division="speedfast"]    { --accent-color: var(--speedfast); }
.division-card[data-division="medicine"]     { --accent-color: var(--medicine); }
.division-card[data-division="pharma"]       { --accent-color: var(--pharma); }
.division-card[data-division="paper"]        { --accent-color: var(--paper-pulp); }

/* ---------- Stat row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 36px 28px;
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
@media (max-width: 720px) {
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat:nth-child(odd) { border-right: 1px solid var(--rule); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}
.stat .num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}
.stat .label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Two-column feature ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.feature--reverse .feature__media { order: 2; }
@media (max-width: 880px) {
  .feature, .feature--reverse { grid-template-columns: 1fr; }
  .feature--reverse .feature__media { order: 0; }
}
.feature__media {
  aspect-ratio: 4 / 5;
  background: var(--paper-warm);
  position: relative;
  overflow: hidden;
}
.feature__media svg { width: 100%; height: 100%; }

/* ---------- Division hero (sub-pages) ---------- */
.division-hero {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
  color: var(--paper);
  overflow: hidden;
}
.division-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
.division-hero > * { position: relative; z-index: 2; }
.division-hero h1 { color: var(--paper); }
.division-hero p { color: rgba(255,255,255,0.85); max-width: 60ch; }
.division-hero .container { position: relative; z-index: 2; }
.division-hero .eyebrow { color: rgba(255,255,255,0.7); }

.division-hero--speedfast { background: var(--speedfast); }
.division-hero--medicine  { background: var(--medicine); }
.division-hero--pharma    { background: var(--pharma); }
.division-hero--paper     { background: var(--paper-pulp); }

/* ---------- Insight cards ---------- */
.insight {
  padding: 36px 28px;
  border: 1px solid var(--rule);
  background: var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.insight:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.insight .ico {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: var(--paper-warm);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
}
.insight h4 { margin-bottom: 10px; }
.insight p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Industry context ---------- */
.industry {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 90px);
}
@media (max-width: 880px) { .industry { grid-template-columns: 1fr; } }
.industry__points { list-style: none; }
.industry__points li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.industry__points li:first-child { border-top: 1px solid var(--rule); }
.industry__points .num {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--muted);
}
.industry__points h4 { margin-bottom: 6px; }
.industry__points p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* ---------- Quote ---------- */
.quote {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.quote cite {
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 32px;
  font-size: 0.9rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 820px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }
.footer h5 {
  color: var(--paper);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: var(--sans);
  font-weight: 700;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a:hover { color: var(--paper); }
.footer__brand p { margin-top: 14px; max-width: 28ch; line-height: 1.55; }
.footer__bottom {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.form input, .form textarea, .form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 0;
  border-color: var(--ink);
}
.form textarea { min-height: 140px; resize: vertical; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--rule); margin: 0; border: 0; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--paper-warm);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 6px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
