/*
Theme Name: 5C Consulting
Theme URI: https://5cconsulting.co.za/
Author: 5C Consulting
Author URI: https://5cconsulting.co.za/
Description: Custom WordPress theme for 5C Consulting — Strategy across Cost, Compliance, Confidentiality, Continuity & Culture. One-page responsive theme with integrated contact form, customizer options, and blog support.
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fivec-consulting
Tags: one-page, business, consulting, custom-logo, custom-menu, featured-images, theme-options, translation-ready
*/

/* =========================================================
   DESIGN TOKENS — pulled from the 5C brand mark
   ========================================================= */
:root {
  --background: #fbf8f4;
  --foreground: #1b2d36;
  --card: #ffffff;
  --card-fg: #1b2d36;
  --primary: #1f4e5c;          /* deep teal */
  --primary-fg: #fbf8f4;
  --primary-glow: #4f8a96;     /* mid teal */
  --secondary: #e2eef1;
  --secondary-fg: #1f4e5c;
  --muted: #edf3f4;
  --muted-fg: #546167;
  --accent: #c7e0e4;
  --accent-fg: #15373f;
  --border: #d6e4e7;
  --input: #d6e4e7;
  --ring: #1f4e5c;

  --hero-from: #163b48;
  --hero-to: #3f7784;
  --gradient-hero: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  --gradient-soft: linear-gradient(180deg, #fdfbf6 0%, #e5eff1 100%);
  --gradient-band: linear-gradient(90deg, #1f4e5c 0%, #5aa0ad 100%);
  --shadow-elegant: 0 24px 60px -24px rgba(20, 50, 60, 0.28);
  --shadow-card: 0 12px 32px -18px rgba(20, 50, 60, 0.18);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 0.75rem;
  --container-max: 1200px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition-smooth); }
button { cursor: pointer; font-family: inherit; }
h1, h2, h3, h4, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--foreground);
  font-weight: 600;
}
p { margin: 0 0 1em; }
.font-script { font-family: 'Allura', 'Brush Script MT', cursive; font-weight: 400; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .container { padding: 0 2rem; } }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: var(--transition-smooth);
  background: transparent;
}
.site-header.scrolled {
  background: rgba(251, 248, 244, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 0.5rem;
  background: var(--background);
  padding: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-fg);
  transition: var(--transition-smooth);
}
.site-header.scrolled .brand-name { color: var(--foreground); }
.brand-name .five { color: inherit; }

.primary-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
@media (min-width: 900px) { .primary-nav { display: flex; } }
.primary-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(251, 248, 244, 0.85);
}
.site-header.scrolled .primary-nav a { color: rgba(27, 45, 54, 0.75); }
.primary-nav a:hover,
.site-header.scrolled .primary-nav a:hover { color: var(--primary); }
.site-header.scrolled .primary-nav a:hover { color: var(--primary); }

.cta-btn {
  display: none;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 500;
}
.cta-btn:hover { background: #183e49; }
@media (min-width: 900px) { .cta-btn { display: inline-flex; } }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid rgba(251, 248, 244, 0.4);
  border-radius: 0.5rem;
  color: var(--primary-fg);
}
.site-header.scrolled .menu-toggle { color: var(--foreground); border-color: var(--border); }
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem 1rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.75rem 0.5rem;
  font-size: 0.95rem;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 10rem 0 6rem;
  background-image: var(--gradient-hero);
  color: var(--primary-fg);
}
@media (min-width: 768px) { .hero { padding-top: 12rem; } }
.hero .blob {
  position: absolute;
  border-radius: 9999px;
  background: rgba(251, 248, 244, 0.1);
  filter: blur(60px);
  pointer-events: none;
}
.hero .blob-1 { top: -8rem; right: -8rem; width: 520px; height: 520px; }
.hero .blob-2 { bottom: -10rem; left: -8rem; width: 420px; height: 420px; }
.hero-watermark {
  display: none;
  position: absolute;
  right: -5rem;
  top: 50%;
  width: 560px;
  transform: translateY(-50%);
  opacity: 0.07;
  pointer-events: none;
}
@media (min-width: 900px) { .hero-watermark { display: block; } }
.hero-inner {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.hero-badge-logo {
  display: inline-flex;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 1rem;
  box-shadow: var(--shadow-elegant);
  margin-bottom: 1.5rem;
}
.hero-badge-logo img { width: 64px; height: 64px; object-fit: contain; }
.kicker {
  display: inline-block;
  padding: 0.35rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(251, 248, 244, 0.3);
  background: rgba(251, 248, 244, 0.1);
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(251, 248, 244, 0.85);
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--primary-fg);
  margin-bottom: 1.25rem;
}
.hero p.lede {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: rgba(251, 248, 244, 0.82);
}
.hero-actions {
  display: flex; flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}
