/*
Theme Name: Connecting H2O
Theme URI: https://www.connecting-h2o.com
Description: Child theme of Hello Elementor for the Connecting H2O storefront. Provides the brand design tokens, a coded header/footer (Elementor Free), and the base styling that the "Connecting H2O – Elements" widget pack builds on. Replaces the headless React/TanStack storefront so payments run natively through WooCommerce + Razorpay.
Author: Connecting H2O
Template: hello-elementor
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: connecting-h2o-child
*/

/* Design tokens live in assets/tokens.css (enqueued before this file).
   This file holds base typography + the coded header / footer / sticky WhatsApp. */

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a { color: inherit; }

.ch2o-container {
  width: 100%;
  max-width: 80rem; /* max-w-7xl */
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .ch2o-container { padding-inline: 1.5rem; }
}

/* ── Header / Nav ─────────────────────────────────────────────────────────── */
.ch2o-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--background) 70%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: padding 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  padding-block: 1rem;
  border-bottom: 1px solid transparent;
}
.ch2o-header.is-scrolled {
  padding-block: 0.5rem;
  border-bottom-color: var(--border);
}
.ch2o-header__inner {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) {
  .ch2o-header__inner { padding-inline: 1.5rem; }
}

.ch2o-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}
.ch2o-brand svg { height: 2.5rem; width: 2.5rem; transition: all 0.3s ease; }
.ch2o-header.is-scrolled .ch2o-brand svg { height: 2rem; width: 2rem; }
.ch2o-header .ch2o-brand__img { display: block; height: 2.75rem; width: auto; max-width: none; object-fit: contain; transition: height 0.3s ease; }
.ch2o-header.is-scrolled .ch2o-brand__img { height: 2.25rem; }
.ch2o-brand__text { line-height: 1.1; }
.ch2o-brand__name { display: block; font-weight: 700; color: var(--foreground); letter-spacing: -0.02em; }
.ch2o-brand__name sub { font-size: 0.7rem; }
.ch2o-brand__tag { display: none; font-size: 0.625rem; color: var(--muted-foreground); margin-top: -0.1rem; }
@media (min-width: 640px) { .ch2o-brand__tag { display: block; } }

/* ── Header product search (ports src/components/SearchBar.tsx) ──────────── */
.ch2o-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  padding: 0.4rem 0.9rem;
  color: var(--muted-foreground);
}
.ch2o-search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }
.ch2o-search input[type="search"] {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: 0.875rem; font-family: inherit; color: var(--foreground);
}
.ch2o-search svg { flex-shrink: 0; }
.ch2o-search--desktop { display: none; }
@media (min-width: 1024px) { .ch2o-search--desktop { display: flex; width: 11rem; flex-shrink: 0; } }
@media (min-width: 1280px) { .ch2o-search--desktop { width: 16rem; } }
.ch2o-search--mobile { margin: 1rem 1.5rem 0; }

.ch2o-nav { display: none; }
@media (min-width: 1024px) { .ch2o-nav { display: flex; align-items: center; } }
.ch2o-nav__list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ch2o-nav__list a {
  font-size: 0.875rem;
  font-weight: 500;
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ch2o-nav__list a:hover,
.ch2o-nav__list .current-menu-item > a,
.ch2o-nav__list .current_page_item > a { color: var(--primary); }

.ch2o-header__actions { display: flex; align-items: center; gap: 0.5rem; }

.ch2o-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--foreground);
  transition: background 0.2s ease, color 0.2s ease;
}
.ch2o-cart:hover { background: var(--primary); color: var(--primary-foreground); }
.ch2o-cart__count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  padding-inline: 0.2rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ch2o-cart__count[data-empty="1"] { display: none; }

