/* =========================================================
   BEGOLLI LLC — Port Drayage & Intermodal Logistics
   Stylesheet
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --navy: #0f2b46;
  --navy-deep: #0a1e32;
  --navy-soft: #163c5f;
  --steel: #5b6b7a;
  --steel-light: #eef1f4;
  --line: #d8dee5;
  --white: #ffffff;
  --ink: #16222e;
  --accent: #e65c00;
  --accent-dark: #c44e00;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Inter", system-ui, sans-serif;

  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(15, 43, 70, .06), 0 2px 8px rgba(15, 43, 70, .06);
  --shadow-md: 0 8px 24px rgba(15, 43, 70, .10);
  --shadow-lg: 0 18px 48px rgba(10, 30, 50, .18);
  --header-h: 76px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--white);
  padding: 12px 20px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--white); }

.container {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-lg { padding: 17px 34px; font-size: 15px; }

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(230, 92, 0, .28);
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  border-color: rgba(255, 255, 255, .55);
  backdrop-filter: blur(2px);
}
.btn-ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline:hover { background: var(--steel-light); color: var(--navy); border-color: var(--steel); }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link { display: flex; align-items: center; flex: 0 0 auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav ul a {
  position: relative;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
}
.main-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .2s ease;
}
.main-nav ul a:hover::after { width: 100%; }

/* Tracking bar */
.tracking-form {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.tracking-form:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 43, 70, .10);
}
.tracking-form input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: transparent;
}
.tracking-form input::placeholder { color: #93a1ae; }
.tracking-form button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  cursor: pointer;
  padding: 0 16px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color .18s ease;
}
.tracking-form button:hover { background: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 40px;
  padding: 0 8px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(88vh, 780px);
  padding: 96px 0 72px;
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 30, 50, .72) 0%, rgba(10, 30, 50, .35) 70%),
    rgba(0, 0, 0, .45);
}

.hero-inner { max-width: 820px; }

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #ffd9c0;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(3.2rem, 11vw, 7rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  max-width: 42ch;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 56px 0 0;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .18);
}
.hero-stats > div {
  background: rgba(10, 30, 50, .55);
  padding: 16px 18px;
}
.hero-stats dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.hero-stats dd {
  margin: 4px 0 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ---------- 6. Sections ---------- */
.section { padding: 84px 0; }
.section-steel { background: var(--steel-light); }
.section-navy { background: var(--navy); color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-lede { font-size: 1.05rem; color: var(--steel); }
.section-head-invert .section-lede { color: rgba(255, 255, 255, .74); }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: 1fr; }

/* ---------- 7. Service cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #c3ccd6;
}
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--steel-light); }
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-media img { transform: scale(1.05); }

.card-body { padding: 26px 26px 30px; position: relative; }
.card-index {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 8px;
}
.service-card h3 {
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--navy);
}
.service-card p { color: var(--steel); font-size: .97rem; }

/* ---------- 8. Spec table ---------- */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.spec-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .95rem;
}
.spec-table thead th {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 15px 20px;
  white-space: nowrap;
}
.spec-table tbody th,
.spec-table tbody td {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.spec-table tbody th {
  font-weight: 700;
  color: var(--navy);
  width: 27%;
}
.spec-table tbody td { color: var(--steel); }
.spec-table tbody tr:nth-child(even) { background: #f8fafb; }
.spec-table tbody tr:hover { background: #f1f5f8; }
.spec-table .num {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- 9. Portals ---------- */
.portal-grid { margin-bottom: 34px; }
.portal-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px 26px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  color: var(--white);
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.portal-card:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
  transform: translateY(-4px);
}
.portal-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.portal-card:hover .portal-tag { color: var(--accent-dark); }
.portal-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.12;
  text-transform: uppercase;
}
.portal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: .88rem;
  color: rgba(255, 255, 255, .68);
}
.portal-card:hover .portal-meta { color: var(--steel); }
.portal-arrow {
  font-size: 1.15rem;
  transition: transform .2s ease;
}
.portal-card:hover .portal-arrow { transform: translateX(5px); }

.quickpay {
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, .06);
  padding: 20px 24px;
  font-size: .95rem;
  color: rgba(255, 255, 255, .82);
}
.quickpay strong { color: var(--white); }

/* ---------- 10. About ---------- */
.about-grid {
  display: grid;
  gap: 46px;
  grid-template-columns: 1fr;
  align-items: start;
}
.about-copy h2 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.about-body {
  font-size: 1.06rem;
  color: var(--steel);
  margin-bottom: 30px;
}
.about-points { list-style: none; margin: 0; padding: 0; }
.about-points li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.about-points li:last-child { border-bottom: 1px solid var(--line); }
.point-k {
  display: block;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
}
.point-v { display: block; font-size: .94rem; color: var(--steel); margin-top: 4px; }

/* ---------- 11. Quote form ---------- */
.quote-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 26px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field-full { grid-column: 1 / -1; }

.field > label,
.field > legend {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 0;
}
.field > legend { margin-bottom: 10px; }

.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form select,
.quote-form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.quote-form textarea { resize: vertical; min-height: 120px; }
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: 0;
  background: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 43, 70, .10);
}
.quote-form input:user-invalid { border-color: #c0392b; }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: #fbfcfd;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.choice:hover { border-color: var(--steel); }
.choice input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.choice:has(input:checked) {
  border-color: var(--accent);
  background: #fff6f0;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.form-note { font-size: .9rem; color: var(--steel); }
.form-note a { font-weight: 600; }

.form-status {
  margin-top: 16px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--navy);
}
.form-status.is-error { color: #c0392b; }
.form-status.is-success { color: #1c7c4a; }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .72);
  padding: 62px 0 26px;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-logo {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--accent); font-weight: 400; }
.footer-col h4 {
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 10px;
}
.site-footer a { color: rgba(255, 255, 255, .88); }
.site-footer a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 22px;
  font-size: .86rem;
  color: rgba(255, 255, 255, .55);
}
.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- 13. Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 30, 50, .62);
  backdrop-filter: blur(4px);
  animation: fade .18s ease;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  width: 100%;
  max-width: 470px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 30px;
  text-align: left;
  animation: pop .22s cubic-bezier(.2, .8, .3, 1);
}
.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff1e7;
  color: var(--accent);
  margin-bottom: 18px;
}
.modal h2 {
  font-size: 1.7rem;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}
.modal p { color: var(--steel); font-size: .98rem; margin-bottom: 26px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.97) }
  to { opacity: 1; transform: none }
}

/* ---------- 14. Responsive ---------- */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.is-open { display: flex; }

  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav ul li { border-bottom: 1px solid var(--line); }
  .main-nav ul a { display: block; padding: 14px 2px; font-size: 15px; }
  .main-nav ul a::after { display: none; }

  .tracking-form { margin-top: 18px; }
  .tracking-form input { width: 100%; flex: 1; padding: 13px 14px; }
  .tracking-form button { padding: 0 20px; }
}

@media (min-width: 640px) {
  .container { padding-inline: 28px; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-form { padding: 40px 36px; }
}

@media (min-width: 768px) {
  .section { padding: 100px 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1.35fr 1fr; gap: 60px; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .section { padding: 112px 0; }
  .hero { padding: 120px 0 90px; }
}

@media (min-width: 1200px) {
  .tracking-form input { width: 220px; }
}

/* Small phones: hide the "Track" word, keep the icon */
@media (max-width: 400px) {
  .track-btn-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .modal-backdrop, .hero-actions { display: none !important; }
}
