/*
 Theme Name:   CaliChi 2026
 Theme URI:    https://calichi.com
 Description:  GeneratePress child theme for CaliChi Design Group — Civil Engineers and Dry Utility Consultants
 Author:       CaliChi Design Group
 Author URI:   https://calichi.com
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  calichi-2026
*/

/* ==========================================================================
   DESIGN SYSTEM — CaliChi 2026
   All design tokens as CSS custom properties.
   GeneratePress Customizer handles base settings;
   these override and extend for brand consistency.
   ========================================================================== */

:root {
  /* --- Colors --- */
  --cc-navy:        #1B2B4B;
  --cc-terracotta:  #C4572A;
  --cc-warm-gray:   #F5F3F0;
  --cc-text:        #2D2D2D;
  --cc-white:       #FFFFFF;
  --cc-border:      #E0DCD7;
  --cc-success:     #2E7D5B;
  --cc-error:       #B33A3A;
  --cc-navy-90:     rgba(27, 43, 75, 0.9);
  --cc-navy-60:     rgba(27, 43, 75, 0.6);
  --cc-navy-10:     rgba(27, 43, 75, 0.1);
  --cc-terra-hover: #A8481F;

  /* --- Typography --- */
  --cc-font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --cc-font-body:    'Inter', system-ui, sans-serif;

  /* --- Spacing --- */
  --cc-section-pad:       100px;
  --cc-section-pad-mobile: 60px;
  --cc-container-max:     1200px;
  --cc-container-pad:     40px;
  --cc-container-pad-mob: 20px;
  --cc-card-pad:          24px;
  --cc-grid-gap:          20px;
  --cc-grid-gap-mobile:   16px;

  /* --- Radii --- */
  --cc-radius-card:   12px;
  --cc-radius-button: 8px;
  --cc-radius-image:  8px;

  /* --- Shadows --- */
  --cc-shadow:       0 2px 8px rgba(27, 43, 75, 0.06);
  --cc-shadow-hover: 0 4px 16px rgba(27, 43, 75, 0.12);
  --cc-shadow-nav:   0 1px 3px rgba(27, 43, 75, 0.08);

  /* --- Transitions --- */
  --cc-transition: 200ms ease;
}


/* ==========================================================================
   GLOBAL RESETS & BASE
   ========================================================================== */

body {
  font-family: var(--cc-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--cc-text);
  background: var(--cc-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cc-font-heading);
  color: var(--cc-navy);
  letter-spacing: -0.01em;
}

h1 { font-size: 48px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 36px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 28px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 22px; font-weight: 600; line-height: 1.35; }
h5 { font-size: 18px; font-weight: 600; line-height: 1.4; }
h6 { font-size: 16px; font-weight: 600; line-height: 1.4; }

a {
  color: var(--cc-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--cc-transition);
}

a:hover {
  color: var(--cc-terracotta);
}

img {
  border-radius: var(--cc-radius-image);
}

::selection {
  background: var(--cc-terracotta);
  color: var(--cc-white);
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.cc-btn,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  font-family: var(--cc-font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--cc-radius-button);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--cc-transition);
  text-decoration: none;
}

.cc-btn-primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--cc-terracotta);
  color: var(--cc-white);
  border-color: var(--cc-terracotta);
}

.cc-btn-primary:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--cc-terra-hover);
  border-color: var(--cc-terra-hover);
  color: var(--cc-white);
  transform: translateY(-1px);
  box-shadow: var(--cc-shadow-hover);
}

.cc-btn-outline,
.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--cc-navy);
  border-color: var(--cc-navy);
}

.cc-btn-outline:hover,
.is-style-outline .wp-block-button__link:hover {
  background: var(--cc-navy);
  color: var(--cc-white);
}

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

