/* ==================================================================
   Public site: pieces shared by all six templates.

   Loaded after style.css and before the active template's own file
   (assets/css/templates/<template>.css), which gives each piece its
   look. Never loaded in the admin panel.

   Colour rule: text on a coloured surface always uses the matching
   "on-" variable (--on-brand, --on-dark, --on-accent ...), worked out
   from the active palette in includes/design.php. That is what keeps
   every template readable under every palette.
   ================================================================== */

:root {
  --on-brand: #fff;
  --on-brand-dark: #fff;
  --on-accent: #111827;
  --on-ink: #fff;
  --surface-dark: #111827;
  --on-dark: #fff;
  --on-dark-soft: #c9ced6;
  --on-dark-muted: #9aa1ad;
  --text: #111827;
  --link: #a80410;
  --brand-text: #d40511;
  --accent-text: #a80410;
  --accent-on-dark: #ffcc00;
  --brand-on-dark: #ff6b6b;
  --accent-on-brand: #ffcc00;
  --brand-tint: #fdecec;
  --brand-tint-2: #f9d6d6;
  --accent-tint: #fff5cc;
  --brand-red-rgb: 212,5,17;
  --brand-yellow-rgb: 255,204,0;
  --ink-rgb: 17,24,39;
  --white-rgb: 255,255,255;
  --surface-dark-rgb: 17,24,39;
  --font-body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-body);
  --star: #f5a524;
}

body { font-family: var(--font-body); color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-heading); }
main { display: block; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--surface-dark); color: var(--on-dark);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Links and labels that sit on the page background. */
.section-head .eyebrow, .eyebrow { color: var(--brand-text); }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--link); }
.more-link .ui-icon { transition: transform .2s ease; }
a:hover > .more-link .ui-icon, .more-link:hover .ui-icon { transform: translateX(4px); }

/* Buttons that sit on dark or coloured surfaces. */
.btn-primary { background: var(--brand-red); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-red-dark); color: var(--on-brand-dark); }
.btn-accent { background: var(--brand-yellow); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(.95); }
.btn-ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,.75); }
.btn-ghost-light:hover { background: var(--on-dark); color: var(--surface-dark); border-color: var(--on-dark); }
.btn-lg { padding: 14px 28px; font-size: 15.5px; }
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }

/* Picture hover zoom used across templates. */
.img-zoom { overflow: hidden; border-radius: var(--radius); }
.img-zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.img-zoom:hover img { transform: scale(1.07); }

/* Small pulsing "live" dot. */
.pulse-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 0 rgba(22,163,74,.55);
  animation: pulse-ring 1.8s infinite; flex: none;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70% { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

/* ---------------- Header pieces every template uses ---------------- */
.site-header { z-index: 50; }
.site-header .logo { color: var(--header-ink); }
.nav-menu-btn { color: inherit; }
.nav-menu-btn svg { display: block; }
.mobile-nav-dropdown { background: var(--white); }
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-link { color: var(--text); }
.mobile-nav-link.active, .mobile-nav-link:hover { color: var(--link); }
.mobile-nav-foot { display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 20px; }
.mobile-nav-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.mobile-nav-dropdown.is-open { max-height: calc(100vh - 80px); }
.topbar-contacts { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-contacts a, .topbar-contacts span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .topbar-hide-sm { display: none !important; } }

/* ---------------- Tracking form ---------------- */
.track-form { display: flex; gap: 10px; }
.track-form input[type="text"] {
  flex: 1; min-width: 0; padding: 13px 14px; border: 1.5px solid var(--border);
  border-radius: 6px; font-size: 15px; background: var(--white); color: var(--text); font-family: inherit;
}
.track-form input[type="text"]:focus { outline: none; border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(var(--brand-red-rgb), .15); }
.track-form .btn { flex: none; }
@media (max-width: 520px) {
  .track-form { flex-direction: column; }
  .track-form .btn { width: 100%; }
}

/* ---------------- Stats ---------------- */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---------------- Carousel ---------------- */
.carousel { position: relative; --per-view: 1; }
.carousel-viewport { overflow: hidden; }
.carousel-track {
  display: flex; width: 100%; will-change: transform;
  transition: transform .65s cubic-bezier(.22,.7,.2,1);
}
.carousel-slide { flex: 0 0 calc(100% / var(--per-view)); min-width: 0; padding: 0 10px; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.carousel-btn:hover { background: var(--brand-red); border-color: var(--brand-red); color: var(--on-brand); }
.carousel-btn:focus-visible, .carousel-dot:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 3px; }
.carousel-btn[hidden] { display: none; }
.carousel-pause .i-play { display: none; }
.carousel.is-paused .carousel-pause .i-play { display: block; }
.carousel.is-paused .carousel-pause .i-pause { display: none; }
.carousel-dots { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: rgba(var(--ink-rgb), .22); transition: width .3s ease, background .3s ease;
}
.carousel-dot.is-active { width: 26px; background: var(--brand-red); }
.carousel--static .carousel-controls { display: none; }
.carousel--static .carousel-track { justify-content: center; }

/* Crossfade mode: slides stacked in one place. */
.carousel--fade .carousel-track { display: grid; transition: none; transform: none !important; }
.carousel--fade .carousel-slide {
  grid-area: 1 / 1; padding: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s ease, visibility 0s linear .9s;
}
.carousel--fade .carousel-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }

/* ---------------- Marquee (endless strip) ---------------- */
.marquee { overflow: hidden; --marquee-speed: 40; --marquee-duration: 40s; }
.marquee-track { display: flex; width: max-content; animation: marquee-move var(--marquee-duration) linear infinite; }
.marquee--reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex: none; }
@keyframes marquee-move { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ---------------- Reviews ---------------- */
.rv-section { overflow: hidden; }
.rv-head .rv-summary {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin: 2px 0 8px; font-size: 14.5px; color: var(--ink-soft);
}
.rv-stars { display: inline-flex; gap: 2px; color: var(--star); vertical-align: middle; }
.rv-stars svg { display: block; fill: currentColor; }
.rv-stars .rv-star--empty { opacity: .25; }
.rv-card {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 28px 26px; color: var(--text); overflow: hidden;
}
.rv-quote {
  position: absolute; right: 18px; top: -6px; font-size: 96px; line-height: 1;
  font-family: Georgia, "Times New Roman", serif; color: rgba(var(--brand-red-rgb), .12); pointer-events: none;
}
.rv-title { margin: 2px 0 0; font-size: 18px; line-height: 1.3; }
.rv-message {
  color: var(--ink-soft); font-size: 15px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.rv-more { text-align: center; margin-top: 18px; }
.rv-more-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--link); }
.rv-more-link:hover { text-decoration: underline; }
.rv-carousel .carousel-slide { display: flex; }
.rv-carousel .carousel-slide > .rv-card { width: 100%; }

