/*
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.0.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-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; } }

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