/* Compass Logistics — marketing site
 * Brand tokens: drayage-quote-demo/docs/wix-design-tokens.json
 * Layout faithfully recreates the Wix-built ontariocompass.com pages
 * using semantic markup + responsive grid (no Wix runtime).
 */

/* -------- design tokens -------- */
:root {
  --navy: #162b6f;
  --navy-deep: #0f1f54;
  --navy-darker: #0a1640;
  --orange: #ff9a2c;
  --orange-deep: #ee8a18;
  --teal: #2dc0b3;
  --white: #ffffff;
  --paper: #fafbff;
  --ink: #1a2240;
  --ink-soft: #4a5378;
  --line: #d8def0;

  --gradient-teal-blue: linear-gradient(120deg, #2dc0b3 0%, #1f7fbf 50%, #162b6f 100%);
  --gradient-blue: linear-gradient(180deg, #1f3aa6 0%, #162b6f 100%);

  --shadow-card: 0 10px 30px rgba(15, 31, 84, 0.08);

  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Nunito Sans", "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;

  --radius-card: 6px;
  --shell: 1200px;
}

/* -------- reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  line-height: 1.15;
}
p { margin: 0 0 1em; }

/* -------- shell -------- */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------- skip link -------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

/* -------- locale switcher (white header variant) --------
 * Smaller than nav links to read as secondary chrome. The globe is a
 * <button>, not decoration — clicking it toggles between en/zh so users
 * who reach for the icon (rather than the EN/中文 text) get the expected
 * behavior.
 */
.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 6px;
  border-radius: 999px;
  background: rgba(22, 43, 111, 0.04);
  border: 1px solid rgba(22, 43, 111, 0.12);
}
.locale-globe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}
.locale-globe-btn:hover { color: var(--navy); }
.locale-globe-btn .icon-globe {
  width: 13px;
  height: 13px;
}
.locale-btn {
  border: 0;
  border-radius: 999px;
  padding: 3px 9px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.locale-btn:hover { color: var(--navy); }
.locale-btn.is-active {
  background: var(--orange);
  color: var(--white);
}

/* visually hidden but available to screen readers (form labels) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------- header / nav -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.brand-link { display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav { display: flex; align-items: center; }
.primary-nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.primary-nav-link:hover,
.primary-nav-link.is-active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--radius-card);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }

/* -------- buttons -------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: var(--radius-card);
  text-align: center;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-deep); }
.btn-outline-light {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--white);
}
.btn-outline-light:hover { background: transparent; color: var(--white); }

/* -------- hero (home) -------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(10, 22, 64, 0.35) 0%, rgba(10, 22, 64, 0.55) 100%),
    url("/marketing/images/hero-ship.jpg") center/cover no-repeat;
  min-height: 640px;
  display: flex;
  align-items: center;
}
.hero-content { text-align: center; padding: 120px 0; width: 100%; }
.hero-title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.hero-subtitle {
  font-size: clamp(18px, 2.4vw, 24px);
  margin-bottom: 40px;
  opacity: 0.95;
}
.hero .btn-primary {
  padding: 36px 120px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(255, 154, 44, 0.35);
}

/* -------- generic section -------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-orange-title {
  text-align: center;
  color: var(--orange);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  margin-bottom: 16px;
}
.section-lede {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-soft);
}

/* -------- gradient bands -------- */
.band-teal-blue {
  background: var(--gradient-teal-blue);
  color: var(--white);
}
.band-blue {
  background: var(--gradient-blue);
  color: var(--white);
}
.band-title {
  text-align: center;
  color: var(--white);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 40px;
}
.band-title--left { text-align: left; }

/* -------- service grid (home) -------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.svc-card {
  background: var(--navy-deep);
  border-radius: var(--radius-card);
  padding: 64px 28px 40px;
  text-align: center;
  position: relative;
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.svc-card-num {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.svc-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.svc-card-text {
  font-size: 14px;
  opacity: 0.92;
  margin: 0;
}

.learn-more-row { text-align: center; margin-top: 40px; }

/* -------- mid-band image (home) -------- */
.image-band {
  width: 100%;
  height: clamp(280px, 36vw, 480px);
  background-size: cover;
  background-position: center;
}

/* -------- inline quote/contact form on home -------- */
.lead-form-cta {
  text-align: center;
  margin: 24px 0 0;
}
.lead-form-cta .btn {
  font-size: 16px;
  padding: 14px 36px;
}
.lead-form-divider {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 32px 0 12px;
}
.lead-form-wrap { max-width: 720px; margin: 0 auto; padding-top: 8px; }
.lead-form-thumb {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-card);
  margin: 0 auto 16px;
}
.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.lead-form input,
.lead-form textarea {
  width: 100%;
  font: inherit;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--white);
  color: var(--ink);
}
.lead-form input:focus,
.lead-form textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange);
}
.lead-form .span-2 { grid-column: span 2; }
.lead-form textarea { min-height: 120px; resize: vertical; }
.lead-form .form-actions {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.lead-form .form-status {
  font-size: 14px;
  color: var(--ink-soft);
}
.lead-form .form-status[data-state="error"]   { color: #b32424; }
.lead-form .form-status[data-state="success"] { color: #1d7a3a; }

/* honeypot — invisible to users, present for bots */
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* -------- about page -------- */
.about-overview {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-overview-img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  width: 100%;
  /* Original Wix render is portrait (image is 426×638 ratio).
   * Force a portrait box so wide viewports don't squash it. */
  aspect-ratio: 426 / 638;
  object-fit: cover;
  object-position: center;
}
.about-orange-title {
  color: var(--orange);
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: 16px;
}
.about-block-title {
  color: var(--navy);
  font-weight: 700;
  margin: 16px 0 4px;
}
.social-row {
  display: flex; gap: 12px; margin-top: 16px;
}
.social-row a img { width: 28px; height: 28px; }

.history-title { text-align: left; max-width: var(--shell); }
.about-history-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  opacity: 0.92;
}

.strengths-card {
  background: var(--navy-deep);
  border-radius: var(--radius-card);
  padding: 56px;
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.strengths-card h2 { color: var(--white); margin-bottom: 32px; }
.strengths-list {
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 24px;
  column-gap: 32px;
  margin: 0;
  padding: 0;
}
/* Each <dt>/<dd> row gets a thin orange left-border accent (matches the
 * original Wix layout). Uses border-inline-start so it flips correctly
 * for RTL — though we're LTR-only today, it costs nothing. */
.strengths-list dt {
  font-weight: 700;
  color: var(--white);
  padding-left: 14px;
  border-inline-start: 3px solid var(--orange);
}
.strengths-list dd {
  margin: 0;
  padding-left: 14px;
  opacity: 0.92;
  border-inline-start: 3px solid rgba(255, 154, 44, 0.32);
}

.licenses-band {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  margin-top: 0;
}
.licenses-text {
  background: var(--orange);
  color: var(--white);
  padding: 56px 48px;
}
.licenses-text h2 { color: var(--white); }
.licenses-text ul { padding-left: 20px; }
.licenses-text li { margin-bottom: 8px; }
.licenses-img {
  background-size: cover;
  background-position: center;
  min-height: 320px;
}

/* -------- services page -------- */
.services-hero {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr;
  align-items: center;
  background: var(--paper);
}
.services-hero-title {
  background: var(--orange);
  color: var(--white);
  padding: 88px 48px;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}
.services-hero-lede {
  padding: 32px 48px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.55;
  max-width: 560px;
}

.svc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.svc-detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--gradient-blue);
  color: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.svc-detail-img {
  background-size: cover;
  background-position: center;
  min-height: 220px;
}
.svc-detail-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.svc-detail-body p { font-size: 14px; margin: 0; opacity: 0.95; }
.svc-detail-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--white);
}

