/*
Theme Name: hydroMazing
Theme URI: https://hydromazing.com
Author: Cory
Author URI: https://coreconduit.com
Description: Companion theme for hydroMazing Smart Garden System — shares design DNA with CoreConduit, green-forward palette.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: hydromazing
*/

/* ── CSS VARIABLES ── */
:root {
  --ink:    #0b0f0b;
  --ink2:   #141a13;
  --panel:  #1c251b;
  --leaf:   #5a8a5f;
  --leaf2:  #3d6642;
  --leaf3:  #7db882;
  --warm:   #e8a83e;
  --amber:  #c4862a;
  --text:   #dde8dc;
  --muted:  #7a8c79;
  --border: rgba(90,138,95,0.22);
  --mono:   'DM Mono', monospace;
  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'DM Sans', sans-serif;
  --max:    1200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Grain + subtle leaf vein texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

a { color: var(--leaf3); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--leaf); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.01em; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── UTILITY ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--leaf3);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--leaf3);
}

.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-primary { background: var(--leaf); color: var(--ink); font-weight: 500; }
.btn-primary:hover { background: var(--leaf2); color: var(--text); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--leaf3); color: var(--leaf3); }
.btn-amber { background: var(--warm); color: var(--ink); font-weight: 500; }
.btn-amber:hover { background: var(--amber); color: var(--ink); }

/* ── NAV ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3rem;
  background: rgba(11,15,11,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-logo .logo-hydro { color: var(--leaf3); }
.site-logo .logo-mazing { color: var(--text); }
.site-logo .logo-tag {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: none;
  font-style: italic;
}

/* "by CoreConduit" back-link */
.site-logo .by-core {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-family: var(--mono);
  margin-left: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--border);
}
.site-logo .by-core a { color: var(--warm); }
.site-logo .by-core a:hover { color: var(--amber); }

#primary-menu {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
#primary-menu a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}
#primary-menu a:hover,
#primary-menu .current-menu-item > a { color: var(--leaf3); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--leaf3);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
}

/* ── PAGE OFFSET ── */
#page { padding-top: 72px; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
  overflow: hidden;
}

/* Living green dot-grid background */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(90,138,95,0.25) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 85% 85% at 40% 55%, black 30%, transparent 100%);
  pointer-events: none;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90,138,95,0.05) 0%, transparent 60%);
}

.hero-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 4rem 3rem 4rem 4rem;
  position: relative; z-index: 2;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--leaf3);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before { content: ''; display: inline-block; width: 32px; height: 1px; background: var(--leaf3); }

.hero-left h1 {
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.hero-left h1 em { font-style: italic; color: var(--leaf3); }

.hero-desc { font-size: 1.05rem; color: var(--muted); max-width: 440px; margin-bottom: 2.5rem; line-height: 1.8; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-right {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 4rem 4rem 2rem;
  position: relative; z-index: 2;
}

/* Sensor data card */
.sensor-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.8rem;
  max-width: 340px; width: 100%;
  position: relative;
}
.sensor-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 2rem; right: 2rem; height: 2px;
  background: linear-gradient(90deg, transparent, var(--leaf3), transparent);
}
.sensor-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--leaf3);
  margin-bottom: 1.2rem;
}
.sensor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(90,138,95,0.1);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.sensor-row:last-of-type { border-bottom: none; }
.sensor-name { color: var(--muted); }
.sensor-value { color: var(--leaf3); }
.sensor-value.ok { color: var(--leaf3); }
.sensor-value.warn { color: var(--warm); }
.sensor-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.65rem;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--leaf3);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.sensor-footer {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* ── WHAT IS SECTION ── */
.what-is {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  padding: 5rem 4rem;
}
.what-is .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.what-is h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; margin-bottom: 1.2rem; }
.what-is h2 em { font-style: italic; color: var(--leaf3); }
.what-is p { color: var(--muted); margin-bottom: 1rem; font-size: 0.97rem; }
.feature-list { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.feature-list li {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  display: flex; align-items: center; gap: 0.75rem;
}
.feature-list li::before { content: '▸'; color: var(--leaf3); font-size: 0.65rem; flex-shrink: 0; }
.tech-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.8rem;
}
.tech-panel .card-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--leaf3);
  margin-bottom: 1rem;
}
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.tech-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex; align-items: center; gap: 0.4rem;
  transition: all 0.2s;
}
.tech-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--leaf); flex-shrink: 0; }
.tech-chip:hover { border-color: var(--leaf3); color: var(--leaf3); }

