/* ============================================
   THE REAL CLEAN COMPANY — styles.css
   Brand: Navy #003b87, Mid-blue #2f6dbd,
          Light blue gradient #bbd4ec→#e1ebf5
   Font: Crique Grotesk (brand font)
   ============================================ */

/* Crique Grotesk Medium — base text */
@font-face {
  font-family: 'Crique Grotesk';
  src: url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.eot');
  src: url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.eot?#iefix') format('embedded-opentype'),
       url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.woff2') format('woff2'),
       url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.woff') format('woff'),
       url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.ttf') format('truetype'),
       url('https://db.onlinewebfonts.com/t/7ac5b5e00dfb4c46d71852429dc4eafc.svg#CriqueGroteskMedium') format('svg');
  font-weight: 100 600;
  font-style: normal;
  font-display: swap;
}

/* Crique Grotesk Bold — labels / card text (font-weight: 700) */
@font-face {
  font-family: 'Crique Grotesk';
  src: url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.eot');
  src: url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.eot?#iefix') format('embedded-opentype'),
       url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.woff2') format('woff2'),
       url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.woff') format('woff'),
       url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.ttf') format('truetype'),
       url('https://db.onlinewebfonts.com/t/0422470d8460bcc298578d02059ad5ca.svg#CriqueGrotesk-Bold') format('svg');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

/* Crique Grotesk Heavy — headings (font-weight: 900) */
@font-face {
  font-family: 'Crique Grotesk';
  src: url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.eot');
  src: url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.eot?#iefix') format('embedded-opentype'),
       url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.woff2') format('woff2'),
       url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.woff') format('woff'),
       url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.ttf') format('truetype'),
       url('https://db.onlinewebfonts.com/t/56196b8b12da75c4f5cb429950344edb.svg#CriqueGrotesk-Heavy') format('svg');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ── Custom Properties ─────────────────────── */
:root {
  --navy:        #003b87;
  --mid-blue:    #2f6dbd;
  --light-blue:  #e0ebf4;
  --grad-top:    #bbd4ec;
  --grad-btm:    #e1ebf5;
  --white:       #ffffff;
  --shadow-sm:   0 2px 12px rgba(0, 59, 135, 0.10);
  --shadow-md:   0 6px 28px rgba(0, 59, 135, 0.18);
  --shadow-lg:   0 12px 48px rgba(0, 59, 135, 0.24);
  --radius-card: 16px;
  --radius-pill: 50px;
  --transition:  0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Crique Grotesk', sans-serif;
  font-weight: 700;
  background: linear-gradient(180deg, var(--grad-top) 0%, var(--grad-btm) 100%);
  background-attachment: fixed;
  color: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Decorative Layer ─────────────────────── */
/* Stars and bubbles sit in a fixed layer behind all content */
.deco-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco-layer svg {
  position: absolute;
  opacity: 0.85;
  /* Parallax offset — uses the independent `translate` property so it
     composites on top of `transform` (used by float keyframe animations) */
  translate: 0 var(--py, 0px);
  will-change: transform, translate;
}

/* All page sections sit above the deco layer */
nav, section, footer, header {
  position: relative;
  z-index: 1;
}

/* ── Navigation ────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  padding: 0 clamp(1rem, 4vw, 3rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Hidden until user scrolls past hero logo */
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
  pointer-events: none;
}

.site-nav.nav-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-logo img {
  height: 52px;
  width: auto;
  transition: transform var(--transition);
}
.nav-logo img:hover { transform: scale(1.05); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--mid-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--mid-blue); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  width: 36px;
  height: 36px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger open state */
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  /* Only show when nav itself is visible */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  left: 0; right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  padding: 1.5rem 2rem 2rem;
  z-index: 99;
  box-shadow: var(--shadow-md);
  border-top: 2px solid var(--light-blue);
  flex-direction: column;
  gap: 1.25rem;
  animation: slideDown 0.25s ease;
}
.nav-mobile.open { display: flex; opacity: 1; pointer-events: auto; }
.site-nav.nav-visible ~ .nav-mobile.open { opacity: 1; pointer-events: auto; }
.nav-mobile a {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-blue);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--mid-blue); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ──────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

/* Floating bubble/star layer specific to hero */
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-deco svg { position: absolute; opacity: 0.9; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  animation: heroReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-logo {
  display: block;
  max-width: 640px;  /* wider to suit the landscape logo */
  width: 72%;  /* smaller on mobile */
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 4px 16px rgba(0,59,135,0.15));
  animation: heroReveal 0.8s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
  animation: heroReveal 0.8s 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--mid-blue);
  font-weight: 700;
  margin-bottom: 1.75rem;
  line-height: 1.5;
  animation: heroReveal 0.8s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: 'Crique Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 59, 135, 0.3);
  transition: transform var(--transition), box-shadow var(--transition), background 0.2s;
  animation: heroReveal 0.8s 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 59, 135, 0.4);
  background: var(--mid-blue);
}
.btn-primary:active { transform: translateY(0) scale(0.99); }

