/*
Theme Name: Clearview Data
Theme URI: https://clearviewdata.com
Author: Clearview Data
Author URI: https://clearviewdata.com
Description: Custom WordPress theme for Clearview Data - Microsoft Fabric, Power BI & Data Analytics Consulting
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clearview-data
Tags: business, consulting, data, analytics
*/

/* =========================================
   CSS RESET & ROOT VARIABLES
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cv-navy: #0a1628;
  --cv-blue: #1a3a6e;
  --cv-accent: #0ea5e9;
  --cv-accent-dark: #0284c7;
  --cv-light: #f0f6ff;
  --cv-white: #ffffff;
  --cv-gray: #64748b;
  --cv-gray-light: #94a3b8;
  --cv-border: #e2e8f0;
  --cv-bg: #f8fbff;
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--cv-navy);
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--cv-navy);
}

h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -1px; }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.5px; }
h3 { font-family: var(--font-sans); font-size: 16px; font-weight: 500; }
h4 { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }

p {
  font-size: 16px;
  color: var(--cv-gray);
  line-height: 1.65;
  font-weight: 300;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--cv-accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--cv-gray);
  margin-bottom: 48px;
  max-width: 480px;
  line-height: 1.65;
  font-weight: 300;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  display: inline-block;
  background: var(--cv-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--cv-accent-dark);
  color: #fff;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--cv-navy);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 7px;
  border: 1.5px solid var(--cv-border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--cv-accent);
  color: var(--cv-accent);
}

.btn-white {
  display: inline-block;
  background: #fff;
  color: var(--cv-navy);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-white:hover {
  opacity: 0.9;
  color: var(--cv-navy);
}

.btn-outline-white {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 7px;
  border: 1.5px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-outline-white:hover {
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

/* =========================================
   NAVIGATION
   ========================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--cv-border);
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0ea5e9, #1a3a6e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--cv-navy);
  letter-spacing: -0.3px;
}

.logo-text span {
  color: var(--cv-accent);
}

#primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

#primary-nav a {
  font-size: 14px;
  color: var(--cv-gray);
  font-weight: 400;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}

#primary-nav a:hover {
  color: var(--cv-accent);
}

.nav-cta {
  background: var(--cv-navy);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--cv-blue);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cv-navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

/* =========================================
   HERO SECTION
   ========================================= */
#hero {
  padding: 96px 0 80px;
  background: linear-gradient(160deg, #f8fbff 0%, #eef5ff 100%);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #0ea5e9;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

#hero h1 {
  margin-bottom: 20px;
}

#hero h1 em {
  font-style: normal;
  color: var(--cv-accent);
}

.hero-sub {
  font-size: 17px;
  color: var(--cv-gray);
  line-height: 1.65;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dashboard Visual */
.hero-visual {
  flex: 0 0 420px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--cv-border);
  padding: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.07);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dash-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--cv-navy);
}

.dash-badge {
  font-size: 11px;
  background: #dcfce7;
  color: #166534;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--cv-light);
  border-radius: 8px;
  padding: 12px;
}

.metric-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--cv-navy);
  line-height: 1;
}

.metric-label {
  font-size: 11px;
  color: var(--cv-gray);
  margin-top: 4px;
}

.metric-change {
  font-size: 11px;
  color: #16a34a;
  font-weight: 500;
  margin-top: 2px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin-bottom: 16px;
}

.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--cv-accent);
  opacity: 0.2;
}

.bar.active { opacity: 1; }
.bar.medium { opacity: 0.6; }

.fabric-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
#services {
  padding: 80px 0;
  background: #fff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--cv-border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--cv-accent);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--cv-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--cv-accent);
  fill: none;
  stroke-width: 1.8;
}

.service-card h3 {
  margin-bottom: 8px;
}

.service-card p {
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  background: var(--cv-light);
  color: var(--cv-blue);
}

/* =========================================
   PROCESS SECTION
   ========================================= */
#process {
  padding: 80px 0;
  background: var(--cv-bg);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.process-step {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--cv-border);
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--cv-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin: 0 auto 16px;
}

.process-step h3 {
  margin-bottom: 8px;
}

.process-step p {
  font-size: 13px;
}

/* =========================================
   WHY US SECTION
   ========================================= */
#why-us {
  padding: 80px 0;
  background: var(--cv-navy);
}

#why-us .section-label {
  color: #7dd3fc;
}

#why-us h2 {
  color: #fff;
}

#why-us .section-sub {
  color: #94a3b8;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-item {
  padding: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}

.why-number {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--cv-accent);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 12px;
}

.why-item h4 {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.why-item p {
  font-size: 13px;
  color: #94a3b8;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
#testimonials {
  padding: 80px 0;
  background: #fff;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--cv-bg);
  border: 1px solid var(--cv-border);
  border-radius: 12px;
  padding: 28px;
}

.testimonial-quote {
  font-size: 15px;
  color: var(--cv-navy);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cv-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cv-blue);
  flex-shrink: 0;
}

.author-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--cv-navy);
}

.author-role {
  font-size: 12px;
  color: var(--cv-gray);
}

/* =========================================
   CTA SECTION
   ========================================= */
#cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #0ea5e9 0%, #1a3a6e 100%);
  text-align: center;
}

#cta h2 {
  color: #fff;
  margin-bottom: 16px;
}

#cta p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  font-weight: 300;
}

.cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  background: var(--cv-navy);
  color: #fff;
  padding: 60px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text {
  color: #fff;
  display: block;
  margin-top: 8px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--cv-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 12px;
  color: #64748b;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 12px;
  color: #64748b;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: #94a3b8;
}

/* =========================================
   WORDPRESS SPECIFIC
   ========================================= */
.wp-block-image img {
  border-radius: 12px;
}

.alignleft { float: left; margin-right: 24px; }
.alignright { float: right; margin-left: 24px; }
.aligncenter { margin: 0 auto; text-align: center; }

/* WordPress menu fallback */
.wp-nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.wp-nav-menu a {
  font-size: 14px;
  color: var(--cv-gray);
  font-weight: 400;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .hero-inner { gap: 40px; }
  .hero-visual { flex: 0 0 360px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  #hero { padding: 60px 0; }
  .hero-inner { flex-direction: column; gap: 40px; }
  .hero-visual { flex: none; width: 100%; }
  .hero-content { max-width: 100%; }

  #primary-nav { display: none; }
  #primary-nav.open { display: flex; flex-direction: column; gap: 16px; position: absolute; top: 70px; left: 0; right: 0; background: #fff; padding: 24px; border-bottom: 1px solid var(--cv-border); }
  .menu-toggle { display: block; }
  .nav-cta { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  h1 { font-size: 36px; }
  h2 { font-size: 28px; }

  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .cta-btns { flex-direction: column; align-items: center; }
  .metrics-grid { grid-template-columns: 1fr; }
}
