/* ============================================
   HydeMind Design System — v2
   Refined to match WordPress site aesthetic
   ============================================ */

:root {
  --color-primary: #1a365d;
  --color-secondary: #2c5282;
  --color-accent: #4a7c9b;
  --color-hover: #63b3ed;
  --color-subtle: #7fb3c8;
  --color-section-bg: #f7fafc;
  --color-card-bg: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #2d3748;
  --color-text-muted: #718096;
  --color-success: #48bb78;
  --color-white: #ffffff;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --content-width: 860px;
  --header-height: 80px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--color-hover); text-decoration: underline; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 600; }

h1 {
  font-size: 2.25rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-border);
}

h3 {
  font-size: 1.15rem;
  color: var(--color-secondary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-section-bg);
  color: var(--color-text-muted);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}
blockquote p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
em { color: var(--color-text-muted); }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Accent bar beneath header */
.header-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-subtle));
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; color: var(--color-primary); }
.site-logo img { width: 52px; height: 52px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-link:hover { background: var(--color-section-bg); color: var(--color-accent); text-decoration: none; }
.nav-link.active { color: var(--color-accent); }

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 260px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 200;
}
.nav-dropdown.open .dropdown-menu { display: block; }

.dropdown-item {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--color-text);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--color-section-bg); color: var(--color-accent); text-decoration: none; }
.dropdown-item.active { color: var(--color-accent); font-weight: 500; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
}
.hamburger::before, .hamburger::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: absolute;
}
.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

/* ============================================
   LAYOUT
   ============================================ */
.site-main {
  min-height: calc(100vh - var(--header-height) - 200px);
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ============================================
   HOMEPAGE
   ============================================ */

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 2rem 2.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero .quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero .value-prop {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  color: var(--color-text);
  line-height: 1.8;
}

/* Sections with alternating backgrounds */
.home-section {
  padding: 2.75rem 0;
}
.home-section:nth-child(even) {
  background: var(--color-section-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.home-section .section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.home-section h2 {
  font-size: 1.85rem;
  border-bottom: none;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

/* Pillar Cards */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.pillar-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.75rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: block;
}
.pillar-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(74, 124, 155, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}
.pillar-card h3 {
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}
.pillar-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.kpi-group-label {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: 1rem;
  margin-bottom: -0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}
.kpi-group-label:first-child { margin-top: 0; }

.kpi-item {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: default;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kpi-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(74, 124, 155, 0.1);
}

.kpi-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  width: 280px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  text-align: left;
}
.kpi-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--color-primary);
}
.kpi-item:hover .kpi-tooltip,
.kpi-item.active .kpi-tooltip { display: block; }

.kpi-note {
  margin-top: 1.75rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-muted);
}

/* Shift section */
.shift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.75rem;
}

.shift-card {
  padding: 2rem;
  border-radius: 10px;
}
.shift-card.before {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
}
.shift-card.after {
  background: #f0fff4;
  border-left: 4px solid var(--color-success);
}
.shift-card h3 { margin-top: 0; font-size: 1.05rem; margin-bottom: 0.75rem; }
.shift-card.before h3 { color: #c53030; }
.shift-card.after h3 { color: #276749; }
.shift-card p { font-size: 0.95rem; margin-bottom: 0; line-height: 1.7; }

/* Foundation bar (LLMs for RevOps) */
.foundation-bar {
  display: block;
  margin-top: 1.25rem;
  padding: 1.75rem;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.foundation-bar:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(74, 124, 155, 0.25);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-white);
}
.foundation-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.foundation-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--color-white);
}
.foundation-desc {
  display: block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

/* Career section */
.career-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 1.75rem;
}
.career-block h3 { margin-top: 0; }

/* ============================================
   PILLAR PAGES
   ============================================ */
.pillar-hero {
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2.5rem;
}
.pillar-hero h1 { margin-bottom: 0.75rem; }
.pillar-intro {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 720px;
  line-height: 1.7;
}

/* TOC */
.pillar-toc {
  background: var(--color-section-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 2.5rem;
}
.toc-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  border-bottom: none;
  padding-bottom: 0;
}
.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { margin: 0; }
.toc-list a { font-size: 0.9rem; font-weight: 500; }

.pillar-content h2:first-child { margin-top: 0; }

/* Related KPIs box */
.kpi-box {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  background: var(--color-section-bg);
}
.kpi-box h4 { color: var(--color-secondary); margin-top: 0; margin-bottom: 0.75rem; }
.kpi-box ul { margin-bottom: 0; }
.kpi-box p:last-child { margin-bottom: 0; }

