/* Fridge Repair Parramatta - Human-Crafted Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --color-primary-navy: #0f172a;
  --color-secondary-navy: #1e293b;
  --color-trade-blue: #0284c7;
  --color-trade-blue-hover: #0369a1;
  --color-emerald-green: #16a34a;
  --color-emerald-hover: #15803d;
  --color-amber-gold: #d97706;
  --color-bg-light: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-text-dark: #0f172a;
  --color-text-muted: #475569;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
  scroll-behavior: smooth;
  /* Clears the sticky header (~90px tall) plus breathing room so jumping to
     any #section (nav links, footer links, "Read Article", etc.) doesn't
     land with the heading hidden underneath the header. */
  scroll-padding-top: 110px;
  font-family: var(--font-body);
  background-color: #ffffff;
  color: var(--color-text-dark);
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}

body {
  overflow-x: hidden;
}

/* Content text set to 18px site-wide, independent of heading sizes.
   Scoped to actual body copy (paragraphs, list items, table cells, FAQ
   answers) and excluded from the header/nav/sticky mobile bar so their
   carefully-tuned widths aren't affected. A matching line-height is set
   explicitly because Tailwind's smaller text-xs/text-sm utilities bundle
   a tight line-height (e.g. 16px) that would otherwise stay put under the
   larger 18px font, crowding wrapped lines together. */
body :is(p, li, td, .faq-answer):not(header *, .sticky-mobile-bar *) {
  font-size: 18px;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #0284c7;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0369a1;
}

/* Typography Details */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Headings keep their existing font-size but get a roomier line-height so
   multi-line titles (hero H1, blog post H1s, H2 section headings) don't
   read as touching lines. Tailwind's text-3xl/4xl/5xl utilities bundle a
   tight ~1.1-1.2 ratio into the class itself, so this needs the same
   specificity-boosting :is()/:not() pattern as the body-copy rule above
   to win over that class without !important. */
body :is(h1, h2, h3, h4, h5, h6):not(header *, .sticky-mobile-bar *) {
  line-height: 1.3;
}

/* Custom Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: #0284c7;
  z-index: 100;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Accordion Smooth Transitions */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out, opacity 0.25s ease;
  opacity: 0;
}

.faq-answer.active {
  max-height: 800px;
  opacity: 1;
}

/* Modal Overlay & Animation */
.modal-overlay {
  transition: opacity 0.25s ease;
}

.modal-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Button & Hover Card Micro-Interactions */
.card-hover {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0);
  transition: transform 0.15s ease-out, box-shadow 0.35s ease, border-color 0.2s ease;
}

