/* ───────────────────────────────────────────────────────────────
   FreightHedge marketing site — single stylesheet.
   Tokens mirror the brand package (freighthedge_brand_package).
   ─────────────────────────────────────────────────────────────── */

:root {
  /* Brand (purple is primary) */
  --brand-purple: #5c2a5d;
  --brand-purple-bold: #b05fb2;
  --brand-purple-light: #d6a7d7;
  --brand-purple-vlight: #f3e8fd;

  /* Accents — use sparingly */
  --teal: #00b8a9;
  --orange: #ff6b35;
  --gold: #f39c12;

  /* Neutrals — warm gray, per brand */
  --surface: #ffffff;
  --surface-hover: #e6e3e0;
  --surface-alert: #f3f4f6;
  --content-primary: #3a3531;
  --content-secondary: #6a655f;
  --content-border: #cdc8c4;
  --content-inverted: #ffffff;

  /* Status */
  --positive: #27ae60;
  --negative: #e74c3c;

  /* Typography */
  --font-sans: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(58, 53, 49, 0.06);
  --shadow-md: 0 8px 24px rgba(58, 53, 49, 0.08);
  --shadow-lg: 0 24px 60px rgba(58, 53, 49, 0.18);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--content-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--brand-purple); text-decoration: none; }
a:hover { color: var(--brand-purple-bold); text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--content-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 700; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}
.section-head p {
  color: var(--content-secondary);
  font-size: 1.1rem;
  margin: 0;
}
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-purple);
  margin-bottom: 1rem;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 14%,
    var(--brand-purple) 55%,
    #1a0d1c 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--content-inverted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
  color: var(--content-primary);
}
.brand:hover { text-decoration: none; color: var(--brand-purple); }
.brand-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.brand-name {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:not(.btn):hover { color: var(--content-inverted); text-decoration: none; }

/* CTA in header sits on the dark right-hand side — invert for contrast */
.site-header .btn-primary {
  background: var(--content-inverted);
  color: var(--brand-purple);
}
.site-header .btn-primary:hover {
  background: var(--brand-purple-vlight);
  color: var(--brand-purple);
}

@media (max-width: 600px) {
  .site-nav a:not(.btn) { display: none; }
  .site-header { padding: 0.4rem 1.1rem; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1.3rem; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-sm  { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg  { padding: 0.95rem 1.6rem; font-size: 1rem; }

.btn-primary {
  background: var(--brand-purple);
  color: var(--content-inverted);
}
.btn-primary:hover { background: var(--brand-purple-bold); color: var(--content-inverted); }

.btn-secondary {
  background: var(--surface);
  color: var(--brand-purple);
  border-color: var(--brand-purple);
}
.btn-secondary:hover { background: var(--brand-purple-vlight); color: var(--brand-purple); }

.btn-ghost {
  background: transparent;
  color: var(--content-inverted);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--content-inverted); }

/* ─── Hero ─── */
.hero {
  padding: 6rem 0 7rem;
  background:
    radial-gradient(70% 60% at 80% 10%, rgba(214, 167, 215, 0.28) 0%, transparent 60%),
    radial-gradient(60% 50% at 5% 95%, rgba(176, 95, 178, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, #4a1f4c 0%, #2f1330 100%);
  color: var(--content-inverted);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-purple-light);
  margin-bottom: 1.25rem;
}
.hero h1 { color: var(--content-inverted); }
.hero .accent { color: var(--brand-purple-light); }
.hero .lede {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 36rem;
  margin-top: 1.25rem;
}
.cta-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
/* On the dark hero, primary becomes inverted for legibility */
.hero .btn-primary {
  background: var(--content-inverted);
  color: var(--brand-purple);
}
.hero .btn-primary:hover { background: var(--brand-purple-vlight); color: var(--brand-purple); }
.hero-art { display: flex; justify-content: center; }
.hero-mark {
  width: min(360px, 100%);
  filter: drop-shadow(0 24px 60px rgba(176, 95, 178, 0.5));
}

@media (max-width: 800px) {
  .hero { padding: 3.5rem 0 4rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art { order: -1; }
  .hero-mark { width: 180px; }
}

/* ─── Value props ─── */
.value-props { padding: 6rem 0; background: var(--brand-purple-vlight); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--brand-purple-light);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: var(--brand-purple-vlight);
  border-radius: var(--radius-md);
  color: var(--brand-purple);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 {
  color: var(--content-primary);
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}
.card p { color: var(--content-secondary); margin: 0; font-size: 1rem; }

/* ─── How it works ─── */
.how { padding: 6rem 0; background: var(--surface); }
.steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: grid;
  gap: 2.5rem;
}
.step {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--content-border);
}
.step:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.step-content { max-width: 100%; }
.step-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-purple);
  margin: 0 0 0.75rem;
}
.step-content h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.step-content p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--content-secondary);
  line-height: 1.55;
}

/* ─── Contact ─── */
.contact { padding: 6rem 0; background: var(--brand-purple-vlight); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-copy h2 { color: var(--content-primary); }
.contact-copy .lede {
  color: var(--content-secondary);
  font-size: 1.1rem;
}

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ─── Form ─── */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > span {
  font-weight: 600;
  color: var(--content-primary);
  font-size: 0.85rem;
}
.field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--content-secondary);
  margin-left: 0.25rem;
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--content-primary);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--content-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px var(--brand-purple-vlight);
}
.field textarea { resize: vertical; min-height: 100px; }

/* Error state — applied by JS when validation fails */
.field.has-error input,
.field.has-error textarea {
  border-color: var(--negative);
  background: #fef6f5;
}
.field.has-error input:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-note { margin: 0; font-size: 0.8rem; color: var(--content-secondary); }
.form-status {
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.25rem;
  font-weight: 500;
}
.form-status.is-sending { color: var(--content-secondary); }
.form-status.is-success { color: var(--positive); }
.form-status.is-error   { color: var(--negative); }

/* Honeypot */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ─── Footer ─── */
.site-footer {
  background: var(--brand-purple);
  padding: 0.75rem 0;
  color: rgba(255, 255, 255, 0.8);
}
.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}