@media (min-width: 560px) { .hero-actions { flex-direction: row; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.75rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  cursor: pointer;
}
.btn-primary { background: var(--primary-fg); color: var(--primary); }
.btn-primary:hover { background: rgba(251, 248, 244, 0.9); }
.btn-outline-light { background: transparent; color: var(--primary-fg); border-color: rgba(251, 248, 244, 0.4); }
.btn-outline-light:hover { background: rgba(251, 248, 244, 0.12); }

.pillar-band {
  position: relative;
  margin-top: 5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(251, 248, 244, 0.15);
  background: rgba(31, 78, 92, 0.3);
  backdrop-filter: blur(6px);
}
.pillar-band .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 2rem;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(251, 248, 244, 0.85);
}

/* =========================================================
   SECTIONS
   ========================================================= */
section { padding: 6rem 0; }
.bg-soft { background-image: var(--gradient-soft); }
.bg-primary-gradient { background-image: var(--gradient-hero); color: var(--primary-fg); }
.bg-primary-gradient h2, .bg-primary-gradient h3 { color: var(--primary-fg); }

.section-head {
  max-width: 40rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section-head .kicker {
  background: transparent;
  border: 0;
  color: rgba(31, 78, 92, 0.7);
  padding: 0 0 0.5rem;
  font-size: 0.7rem;
  display: block;
}
.bg-primary-gradient .section-head .kicker { color: rgba(251, 248, 244, 0.75); }
.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 600;
}
.section-head p {
  color: var(--muted-fg);
  font-size: 1rem;
}
.bg-primary-gradient .section-head p { color: rgba(251, 248, 244, 0.82); }

/* Pillars */
.pillar-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media (min-width: 1024px) { .pillar-grid { grid-template-columns: repeat(5, 1fr); } }
.pillar-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.pillar-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 0.6rem;
  background: var(--secondary);
  color: var(--primary);
  margin-bottom: 1.25rem;
  transition: var(--transition-smooth);
}
.pillar-card:hover .pillar-icon { background: var(--primary); color: var(--primary-fg); }
.pillar-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.pillar-card p { font-size: 0.9rem; color: var(--muted-fg); margin: 0; }

/* About */
.about-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.about-grid h2 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.15; }
.about-copy p { color: var(--muted-fg); margin-bottom: 1rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0; }
.about-tag {
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.about-sig { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem; }
.about-sig .sig-name { font-family: 'Allura', cursive; font-size: 1.9rem; color: var(--primary); margin: 0; }
.about-sig .sig-role { margin: 0.25rem 0 0; font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.25em; color: var(--muted-fg); }

.mv-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
.mv-card { padding: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow-card); }
.mv-card.wide { grid-column: 1 / -1; }
.mv-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.mv-card p, .mv-card ul { font-size: 0.9rem; color: var(--muted-fg); margin: 0; }
.mv-card ul { padding-left: 0; list-style: none; }
.mv-card ul li { padding: 0.2rem 0; }

/* Services */
.service-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.tag {
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.service-card p { flex: 1; font-size: 0.9rem; color: var(--muted-fg); }
.service-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
}
.service-link:hover { gap: 0.6rem; }
.service-link svg { width: 16px; height: 16px; }

/* Process */
.process-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .process-grid { grid-template-columns: 1fr 1fr; } }
.process-card {
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}
.process-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(31, 78, 92, 0.15);
  margin-bottom: 0.25rem;
}
.process-card h3 { font-size: 1.45rem; margin-bottom: 0.65rem; }
.process-card p { font-size: 0.9rem; color: var(--muted-fg); margin: 0; }

