/* ─── D & B Garage Doors — Liquid Glass Design System ─── */

/* Custom Properties */
:root {
  /* Color Hunt: #EFECE3 #8FABD4 #4A70A9 #000000 */
  --primary: #4a70a9;
  --primary-light: #8fabd4;
  --primary-dark: #395882;
  --accent: #8fabd4;
  --surface: #efece3;
  --surface-raised: #e4e1d8;
  --surface-glass: rgba(255, 255, 255, 0.62);
  --border-glass: rgba(74, 112, 169, 0.2);
  --text-primary: #000000;
  --text-muted: #4a5568;
  --shadow-lg: 0 18px 50px rgba(74, 112, 169, 0.12);
  --ring: 0 0 0 3px rgba(74, 112, 169, 0.35);
}

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Accessibility */
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #000;
  color: #efece3;
  font-weight: 700;
  z-index: 9999;
}
.skip:focus { top: 12px; }

/* Glass utility */
.glass-card {
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Aura-inspired: stronger gloss + depth (use with .glass-card) */
.glass-card--gloss {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.72) 42%,
    rgba(143, 171, 212, 0.14) 100%
  );
  box-shadow:
    0 0 0 1px rgba(74, 112, 169, 0.12) inset,
    0 16px 48px -12px rgba(74, 112, 169, 0.18);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

/* Subtle hover lift for cards (homepage) */
.glass-card--lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}
.glass-card--lift:hover {
  transform: translateY(-5px);
  border-color: rgba(74, 112, 169, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65) inset,
    0 22px 55px -14px rgba(74, 112, 169, 0.22);
}

/* Sticky nav bar — tightens slightly when scrolled (Aura-style) */
#site-header {
  transition: padding 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
#site-header.site-header--scrolled {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
  border-color: rgba(74, 112, 169, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 12px 40px -8px rgba(74, 112, 169, 0.16);
}

/* ─── Keyframe Animations ─── */

@keyframes blob-morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
  75% { border-radius: 60% 30% 60% 40% / 60% 40% 30% 70%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(2deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.4; }
  50% { transform: scale(1); opacity: 0.15; }
  100% { transform: scale(0.95); opacity: 0.4; }
}

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Gradient Text ─── */

.gradient-text {
  background-image: linear-gradient(135deg, #4a70a9, #8fabd4, #395882, #4a70a9);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

/* ─── Form Styles ─── */

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: rgba(74, 112, 169, 0.55);
  box-shadow: var(--ring);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 120px; resize: vertical; }

/* ─── Mobile Bottom Bar ─── */

.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: rgba(239, 236, 227, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  display: none;
}

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

/* ─── Homepage section textures (pure CSS, layered, subtle) ─── */

#top {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(0, 0, 0, 0.02) 4px,
    rgba(0, 0, 0, 0.02) 5px
  );
  background-repeat: repeat;
}

/* feTurbulence noise tiles — opacity tuned per section */
#services {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

#why {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

#service-areas {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

#testimonials {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

footer[aria-label="Footer"] {
  background-color: var(--surface);
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  background-repeat: repeat;
}

/* ─── Reduced Motion ─── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .glass-card--lift,
  .glass-card--lift:hover {
    transform: none !important;
    box-shadow: none;
  }
  #site-header.site-header--scrolled {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}
