/* ==========================================================================
   SPRUCE CLEANING - CSS DESIGN SYSTEM
   ========================================================================== */

/* --- Fonts (Local Fallbacks for Bricolage Grotesque & Figtree) --- */

/* Bricolage Grotesque */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Figtree */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Global Reset & Core Styles --- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  padding: 0;
  background: #F4FAFB;
}
body {
  font-family: 'Figtree', system-ui, sans-serif;
  color: #0E2A33;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: #BCE9EF;
  color: #0E2A33;
}

/* --- Micro-Animations --- */
@keyframes spr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes spr-bob {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50% { transform: translateY(9px); opacity: .35; }
}
@keyframes spr-twinkle {
  0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(90deg); }
}

/* Mobile dropdown animation */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

#nav-drop {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(14, 42, 51, 0.16);
  border: 1px solid rgba(14, 42, 51, 0.06);
  position: fixed;
  top: 70px;
  left: clamp(12px, 4vw, 48px);
  right: clamp(12px, 4vw, 48px);
  z-index: 99;
}

#nav-drop.open {
  display: flex;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#nav-drop a {
  text-decoration: none;
  color: #294A52;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  transition: background 0.2s ease, color 0.2s ease;
}

#nav-drop a:hover {
  background: rgba(15, 126, 142, 0.08);
  color: #0F7E8E;
}

/* --- Mobile view responsive overrides --- */
@media (max-width: 860px) {
  /* Hide desktop links and show menu button via script or css rules */
  [data-nav-links] {
    display: none !important;
  }
  [data-nav-menubtn] {
    display: inline-flex !important;
  }
}

@media (max-width: 600px) {
  /* Prevent horizontal padding issues on small screens */
  section {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  
  /* Hero typography */
  [data-hero-line="a"] h1,
  [data-hero-line="b"] h1 {
    font-size: 38px !important;
    line-height: 1.1 !important;
  }
  [data-hero-line="a"] p,
  [data-hero-line="b"] p {
    font-size: 16px !important;
    margin-top: 14px !important;
  }
}

@media (max-width: 480px) {
  /* Force main grid layouts to stack in single columns to avoid layout squishing and overflow */
  #services div[style*="grid-template-columns"],
  #how div[style*="grid-template-columns"],
  #gallery div[style*="grid-template-columns"]:not([style*="gap: 8px"]), /* do not stack before/after grid */
  #why div[style*="grid-template-columns"],
  #pricing div[style*="grid-template-columns"],
  #reviews div[style*="grid-template-columns"],
  #book div[style*="grid-template-columns"],
  footer div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Pricing standard card padding fixes */
  #pricing div[style*="padding: 40px 32px"] {
    padding: 30px 20px !important;
  }
  
  /* Trust strip layout */
  div[style*="max-width: 1180px; margin: 0 auto; padding: 20px"] {
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center;
  }
  div[style*="max-width: 1180px; margin: 0 auto; padding: 20px"] span[style*="opacity: 0.3"] {
    display: none !important;
  }
  
  /* Form input layout on tiny screens */
  form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  
  /* Footer copyrights and terms alignment */
  footer div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center;
  }
}