/* Contact */
.contact-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-head h2 { font-size: clamp(1.85rem, 4vw, 3rem); color: var(--primary-fg); }
.contact-head p { color: rgba(251, 248, 244, 0.82); max-width: 30rem; }
.contact-info { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info .row { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9rem; }
.contact-info .row svg { flex-shrink: 0; margin-top: 2px; color: rgba(251, 248, 244, 0.7); }
.contact-info .row .label { font-weight: 600; color: var(--primary-fg); margin-bottom: 2px; }
.contact-info .row .val { color: rgba(251, 248, 244, 0.78); }
.contact-info .row .val a { color: inherit; }
.hours {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: rgba(251, 248, 244, 0.06);
  border: 1px solid rgba(251, 248, 244, 0.15);
  border-radius: 1rem;
}
.hours h3 { color: var(--primary-fg); font-size: 1.05rem; margin-bottom: 0.75rem; }
.hours ul { list-style: none; padding: 0; margin: 0; color: rgba(251, 248, 244, 0.82); font-size: 0.9rem; }
.hours li { display: flex; justify-content: space-between; padding: 0.15rem 0; }

.contact-form {
  padding: 2rem;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid rgba(251, 248, 244, 0.15);
  border-radius: 1rem;
  box-shadow: var(--shadow-elegant);
}
.field { display: grid; gap: 0.35rem; margin-bottom: 1.15rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--foreground); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--input);
  border-radius: 0.5rem;
  transition: var(--transition-smooth);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(31, 78, 92, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-submit {
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: var(--primary-fg);
  border: 0;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.form-submit:hover { background: #183e49; }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.form-message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}
.form-message.success { background: #e8f4ec; color: #1f5b37; border: 1px solid #b9dcc3; }
.form-message.error { background: #fbeceb; color: #7a1f1a; border: 1px solid #e9b5b2; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--primary);
  color: var(--primary-fg);
  border-top: 1px solid var(--border);
}
.site-footer .footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding: 3.5rem 0;
}
@media (min-width: 768px) { .site-footer .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: var(--primary-fg); font-size: 1rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: rgba(251, 248, 244, 0.82); }
.site-footer ul li { padding: 0.2rem 0; }
.site-footer ul a:hover { color: var(--primary-fg); }
.site-footer .f-brand { display: flex; align-items: center; gap: 0.75rem; }
.site-footer .f-brand img { width: 40px; height: 40px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.9; }
.site-footer .f-brand span { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; font-weight: 600; }
.site-footer .f-tag { margin-top: 1rem; max-width: 24rem; font-size: 0.9rem; color: rgba(251, 248, 244, 0.7); }
.site-footer .sig-block { margin-top: 1.25rem; }
.site-footer .sig-block .sig-name { font-family: 'Allura', cursive; font-size: 1.6rem; color: rgba(251, 248, 244, 0.85); margin: 0; }
.site-footer .sig-block .sig-role { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(251, 248, 244, 0.55); margin: 0.25rem 0 0; }
.footer-bottom { border-top: 1px solid rgba(251, 248, 244, 0.12); }
.footer-bottom .container {
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  justify-content: space-between; align-items: center;
  font-size: 0.75rem;
  color: rgba(251, 248, 244, 0.6);
}
@media (min-width: 768px) { .footer-bottom .container { flex-direction: row; } }

/* =========================================================
   BLOG
   ========================================================= */
.blog-hero { padding: 10rem 0 4rem; background-image: var(--gradient-hero); color: var(--primary-fg); }
.blog-hero h1 { font-size: clamp(2rem, 4vw, 3.5rem); color: var(--primary-fg); }
.blog-hero p { color: rgba(251, 248, 244, 0.82); }
.blog-section { padding: 4rem 0 6rem; }
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card {
  display: flex; flex-direction: column;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.post-card .meta { font-size: 0.75rem; color: var(--muted-fg); letter-spacing: 0.1em; text-transform: uppercase; }
.post-card h3 { margin: 0.5rem 0; font-size: 1.3rem; }
.post-card p { font-size: 0.9rem; color: var(--muted-fg); flex: 1; }
.post-card a.read-more { margin-top: 1rem; color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem; }

.single-post { padding: 8rem 0 5rem; max-width: 760px; margin: 0 auto; }
.single-post .meta { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-fg); }
.single-post h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin: 0.75rem 0 1.5rem; }
.single-post .post-content { font-size: 1rem; color: var(--foreground); }
.single-post .post-content p, .single-post .post-content li { color: var(--foreground); }
.single-post .back { margin-top: 3rem; display: inline-block; color: var(--primary); font-weight: 500; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
