/*
Theme Name: Fitzroy Crossing Buses
Theme URI: https://fitzroycrossingbuses.com.au
Author: Plum Oak Pty Ltd
Author URI: https://fitzroycrossingbuses.com.au
Description: A modern WordPress block theme for Fitzroy Crossing Buses & Charter. Built around the Kimberley landscape palette with Plus Jakarta Sans and Inter typography. Designed for transport, mining, and government procurement audiences.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fcb
Tags: full-site-editing, block-theme, transport, business
*/

/* ===== FOOTER MARGIN RESET ===== */
.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* ===== UTILITIES ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
}

/* ===== NAVIGATION / HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0 !important;
}

.fcb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
}

.fcb-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  flex-shrink: 0;
}

.fcb-brand-main {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--wp--preset--color--pindan);
  letter-spacing: -0.3px;
}

.fcb-brand-sub {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  font-size: 0.65rem;
  color: var(--wp--preset--color--grey);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 2px;
}

.fcb-nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fcb-nav-links a {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wp--preset--color--dark);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.fcb-nav-links a:hover {
  color: var(--wp--preset--color--pindan);
  background: var(--wp--preset--color--sand);
}

.fcb-nav-phone {
  font-family: var(--wp--preset--font-family--heading) !important;
  font-weight: 700 !important;
  color: var(--wp--preset--color--pindan) !important;
  font-size: 0.9rem !important;
  margin-left: 0.4rem;
}

.fcb-nav-phone:hover {
  background: transparent !important;
}

.fcb-nav-cta {
  background: var(--wp--preset--color--teal) !important;
  color: var(--wp--preset--color--white) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 8px !important;
  margin-left: 0.6rem;
}

.fcb-nav-cta:hover {
  background: var(--wp--preset--color--teal-dark) !important;
  color: var(--wp--preset--color--white) !important;
}

.fcb-hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.fcb-hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--wp--preset--color--dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.fcb-hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.fcb-hamburger.open span:nth-child(2) { opacity: 0; }
.fcb-hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.fcb-mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 999;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.fcb-mobile-menu.open { display: flex; }

.fcb-mobile-menu a {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: 8px;
  color: var(--wp--preset--color--dark);
  text-decoration: none;
  border-bottom: 1px solid var(--wp--preset--color--sand);
}

.fcb-mobile-cta {
  background: var(--wp--preset--color--teal);
  color: white !important;
  text-align: center;
}

@media (max-width: 900px) {
  .fcb-nav-links { display: none; }
  .fcb-hamburger { display: block; }
}

/* ===== HERO SECTION ===== */
.fcb-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--wp--preset--color--white);
}

/* Show the bus in context — default centered framing */
.fcb-hero img.wp-block-cover__image-background {
  object-position: center center !important;
}

/* Lighten the full-image cover overlay so the photo stays vivid. This forces
   the gradient regardless of the inline value baked into the block markup
   (the live Site Editor stores a customised template that overrides the file),
   so the brightening applies everywhere the file alone can't reach. */
.fcb-hero .wp-block-cover__gradient-background {
  background: linear-gradient(135deg,
    rgba(26,26,26,0.30) 0%,
    rgba(26,26,26,0.12) 50%,
    rgba(26,26,26,0.00) 100%) !important;
}

/* Soft scrim only behind the text on the left, fading to fully clear on the
   right so the bus and ranges stay vivid. Legibility comes mostly from the
   text-shadows below, so this overlay can stay light. */
.fcb-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.32) 30%,
    rgba(0,0,0,0.10) 60%,
    rgba(0,0,0,0.00) 85%);
  z-index: 1;
  pointer-events: none;
}

.fcb-hero .wp-block-cover__inner-container,
.fcb-hero > .wp-block-group {
  position: relative;
  z-index: 2;
}

.fcb-hero h1 {
  color: var(--wp--preset--color--white) !important;
  letter-spacing: -1px;
  line-height: 1.08;
  max-width: 720px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.65);
}

.fcb-hero h1 em {
  font-style: normal;
  color: var(--wp--preset--color--ochre-light);
}

.fcb-hero p {
  color: #ffffff;
  max-width: 540px;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.55);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wp--preset--color--white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wp--preset--color--teal-light);
  display: inline-block;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  flex-wrap: wrap;
}

