/* ============================================
   Centennial Plumbing & Heating
   Design System & Base Styles
   ============================================ */

/* --------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #00004D;        /* Dark Navy - backgrounds */
  --color-secondary: #000066;      /* Medium Blue - headings, buttons */
  --color-accent: #B9D8ED;         /* Light Blue - accents */
  --color-accent-dark: #6AB6EA;    /* Medium Light Blue - headings on dark bg */
  --color-heading: #245CA1;        /* Heading Blue - section titles */
  --color-cta: #EC1C24;            /* Red - CTAs, highlights */

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-off-white: #f8f9fa;
  --color-gray-light: #e9ecef;
  --color-gray: #6c757d;
  --color-gray-dark: #343a40;
  --color-black: #1A1818;

  /* Typography */
  --font-family: "myriad-pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Font Sizes (Mobile First) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  /* Spacing Scale */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.5rem;       /* 24px */
  --space-6: 2rem;         /* 32px */
  --space-7: 2.5rem;       /* 40px */
  --space-8: 3rem;         /* 48px */
  --space-9: 4rem;         /* 64px */
  --space-10: 5rem;        /* 80px */

  /* Layout */
  --container-max: 1200px;
  --container-padding: var(--space-4);

  /* Border Radius - None (sharp corners) */
  --radius-none: 0;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-full: 9999px;   /* For pills/circles only */

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
}

/* --------------------------------------------
   Breakpoints Reference
   - Mobile: 320px - 767px
   - Tablet: 768px - 1024px
   - Desktop: 1025px+
   -------------------------------------------- */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* --------------------------------------------
   Typography
   -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

p {
  margin-bottom: var(--space-4);
}

/* --------------------------------------------
   Layout Utilities
   -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.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;
}

/* --------------------------------------------
   Button Styles
   -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-cta);
  color: var(--color-white);
  border-color: var(--color-cta);
}

.btn--primary:hover {
  background-color: #c62828;
  border-color: #c62828;
  color: var(--color-white);
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn--secondary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn--outline:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* --------------------------------------------
   Section Base Styles
   -------------------------------------------- */
section {
  padding: var(--space-8) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--space-10) 0;
  }
}

/* Dark Background Sections */
.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section--dark a {
  color: var(--color-accent);
}

/* Light Background Sections */
.section--light {
  background-color: var(--color-off-white);
}

/* --------------------------------------------
   Form Styles
   -------------------------------------------- */
input,
textarea,
select {
  font-family: var(--font-family);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-gray-light);
  width: 100%;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(30, 87, 153, 0.25);
}

/* Focus styles for interactive elements - Accessibility */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* Skip link - Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  z-index: 1000;
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.skip-link:focus {
  top: 0;
}

label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

/* --------------------------------------------
   Component Styles (BEM)
   Add section-specific styles below
   -------------------------------------------- */

/* --------------------------------------------
   Header
   -------------------------------------------- */
.header {
  background-color: var(--color-white);
  padding: var(--space-3) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.header__logo {
  display: block;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .header__logo {
    padding-left: var(--space-8);
  }
}

.header__logo img {
  height: 40px;
  width: auto;
}

@media (min-width: 768px) {
  .header__logo img {
    height: 50px;
  }
}

@media (min-width: 1025px) {
  .header__logo img {
    height: 61px;
  }
}

.header__actions {
  display: none;
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .header__actions {
    display: flex;
  }
}

/* Phone Button - Pill Style */
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--color-accent);
  color: var(--color-primary);
  padding: 0.425rem var(--space-4);
  border-radius: var(--radius-full);
  font-size: 1.1875rem; /* 19px - converted from 26.7247pt AI */
  font-weight: 900;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header__phone:hover {
  background-color: #9FCCE5; /* Slightly darker accent */
  color: var(--color-primary);
}

.header__phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header__phone-icon img {
  width: 24px;
  height: 24px;
}

.header__phone-number {
  white-space: nowrap;
}

/* Schedule Service Button - Pill Style */
.header__cta {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
  border-radius: var(--radius-full);
  font-size: 1.1875rem; /* 19px - converted from 26.7247pt AI */
  font-weight: 900;
  padding: calc(0.425rem - 2px) var(--space-5); /* Account for 2px border from .btn */
}

.header__cta:hover {
  background-color: #9FCCE5; /* Slightly darker accent */
  border-color: #9FCCE5;
  color: var(--color-primary);
}

