/* =========================================================
   NORTHLINE BATHWORKS – STYLES
   This file is "mobile-first": the base styles are for phones.
   Media queries near the bottom add layout for bigger screens.
   ========================================================= */


/* ---------- 1. VARIABLES ----------
   Change a value here and it updates everywhere it's used. */
:root {
  /* Colors */
  --color-bg: #FAF7F2;          /* warm white page background */
  --color-bg-alt: #F5EFE4;      /* very light warm sand tint for alternating sections */
  --color-surface: #FFFFFF;     /* cards and the form */
  --color-text: #2B2B2B;        /* dark charcoal text */
  --color-text-muted: #5E5A55;  /* softer text for notes and captions */
  --color-border: #E2DCD3;      /* thin lines around cards and inputs */
  --color-accent: #2F5D50;      /* muted evergreen: the one accent, for buttons and small highlights only */
  --color-accent-dark: #22463C; /* darker evergreen for button hover */
  --color-placeholder: #CFCAC3; /* grey image placeholder boxes */
  --color-error: #A33A2B;       /* error message text */

  /* Fonts */
  --font-main: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing and shape */
  --space-section: 3.5rem;      /* vertical padding of each section */
  --radius: 10px;               /* rounded corners */
  --max-width: 1120px;          /* widest the content gets */
}


/* ---------- 2. BASE / RESET ---------- */

/* Makes width calculations include padding and borders */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Smooth scrolling when you click links like "#quote" */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--color-accent);
}

/* Centers content and keeps a gap from the screen edges */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* A narrower container, used for the FAQ so lines aren't too long */
.narrow {
  max-width: 760px;
}


/* ---------- 3. BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #FFFFFF;
  background: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

/* A visible outline for keyboard users */
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-small {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
}

/* Outline button: same accent color, but hollow */
.btn-outline {
  color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  color: #FFFFFF;
}


/* ---------- 4. GREY IMAGE PLACEHOLDERS ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-placeholder);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;   /* keeps a photo-like shape at any width */
  width: 100%;
}


/* ---------- 5. HEADER ---------- */
.site-header {
  position: sticky;      /* stays at the top while scrolling */
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;      /* compact on phones; 700px+ uses 0.75rem (see media query) */
  padding-bottom: 0.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;      /* never wrap the logo onto two lines */
}

/* Holds the header buttons in a row */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Header buttons: always one line, and a little slimmer on phones */
.site-header .btn {
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  line-height: 1.3;
}

/* Phones: hide the header quote button (the bottom bar does that job)
   and hide the long phone-number text, so the button just says "Call now" */
.header-quote,
.call-long {
  display: none;
}

.logo span {
  font-weight: 400;
}


/* ---------- 6. HERO + FORM ---------- */
.hero {
  padding: 2.5rem 0 var(--space-section);
}

/* On phones the hero is one column: text, then form */
.hero-grid {
  display: grid;
  gap: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* Hide the hero photo on small phones to keep the form close to the top */
.hero-image {
  display: none;
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  scroll-margin-top: 5rem; /* stops the sticky header covering the form when jumping to #quote */
}

.form-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.form-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Labels sit above their inputs */
label {
  display: block;
  font-weight: 500;
  margin: 1rem 0 0.35rem;
}

input,
select {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.form-error {
  color: var(--color-error);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

#quote-form .btn {
  margin-top: 1.25rem;
}

/* Greyed-out button while the form is sending */
#quote-form .btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Hides the Netlify honeypot field from people without using display:none,
   which some spam bots detect and skip. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.thank-you {
  padding: 1rem 0 0;
}

.thank-you h3 {
  color: var(--color-accent);
}

.thank-you:focus {
  outline: none;
}


/* ---------- 7. TRUST STRIP ---------- */
.trust-strip {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 1.25rem 0;
}

/* Stacked on phones, side by side on bigger screens */
.trust-list {
  list-style: none;
  margin: 0 auto;
  display: grid;
  gap: 0.6rem;
  font-weight: 600;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #FFFFFF;
  font-size: 0.85rem;
}


/* ---------- 8. GENERAL SECTIONS ---------- */
.section {
  padding: var(--space-section) 0;
}

/* Every other section gets a slightly darker background */
.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.section-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

/* Grid used for services and testimonials. 1 column on phones. */
.card-grid {
  display: grid;
  gap: 1.25rem;
}


/* ---------- 9. SERVICES ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.card-image {
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}


/* ---------- 10. HOW IT WORKS ---------- */
.steps {
  list-style: none;   /* we draw our own numbers instead */
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #FFFFFF;
  font-weight: 700;
}

.step h3 {
  font-size: 1.15rem;
}

.step p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}


/* ---------- 11. BEFORE / AFTER ---------- */
.ba-grid {
  display: grid;
  gap: 1.25rem;
}

.ba-item {
  margin: 0;  /* <figure> has default margins we don't want */
}

.ba-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}