/* -------- contact page -------- */
.contact-cta-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--shell);
  margin: 48px auto 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.contact-cta-img {
  background-size: cover;
  background-position: center;
  min-height: 220px;
}
.contact-cta-text {
  background: var(--orange);
  color: var(--white);
  padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.contact-cta-text h2 {
  color: var(--white); font-size: 28px; font-weight: 600; margin: 0;
}
.contact-cta-text .btn-outline-light {
  align-self: flex-start;
  padding: 11px 24px;
  font-size: 14px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
  padding-top: 16px;
}
.contact-info { font-size: 16px; }
.contact-info h2 {
  color: var(--white);
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: 24px;
}
.contact-info-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}
.contact-info-item .icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
}
.contact-info-item a { color: var(--white); text-decoration: underline; }

.contact-form { display: grid; gap: 14px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-card);
  background: rgba(255,255,255,0.18);
  color: var(--white);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.85); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  background: rgba(255,255,255,0.28);
}
.contact-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .form-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
}
.contact-form .form-status { font-size: 14px; color: var(--white); }
.contact-form .form-status[data-state="error"]   { color: #ffd7d7; }
.contact-form .form-status[data-state="success"] { color: #d6ffd9; }

/* -------- legal pages (privacy, terms) -------- */
.legal-page { padding: 64px 0; }
.legal-page .shell { max-width: 760px; }
.legal-page h1 { color: var(--orange); font-size: 36px; margin-bottom: 8px; }
.legal-page .legal-updated { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }
.legal-page h2 { color: var(--navy); margin-top: 32px; }
/* English-authoritative banner for translated legal pages; empty in EN */
.legal-page .legal-note {
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 24px;
}
.legal-page .legal-note:empty { display: none; }

/* -------- footer -------- */
.site-footer {
  background: var(--gradient-teal-blue);
  color: var(--white);
  padding: 32px 0;
  text-align: center;
}
.footer-brand { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.footer-tag   { font-size: 13px; opacity: 0.92; margin: 0; }
/* Legal links live in a small, low-contrast row so they don't compete
 * with the brand line — original Wix omits them entirely, but the
 * privacy/terms links need to stay one click away for compliance. */
.footer-links { margin-top: 10px; font-size: 12px; opacity: 0.7; }
.footer-links a { margin: 0 6px; text-decoration: underline; }
.footer-copy  { font-size: 12px; opacity: 0.85; margin-top: 8px; }

/* -------- cookie consent banner -------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  margin: 0 auto;
  max-width: 720px;
  background: var(--navy-deep);
  color: var(--white);
  padding: 18px 22px;
  border-radius: var(--radius-card);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner-body { margin: 0; flex: 1 1 320px; font-size: 14px; }
.cookie-banner-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.cookie-banner .btn { padding: 10px 18px; font-size: 13px; }
.cookie-banner .btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.cookie-banner .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* -------- responsive -------- */
@media (max-width: 1080px) {
  /* Six-item nav crowds at small laptop widths — tighten gap + drop one
   * size class so it stays single-line until the hamburger kicks in. */
  .primary-nav-list { gap: 18px; }
  .primary-nav-link { font-size: 14px; }
  .header-actions { gap: 16px; }
}

@media (max-width: 960px) {
  .svc-grid { grid-template-columns: 1fr; gap: 32px 16px; }
  .svc-grid .svc-card { padding-top: 56px; padding-bottom: 32px; }
  .about-overview { grid-template-columns: 1fr; }
  .about-overview-img { aspect-ratio: 16 / 9; max-height: 360px; }
  .strengths-list { grid-template-columns: 1fr; row-gap: 16px; }
  .strengths-list dt { margin-top: 8px; }
  .licenses-band { grid-template-columns: 1fr; }
  .services-hero { grid-template-columns: 1fr; }
  .services-hero-title { font-size: 28px; padding: 40px 24px; }
  .services-hero-lede  { padding: 24px; }
  .svc-detail-grid     { grid-template-columns: 1fr; }
  .contact-cta-band    { grid-template-columns: 1fr; }
  .contact-grid        { grid-template-columns: 1fr; }
  .lead-form           { grid-template-columns: 1fr; }
  .lead-form .span-2   { grid-column: span 1; }
  .lead-form .form-actions { grid-column: span 1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .header-actions { gap: 8px; }
  .locale-switch { padding-left: 8px; }
  .locale-btn { padding: 6px 10px; font-size: 12px; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px;
    gap: 0;
  }
  .primary-nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .primary-nav-link.is-active { border-bottom-color: var(--orange); }
  .hero-content { padding: 64px 0; }
  .section { padding: 56px 0; }
}