/* Mobile Toggle */
.header__mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

@media (min-width: 768px) {
  .header__mobile-toggle {
    display: none;
  }
}

.header__mobile-toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  transition: all var(--transition-fast);
}

.header__mobile-toggle[aria-expanded="true"] .header__mobile-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__mobile-toggle[aria-expanded="true"] .header__mobile-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header__mobile-toggle[aria-expanded="true"] .header__mobile-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
.header__mobile-menu {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background-color: var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.header__mobile-menu--open {
  display: flex;
}

@media (min-width: 768px) {
  .header__mobile-menu {
    display: none !important;
  }
}

/* --------------------------------------------
   Footer
   -------------------------------------------- */
.footer {
  background-color: var(--color-white);
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-5) var(--space-4);
}

.footer__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.footer__phone:hover {
  opacity: 0.8;
  color: var(--color-primary);
}

.footer__phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer__phone-icon img {
  width: 40px;
  height: 40px;
}

.footer__phone-number {
  font-size: 2.2rem; /* ~35px - converted from 50.1966pt AI */
  font-weight: 900;
  white-space: nowrap;
}

/* --------------------------------------------
   Hero Section
   -------------------------------------------- */
.hero {
  padding: 0;
  background-color: var(--color-primary);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 400px;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 2fr 3fr;
    min-height: 450px;
  }
}

@media (min-width: 1025px) {
  .hero__inner {
    min-height: 500px;
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
  order: 2;
}

@media (min-width: 768px) {
  .hero__content {
    padding: var(--space-8) var(--space-6);
    order: 1;
  }
}

@media (min-width: 1025px) {
  .hero__content {
    padding: var(--space-9) var(--space-8);
  }
}

.hero__title {
  font-size: 2rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 2.375rem;
  }
}

@media (min-width: 1025px) {
  .hero__title {
    font-size: 2.625rem;
  }
}

.hero__features {
  list-style: none;
  margin-bottom: var(--space-5);
}

.hero__features li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .hero__features li {
    font-size: 1.0625rem;
  }
}

@media (min-width: 1025px) {
  .hero__features li {
    font-size: 1.125rem;
  }
}

.hero__features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-cta);
  font-size: 1.25em;
  line-height: 1;
  top: 0.1em;
}

.hero__phone {
  display: inline-block;
  font-size: 1.375rem;
  font-weight: var(--font-weight-black);
  color: var(--color-cta);
  text-decoration: none;
  margin-bottom: 1.35rem; /* 10% less than --space-5 */
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .hero__phone {
    font-size: 1.5rem;
  }
}

@media (min-width: 1025px) {
  .hero__phone {
    font-size: 1.625rem;
  }
}

.hero__phone:hover {
  color: var(--color-cta);
}

.hero__badges {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__badge {
  height: 44px;
  width: auto;
}

.hero__image {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  order: 1;
}

@media (min-width: 768px) {
  .hero__image {
    min-height: auto;
    order: 2;
  }
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Cards */
/* .card {} */
/* .card__image {} */
/* .card__content {} */
/* .card__title {} */

/* --------------------------------------------
   Services Section
   -------------------------------------------- */
.services {
  background-color: var(--color-accent);
  padding: var(--space-8) 0;
}

@media (min-width: 768px) {
  .services {
    padding: var(--space-9) 0;
  }
}

.services__inner {
  max-width: var(--container-max);
}

.services__title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-heading);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .services__title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1025px) {
  .services__title {
    font-size: 2.47rem; /* ~39.5px */
    padding-left: var(--space-6); /* 32px + 16px container = 48px to match hero */
  }
}

.services__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4) var(--space-6);
}

@media (min-width: 480px) {
  .services__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .services__list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5) var(--space-8);
    padding-left: calc(var(--space-8) + 30px); /* 78px - indented from title */
  }
}

@media (min-width: 1025px) {
  .services__list {
    padding-left: calc(var(--space-9) + 30px); /* 94px - indented from title */
  }
}

.services__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .services__item {
    font-size: 1.375rem;
  }
}

@media (min-width: 1025px) {
  .services__item {
    font-size: 1.51rem; /* ~24px */
  }
}

.services__item::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-image: url("/assets/images/icon_checkmark.svg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .services__item::before {
    width: 24px;
    height: 24px;
  }
}

