/*
Theme Name: CoreConduit
Theme URI: https://coreconduit.com
Author: Cory
Author URI: https://coreconduit.com
Description: Custom theme for CoreConduit Consulting Services — industrial craftsman aesthetic with hydroMazing integration.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: coreconduit
*/

/* ── CSS VARIABLES ── */
:root {
  --ink:    #0f0f0e;
  --ink2:   #1c1c1a;
  --panel:  #242420;
  --warm:   #e8a83e;
  --warm2:  #c4862a;
  --leaf:   #5a8a5f;
  --text:   #e8e4dc;
  --muted:  #8a857a;
  --border: rgba(232,168,62,0.18);
  --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 overlay */
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.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a { color: var(--warm); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--warm2); }
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(--warm);
  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(--warm);
}

.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
  display: inline-block;
}
.btn-primary { background: var(--warm); color: var(--ink); font-weight: 500; }
.btn-primary:hover { background: var(--warm2); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--warm); color: var(--warm); }
.btn-leaf { border: 1px solid var(--leaf); color: var(--leaf); }
.btn-leaf:hover { background: var(--leaf); 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(15,15,14,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--warm);
  text-decoration: none;
  text-transform: uppercase;
}
.site-logo span { color: var(--text); }

#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(--warm); }

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

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

/* ── PAGE / POST LAYOUTS ── */
.page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.page-wrap h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 2rem;
  color: var(--text);
}
.page-wrap h1 em { font-style: italic; color: var(--warm); }

.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(--warm);
}
.entry-content img { border-radius: 3px; margin: 1.5rem 0; }
.entry-content a { color: var(--warm); border-bottom: 1px solid rgba(232,168,62,0.3); }
.entry-content a:hover { border-bottom-color: var(--warm); }
.entry-content blockquote {
  border-left: 2px solid var(--warm);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
}

/* ── POST META ── */
.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(--warm); color: var(--warm); }

/* ── BLOG INDEX ── */
.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.5rem);
  font-weight: 900;
  margin-bottom: 3rem;
}
.blog-wrap .page-title em { color: var(--warm); 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(--warm);
  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);
  letter-spacing: 0.1em;
}
.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(--warm);
  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(--warm); }
.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(--warm); }

/* 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(--warm);
  color: var(--warm);
}

/* ── HYDROMAZING PAGE ── */
.hydro-page {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}
.hydro-page::before {
  content: 'HYDROMAZING';
  position: absolute;
  top: 50%; right: -2rem;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--serif);
  font-size: 7rem;
  font-weight: 900;
  color: var(--leaf);
  opacity: 0.05;
  pointer-events: none;
  white-space: nowrap;
}
.hydro-page-inner { max-width: var(--max); margin: 0 auto; }

.hydro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}
.hydro-left h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.hydro-left h3 span { color: var(--leaf); }
.hydro-left p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }
.tech-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.tech-item {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tech-item::before { content: '▸'; color: var(--leaf); font-size: 0.6rem; }
.hydro-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

.hydro-posts-list { display: flex; flex-direction: column; gap: 1rem; }
.card-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: 0.75rem;
}
.hydro-post {
  background: var(--ink2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.hydro-post:hover { border-color: var(--leaf); transform: translateX(4px); color: var(--text); }
.hydro-post-num { font-family: var(--mono); font-size: 0.65rem; color: var(--leaf); flex-shrink: 0; margin-top: 0.2rem; opacity: 0.7; }
.hydro-post-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.2rem; color: var(--text); }
.hydro-post-sub { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* ── 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);
}
#site-footer a { color: var(--warm); }
#footer-menu { list-style: none; display: flex; gap: 1.5rem; }
#footer-menu a { color: var(--warm); text-decoration: none; }
#footer-menu a:hover { color: var(--warm2); }

/* ── FRONT PAGE ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}
.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(--warm);
  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(--warm); }
.hero-left h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
}
.hero-left h1 em { font-style: italic; color: var(--warm); }
.hero-desc { font-size: 1.05rem; color: var(--muted); max-width: 420px; 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;
}
.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  max-width: 380px; width: 100%;
  position: relative;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 2rem; right: 2rem; height: 2px;
  background: linear-gradient(90deg, transparent, var(--warm), transparent);
}
.skills-stack { display: flex; flex-direction: column; gap: 0.6rem; }
.skill-row {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
}
.skill-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warm); flex-shrink: 0; }
.skill-row.active { color: var(--text); }
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat-num { font-family: var(--serif); font-size: 2rem; color: var(--warm); line-height: 1; }
.stat-label { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.25rem; }

/* About strip */
.about-strip {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text p { color: var(--muted); margin-bottom: 1.2rem; font-size: 0.97rem; }
.about-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.badge {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem; border: 1px solid var(--border);
  border-radius: 2px; color: var(--muted); text-transform: uppercase;
  transition: all 0.2s;
}
.badge:hover { border-color: var(--warm); color: var(--warm); cursor: default; }
.about-quote { border-left: 2px solid var(--warm); 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(--warm); letter-spacing: 0.1em; font-style: normal; }

/* Featured hydro strip on front page */
.hydro-strip {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 6rem 4rem;
  position: relative; overflow: hidden;
}
.hydro-strip::before {
  content: 'HYDROMAZING';
  position: absolute; top: 50%; right: -2rem;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--serif); font-size: 7rem; font-weight: 900;
  color: var(--leaf); opacity: 0.05;
  pointer-events: none; white-space: nowrap;
}
.hydro-strip .inner { max-width: var(--max); margin: 0 auto; }

/* Projects */
.projects-section { background: var(--ink); padding: 6rem 4rem; }
.projects-section .inner { max-width: var(--max); margin: 0 auto; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.project-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 3px; overflow: hidden;
  transition: all 0.3s; display: flex; flex-direction: column;
}
.project-card:hover {
  border-color: var(--warm); transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-card-top { padding: 1.8rem 1.8rem 1rem; flex: 1; }
.project-tag { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warm); margin-bottom: 0.8rem; }
.project-card h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; line-height: 1.3; }
.project-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.project-card-footer {
  padding: 1rem 1.8rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.project-card-footer .arrow { color: var(--warm); transition: transform 0.2s; }
.project-card:hover .arrow { transform: translateX(4px); }

/* Services */
.services-section {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 4rem;
}
.services-section .inner { max-width: var(--max); margin: 0 auto; }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 3rem;
  border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
}
.service-item {
  background: var(--panel); padding: 2rem 1.5rem;
  border-right: 1px solid var(--border); transition: background 0.25s;
}
.service-item:last-child { border-right: none; }
.service-item:hover { background: var(--ink); }
.service-icon { font-size: 1.4rem; margin-bottom: 1rem; display: block; }
.service-item h4 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.service-item p { font-size: 0.8rem; color: var(--muted); line-height: 1.7; margin-bottom: 0; }

/* Contact */
.contact-section { background: var(--ink); text-align: center; padding: 8rem 4rem; }
.contact-section .inner { max-width: 600px; margin: 0 auto; }
.contact-section p { color: var(--muted); max-width: 480px; margin: 0 auto 2.5rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── 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) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .services-section, .projects-section { padding: 5rem 2rem; }
}

@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; }
  .about-strip { grid-template-columns: 1fr; gap: 3rem; padding: 3rem 1.5rem; }
  .hydro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hydro-strip, .hydro-page { padding: 4rem 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .contact-section { padding: 5rem 1.5rem; }
  #site-footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
  .blog-wrap { padding: 3rem 1.5rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .page-wrap { padding: 3rem 1.5rem; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-left h1 { font-size: 2.8rem; }
}
