/* ==========================================================================
   BASE & LAYOUT STYLES - Garage Door Repairs Northern Beaches
   Sydney Sandstone Design System
   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(20px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

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

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

/* 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 - Warm Terracotta & Eucalyptus Teal */
@keyframes pulseEmergency {
  0% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(234, 88, 12, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
  }
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(15, 118, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
}

@keyframes radarPing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 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-ocean);
  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 - Plus Jakarta Sans + DM Sans */
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: var(--color-teal-100);
  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 - PILL SHAPES (border-radius: 9999px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);  /* Distinctive pill button geometry */
  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);  /* Terracotta #EA580C */
  color: #FFFFFF;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-light);  /* #F97316 */
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.45);
}

.btn-emergency {
  background-color: var(--color-emergency);  /* Terracotta #EA580C */
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.btn-emergency:hover {
  background-color: var(--color-emergency-hover);  /* #F97316 */
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.45);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: #FFFFFF;
  color: var(--color-ocean);
  border-color: var(--color-ocean);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid 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: var(--color-surface-soft);
  border: 1px solid var(--color-border-light);
  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: var(--color-teal-100);
  color: var(--color-teal-700);
}

/* 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 & Quote Bar (Side-by-Side Flex Layout) */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 0.75rem;
  box-shadow: 0 -4px 20px rgba(28, 25, 23, 0.12);
  border-top: 1px solid rgba(214, 211, 209, 0.7);
  z-index: 999;
  box-sizing: border-box;
}

.mobile-sticky-cta .btn {
  flex: 1 1 50%;
  min-width: 0;
  width: auto;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.72rem 0.4rem;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1.1;
  box-sizing: border-box;
}

.mobile-sticky-cta .btn-sticky-call {
  background-color: var(--color-emergency); /* Burnt Terracotta #EA580C */
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

.mobile-sticky-cta .btn-sticky-quote {
  background-color: var(--color-teal-700); /* Eucalyptus Teal #0F766E */
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

.mobile-sticky-cta .btn:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
  }
  body {
    padding-bottom: 74px;
  }
  .grecaptcha-badge {
    bottom: 78px !important;
  }
}

@media (max-width: 380px) {
  .mobile-sticky-cta {
    gap: 0.35rem;
    padding: 0.5rem;
  }
  .mobile-sticky-cta .btn {
    font-size: 0.78rem;
    padding: 0.65rem 0.25rem;
  }
}