/* ── GUIDE SERIES ── */
.guides-section { background: var(--ink); padding: 6rem 4rem; }
.guides-section .inner { max-width: var(--max); margin: 0 auto; }
.guides-section h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; margin-bottom: 0.5rem; }
.guides-section h2 em { font-style: italic; color: var(--leaf3); }
.guides-intro { color: var(--muted); max-width: 560px; margin-bottom: 3rem; font-size: 0.95rem; }

.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.guide-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.guide-card:hover {
  border-color: var(--leaf3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  color: var(--text);
}
.guide-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--leaf3);
  opacity: 0.6;
  margin-bottom: 0.8rem;
}
.guide-card h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.guide-card p { font-size: 0.82rem; color: var(--muted); flex: 1; }
.guide-card .read-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--leaf3);
  margin-top: 1rem;
  display: flex; align-items: center; gap: 0.3rem;
  transition: gap 0.2s;
}
.guide-card:hover .read-link { gap: 0.6rem; }

/* ── DEMO CTA ── */
.demo-section {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 5rem 4rem;
}
.demo-section .inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.demo-left h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; margin-bottom: 1rem; }
.demo-left h2 em { font-style: italic; color: var(--leaf3); }
.demo-left p { color: var(--muted); margin-bottom: 1.5rem; }
.demo-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.demo-right {
  background: var(--ink2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.demo-right .demo-bar {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.demo-right .demo-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf3); animation: pulse 2s infinite; }
.demo-right .demo-bar span { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; }
.demo-stat { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid rgba(90,138,95,0.08); }
.demo-stat .k { color: var(--muted); }
.demo-stat .v { color: var(--leaf3); }
.demo-stat .v.warn { color: var(--warm); }

/* ── ABOUT / CORY ── */
.about-section {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  padding: 5rem 4rem;
}
.about-section .inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: center;
}
.about-quote { border-left: 2px solid var(--leaf3); padding-left: 2rem; }
.about-quote blockquote {
  font-family: var(--serif); font-size: 1.4rem; font-style: italic;
  color: var(--text); line-height: 1.6; margin-bottom: 1rem;
}
.about-quote cite { font-family: var(--mono); font-size: 0.75rem; color: var(--leaf3); font-style: normal; }
.about-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; margin-bottom: 1rem; }
.about-text h2 em { font-style: italic; color: var(--leaf3); }
.about-text p { color: var(--muted); font-size: 0.95rem; }
.about-links { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ── BLOG / POSTS ── */
.blog-wrap {
  max-width: var(--max); margin: 0 auto;
  padding: 5rem 2rem;
}
.blog-wrap .page-title {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900; margin-bottom: 3rem;
}
.blog-wrap .page-title em { color: var(--leaf3); font-style: italic; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 3px; overflow: hidden;
  transition: all 0.3s; display: flex; flex-direction: column;
}
.post-card:hover {
  border-color: var(--leaf3); transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.post-card-thumb img { width: 100%; height: 200px; object-fit: cover; }
.post-card-thumb-placeholder {
  width: 100%; height: 200px;
  background: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
}
.post-card-body { padding: 1.5rem 1.5rem 1rem; flex: 1; }
.post-card-tags { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leaf3); margin-bottom: 0.6rem; }
.post-card-body h2 { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; line-height: 1.3; }
.post-card-body h2 a { color: var(--text); text-decoration: none; }
.post-card-body h2 a:hover { color: var(--leaf3); }
.post-card-body p { font-size: 0.85rem; color: var(--muted); }
.post-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 0.7rem; color: var(--muted); display: flex; justify-content: space-between; }
.post-card-footer a { color: var(--leaf3); }