/* Example boxes */
.example-box {
  background: var(--color-section-bg);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
}
.example-box h4 { margin-top: 0; }

/* ============================================
   TABLES
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
thead { background: var(--color-section-bg); }
th {
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-primary);
  font-size: 0.85rem;
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-section-bg); }
td:first-child a { font-weight: 500; }

/* ============================================
   CHECKLISTS (Pillar pages)
   ============================================ */
.pillar-content ul {
  list-style: none;
  padding-left: 0;
}
.pillar-content ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
.pillar-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white);
}

/* Override for KPI box lists and regular bullet lists */
.kpi-box ul li,
.pillar-content .rationale-covers li {
  padding-left: 0;
}
.kpi-box ul li::before,
.pillar-content .rationale-covers li::before {
  content: none;
}
.kpi-box ul,
.pillar-content .rationale-covers {
  list-style: disc;
  padding-left: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0;
  margin-top: 0;
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}
.footer-links { margin-bottom: 1.75rem; }
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--color-white); text-decoration: none; }
.footer-sep { margin: 0 0.5rem; color: rgba(255, 255, 255, 0.25); }
.footer-credits p { font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer-credits a { color: var(--color-hover); }
.footer-credits a:hover { color: var(--color-white); }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, background 0.15s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-secondary); }

/* Tool Landscape */
.tool-category { margin-bottom: 1.5rem; }
.tool-category h3 { margin-bottom: 0.25rem; }
.tool-category p { margin-bottom: 0.25rem; }
.tool-examples { font-size: 0.9rem; color: var(--color-text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 2rem 1.5rem 1.75rem; }
  .home-section h2 { font-size: 1.5rem; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }
  .site-nav.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    min-width: 0;
  }

  .pillar-grid { grid-template-columns: 1fr; }
  .shift-grid { grid-template-columns: 1fr; }
  .career-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-tooltip { width: 200px; font-size: 0.75rem; }
  .toc-list { flex-direction: column; gap: 0.25rem; }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  :root { --header-height: 64px; }
  .site-logo img { width: 36px; height: 36px; }
  .site-logo { font-size: 1.2rem; }
  .content-container { padding: 1.5rem 1rem 3rem; }
  .home-section .section-inner { padding: 0 1rem; }
  .header-inner { padding: 0 1rem; }
  .hero { padding: 1.75rem 1rem 1.25rem; }
  .hero h1 { font-size: 1.6rem; }
  .back-to-top { width: 38px; height: 38px; bottom: 1.25rem; right: 1.25rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   BLOG
   ============================================ */

/* Blog index hero */
.blog-hero {
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2.5rem;
}
.blog-hero h1 { margin-bottom: 0.75rem; }
.blog-intro {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 720px;
  line-height: 1.7;
}

/* Blog index entries */
.blog-entry { margin-bottom: 0; }

.entry-header { margin-bottom: 1.25rem; }
.entry-header h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  border-bottom: none;
  padding-bottom: 0;
}
.entry-header h2 a {
  color: var(--color-primary);
  text-decoration: none;
}
.entry-header h2 a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.entry-content { margin-bottom: 1.5rem; }
.entry-content p:last-child { margin-bottom: 0; }

.entry-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.blog-empty {
  color: var(--color-text-muted);
  font-style: italic;
  padding: 3rem 0;
}

/* Post date (shared between index and single post) */
.post-date {
  display: block;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--color-section-bg);
  border-color: var(--color-accent);
}
.pagination-btn:disabled {
  color: var(--color-border);
  cursor: default;
  opacity: 0.5;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 90px;
  text-align: center;
}

/* ============================================
   SINGLE BLOG POST
   ============================================ */
.post-header {
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2.5rem;
}
.post-header h1 { margin-bottom: 0.5rem; }
.post-header .post-date { margin-top: 0.25rem; }

.back-to-blog {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.back-to-blog:hover { color: var(--color-hover); text-decoration: underline; }

.post-content { margin-bottom: 3rem; }

.post-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.post-footer .back-to-blog { margin-bottom: 0; }

/* Blog responsive */
@media (max-width: 768px) {
  .entry-header h2 { font-size: 1.3rem; }
  .blog-pagination { gap: 0.75rem; }
  .pagination-btn { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .pagination-btn span { display: none; }
  .pagination-btn { padding: 0.5rem; }
}
