/* ==========================================================================
   FITO Logistics — static recreation of fitologistics.co.uk
   ========================================================================== */

:root {
  --lime: #bfff00;
  --black: #0a0909;
  --ink: #0a0a0a;
  --grey-light: #d8d8d8;
  --grey-sage: #aab5b5;
  --white: #ffffff;
  --max-width: 1170px;
  --header-h: 84px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  /* "odisseia" is served by Adobe Fonts (kit fgp8gqt), same as the original site;
     Rubik is the theme's fallback stack. */
  font-family: 'odisseia', 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); }
h2 { font-size: clamp(2.2rem, 5.2vw, 4.7rem); line-height: 1.1; }
h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; }
h4 { font-size: 1.25rem; }
h6 { font-size: 0.95rem; font-weight: 500; }
p  { margin-bottom: 1em; line-height: 1.35; }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 30px; width: 100%; }

/* ---- Page fade transition ---- */
body { animation: page-fade-in .5s ease both; }
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
body.page-exit { opacity: 0; transition: opacity .3s ease; animation: none; }

/* ---- Entrance animations (matching the original theme's GSAP entrances:
   ease cubic-bezier(.35,.3,.2,.85) — the theme's global BezierEasing —
   elements entering the viewport together stagger by 0.15s via --stagger,
   set by JS in DOM order) ---- */

/* fade + rise (theme "bottom-to-top": 30px, 0.5s) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
  transition: opacity .5s cubic-bezier(.35, .3, .2, .85), transform .5s cubic-bezier(.35, .3, .2, .85);
  transition-delay: var(--stagger, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* 3D tilt entrance for news cards + post titles (theme "bottom-to-top-3d");
   JS adds .perspective-wrap to the animated element's parent */
.perspective-wrap { perspective: 3000px; }
.reveal-3d {
  opacity: 0;
  transform: rotateX(-45deg) translateY(120px);
  transform-style: preserve-3d;
  will-change: opacity, transform;
  transition: opacity .5s cubic-bezier(.35, .3, .2, .85), transform .5s cubic-bezier(.35, .3, .2, .85);
  transition-delay: var(--stagger, 0s);
}
.reveal-3d.visible { opacity: 1; transform: none; }

/* Masked heading reveal (theme "slidetype" style1): JS wraps the heading's
   content in .st-entry (an overflow-hidden mask) > .st-lines, which slides
   up into place as one block from 200% below the mask (0.65s). Nothing is
   hidden unless the wrap succeeded, so no-JS still shows the text. */
.slidetype .st-entry { display: block; overflow: hidden; }
.slidetype .st-lines {
  display: block;
  transform: translateY(200%);
  will-change: transform;
  transition: transform .65s cubic-bezier(.35, .3, .2, .85);
  transition-delay: var(--stagger, 0s);
}
.slidetype.visible .st-lines { transform: none; }

/* NOTE: no prefers-reduced-motion override — the live site's theme animates
   unconditionally, and matching it exactly is the brief. Windows users with
   "Animation effects" switched off would otherwise see no entrances at all. */

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-header .logo { margin-right: auto; display: block; }
.site-header .logo img { width: 132px; }
.site-header .logo .logo-light { display: none; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav .nav-links { display: flex; gap: 26px; }
.main-nav .nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: opacity .2s ease;
}
.main-nav .nav-links a:hover,
.main-nav .nav-links a[aria-current="page"] { opacity: 0.55; }