/* Pagination */
.pagination { margin-top: 3rem; display: flex; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; }
.pagination .page-numbers { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 2px; color: var(--muted); text-decoration: none; transition: all 0.2s; }
.pagination .page-numbers:hover, .pagination .page-numbers.current { border-color: var(--leaf3); color: var(--leaf3); }

/* ── SINGLE POST ── */
.page-wrap { max-width: 780px; margin: 0 auto; padding: 5rem 2rem; }
.page-wrap h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; margin-bottom: 2rem; }
.page-wrap h1 em { font-style: italic; color: var(--leaf3); }
.entry-meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin-bottom: 2rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.entry-meta .tags a { color: var(--muted); border: 1px solid var(--border); padding: 0.2rem 0.5rem; border-radius: 2px; font-size: 0.65rem; transition: all 0.2s; }
.entry-meta .tags a:hover { border-color: var(--leaf3); color: var(--leaf3); }
.entry-content { color: var(--muted); font-size: 0.97rem; }
.entry-content h2, .entry-content h3 { color: var(--text); margin: 2rem 0 0.75rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content pre { background: var(--panel); border: 1px solid var(--border); border-radius: 3px; padding: 1.2rem; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; margin-bottom: 1.5rem; }
.entry-content code { font-family: var(--mono); font-size: 0.85em; background: var(--panel); padding: 0.15em 0.4em; border-radius: 2px; color: var(--leaf3); }
.entry-content img { border-radius: 3px; margin: 1.5rem 0; }
.entry-content a { color: var(--leaf3); border-bottom: 1px solid rgba(90,138,95,0.3); }
.entry-content a:hover { border-bottom-color: var(--leaf3); }
.entry-content blockquote { border-left: 2px solid var(--leaf3); padding-left: 1.5rem; margin: 1.5rem 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--text); }

/* ── FOOTER ── */
#site-footer {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.footer-left a { color: var(--warm); }
.footer-left a:hover { color: var(--amber); }
#footer-menu { list-style: none; display: flex; gap: 1.5rem; }
#footer-menu a { color: var(--leaf3); text-decoration: none; }
#footer-menu a:hover { color: var(--leaf); }

/* ── 404 ── */
.error-wrap { text-align: center; padding: 8rem 2rem; }
.error-wrap h1 { font-size: clamp(2.5rem, 6vw, 6rem); font-weight: 900; margin-bottom: 1rem; }
.error-wrap h1 em { font-style: italic; color: var(--leaf3); }
.error-wrap p { color: var(--muted); margin-bottom: 2.5rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-left > * { animation: fadeUp 0.7s ease both; }
.hero-left > *:nth-child(1) { animation-delay: 0.1s; }
.hero-left > *:nth-child(2) { animation-delay: 0.25s; }
.hero-left > *:nth-child(3) { animation-delay: 0.4s; }
.hero-left > *:nth-child(4) { animation-delay: 0.55s; }
.hero-right { animation: fadeUp 0.7s ease 0.5s both; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .guides-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #site-header { padding: 1rem 1.5rem; }
  #primary-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink2); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; gap: 1rem; }
  #primary-menu.is-open { display: flex; }
  .menu-toggle { display: block; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-right { display: none; }
  .hero-left { padding: 3rem 1.5rem 4rem; }
  .what-is { padding: 3rem 1.5rem; }
  .what-is .inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .guides-section { padding: 4rem 1.5rem; }
  .guides-grid { grid-template-columns: 1fr; }
  .demo-section { padding: 4rem 1.5rem; }
  .demo-section .inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-section { padding: 4rem 1.5rem; }
  .about-section .inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-wrap { padding: 3rem 1.5rem; }
  .page-wrap { padding: 3rem 1.5rem; }
  #site-footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}
@media (max-width: 600px) {
  .hero-left h1 { font-size: 2.6rem; }
  #footer-menu { flex-wrap: wrap; justify-content: center; }
}