/* ── White stroke on text floating over gradient background ─────────────── */
/* Mimics the stroke effect used in the original leaflet artwork */
.hero h1,
.hero-sub,
.section-title {
  -webkit-text-stroke: 3px #ffffff;
  paint-order: stroke fill;
}
.hero h1 {
  -webkit-text-stroke-width: 5px;
}
/* Contact title is white-on-navy — no stroke needed */
#contact .section-title {
  -webkit-text-stroke-width: 0;
}

/* ── Section Base ──────────────────────────── */
.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.section-underline {
  width: 64px;
  height: 4px;
  background: var(--mid-blue);
  border-radius: 2px;
  margin: 0 auto 3rem;
}

/* ── Services ──────────────────────────────── */
#services {
  background: transparent;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: row;   /* icon + text side-by-side on mobile */
  align-items: center;
  gap: 0.85rem;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--light-blue);
}

@media (min-width: 640px) {
  .service-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem 1.5rem;
    gap: 0.75rem;
  }
}

.service-icon {
  width: 42px;
  height: 42px;
  background: var(--light-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-icon svg { width: 24px; height: 24px; }

@media (min-width: 640px) {
  .service-icon { width: 52px; height: 52px; border-radius: 12px; }
  .service-icon svg { width: 28px; height: 28px; }
}

.service-name {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--navy);
}
.service-desc {
  font-size: 0.92rem;
  color: var(--mid-blue);
  font-weight: 700;
  line-height: 1.4;
}

/* ── Why Choose Us ─────────────────────────── */
#why-us {
  background: transparent;
}

.why-card {
  background: var(--light-blue);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255,255,255,0.65);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: transform var(--transition), background 0.2s;
}
.trust-item:hover {
  transform: translateX(4px);
  background: rgba(255,255,255,0.9);
}

.trust-star {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.trust-text {
  font-weight: 900;
  font-size: 0.97rem;
  color: var(--navy);
  line-height: 1.3;
}

/* ── Contact ───────────────────────────────── */
#contact-wrap {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

/* Subtle wave divider */
#contact-wrap::before {
  content: '';
  display: block;
  height: 60px;
  background: linear-gradient(180deg, var(--grad-btm) 0%, var(--navy) 100%);
}

.contact-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.contact-deco svg { position: absolute; opacity: 0.15; }

#contact {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 7rem);
}

#contact .section-title { color: var(--white); }
#contact .section-underline { background: rgba(255,255,255,0.4); }

.contact-lede {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  font-weight: 700;
}

.contact-card {
  background: var(--white);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.contact-card h3 {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.contact-card .contact-tag {
  font-size: 0.85rem;
  color: var(--mid-blue);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: var(--light-blue);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--navy);
  transition: transform var(--transition), box-shadow var(--transition), background 0.2s;
  text-decoration: none;
}
.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: #cfe1f5;
}
.contact-item:last-child { margin-bottom: 0; }

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }

/* ── Footer ────────────────────────────────── */
footer {
  background: #002b6b;
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 1.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
}
footer strong {
  color: var(--white);
  font-weight: 900;
}
footer p + p { margin-top: 0.3rem; font-size: 0.8rem; opacity: 0.7; }

/* ── Responsive ────────────────────────────── */
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Centre last odd card */
  .service-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .service-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin: 0;
  }
  /* Centre last item when it's the 7th (position 1 in last row of 3) */
  .service-card:nth-child(7):nth-last-child(1) {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .nav-links  { display: none; }
}

/* ── Floating Animations ───────────────────── */
@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-18px) rotate(8deg); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(14px) rotate(-6deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.05); }
}
@keyframes floatD {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(12deg); }
  66%       { transform: translateY(8px) rotate(-8deg); }
}

.float-a { animation: floatA 6s ease-in-out infinite; }
.float-b { animation: floatB 7.5s ease-in-out infinite; }
.float-c { animation: floatC 5.5s ease-in-out infinite; }
.float-d { animation: floatD 8s ease-in-out infinite; }

/* Delay variants */
.delay-1 { animation-delay: -1.5s; }
.delay-2 { animation-delay: -3s; }
.delay-3 { animation-delay: -4.5s; }
.delay-4 { animation-delay: -6s; }

/* ── Pop / reappear animation ──────────────
   Some bubbles & stars occasionally burst and re-emerge.
   Uses only `opacity` so it doesn't conflict with float `transform`. */
@keyframes popBubble {
  0%,  40%, 100% { opacity: 0.85; }
  52%             { opacity: 0;    }   /* invisible (popped) */
  53%             { opacity: 0;    }   /* stays invisible briefly */
  70%             { opacity: 0.85; }   /* fades back in */
}
@keyframes popStar {
  0%,  55%, 100% { opacity: 0.85; }
  67%             { opacity: 0;    }
  68%             { opacity: 0;    }
  82%             { opacity: 0.85; }
}

/* Pop animation applied via inline `style` on selected elements in HTML,
   so each element can carry its own delay without CSS cascade conflicts. */

/* ── Larger hero logo on desktop ───────────── */
@media (min-width: 640px) {
  .hero-logo  { max-width: 860px; width: 100%; }
  .hero-content { max-width: 960px; }
}