/* ---------- 12. TESTIMONIALS ---------- */
.testimonial {
  position: relative;
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.25rem 1.25rem 1.25rem;
}

/* The small "Sample" label in the corner */
.sample-tag {
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.testimonial p {
  font-size: 1.05rem;
}

.testimonial footer {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}


/* ---------- 13. FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;      /* hide the default triangle */
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Hide the default triangle in Safari */
.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Our own "+" sign, which turns into "−" when open */
.faq-item summary::after {
  content: "+";
  color: var(--color-accent);
  font-size: 1.3rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
}


/* ---------- 14. FINAL CALL TO ACTION ---------- */
.final-cta {
  background: var(--color-bg-alt);
  padding: var(--space-section) 0;
  text-align: center;
}

.final-cta h2 {
  font-size: 1.6rem;
}

.final-cta p {
  color: var(--color-text-muted);
}

/* Buttons stack on phones */
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}


/* ---------- 15. FOOTER ---------- */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.disclaimer {
  opacity: 0.75;
}


/* ---------- 16. STICKY QUOTE BAR (PHONES ONLY) ----------
   A bar fixed to the bottom of the screen with one button.
   script.js adds the "is-hidden" class while the form is on screen.
   The media query below hides the bar completely on tablets and desktops. */
.quote-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  /* env(...) adds room for the iPhone home indicator */
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, visibility 0.25s ease;
}

/* Slides the bar down out of view. "visibility: hidden" also stops
   keyboard users tabbing to a button they can't see. */
.quote-bar.is-hidden {
  transform: translateY(100%);
  visibility: hidden;
}

/* Extra space at the bottom of the footer so the bar doesn't cover the disclaimer */
.site-footer {
  padding-bottom: 6.5rem;
}


/* =========================================================
   MEDIA QUERIES: layout changes for bigger screens
   ========================================================= */

/* Tablets and up (700px wide or more) */
@media (min-width: 700px) {
  :root {
    --space-section: 3.75rem;   /* section padding on bigger screens (was 5rem, now 25% less) */
  }

  /* No sticky quote bar on bigger screens: the form is easy to reach */
  .quote-bar {
    display: none;
  }

  /* Put the footer's normal padding back, since there's no bar to make room for */
  .site-footer {
    padding-bottom: 2rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  .section-title,
  .final-cta h2 {
    font-size: 2rem;
  }

  /* Trust items in one row */
  .trust-list {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 2.5rem;
  }

  /* Before and after side by side */
  .ba-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* CTA buttons in a row */
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }

  /* Show the hero photo again */
  .hero-image {
    display: flex;
    margin-top: 1.5rem;
  }
}

/* Desktops (1000px wide or more) */
@media (min-width: 1000px) {
  h1 {
    font-size: 2.9rem;
  }

  /* Hero: text on the left, form on the right */
  .hero-grid {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
    gap: 3rem;
  }

  /* Services, steps and testimonials in 3 columns */
  .card-grid,
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