.socials { display: flex; gap: 14px; align-items: center; }
.socials a { display: inline-flex; transition: opacity .2s ease; }
.socials a:hover { opacity: 0.55; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
.main-nav .socials { color: var(--ink); }

/* lime pill, like the live site's header button (.btn.white custom CSS) */
.header-phone {
  background: #cfff00;
  color: #2d2d2d;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 25px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.header-phone:hover { background: var(--black); color: var(--white); }

/* scrolled state: solid dark bar, lime logo, light links */
.site-header.scrolled { background: var(--black); box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.site-header.scrolled .logo .logo-dark { display: none; }
.site-header.scrolled .logo .logo-light { display: block; }
.site-header.scrolled .main-nav .nav-links a,
.site-header.scrolled .main-nav .socials { color: var(--white); }
.site-header.scrolled .mobile-toggle span { background: var(--white); }

/* mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.mobile-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .3s ease, opacity .3s ease; }

/* mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 40px;
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu.open { transform: none; }
.mobile-menu .mobile-close {
  position: absolute;
  top: 28px; right: 28px;
  width: 32px; height: 32px;
  background: none; border: 0; cursor: pointer;
}
.mobile-menu .mobile-close::before,
.mobile-menu .mobile-close::after {
  content: "";
  position: absolute;
  top: 50%; left: 4px; right: 4px;
  height: 2px;
  background: var(--white);
}
.mobile-menu .mobile-close::before { transform: rotate(45deg); }
.mobile-menu .mobile-close::after { transform: rotate(-45deg); }
.mobile-menu ul li a {
  color: var(--white);
  font-size: 2rem;
  font-weight: 600;
  display: block;
  padding: 10px 0;
}
.mobile-menu ul li a:hover { color: var(--lime); }
.mobile-menu .header-phone { align-self: flex-start; margin-top: 30px; }
.mobile-menu .socials { margin-top: 40px; color: var(--white); }

/* ==========================================================================
   Buttons & arrow links
   ========================================================================== */
.btn-pill {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 999px;
  transition: all .25s ease;
  border: 2px solid var(--black);
}
.btn-pill.solid { background: var(--black); color: var(--white); }
.btn-pill.solid:hover { background: transparent; color: var(--black); }
.btn-pill.outline { background: transparent; color: var(--black); }
.btn-pill.outline:hover { background: var(--black); color: var(--white); }

/* pill text-link with animated arrow (theme btn-text.style5 + the live site's
   custom CSS: outlined pill, 15px bold label, border turns lime on hover while
   the arrowhead slides right and its horizontal bar "draws" from scaleX(0)) */
.btn-text {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 25px;
  padding: 8px 0 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-right: 10px;
  margin-top: 10px;
  transition: border-color .15s linear;
}
.btn-text > span:first-child { font-weight: 700; padding: 0 15px; }
.btn-text:hover { border-color: #beff00; }
/* lime-filled variant (the home hero "Our services" button) */
.btn-text.hero-button { background: #cfff00; border: 1px solid #cfff00; margin-right: 5px; }
.btn-text .arrow { display: inline-flex; align-items: center; justify-content: center; height: 10px; width: 30px; }
.btn-text .arrow svg {
  width: 17px;
  height: 10px;
  fill: currentColor;
  transform: translateX(-4px);
  transition: transform .15s linear;
}
.btn-text .arrow svg path:last-child {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .15s linear;
}
.btn-text:hover .arrow svg { transform: translateX(0); }
.btn-text:hover .arrow svg path:last-child { transform: scaleX(1); }

/* ==========================================================================
   Hero sections
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--black);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: calc(var(--header-h) + 40px) 0 15vh;
}
.hero .hero-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.1); }
.hero .container { position: relative; z-index: 2; }
.hero .hero-text { max-width: 58%; }
.hero h1 { color: var(--ink); margin-bottom: 16px; }
.hero p { color: var(--ink); max-width: 540px; }

.hero.hero-home { background-image: url('../img/truck-header-green-scaled.jpg'); }
.hero.hero-about { background-image: url('../img/About-Hero3-web.png'); min-height: 90vh; padding-top: 20vh; padding-bottom: 15vh; }
.hero.hero-about .hero-overlay,
.hero.hero-services .hero-overlay { background: none; }
.hero.hero-services { background-image: url('../img/Services-Hero-2-web.png'); min-height: 90vh; padding-top: 20vh; padding-bottom: 15vh; }

@media (max-width: 768px) {
  .hero.hero-home { background-image: url('../img/truck-header-mobile2.jpg'); }
  .hero.hero-about { background-image: url('../img/About-Hero-mobile3.png'); }
  .hero.hero-services { background-image: url('../img/Services-Hero-mobile.png'); }
  .hero .hero-text { max-width: 100%; }
}

/* simple page header (news / contact) */
.page-header { background: var(--grey-sage); padding: calc(var(--header-h) + 60px) 0 60px; }
.page-header h1 { margin-bottom: 18px; }
.page-header p { max-width: 640px; }

/* ==========================================================================
   Content sections
   ========================================================================== */
.section { padding: 15vh 0; }
.section.bg-grey { background: var(--grey-light); }
.section.bg-sage { background: var(--grey-sage); }
.section.bg-white { background: var(--white); padding: 10vh 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split .graphic img { margin: 0 auto; }
.split.graphic-left .graphic { order: -1; }

.eyebrow { color: rgba(10,10,10,0.6); font-weight: 500; margin-bottom: 8px; }
.split h2 { margin-bottom: 20px; white-space: pre-line; }

/* two-column bullet list used on home + about */
.column-list { display: flex; gap: 40px; margin: 20px 0 10px 20px; flex-wrap: wrap; }
.column-list ul { flex: 1 1 200px; }
.column-list ul li { padding: 2px 0; }

/* ==========================================================================
   Fleet (about page)
   ========================================================================== */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 60px;
  margin-top: 50px;
}
.fleet-item h4 { margin-bottom: 8px; }
.fleet-item > p { font-size: 0.95rem; margin-bottom: 18px; }
.fleet-stats { display: flex; gap: 40px; }
.fleet-stats .stat h4 { font-size: 2rem; font-weight: 600; margin-bottom: 2px; }
.fleet-stats .stat p { font-size: 0.85rem; line-height: 1.4; }

/* ==========================================================================
   News accordion cards (style9)
   ========================================================================== */
.news-list { margin-top: 30px; }
.news-card { border-bottom: 1px solid rgba(0,0,0,0.15); }
.news-card .news-card-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font-family: inherit;
}
.news-card .news-cat { grid-column: 1 / -1; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; margin-bottom: -14px; }
.news-card h4 { font-size: 1.3rem; transition: color .2s ease; }
.news-card .news-date { font-size: 0.85rem; opacity: 0.65; white-space: nowrap; }
.news-card .news-arrow { display: inline-flex; transition: transform .3s ease; }
.news-card .news-arrow svg { width: 30px; height: 18px; fill: currentColor; }
.news-card.open .news-arrow { transform: rotate(-90deg); }
.news-card .news-card-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.news-card .news-card-body-inner { padding: 0 0 26px; }
.news-card .readmore { font-weight: 600; text-decoration: underline; }
.news-card:hover h4 { color: rgba(10,10,10,0.6); }

/* dark variant (home page news section) */
.news-dark { position: relative; background: var(--grey-light) url('../img/Screenshot-2022-02-02-at-09.35.10.png') center/cover no-repeat; }
.news-dark .news-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.78); }
.news-dark .container { position: relative; z-index: 2; padding-top: 20vh; padding-bottom: 20vh; }
.news-dark .news-intro { max-width: 50%; margin-left: auto; }
.news-dark h2, .news-dark p { color: var(--white); }
.news-dark .news-card { border-color: rgba(255,255,255,0.25); color: var(--white); }
.news-dark .news-card h4 { color: var(--white); }
.news-dark .news-card:hover h4 { color: var(--lime); }
.news-dark .news-card .readmore { color: var(--white); }
@media (max-width: 900px) {
  .news-dark .news-intro { max-width: 100%; }
}

/* ==========================================================================
   Lime CTA band
   ========================================================================== */
.cta-band { background: var(--lime); padding: 40px 0; }
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h3 { font-weight: 600; }
.cta-band .cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 70px;
  align-items: start;
}
.contact-info h3 { margin-bottom: 10px; }
.contact-info > div { margin-bottom: 36px; }
.contact-info a { text-decoration: underline; }
.contact-form label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; }
.contact-form .field { margin-bottom: 22px; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  background: var(--white);
  padding: 13px 15px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--black); }
