/* ===================================================
   Pete Oil & Haulage Services — Custom Stylesheet
   =================================================== */

/* ---------- Preloader ---------- */
/* Lives as inline critical CSS in includes/header.php's <head> instead of
   here — it must apply the instant the DOM parses, with zero dependency on
   this file (a separate network request) finishing to load. See the note
   there for why. */

/* ---------- Layout safety ---------- */
/* Guards against horizontal scroll/overflow on mobile — kept as plain CSS
   (not a Tailwind utility class) so it's guaranteed to apply immediately,
   the same reasoning as the preloader above. */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ---------- Material Symbols ---------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
}

/* ---------- Hero ---------- */
.hero-gradient {
    background: linear-gradient(
        to right,
        rgba(25, 28, 29, 0.92) 0%,
        rgba(25, 28, 29, 0.55) 55%,
        rgba(25, 28, 29, 0.15) 100%
    );
}

/* ---------- Decorative dot grid ---------- */
.industrial-grid {
    background-image: radial-gradient(circle, #c8cdc8 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ---------- Hamburger animation ---------- */
#menuToggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuToggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuToggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Scroll-reveal animations ---------- */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal       { transform: translateY(28px); }
.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* Stagger children inside a reveal group */
.reveal-group > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-group > *:nth-child(6) { transition-delay: 0.55s; }
.reveal-group > *:nth-child(7) { transition-delay: 0.65s; }
.reveal-group > *:nth-child(8) { transition-delay: 0.75s; }

/* ---------- Service cards ---------- */
.service-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 107, 49, 0.13);
}

/* ---------- Scroll-to-top button ---------- */
#scrollToTop.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Footer helpers ---------- */
.footer-link {
    transition: color 0.18s;
}
.footer-link:hover {
    color: #B3D335;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    color: #c8d8c9;
    transition: background 0.18s, color 0.18s;
}
.social-icon:hover {
    background: #B3D335;
    color: #3e4c00;
}

/* ---------- Contact form (React component) ---------- */
.form-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #bdcabb;
    border-radius: 0.5rem;
    background: #fff;
    color: #191c1d;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field:focus {
    border-color: #006b31;
    box-shadow: 0 0 0 3px rgba(0, 107, 49, 0.14);
}
.form-field::placeholder {
    color: #6e7a6e;
}
.form-field.error {
    border-color: #ba1a1a;
    box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.12);
}
.form-error-msg {
    font-size: 12px;
    color: #ba1a1a;
    margin-top: 4px;
}
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #006b31;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-submit:hover:not(:disabled) {
    background: #B3D335;
    color: #3e4c00;
    box-shadow: 0 6px 20px rgba(179, 211, 53, 0.35);
    transform: translateY(-1px);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---------- Stats counter typography ---------- */
.stat-number {
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

/* ---------- Section divider ---------- */
.section-rule {
    display: block;
    height: 4px;
    width: 56px;
    background: #006b31;
    border-radius: 2px;
    margin-top: 0.75rem;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar           { width: 6px; }
::-webkit-scrollbar-track     { background: #f3f4f5; }
::-webkit-scrollbar-thumb     { background: #006b31; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: #038740; }