.cc-btn-white:hover {
  background: transparent;
  color: var(--cc-white);
  border-color: var(--cc-white);
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.cc-card {
  background: var(--cc-white);
  border-radius: var(--cc-radius-card);
  padding: var(--cc-card-pad);
  box-shadow: var(--cc-shadow);
  transition: box-shadow var(--cc-transition), transform var(--cc-transition);
}

.cc-card:hover {
  box-shadow: var(--cc-shadow-hover);
  transform: translateY(-2px);
}

.cc-card img {
  border-radius: var(--cc-radius-image) var(--cc-radius-image) 0 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}


/* ==========================================================================
   SECTIONS
   ========================================================================== */

.cc-section {
  padding: var(--cc-section-pad) 0;
}

.cc-section-gray {
  background: var(--cc-warm-gray);
}

.cc-section-navy {
  background: var(--cc-navy);
  color: var(--cc-white);
}

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

.cc-section-navy a {
  color: var(--cc-white);
  text-decoration-color: rgba(255,255,255,0.4);
}

.cc-section-navy a:hover {
  color: var(--cc-terracotta);
}


/* ==========================================================================
   EYEBROW TEXT (small label above headings)
   ========================================================================== */

.cc-eyebrow {
  font-family: var(--cc-font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cc-terracotta);
  margin-bottom: 12px;
  display: block;
}


/* ==========================================================================
   LOGO BAR (client logos)
   ========================================================================== */

.cc-logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.cc-logo-bar img {
  max-height: 40px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all var(--cc-transition);
  border-radius: 0;
}

.cc-logo-bar img:hover {
  filter: grayscale(0%);
  opacity: 1;
}


/* ==========================================================================
   STAT CALLOUTS
   ========================================================================== */

.cc-stats {
  display: flex;
  gap: 48px;
  margin-top: 32px;
}

.cc-stat-number {
  font-family: var(--cc-font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--cc-terracotta);
  line-height: 1;
}

.cc-stat-label {
  font-size: 14px;
  color: var(--cc-navy-60);
  margin-top: 4px;
}


/* ==========================================================================
   TRUST BAR (below hero)
   ========================================================================== */

.cc-trust-bar {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-trust-bar span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--cc-terracotta);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.cc-trust-bar span:first-child::before {
  display: none;
}


/* ==========================================================================
   BENTO GRID (services layout)
   ========================================================================== */

.cc-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: var(--cc-grid-gap);
}

.cc-bento-large {
  grid-column: span 2;
  grid-row: span 1;
  min-height: 320px;
}

.cc-bento-item {
  position: relative;
  border-radius: var(--cc-radius-card);
  overflow: hidden;
  padding: var(--cc-card-pad);
  background: var(--cc-warm-gray);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-bento-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--cc-shadow-hover);
}

.cc-bento-item.cc-has-bg {
  background-size: cover;
  background-position: center;
  color: var(--cc-white);
}

.cc-bento-item.cc-has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,43,75,0.3) 0%, rgba(27,43,75,0.85) 100%);
  border-radius: var(--cc-radius-card);
}

.cc-bento-item.cc-has-bg > * {
  position: relative;
  z-index: 1;
}

.cc-bento-item.cc-has-bg h3,
.cc-bento-item.cc-has-bg h4 {
  color: var(--cc-white);
}

.cc-bento-icon {
  width: 40px;
  height: 40px;
  color: var(--cc-terracotta);
  margin-bottom: 16px;
}

.cc-bento-link {
  font-weight: 500;
  color: var(--cc-terracotta);
  text-decoration: none;
  margin-top: auto;
}

.cc-bento-link::after {
  content: ' \2192';
  transition: transform var(--cc-transition);
  display: inline-block;
}

.cc-bento-link:hover::after {
  transform: translateX(4px);
}


/* ==========================================================================
   LOCATION GRID
   ========================================================================== */

.cc-locations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--cc-grid-gap);
}

.cc-location-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--cc-radius-card);
  padding: var(--cc-card-pad);
  transition: background var(--cc-transition);
}

.cc-location-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cc-location-card h3 {
  color: var(--cc-white);
  font-size: 22px;
  margin-bottom: 4px;
}

.cc-location-card .cc-location-state {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-bottom: 16px;
}

.cc-location-card a {
  color: var(--cc-terracotta);
  font-size: 15px;
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

:focus-visible {
  outline: 3px solid var(--cc-terracotta);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--cc-navy);
  color: var(--cc-white);
  padding: 8px 16px;
  border-radius: var(--cc-radius-button);
  z-index: 10000;
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1023px) {
  .cc-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .cc-bento-large {
    grid-column: span 2;
  }

  .cc-locations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cc-stats {
    gap: 32px;
  }
}

@media (max-width: 767px) {
  :root {
    --cc-section-pad: var(--cc-section-pad-mobile);
    --cc-container-pad: var(--cc-container-pad-mob);
    --cc-grid-gap: var(--cc-grid-gap-mobile);
  }

  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 22px; }
  h4 { font-size: 20px; }

  body {
    font-size: 16px;
  }

  .cc-bento {
    grid-template-columns: 1fr;
  }

  .cc-bento-large {
    grid-column: span 1;
  }

  .cc-locations-grid {
    grid-template-columns: 1fr;
  }

  .cc-stats {
    flex-direction: column;
    gap: 24px;
  }

  .cc-logo-bar {
    gap: 24px;
  }

  .cc-logo-bar img {
    max-height: 30px;
  }

  .cc-trust-bar {
    flex-direction: column;
    gap: 8px;
  }
}