.contact-form textarea { min-height: 190px; resize: vertical; }
.contact-form .form-note { font-size: 0.85rem; opacity: 0.7; margin-top: 14px; }
.map-embed iframe { width: 100%; height: 450px; border: 0; display: block; }

/* ==========================================================================
   News post pages
   ========================================================================== */
.post-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  padding: calc(var(--header-h) + 60px) 0 70px;
}
.post-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.post-hero h1 { position: relative; z-index: 2; color: var(--white); text-align: center; max-width: 820px; margin: 0 auto; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.post-body { max-width: 780px; margin: 0 auto; padding: 70px 30px 90px; }
.post-body p { margin-bottom: 1.2em; }
.post-body a { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #2d2d2d; color: #a3a3a3; font-size: 0.92rem; }
.site-footer a:hover { color: var(--lime); }
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px 30px 50px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr;
  gap: 40px;
}
.footer-grid h6 { color: var(--white); text-transform: none; margin-bottom: 14px; }
.footer-grid .f-brand img { width: 160px; margin-bottom: 22px; }
.footer-grid ul li { padding: 3px 0; }
.f-arrow { width: 22px; margin-bottom: 24px; }
.memberships { display: flex; gap: 18px; align-items: center; }
.memberships img { width: 78px; }
.subfooter { border-top: 1px solid rgba(255,255,255,0.12); }
.subfooter .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
  flex-wrap: wrap;
}
.subfooter p { font-size: 0.85rem; margin: 0; }
.subfooter .socials { color: #cfcfcf; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .fleet-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .site-header .header-phone { display: none; }
  .mobile-toggle { display: flex; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.graphic-left .graphic { order: 0; }
  .section { padding: 10vh 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 50px; }
}
@media (max-width: 640px) {
  .fleet-grid { grid-template-columns: 1fr; }
  .contact-form .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band .container { justify-content: center; text-align: center; }
  .news-card .news-card-head { grid-template-columns: 1fr auto; }
  .news-card .news-date { display: none; }
}
