/* Website UI step 2 (plan §11.4 U10), trimmed by the owner on 1 Dec 2026: "don't make drastic changes, we do that after SEO".
   Only: light motion (scroll reveal, count-up), glass glare, and small fixes (testimonials gap,
   the Contact map picture fit, better visible form fields). No colours, fonts, sizes or layout of the pages are
   changed. Loaded last on Home, About, Services, Contact and Careers; site-ui.js adds the motion classes. */

:root {
  --ui-yellow: #fcdf2b;
}

/* ------------------------------------------------------------------ small fixes (owner, 1 Dec) */

/* Testimonials: the card logo badges sat on the heading (owner, 1 Dec); keep a clear gap above them */
.home-page .testimonial-section .header-container {
  margin-bottom: 44px !important;
}

.home-page .testimonial-section .header-container .title {
  margin-bottom: 0 !important;
}

/* Contact: the map picture always fills its glass frame (no grey bars at the sides) */
.contact-page .map-preview-trigger,
.contact-page .map-preview-trigger .map-image {
  display: block;
  width: 100% !important;
  max-width: none !important;
}

@media (min-width: 901px) {
  .contact-page .map-preview-trigger .map-image {
    height: 100% !important;
    object-fit: cover;
  }
}

/* form fields (Home "Book Truck Services", Contact "Get In Touch"): clearly visible boxes, readable text */
.input-glass,
.op-glass-input,
.op-glass-card {
  background: rgba(36, 32, 14, 0.42) !important;
  border: 2px solid rgba(252, 223, 43, 0.9) !important;
  color: #fffbe6 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px -10px rgba(0, 0, 0, 0.45) !important;
}

.input-glass::placeholder,
.op-glass-input::placeholder,
.op-glass-textarea::placeholder {
  color: rgba(255, 246, 200, 0.92) !important;
}

.input-glass:focus,
.op-glass-input:focus,
.op-glass-card:focus-within {
  background: rgba(40, 36, 18, 0.48) !important;
  border-color: #fcdf2b !important;
  box-shadow: 0 0 0 3px rgba(252, 223, 43, 0.35) !important;
  outline: none !important;
}

/* Home: the Message box and Submit share one glass card; the card is the field, the textarea inside stays plain */
.op-glass-card .op-glass-textarea {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: #fffbe6 !important;
}

/* ------------------------------------------------------------------ U10: motion (only after site-ui.js runs) */

/* scroll reveal: the hidden state exists only with JS and without reduced motion */
html.js-ui .reveal:not(.is-done) {
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) !important;
  transition-delay: var(--ui-delay, 0ms) !important;
}

html.js-ui .reveal:not(.is-in) {
  opacity: 0 !important;
  transform: translate3d(0, 22px, 0) !important;
}

.count-up {
  font-variant-numeric: tabular-nums;
}

/* glare + lift on glass cards (fine pointer only; site-ui.js adds .ui-glass and the glare layer) */
.ui-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  background:
    radial-gradient(140px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%),
    radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

/* the glass edge lights up near the pointer (a 1.5px ring masked to the border) */
.ui-glare::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(200px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.95), rgba(255, 248, 180, 0.35) 45%, rgba(255, 255, 255, 0) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* a light sweep across the glass each time the pointer comes onto the card */
.ui-glare::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  width: 45%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.38) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  html.js-ui .ui-glass {
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease !important;
  }

  html.js-ui .ui-glass:hover {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, -5px, 0) !important;
    box-shadow: 0 22px 40px -20px rgba(0, 0, 0, 0.5) !important;
  }

  html.js-ui .ui-glass:hover > .ui-glare {
    opacity: 1;
  }

  html.js-ui .ui-glass:hover > .ui-glare::after {
    animation: ui-glass-sweep 0.9s ease-out 1;
  }

  @keyframes ui-glass-sweep {
    0% { left: -70%; opacity: 0; }
    15% { opacity: 1; }
    100% { left: 130%; opacity: 0; }
  }
}

/* buttons: the same glare following the mouse (no tilt), on top of the shine sweep */
@media (hover: hover) and (pointer: fine) {
  html.js-ui .ui-glass-btn:hover > .ui-glare {
    opacity: 1;
  }

  /* form fields: the glare as a light in the field's background, following the mouse */
  html.js-ui .ui-glass-field:hover,
  html.js-ui .ui-glass-field:focus {
    background-image: radial-gradient(170px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%) !important;
  }
}

/* light shine sweep on the main buttons */
.ui-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ui-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg) translateX(0);
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .ui-shine:hover::after {
    opacity: 1;
    transform: skewX(-20deg) translateX(420%);
    transition: transform 0.75s ease, opacity 0.2s ease;
  }
}

/* Home "How Online Truck Booking Works": a small truck drives along the steps once */
.ui-road {
  position: relative;
  height: 26px;
  margin: -24px auto 28px;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.ui-road::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(252, 223, 43, 0.55) 0 14px, rgba(252, 223, 43, 0) 14px 26px);
}

.ui-road-mover {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
}

.ui-road-truck {
  position: absolute;
  left: -32px;
  bottom: 4px;
  width: 30px;
  height: 22px;
}

.ui-road-truck svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ui-road.is-go .ui-road-mover {
  animation: ui-drive 2.8s cubic-bezier(0.45, 0.05, 0.3, 1) forwards;
}

@keyframes ui-drive {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(100%, 0, 0); }
}

/* reduced motion: nothing moves and nothing is hidden */
@media (prefers-reduced-motion: reduce) {
  html.js-ui .reveal,
  html.js-ui .reveal:not(.is-in) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .ui-road,
  .ui-shine::after,
  .ui-glare {
    display: none !important;
  }

  html.js-ui .ui-glass,
  html.js-ui .ui-glass:hover {
    transition: none !important;
  }
}

@media print {
  html.js-ui .reveal:not(.is-in) {
    opacity: 1 !important;
    transform: none !important;
  }
  .ui-road {
    display: none !important;
  }
}
