/* Tratan Motors brand layer: the design tokens plus the chrome every page shares
   (header, nav, menus, footer, buttons, cards, icons). Each page links this before
   its own <style>, so page rules can still override. Change colours here, not in pages. */

:root {
  /* Core brand */
  --brand-orange:        #F47920;
  --brand-orange-light:  #FBA43C;
  --brand-orange-dark:   #D95F0E;
  --brand-navy:          #16365C;
  --brand-navy-light:    #23507F;
  --brand-navy-dark:     #0E2340;

  /* Surfaces */
  --cream:               #FAF7F2;
  --surface:             #FFFFFF;
  --surface-alt:         #F3F6FA;
  --surface-dark:        var(--brand-navy);

  /* Text */
  --text-strong:         #16365C;
  --text-body:           #44536B;
  --text-muted:          #7B8794;
  --text-on-dark:        #EEF3F9;
  --text-on-orange:      #FFFFFF;

  /* Lines and shadow */
  --border:              #E3E9F0;
  --border-strong:       #C9D4E0;
  --shadow-sm:           0 1px 3px rgba(22,54,92,.08);
  --shadow-md:           0 6px 20px rgba(22,54,92,.10);
  --shadow-lg:           0 18px 48px rgba(22,54,92,.14);

  /* Signature gradient, taken from the logo's road mark */
  --gradient-brand:      linear-gradient(135deg, #FBA43C 0%, #F47920 55%, #D95F0E 100%);
  --gradient-navy:       linear-gradient(160deg, #23507F 0%, #16365C 60%, #0E2340 100%);
  --gradient-overlay:    linear-gradient(90deg, rgba(14,35,64,.88) 0%, rgba(14,35,64,.55) 60%, rgba(14,35,64,.15) 100%);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 180ms cubic-bezier(.4,0,.2,1);
}

/* —— Base —— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--surface);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
/* Colour is set per section: --text-strong on light, inherited --text-on-dark on navy. */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

/* —— Header and desktop nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo: transparent PNG, sized here only. The footer copy sits on a cream plate
   because the navy wordmark disappears on the navy footer. */
.logo-link img { height: 44px; width: auto; aspect-ratio: auto 752 / 240; }
.footer-logo {
  display: inline-block;
  vertical-align: top;
  box-sizing: content-box;
  height: 44px;
  width: auto;
  aspect-ratio: auto 752 / 240;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: var(--radius-sm);
}

.nav-desktop { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }
.nav-desktop > li { position: relative; }
.nav-desktop > li > a {
  display: block;
  padding: 14px 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-strong);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
/* Hover/active shows as the orange underline; the label stays navy because
   orange text on white is only 2.76:1. */
.nav-desktop > li > a:hover:not(.btn-nav-cta),
.nav-desktop > li > a.active { border-bottom-color: var(--brand-orange); }
.nav-desktop > li:not(.has-dropdown) > a.active { pointer-events: none; }
.nav-desktop > li > a.btn-nav-cta { border-bottom: none; margin-left: 8px; }

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.has-dropdown:hover .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  border-left: 3px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.dropdown-panel a:hover,
.dropdown-panel a.is-current { border-left-color: var(--brand-orange); background: var(--surface-alt); }

.btn-nav-cta {
  margin-left: 12px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* —— Mobile menu —— */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--brand-navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 1002;
  padding: 100px 24px 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-weight: 700;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
}
.mobile-menu .sub a { padding-left: 16px; font-weight: 600; text-transform: none; font-size: 15px; }
.mobile-menu a.current { box-shadow: inset 3px 0 0 var(--brand-orange); padding-left: 12px; }
.mobile-menu .sub a.current { padding-left: 16px; }
.mobile-menu .btn-nav-cta { margin: 24px 0 0; width: 100%; text-align: center; }

@media (max-width: 992px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
}
@media (max-width: 768px) {
  .logo-link img { height: 34px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 10px 16px; }
}

/* —— Buttons ——
   Primary: orange gradient with a white label. Ghost: white outline, dark sections only.
   Pages keep their own padding and sizing; these rules only paint. Add new buttons to the lists. */
:is(.btn-nav-cta, .btn-submit, .btn-gradient-purple,
    .hero-buttons .btn-solid, .about-grid .btn-red, .product-card .btn-card, .cta-banner .btn-white,
    .about-cta-navy .btn-primary, .model-card .btn, .t-card .btn, .choose-section .btn-call,
    .cta-gradient .btn-w, .cta-gradient .btn-contact, .bottom-cta .btn-solid) {
  background: var(--gradient-brand);
  color: var(--text-on-orange);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
:is(.btn-nav-cta, .btn-submit, .btn-gradient-purple,
    .hero-buttons .btn-solid, .about-grid .btn-red, .product-card .btn-card, .cta-banner .btn-white,
    .about-cta-navy .btn-primary, .model-card .btn, .t-card .btn, .choose-section .btn-call,
    .cta-gradient .btn-w, .cta-gradient .btn-contact, .bottom-cta .btn-solid):hover {
  background: var(--brand-orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

:is(.hero-buttons .btn-outline, .about-cta-navy .btn-outline, .cta-banner .btn-outline-w, .cta-gradient .btn-o) {
  background: transparent;
  color: var(--text-on-dark);
  border: 2px solid var(--text-on-dark);
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}
:is(.hero-buttons .btn-outline, .about-cta-navy .btn-outline, .cta-banner .btn-outline-w, .cta-gradient .btn-o):hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* —— Cards: truck listings, service and product tiles. Layout stays with each page. —— */
:is(.product-card, .model-card, .t-card, .apart-card, .core-card, .svc-card) {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
:is(.product-card, .model-card, .t-card, .apart-card, .core-card, .svc-card)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: 1;
}
:is(.product-card, .model-card, .t-card, .apart-card, .core-card, .svc-card):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
:is(.product-card, .model-card, .t-card, .apart-card, .core-card, .svc-card):hover::before { transform: scaleX(1); }

/* —— Accent strip: 4px brand gradient along the top of the footer and the CTA bands —— */
:is(.footer, .cta-banner, .cta-gradient, .bottom-cta) { position: relative; }
:is(.footer, .cta-banner, .cta-gradient, .bottom-cta)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
}

/* —— Icons and bullets —— */
.icon-circle {
  width: 56px;
  height: 56px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-circle i { color: var(--text-on-orange); font-size: 22px; }
.icon-circle.light { background-color: rgba(255, 255, 255, 0.15); }
.icon-circle.light i { color: var(--text-on-dark); }
.contact-icon {
  width: 44px;
  height: 44px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
}
.contact-icon i { color: var(--text-on-orange); font-size: 18px; }
/* Navy-dark numerals: white on orange is 2.76:1, navy-dark on orange is 5.7:1. */
.step-number {
  width: 52px;
  height: 52px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy-dark);
  margin: 0 auto 16px;
}
.industry-tag i { color: var(--brand-orange); margin-right: 8px; font-size: 15px; }

/* —— Footer —— */
.footer {
  background: var(--gradient-navy);
  color: var(--text-on-dark);
  padding: 56px 24px 0;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid .tagline { opacity: 0.9; font-size: 14px; margin: 16px 0 20px; line-height: 1.65; }
.footer h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  color: var(--text-on-dark);
}
.footer-links a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  opacity: 0.9;
  transition: opacity var(--transition), padding-left var(--transition), color var(--transition);
}
.footer-links a:hover { opacity: 1; padding-left: 4px; color: var(--brand-orange-light); }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: background-color var(--transition);
}
.social-icon:hover { background-color: var(--brand-orange); }
.social-icon i { color: var(--text-on-dark); font-size: 16px; }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  opacity: 0.92;
}
.footer-contact-item i { color: var(--brand-orange); width: 22px; flex-shrink: 0; text-align: center; }
.footer-contact .footer-contact-item:last-child { margin-bottom: 0; }
.footer-bar {
  background: var(--brand-navy-dark);
  padding: 18px 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .social-row { justify-content: center; }
  .footer-contact-item { justify-content: center; }
}

/* —— Scrollbar (desktop pointers only) —— */
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-color: var(--brand-orange) var(--brand-navy); }
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track { background: var(--brand-navy); }
  ::-webkit-scrollbar-thumb { background: var(--brand-orange); border-radius: 6px; border: 3px solid var(--brand-navy); }
}
