/* ============================================
   Phil Parkinson Plumbing — Main Stylesheet
   ============================================ */

/* --- CSS Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --pp-orange: #E8922D;
    --pp-orange-dark: #D07A1A;
    --pp-dark: #111111;
    --pp-dark-lighter: #1e1e1e;
    --pp-dark-mid: #2a2a2a;
    --pp-gray-800: #333333;
    --pp-gray-700: #444444;
    --pp-gray-600: #555555;
    --pp-cream: #FFF8F0;
    --pp-white: #ffffff;
    --pp-red: #DC2626;
    --font-display: 'Fjalla One', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    background: var(--pp-dark);
}

body {
    font-family: var(--font-body);
    color: var(--pp-dark);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* Add bottom padding for mobile sticky CTA */
@media (max-width: 767px) {
    body { padding-bottom: 72px; }
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* --- Utility: Font --- */
.font-body { font-family: var(--font-body); }
.font-display { font-family: var(--font-display); }

/* --- Utility: Colors --- */
.text-pp-orange { color: var(--pp-orange); }
.text-pp-dark { color: var(--pp-dark); }
.bg-pp-orange { background-color: var(--pp-orange); }
.bg-pp-orange-dark { background-color: var(--pp-orange-dark); }
.bg-pp-dark { background-color: var(--pp-dark); }
.bg-pp-cream { background-color: var(--pp-cream); }

.hover\:text-pp-orange:hover { color: var(--pp-orange); }
.hover\:bg-pp-orange:hover { background-color: var(--pp-orange); }
.hover\:bg-pp-orange-dark:hover { background-color: var(--pp-orange-dark); }
.hover\:bg-pp-cream:hover { background-color: var(--pp-cream); }
.bg-pp-dark-surface { background-color: #1a1a1a; }
.bg-pp-dark-mid { background-color: #141414; }
.hover\:bg-white\/5:hover { background-color: rgba(255,255,255,0.05); }
.hover\:bg-white\/10:hover { background-color: rgba(255,255,255,0.1); }
.bg-pp-orange\/15 { background-color: rgba(232, 146, 45, 0.15); }
.bg-red-600\/20 { background-color: rgba(220, 38, 38, 0.2); }
.text-red-500 { color: #ef4444; }
.text-green-400 { color: #4ade80; }
.bg-green-900\/30 { background-color: rgba(20, 83, 45, 0.3); }
.border-green-500\/30 { border-color: rgba(34, 197, 94, 0.3); }
.text-green-500\/70 { color: rgba(34, 197, 94, 0.7); }
.border-white\/5 { border-color: rgba(255,255,255,0.05); }
.border-white\/15 { border-color: rgba(255,255,255,0.15); }
.bg-white\/15 { background-color: rgba(255,255,255,0.15); }
.text-gray-600 { color: #555555; }
.placeholder-gray-600::placeholder { color: #555555; }

/* Dark gradient backgrounds */
.bg-dark-gradient {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 40%, #111111 100%);
}
.bg-dark-gradient-overlay {
    background: linear-gradient(to right, rgba(10,10,10,0.95), rgba(17,17,17,0.7), rgba(20,20,20,0.5));
}
.bg-gradient-to-r.from-pp-orange { background: linear-gradient(to right, var(--pp-orange), var(--pp-orange-dark)); }
.from-pp-orange.to-pp-orange-dark { background-image: linear-gradient(to right, var(--pp-orange), var(--pp-orange-dark)); }

.border-pp-orange\/20 { border-color: rgba(232, 146, 45, 0.2); }
.border-pp-orange\/30 { border-color: rgba(232, 146, 45, 0.3); }
.hover\:border-pp-orange\/30:hover { border-color: rgba(232, 146, 45, 0.3); }
.bg-pp-orange\/10 { background-color: rgba(232, 146, 45, 0.1); }
.bg-pp-orange\/20 { background-color: rgba(232, 146, 45, 0.2); }
.border-pp-orange-dark { border-color: var(--pp-orange-dark); }

/* --- Utility: Layout --- */
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-3 { margin-left: 0.75rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* --- Utility: Flexbox --- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* --- Utility: Grid --- */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- Utility: Display --- */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }

/* --- Utility: Sizing --- */
.w-full { width: 100%; }
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-auto { width: auto; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-72 { height: 18rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-14 { height: 3.5rem; }
.h-full { height: 100%; }
.aspect-\[4\/5\] { aspect-ratio: 4/5; }

/* --- Utility: Typography --- */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.hover\:underline:hover { text-decoration: underline; }
.resize-none { resize: none; }

/* --- Utility: Colors (Tailwind-like) --- */
.text-white { color: #fff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-yellow-400 { color: #facc15; }
.text-red-600 { color: #dc2626; }
.text-green-600 { color: #16a34a; }
.text-green-800 { color: #166534; }
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-800 { background-color: #1e1e1e; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-600 { background-color: #dc2626; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-white\/5 { background-color: rgba(255,255,255,0.05); }
.bg-white\/10 { background-color: rgba(255,255,255,0.1); }
.bg-white\/20 { background-color: rgba(255,255,255,0.2); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.2); }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.border-white\/20 { border-color: rgba(255,255,255,0.2); }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d3d7; }
.border-gray-800 { border-color: #1e1e1e; }
.border-green-200 { border-color: #bbf7d0; }

/* --- Utility: Borders & Rounded --- */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; }
.border-style-solid { border-style: solid; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

/* --- Utility: Effects --- */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.opacity-30 { opacity: 0.3; }
.object-cover { object-fit: cover; }

/* --- Utility: Transitions --- */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 200ms; transition-timing-function: ease; }
.transition-all { transition-property: all; transition-duration: 200ms; transition-timing-function: ease; }
.transition-shadow { transition-property: box-shadow; transition-duration: 300ms; }
.duration-300 { transition-duration: 300ms; }

/* --- Utility: Transforms --- */
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }

/* --- Utility: Animation --- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* --- Gradient Utilities --- */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-pp-dark\/90 { --tw-gradient-from: rgba(26,26,46,0.9); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-pp-dark\/70 { --tw-gradient-stops: var(--tw-gradient-from), rgba(26,26,46,0.7), var(--tw-gradient-to, transparent); }
.to-pp-dark\/50 { --tw-gradient-to: rgba(26,26,46,0.5); }
.from-pp-dark { --tw-gradient-from: var(--pp-dark); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-gray-900 { --tw-gradient-stops: var(--tw-gradient-from), #1e1e1e, var(--tw-gradient-to, transparent); }
.to-pp-dark { --tw-gradient-to: var(--pp-dark); }

/* --- Form Styles --- */
input, select, textarea {
    font-family: var(--font-body);
    font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
}
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(232, 146, 45, 0.3); }
.focus\:ring-pp-orange:focus { --tw-ring-color: var(--pp-orange); }
.focus\:border-pp-orange:focus { border-color: var(--pp-orange); }

/* --- Safe area for mobile CTA --- */
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* === Responsive: SM (640px+) === */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:flex-row { flex-direction: row; }
    .sm\:col-span-2 { grid-column: span 2 / span 2; }
}

/* === Responsive: MD (768px+) === */
@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
    .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
    .md\:p-12 { padding: 3rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1.15; }
}

/* === Responsive: LG (1024px+) === */
@media (min-width: 1024px) {
    .lg\:hidden { display: none; }
    .lg\:flex { display: flex; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:py-40 { padding-top: 10rem; padding-bottom: 10rem; }
    .lg\:text-6xl { font-size: 3.75rem; line-height: 1.1; }
}

/* --- WordPress Admin Bar Fix --- */
.admin-bar .sticky { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .sticky { top: 46px; }
}

/* --- WordPress Core Overrides --- */
.wp-block-image img { max-width: 100%; height: auto; }

/* ============================================
   PREMIUM EFFECTS
   ============================================ */

/* --- Grain Texture Overlay --- */
.grain-overlay { position: relative; }
.grain-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    z-index: 1;
}
.grain-overlay > * { position: relative; z-index: 2; }

/* --- Glassmorphism Header --- */
.header-glass {
    background: rgba(17, 17, 17, 0.7) !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.header-glass.scrolled {
    background: rgba(17, 17, 17, 0.92) !important;
}

/* --- Gradient Text --- */
.text-gradient-white {
    background: linear-gradient(180deg, #ffffff 30%, #888888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-orange {
    background: linear-gradient(135deg, #f0a94e 0%, #E8922D 50%, #c47a1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Orange Glow Shadows --- */
.glow-hover { transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.glow-hover:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 30px rgba(232, 146, 45, 0.08);
}

/* --- Card Top Edge Light --- */
.card-edge-light { position: relative; }
.card-edge-light::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    border-radius: inherit;
}

/* --- Bottom Accent Bar on Hover --- */
.card-accent-bar { position: relative; overflow: hidden; }
.card-accent-bar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c47a1f, #E8922D, #f0a94e);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-accent-bar:hover::after {
    width: 60%;
    left: 20%;
}

/* --- Button Shine Sweep --- */
.btn-sheen { position: relative; overflow: hidden; }
.btn-sheen::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-sheen:hover::after { left: 125%; }

/* --- Mesh Gradient Hero BG --- */
.hero-mesh {
    background-color: #111111;
    background-image:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232, 146, 45, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(232, 146, 45, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(42, 42, 42, 0.8) 0%, transparent 40%);
}

/* --- Subtle Divider --- */
.divider-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 50%, transparent);
    border: none;
}

/* --- Selection Color --- */
::selection {
    background: rgba(232, 146, 45, 0.3);
    color: #f5f5f5;
}

/* --- Focus Ring (accessible + branded) --- */
:focus-visible {
    outline: 2px solid var(--pp-orange);
    outline-offset: 2px;
}

/* --- Pulse Glow for Emergency Badge --- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(232, 146, 45, 0.3); }
    50% { box-shadow: 0 0 24px rgba(232, 146, 45, 0.5); }
}
.badge-pulse { animation: pulse-glow 2s ease-in-out infinite; }

/* --- GSAP Animation Initial States --- */
.gs-reveal {
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
}
.gs-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    will-change: transform, opacity;
}
.gs-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    will-change: transform, opacity;
}
.gs-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    will-change: transform, opacity;
}
