/* ============================================================
   RIDGELINE POOLS v2 — global.css
   White-base design: white backgrounds, dark text, maroon accents
   Mobile-first: base styles = mobile, min-width queries = larger
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,400;0,600;0,700;0,800;0,900;1,400&family=Lora:ital,wght@0,400;0,500;1,400&family=Barlow:wght@300;400;500;600&display=swap');

:root {

  /* ── Brand Colors ── */
  --maroon:       #8B0000;
  --maroon-dk:    #6B0000;
  --maroon-lt:    #C41E1E;
  --black:        #0A0A0A;
  --white:        #FFFFFF;

  /* ── Greys ── */
  --grey-50:      #F9F9F9;
  --grey-100:     #F2F2F2;
  --grey-200:     #E0E0E0;
  --grey-300:     #B0B0B0;
  --grey-400:     #777777;
  --grey-500:     #444444;
  --grey-600:     #2A2A2A;

  /* ── Text ── */
  --text-primary:   #1A1A1A;   /* headings */
  --text-body:      #444444;   /* body copy */
  --text-muted:     #777777;   /* labels, captions */
  --text-white:     #FFFFFF;
  --text-maroon:    #8B0000;

  /* ── Backgrounds ── */
  --bg-white:     #FFFFFF;
  --bg-light:     #F9F9F9;
  --bg-dark:      #111111;
  --bg-maroon:    #8B0000;

  /* ── Typography ── */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-serif:   'Lora', serif;

  /* ── Spacing ── */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   2rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* ── Transitions ── */
  --transition:       0.25s ease;
  --transition-slow:  0.45s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Clip incidental horizontal overflow (full-bleed sections, carousels,
     absolutely-positioned cards, etc.). This MUST live on <html>, not <body>:
       • On <html> it applies to the viewport's scroller, so the sticky
         navbar keeps sticking to the top — sticky stays intact.
       • On <body> it would make <body> its own (non-scrolling) container and
         break the sticky navbar.
     We use `clip` (widely supported): it stops horizontal scroll WITHOUT
     creating a scroll container, so `position: sticky` keeps working. */
  overflow-x: clip;
}

/* White base — opposite of v1 */
body {
  background-color: var(--bg-white);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* `clip` clips horizontal overflow WITHOUT making <body> a scroll container,
     so the sticky navbar keeps working (unlike `hidden`, which would break it).
     Belt-and-suspenders alongside the same rule on <html> above. */
  overflow-x: clip;
}

img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Layout ── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.25rem;
}

@media (min-width: 768px) { .container { padding: 0 2rem; } }

.section-padding { padding: 4.5rem 0; }

@media (min-width: 768px)  { .section-padding { padding: 6rem 0; } }


/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.6rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2rem, 5.5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 2.6rem); }
h4 { font-size: clamp(1.15rem, 2.5vw, 1.8rem); }
h5 { font-size: 1.05rem; }

@media (min-width: 768px) { h5 { font-size: 1.2rem; } }

p {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  font-size: 0.975rem;
  color: var(--text-body);
}

@media (min-width: 768px) { p { font-size: 1.05rem; } }

/* ── Eyebrow label ── */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--maroon-lt);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.75rem;
  height: 2px;
  background: var(--maroon-lt);
  flex-shrink: 0;
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Image zoom ── */
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform 0.6s ease; }
.img-zoom:hover img { transform: scale(1.04); }


/* ============================================================
   HERO SECTION FOR ALL WEB PAGES ASIDE FROM HOME PAGE
   ============================================================ */
.page-hero {
  height: 500px;
}


/* ══════════════════════════════════════════════
   FOOTER
   Dark bg, 4-column grid, social icons,
   newsletter form, bottom bar
══════════════════════════════════════════════ */

#footer {
  background: var(--grey-600);
  padding: 5rem 0 0;
}

/* ── 4-column grid ── */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 2fr; gap: 3rem; }
}

/* ── Shared column styles ── */
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col p {
  font-size: 0.875rem;
  color: var(--grey-300);
  line-height: 1.7;
}

/* ── Brand column ── */
.footer-logo-text {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-logo-text span { color: var(--maroon-lt); }

.footer-brand p { margin-bottom: 1.5rem; }

/* Social icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-300);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.footer-social a:hover {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--white);
}

.footer-social a svg { width: 16px; height: 16px; }

/* ── Nav column ── */
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--grey-300);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--white); }

/* ── Contact column ── */
.footer-contact address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact p,
.footer-contact a {
  font-size: 0.875rem;
  color: var(--grey-300);
  line-height: 1.6;
  transition: color var(--transition);
}

.footer-contact a:hover { color: var(--white); }

/* ── Newsletter column ── */
.footer-newsletter p { margin-bottom: 1.25rem; }

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-form input[type="email"] {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}

.footer-form input[type="email"]::placeholder { color: var(--grey-400); }

.footer-form input[type="email"]:focus {
  border-color: var(--maroon);
  background: rgba(255,255,255,0.09);
}

.footer-form .btn-primary { width: 100%; justify-content: center; }

/* ── Bottom bar ── */
.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.footer-privacy {
  font-size: 0.78rem;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
  transition: color var(--transition);
}
.footer-privacy:hover { color: var(--white); }

/* ── Scroll to top button ── */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), background var(--transition), transform var(--transition);
  z-index: 900;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top-btn:hover {
  background: var(--maroon-dk);
  transform: translateY(-2px);
}

.scroll-top-btn svg { width: 18px; height: 18px; }