.ch2o-burger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 2.5rem;
  width: 2.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--secondary);
  cursor: pointer;
}
@media (min-width: 1024px) { .ch2o-burger { display: none; } }
.ch2o-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.ch2o-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ch2o-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ch2o-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.ch2o-mobile-nav {
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ch2o-mobile-nav[hidden] { display: none; }
@media (min-width: 1024px) { .ch2o-mobile-nav { display: none !important; } }
/* Container-scoped so it styles both a real assigned menu and the fallback markup. */
.ch2o-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ch2o-mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  text-decoration: none;
  padding-block: 0.25rem;
}
.ch2o-mobile-nav .current-menu-item > a { color: var(--primary); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.ch2o-footer {
  color: var(--background);
  background: oklch(0.24 0.06 245);
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.ch2o-footer__grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) { .ch2o-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ch2o-footer__brand { display: flex; align-items: center; gap: 0.75rem; }
.ch2o-footer__brand svg { height: 2.5rem; width: 2.5rem; }
/* White card behind the PNG lockup so it reads on the dark footer. */
.ch2o-footer__brand--box { display: inline-flex; background: rgba(255, 255, 255, 0.95); border-radius: 0.75rem; padding: 0.75rem 1rem; }
.ch2o-footer__logo { display: block; height: 2.75rem; width: auto; object-fit: contain; }
.ch2o-footer__name { font-weight: 700; font-size: 1.125rem; }
.ch2o-footer__name sub { font-size: 0.7rem; }
.ch2o-footer__tag { font-size: 0.75rem; opacity: 0.7; }
.ch2o-footer__about { margin-top: 1.25rem; font-size: 0.875rem; opacity: 0.8; line-height: 1.625; max-width: 20rem; }
.ch2o-footer__col-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.ch2o-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.875rem; opacity: 0.8; }
.ch2o-footer__links a { text-decoration: none; transition: color 0.2s ease; }
.ch2o-footer__links a:hover { color: var(--accent); }
.ch2o-footer__social { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.ch2o-footer__social a {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.ch2o-footer__social a:hover { background: var(--accent); color: var(--accent-foreground); }
.ch2o-footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.875rem; opacity: 0.8; }
.ch2o-footer__contact li { display: flex; align-items: center; gap: 0.5rem; }
.ch2o-footer__contact a { text-decoration: none; }
.ch2o-footer__contact a:hover { color: var(--accent); }
.ch2o-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.7;
}
@media (min-width: 640px) { .ch2o-footer__bottom { flex-direction: row; align-items: center; } }

/* ── Sticky WhatsApp ──────────────────────────────────────────────────────── */
.ch2o-whatsapp {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  height: 3.5rem;
  width: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #fff;
  background: #25D366;
  box-shadow: var(--shadow-lift);
  transition: transform 0.2s ease;
}
.ch2o-whatsapp:hover { transform: scale(1.1); }
.ch2o-whatsapp__ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #25D366;
  opacity: 0.3;
  animation: ch2o-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ch2o-ping {
  75%, 100% { transform: scale(1.6); opacity: 0; }
}

/* ── Modals: water-test booking + lead popup (assets/modals.js) ──────────── */
body.ch2o-modal-open { overflow: hidden; }
.ch2o-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ch2o-modal[hidden] { display: none; }
.ch2o-modal__overlay { position: absolute; inset: 0; background: rgba(7, 31, 32, 0.55); backdrop-filter: blur(4px); }
.ch2o-modal__panel {
  position: relative; z-index: 1; width: 100%; max-height: calc(100vh - 2rem); overflow-y: auto;
  border-radius: 1rem; background: var(--card, #fff); box-shadow: var(--shadow-lift);
}
.ch2o-modal__panel--form { max-width: 28rem; }
.ch2o-modal__panel--popup { max-width: 52rem; overflow: hidden; }
.ch2o-modal__close {
  position: absolute; top: 0.625rem; right: 0.625rem; z-index: 2; height: 2.25rem; width: 2.25rem;
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 9999px; background: rgba(255, 255, 255, 0.85); color: var(--foreground, #071f20);
  font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ch2o-modal__band { padding: 1.25rem 1.75rem; color: var(--primary-foreground, #fff); }
.ch2o-modal__band-title { margin: 0; display: flex; align-items: center; gap: 0.625rem; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.ch2o-modal__band-sub { margin: 0.25rem 0 0; font-size: 0.875rem; opacity: 0.85; }
.ch2o-modal__body { padding: 1.5rem 1.75rem; }

.ch2o-mform { display: flex; flex-direction: column; gap: 1rem; }
.ch2o-mform__row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ch2o-mform__row { grid-template-columns: repeat(2, 1fr); } }
.ch2o-mform__field > span { display: block; font-size: 0.875rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.375rem; }
.ch2o-mform__field input,
.ch2o-mform__field select,
.ch2o-mform__field textarea {
  width: 100%; border-radius: var(--radius-md); border: 1px solid var(--input);
  background: var(--background); padding: 0.625rem 1rem; font-size: 0.875rem; font-family: inherit; color: var(--foreground);
}
.ch2o-mform__field input:focus, .ch2o-mform__field select:focus, .ch2o-mform__field textarea:focus {
  outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}
.ch2o-mform__hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; overflow: hidden; }
.ch2o-mform__error { border-radius: var(--radius-md); background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); padding: 0.625rem 1rem; font-size: 0.875rem; }
.ch2o-mform__submit {
  display: inline-flex; width: 100%; min-height: 48px; align-items: center; justify-content: center;
  border: 0; border-radius: 9999px; padding: 0.875rem; font-family: inherit; font-size: 1rem; font-weight: 700;
  color: var(--primary-foreground, #fff); cursor: pointer; box-shadow: var(--shadow-soft); transition: box-shadow 0.2s, opacity 0.2s;
}
.ch2o-mform__submit:hover { box-shadow: var(--shadow-lift); }
.ch2o-mform__submit:disabled { opacity: 0.6; cursor: default; }
.ch2o-mform__note { margin: 0; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.ch2o-mform__success { text-align: center; padding: 1rem 0; }
.ch2o-mform__success[hidden] { display: none; }
.ch2o-mform__success-icn {
  display: flex; height: 4rem; width: 4rem; margin: 0 auto; align-items: center; justify-content: center;
  border-radius: 9999px; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary);
  font-size: 1.75rem; font-weight: 700;
}
.ch2o-mform__success h3 { margin: 1rem 0 0; font-size: 1.125rem; font-weight: 700; color: var(--foreground); }
.ch2o-mform__success p { margin: 0.375rem auto 0; max-width: 20rem; font-size: 0.875rem; color: var(--muted-foreground); }
.ch2o-mform__done { margin-top: 1.25rem; display: inline-flex; align-items: center; border: 0; border-radius: 9999px; padding: 0.75rem 1.5rem; font-family: inherit; font-weight: 600; color: var(--primary-foreground, #fff); cursor: pointer; box-shadow: var(--shadow-soft); }

/* lead popup layout */
.ch2o-popup__grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ch2o-popup__grid { grid-template-columns: 5fr 6fr; } }
.ch2o-popup__media { display: none; }
@media (min-width: 768px) { .ch2o-popup__media { display: block; } .ch2o-popup__media img { height: 100%; width: 100%; object-fit: cover; } }
.ch2o-popup__content { display: flex; flex-direction: column; justify-content: center; padding: 2rem 1.5rem; }
@media (min-width: 640px) { .ch2o-popup__content { padding: 2.5rem 2rem; } }
.ch2o-popup__eyebrow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); }
.ch2o-popup__heading { margin: 0.75rem 0 0; font-size: clamp(1.5rem, 1rem + 1.5vw, 1.875rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: #1B3B5F; }
.ch2o-popup__desc { margin: 0.75rem 0 0; font-size: 0.875rem; line-height: 1.6; color: var(--muted-foreground); }
.ch2o-popup__form { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.ch2o-popup__form[hidden] { display: none; }
.ch2o-popup__form input[type="email"] {
  height: 56px; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--input);
  background: var(--background); padding: 0 1.25rem; font-size: 1rem; font-family: inherit; color: var(--foreground);
}
.ch2o-popup__form input[type="email"]:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }
.ch2o-popup__check { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; color: var(--muted-foreground); }
.ch2o-popup__check input { height: 1rem; width: 1rem; accent-color: var(--primary); }
.ch2o-popup__error { color: var(--destructive); font-size: 0.875rem; }
.ch2o-popup__submit {
  display: flex; height: 56px; width: 100%; align-items: center; justify-content: center; gap: 0.5rem;
  border: 0; border-radius: var(--radius-md); background: #1B3B5F; color: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-soft); transition: filter 0.2s, box-shadow 0.2s;
}
.ch2o-popup__submit:hover { filter: brightness(1.1); box-shadow: var(--shadow-lift); }
.ch2o-popup__submit:disabled { opacity: 0.6; cursor: default; }
.ch2o-popup__privacy { margin: 0; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.ch2o-popup__success { margin-top: 1.5rem; text-align: center; }
.ch2o-popup__success[hidden] { display: none; }
.ch2o-popup__success h3 { margin: 1rem 0 0; font-size: 1.125rem; font-weight: 700; color: var(--foreground); }
.ch2o-popup__success p { margin: 0.375rem 0 0; font-size: 0.875rem; color: var(--muted-foreground); }