.card-hover:hover {
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* 3D Button Press Feedback */
button,
a[href^="tel:"] {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

button:hover,
a[href^="tel:"]:hover {
  transform: translateY(-2px);
}

button:active,
a[href^="tel:"]:active {
  transform: translateY(0) scale(0.97);
}

/* Sticky Mobile Action Bar */
.sticky-mobile-bar {
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: perspective(1200px) translateY(30px) rotateX(6deg);
  transform-origin: center bottom;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: perspective(1200px) translateY(0) rotateX(0deg);
}

/* Staggered children animation */
.scroll-reveal.revealed .reveal-child {
  opacity: 0;
  transform: perspective(800px) translateY(20px) rotateX(12deg) scale(0.96);
  transform-origin: center bottom;
  animation: revealChild 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-reveal.revealed .reveal-child:nth-child(1) { animation-delay: 0.05s; }
.scroll-reveal.revealed .reveal-child:nth-child(2) { animation-delay: 0.1s; }
.scroll-reveal.revealed .reveal-child:nth-child(3) { animation-delay: 0.15s; }
.scroll-reveal.revealed .reveal-child:nth-child(4) { animation-delay: 0.2s; }
.scroll-reveal.revealed .reveal-child:nth-child(5) { animation-delay: 0.25s; }
.scroll-reveal.revealed .reveal-child:nth-child(6) { animation-delay: 0.3s; }
.scroll-reveal.revealed .reveal-child:nth-child(7) { animation-delay: 0.35s; }
.scroll-reveal.revealed .reveal-child:nth-child(8) { animation-delay: 0.4s; }
.scroll-reveal.revealed .reveal-child:nth-child(9) { animation-delay: 0.45s; }
.scroll-reveal.revealed .reveal-child:nth-child(10) { animation-delay: 0.5s; }
.scroll-reveal.revealed .reveal-child:nth-child(11) { animation-delay: 0.52s; }
.scroll-reveal.revealed .reveal-child:nth-child(12) { animation-delay: 0.54s; }
.scroll-reveal.revealed .reveal-child:nth-child(13) { animation-delay: 0.56s; }
.scroll-reveal.revealed .reveal-child:nth-child(14) { animation-delay: 0.58s; }
.scroll-reveal.revealed .reveal-child:nth-child(15) { animation-delay: 0.6s; }
.scroll-reveal.revealed .reveal-child:nth-child(16) { animation-delay: 0.62s; }
.scroll-reveal.revealed .reveal-child:nth-child(17) { animation-delay: 0.64s; }
.scroll-reveal.revealed .reveal-child:nth-child(18) { animation-delay: 0.66s; }
.scroll-reveal.revealed .reveal-child:nth-child(19) { animation-delay: 0.68s; }
.scroll-reveal.revealed .reveal-child:nth-child(20) { animation-delay: 0.7s; }
.scroll-reveal.revealed .reveal-child:nth-child(21) { animation-delay: 0.72s; }
.scroll-reveal.revealed .reveal-child:nth-child(22) { animation-delay: 0.74s; }
.scroll-reveal.revealed .reveal-child:nth-child(23) { animation-delay: 0.76s; }
.scroll-reveal.revealed .reveal-child:nth-child(24) { animation-delay: 0.78s; }
.scroll-reveal.revealed .reveal-child:nth-child(25) { animation-delay: 0.8s; }
.scroll-reveal.revealed .reveal-child:nth-child(26) { animation-delay: 0.82s; }
.scroll-reveal.revealed .reveal-child:nth-child(27) { animation-delay: 0.84s; }
.scroll-reveal.revealed .reveal-child:nth-child(28) { animation-delay: 0.86s; }
.scroll-reveal.revealed .reveal-child:nth-child(29) { animation-delay: 0.88s; }
.scroll-reveal.revealed .reveal-child:nth-child(30) { animation-delay: 0.9s; }

@keyframes revealChild {
  to {
    opacity: 1;
    transform: perspective(800px) translateY(0) rotateX(0deg) scale(1);
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-reveal.revealed .reveal-child {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .card-hover,
  .card-hover:hover,
  button,
  button:hover,
  button:active,
  a[href^="tel:"],
  a[href^="tel:"]:hover,
  a[href^="tel:"]:active {
    transform: none;
    transition: none;
  }
}

@media print {
  .sticky-mobile-bar, header, footer {
    display: none !important;
  }
}

/* Blog Post Content (admin-authored, plain HTML - no per-element utility
   classes required). Mirrors the spacing/typography already used by the
   hand-built static blog posts so admin-created posts look identical. */
.post-content > * + * {
  margin-top: 2rem;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary-navy);
}

.post-content h2 + p,
.post-content h3 + p {
  margin-top: 0.75rem;
}

.post-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary-navy);
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li + li {
  margin-top: 0.5rem;
}

.post-content a {
  color: var(--color-trade-blue);
  font-weight: 600;
  text-decoration: none;
}

.post-content a:hover {
  color: var(--color-trade-blue-hover);
  text-decoration: underline;
}

.post-content .callout {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.post-content .callout > * + * {
  margin-top: 0.5rem;
}

.post-content .callout h3 {
  font-size: 1.125rem;
}
