/* ==========================================================================
   BASE & LAYOUT STYLES — Garage Door Repairs Dee Why, NSW
   style.css
   ========================================================================== */

/* 1. Reset & Box Model */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

/* 2. Scoped Reveal Animations (Bug #10 Prevention: Never blank when JS fails) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: without .js class, all content is immediately 100% visible */
.no-js .reveal,
.no-js .reveal-stagger > * {
  opacity: 1 !important;
  transform: none !important;
}

/* 2b. Advanced Modern Animations & Micro-Interactions */
@keyframes pulseEmergency {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(220, 38, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes radarPing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.btn-pulse {
  animation: pulseEmergency 2.2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.radar-dot {
  width: 10px;
  height: 10px;
  background: var(--color-success);
  border-radius: 50%;
  display: inline-block;
  animation: radarPing 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

.float-element {
  animation: floatGentle 4s ease-in-out infinite;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.25rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin-top: 1.5rem; margin-bottom: 0.85rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.5rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-ocean);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

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

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* 4. Container & Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section-padding {
  padding: 4.5rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 2.75rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section-padding {
    padding: 2.5rem 0;
  }
}

.bg-white { background-color: var(--color-bg-white); }
.bg-alt   { background-color: var(--color-bg-alt); }
.bg-dark  { background-color: var(--color-bg-dark); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }

.text-center { text-align: center; }

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ocean);
  background: rgba(2, 132, 199, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none !important;
  line-height: 1;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #111827;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.4);
}

.btn-emergency {
  background-color: var(--color-emergency);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.btn-emergency:hover {
  background-color: var(--color-emergency-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.5);
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* 6. Callout Cards (Bespoke Human Design — No Left Border) */
.warning-box,
.advisory-card--alert {
  background-color: #FFF7F7;
  border: 1px solid #FECDCA;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.warning-box h4,
.advisory-card--alert h4 {
  color: #991B1B;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tip-box,
.advisory-card--info {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.tip-box h4,
.advisory-card--info h4 {
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pill-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.pill-badge--alert {
  background: #FEE2E2;
  color: #991B1B;
}

.pill-badge--info {
  background: #E0F2FE;
  color: #0369A1;
}

/* 7. Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.process-step {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* 8. Sticky Mobile Call Bar */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  z-index: 999;
}

.mobile-sticky-cta .btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.85rem 1rem;
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: block;
  }
  body {
    padding-bottom: 72px;
  }
}