/* Testimonials page */
.rv-page-summary {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin: 0 auto 30px; padding: 16px 22px; max-width: 520px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.rv-page-summary .rv-big { font-size: 34px; font-weight: 800; line-height: 1; color: var(--text); font-family: var(--font-heading); }
.rv-page-summary .rv-stars svg { width: 22px; height: 22px; }
.rv-page-summary span { color: var(--ink-soft); font-size: 14px; }
.rv-wall { columns: 3 300px; column-gap: 22px; }
.rv-wall .rv-card { break-inside: avoid; margin: 0 0 22px; height: auto; }
.rv-wall .rv-message { -webkit-line-clamp: unset; display: block; }
.rv-empty { text-align: center; color: var(--muted); }

/* ---------------- Partners ---------------- */
.partners-strip { padding: 34px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.partners-label {
  text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.partners-strip .marquee { --marquee-speed: 35; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.partner-item {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 64px; min-width: 150px; padding: 0 28px; margin: 0 8px;
}
.partner-item img {
  max-height: 44px; max-width: 160px; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: .75; transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}
.partner-item:hover img { filter: none; opacity: 1; transform: scale(1.05); }
.partner-name {
  font-family: var(--font-heading); font-weight: 800; font-size: 19px; letter-spacing: .02em;
  color: var(--muted); white-space: nowrap; transition: color .3s ease;
}
.partner-item:hover .partner-name { color: var(--text); }

/* ---------------- Page banner (shared bits) ---------------- */
.page-banner h1 { margin: 0 0 12px; line-height: 1.12; }
.page-banner-lead { margin: 0; max-width: 640px; font-size: 17px; line-height: 1.6; }
.page-banner--center { text-align: center; }
.page-banner--center .page-banner-lead { margin-left: auto; margin-right: auto; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.crumbs a:hover { text-decoration: underline; }

/* ---------------- Closing call-to-action band ---------------- */
.cta-band { padding: 56px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.cta-band p { margin: 0; font-size: 16px; }
.cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-cta-ghost { display: inline-flex; align-items: center; gap: 8px; }

/* ---------------- Footer (shared bits) ---------------- */
.footer-brand .logo { margin-bottom: 14px; }
.footer-tagline { font-size: 14px; max-width: 340px; line-height: 1.6; margin: 0 0 16px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ui-icon { flex: none; margin-top: 2px; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-bottom { flex-wrap: wrap; gap: 10px; }
.track-form--footer { margin-top: 6px; max-width: 360px; }
.track-form--footer input[type="text"] { padding: 10px 12px; font-size: 14px; }
.track-form--footer .btn { padding: 8px 16px; }
@media (max-width: 520px) { .track-form--footer { flex-direction: row; } .track-form--footer .btn { width: auto; } }

/* Gallery mosaic and mode cards, used by several templates. */
.gallery-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 14px; }
.gallery-mosaic figure { margin: 0; position: relative; }
.gallery-mosaic figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-mosaic figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; font-size: 13.5px; font-weight: 600;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7));
  transform: translateY(100%); transition: transform .35s ease;
}
.gallery-mosaic figure:hover figcaption { transform: none; }
@media (max-width: 760px) {
  .gallery-mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gallery-mosaic figure:nth-child(1) { grid-column: span 2; grid-row: span 1; }
}

/* Testimonials page wall on small screens */
@media (max-width: 640px) { .rv-card { padding: 22px 20px; } }

/* Everything that moves on its own stands still for anyone who asked
   their device for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .blob, .float-card, .float-chip, .tilt-photo, .grid-bg, .hero-slide, .pulse-dot,
  .draw-underline::after, .hero-glow, .hdr-glow-line { animation: none !important; }
  .carousel-track, .img-zoom img { transition: none !important; }
  .marquee { overflow-x: auto; }
}

/* Feature icons drawn through a mask, so they follow the palette. */
.ficon {
  display: inline-block; width: 24px; height: 24px; flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.card .icon { background: var(--brand-tint); color: var(--brand-text); }

/* Figures stay two across on phones rather than one long column. */
@media (max-width: 640px) {
  .stats-strip .grid-4, .mega-stats .grid-4, .plain-stats .grid-4,
  .parallax-stats .grid-4, .net-stats .grid-4 { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .stats-strip .stat-num, .parallax-stats .stat-num, .net-stats .stat-num { font-size: 30px !important; }
}

/* Phones: every template's header "Track" button shrinks to the same
   compact size so it never crowds the logo and name. Written specific
   enough to win over each template's larger button style. */
@media (max-width: 560px) {
  html body .btn.header-track-btn { padding: 8px 12px; font-size: 12.5px; letter-spacing: .02em; }
}
@media (max-width: 400px) {
  html body .btn.header-track-btn { padding: 7px 10px; font-size: 12px; }
}
/* The name and tagline give way (the tagline is cut with an ellipsis)
   rather than ever running underneath the header buttons. */
.logo .brand-text { overflow: hidden; }
.logo .brand-tagline { overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Inner pages ---------------- */
.track-form--banner { max-width: 620px; margin-top: 24px; }
.page-banner--center .track-form--banner { margin-left: auto; margin-right: auto; }
.page-banner--corporate .track-form--banner { margin-left: auto; margin-right: auto; }
.banner-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.page-banner--center .banner-actions, .page-banner--corporate .banner-actions { justify-content: center; }
.page-banner--classic .btn-outline, .page-banner--corporate .btn-outline,
.page-banner--dark .btn-outline, .page-banner--bold .btn-outline { color: var(--on-dark); border-color: rgba(255,255,255,.7); }
.page-banner--bold .btn-outline { color: var(--on-brand-dark); }

.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.about-media { position: relative; padding-bottom: 60px; }
.about-photo-main { aspect-ratio: 4 / 3; }
.about-photo-small { position: absolute; width: 46%; aspect-ratio: 4 / 3; right: -16px; bottom: 0; border: 6px solid var(--white); box-shadow: 0 16px 40px rgba(var(--ink-rgb), .18); }
.about-copy { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); }
.about-copy p:first-child { font-size: 19px; color: var(--text); font-family: var(--font-heading); line-height: 1.55; }
.about-stats .grid-4 { gap: 16px; }
.about-stats .stat-tile { background: var(--white); border-radius: var(--radius); padding: 24px 22px; border: 1px solid var(--border); }
.about-stats .stat-tile .stat-num { font-size: 36px; font-weight: 800; color: var(--brand-text); font-family: var(--font-heading); }
.about-stats .stat-tile .stat-label { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 30px; } .about-photo-small { right: 8px; } }
@media (max-width: 640px) { .about-stats .grid-4 { grid-template-columns: 1fr 1fr; } .about-stats .stat-tile .stat-num { font-size: 28px; } }

.tier-card { padding: 0 0 26px; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.tier-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(var(--ink-rgb), .12); }
.tier-card-media { aspect-ratio: 16 / 10; border-radius: 0; margin-bottom: -23px; }
.tier-card .icon { position: relative; margin: 0 0 14px 26px; box-shadow: 0 6px 16px rgba(var(--ink-rgb), .12); background: var(--white); }
.tier-card h3, .tier-card p { padding: 0 26px; }
.service-modes { row-gap: 24px; }

.prose { max-width: 800px; font-size: 16px; line-height: 1.75; color: var(--ink-soft); }
.prose p { margin: 0 0 1.1em; }

/* Picture cards for the ways of shipping (homepages and Services). */
.mode-card {
  display: block; background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: transform .3s ease, box-shadow .3s ease;
}
.mode-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(var(--ink-rgb), .14); }
.mode-card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.mode-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.mode-card:hover .mode-card-media img { transform: scale(1.08); }
.mode-card-body { padding: 22px 24px 24px; }
.mode-card-body h3 { margin: 0 0 8px; font-size: 19px; color: var(--text); }
.mode-card-body p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }


/* Contact page: the form fills its column. Its usual centring margin
   would otherwise make it shrink to the width of its fields. */
.tracking-layout--contact > .form-card,
.tracking-layout--contact > .timeline { margin: 0; width: 100%; max-width: none; }

/* Small phones: a long company name wraps at its spaces (two or three
   short lines) instead of being cut off beside the header buttons. */
@media (max-width: 440px) {
  .site-header .logo.brand-long .word-brand {
    white-space: normal; font-size: 13px; line-height: 1.1; overflow-wrap: anywhere;
  }
  .site-header .logo.brand-long .brand-tagline { font-size: 8px; }
}