/* --------------------------------------------
   Testimonials Section
   -------------------------------------------- */
.testimonials {
  background-color: white;
  padding: var(--space-8) 0;
}

@media (min-width: 768px) {
  .testimonials {
    padding: var(--space-9) 0;
  }
}

.testimonials__inner {
  max-width: 1000px;
}

@media (min-width: 768px) {
  .testimonials__inner {
    padding-left: var(--space-5);
  }
}

.testimonials__title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-heading);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .testimonials__title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1025px) {
  .testimonials__title {
    font-size: 2.47rem;
    margin-left: -100px;
  }
}

.testimonials__quote {
  margin: 0;
}

@media (min-width: 768px) {
  .testimonials__quote {
    margin-left: 30px;
    max-width: 660px;
  }
}

.testimonials__quote p {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1.5;
  margin: 0;
  padding-left: 0.5em;
  text-indent: -0.5em;
}

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

@media (min-width: 1025px) {
  .testimonials__quote p {
    font-size: 1.1875rem; /* ~19px - converted from 26.3665pt AI */
  }
}

/* --------------------------------------------
   Why Us Section
   -------------------------------------------- */
.why-us {
  background-color: var(--color-primary);
  padding: var(--space-9) 0;
}

@media (min-width: 768px) {
  .why-us {
    padding: var(--space-10) 0;
  }
}

.why-us__inner {
  max-width: 1100px;
}

.why-us__title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-accent-dark);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .why-us__title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1025px) {
  .why-us__title {
    font-size: 2.47rem; /* ~39.5px */
  }
}

.why-us__intro {
  font-size: 1.125rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-white);
  line-height: 1.5;
  margin-bottom: calc(var(--space-8) + 40px); /* 88px total */
  max-width: 950px;
}

@media (min-width: 768px) {
  .why-us__intro {
    font-size: 1.375rem;
  }
}

@media (min-width: 1025px) {
  .why-us__intro {
    font-size: 1.51rem; /* ~24px */
  }
}

.why-us__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
  .why-us__cards {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

@media (min-width: 768px) {
  .why-us__cards {
    gap: var(--space-5);
  }
}

.why-us__card {
  background-color: var(--color-heading);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}

@media (min-width: 768px) {
  .why-us__card {
    padding: var(--space-7) var(--space-5);
  }
}

.why-us__card-title {
  font-size: 1.125rem;
  font-weight: var(--font-weight-black);
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .why-us__card-title {
    font-size: 1.375rem;
  }
}

@media (min-width: 1025px) {
  .why-us__card-title {
    font-size: 1.51rem; /* ~24px */
  }
}

.why-us__card-text {
  font-size: 1.125rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-white);
  line-height: 1.4;
  margin: 0;
}

@media (min-width: 768px) {
  .why-us__card-text {
    font-size: 1.375rem;
  }
}

@media (min-width: 1025px) {
  .why-us__card-text {
    font-size: 1.51rem; /* ~24px */
  }
}

.why-us__tagline {
  font-size: 1.125rem;
  font-weight: var(--font-weight-black);
  color: var(--color-white);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 768px) {
  .why-us__tagline {
    font-size: 1.375rem;
  }
}

@media (min-width: 1025px) {
  .why-us__tagline {
    font-size: 1.51rem; /* ~24px */
  }
}

/* --------------------------------------------
   Contact / Schedule Service Page
   -------------------------------------------- */
.contact-page {
  background-color: var(--color-primary);
  min-height: calc(100vh - 80px);
  padding: var(--space-8) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .contact-page {
    padding: var(--space-10) 0;
  }
}

.contact-page__inner {
  width: 100%;
  max-width: 1100px;
}

.contact-page__form-wrapper {
  background-color: var(--color-white);
  padding: var(--space-5) var(--space-4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .contact-page__form-wrapper {
    padding: var(--space-6) var(--space-5);
  }
}

@media (min-width: 1025px) {
  .contact-page__form-wrapper {
    padding: var(--space-6) var(--space-6);
  }
}

.contact-page__title {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

@media (min-width: 768px) {
  .contact-page__title {
    font-size: 1.75rem;
    margin-bottom: var(--space-3);
  }
}

.contact-page__form {
  width: 100%;
}

.contact-page__form iframe {
  width: 100%;
  min-height: 539px;
}

/* Add more component styles as sections are built */