.hero-stat .num {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--wp--preset--color--ochre-light);
  line-height: 1;
  display: block;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.6);
}

.hero-stat .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wp--preset--color--white);
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* ===== TRUST BAR ===== */
.trust-bar-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--wp--preset--color--grey);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
}

.trust-bar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem 3rem;
  flex-wrap: wrap;
  opacity: 0.65;
}

.trust-bar-row img {
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.trust-bar-row img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--wp--preset--color--white);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #ede9e2;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  border-color: var(--wp--preset--color--ochre);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--wp--preset--color--sand);
  color: var(--wp--preset--color--pindan);
}

.service-card h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wp--preset--color--dark);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--wp--preset--color--grey);
  line-height: 1.6;
  margin: 0;
}

/* ===== FLEET CARDS ===== */
.fleet-card {
  background: var(--wp--preset--color--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ede9e2;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.fleet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.fleet-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.fleet-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fleet-card h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--wp--preset--color--dark);
}

.fleet-card .seats {
  display: inline-block;
  background: var(--wp--preset--color--sand);
  color: var(--wp--preset--color--pindan);
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  align-self: flex-start;
}

.fleet-card p {
  font-size: 0.85rem;
  color: var(--wp--preset--color--grey);
  line-height: 1.5;
  margin: 0;
}

/* ===== EQUAL CARDS LAYOUT ===== */
.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-family: var(--wp--preset--font-family--heading) !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--wp--preset--color--ochre);
  margin-bottom: 0.5rem;
}

/* ===== ANIMATIONS ===== */
/* Default visible — JS can add subtle reveal as an enhancement,
   but never hide content if JS or observer don't fire */
.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only hide before reveal if JS has added the .has-reveal class to <html> */
.has-reveal .animate-on-scroll:not(.is-visible) {
  opacity: 0;
  transform: translateY(20px);
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* ===== BUTTON OVERRIDES ===== */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--teal);
  border: 2px solid var(--wp--preset--color--teal);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--teal);
  color: var(--wp--preset--color--white);
}

.btn-ochre .wp-block-button__link {
  background: var(--wp--preset--color--ochre);
  color: var(--wp--preset--color--white);
}

.btn-ochre .wp-block-button__link:hover {
  background: var(--wp--preset--color--pindan);
}

/* ===== CASE STUDY / GOV BLOCK ===== */
.case-study {
  background: var(--wp--preset--color--sand);
  border-radius: 16px;
  padding: 3rem;
  border-left: 6px solid var(--wp--preset--color--ochre);
}

.case-study .case-study-label {
  display: inline-block;
  background: var(--wp--preset--color--pindan);
  color: white;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ===== ABOUT SECTION ===== */
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-stat {
  background: var(--wp--preset--color--white);
  border-radius: 12px;
  padding: 1.5rem;
  border-top: 4px solid var(--wp--preset--color--ochre);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.about-stat .num {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--wp--preset--color--pindan);
  line-height: 1;
}

.about-stat .label {
  font-size: 0.85rem;
  color: var(--wp--preset--color--grey);
  margin-top: 0.4rem;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrap {
  background: var(--wp--preset--color--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.contact-form-wrap label {
  display: block;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--wp--preset--color--dark);
}

.contact-form-wrap input,
.contact-form-wrap textarea,
.contact-form-wrap select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wp--preset--color--sand-dark);
  border-radius: 8px;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.95rem;
  background: var(--wp--preset--color--light);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus,
.contact-form-wrap select:focus {
  outline: none;
  border-color: var(--wp--preset--color--teal);
  background: white;
}

.contact-form-wrap button[type="submit"] {
  background: var(--wp--preset--color--teal);
  color: white;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.contact-form-wrap button[type="submit"]:hover {
  background: var(--wp--preset--color--teal-dark);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--wp--preset--color--dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}

.site-footer h3,
.site-footer h4 {
  color: var(--wp--preset--color--white) !important;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
}

.site-footer a {
  color: rgba(255,255,255,0.75) !important;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--wp--preset--color--ochre-light) !important;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .fcb-hero { min-height: 80vh; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat .num { font-size: 1.8rem; }
  .case-study { padding: 2rem 1.5rem; }
  .contact-form-wrap { padding: 1.5rem; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
