/* ── Dark Mode Default Nav Background ─────────── */
:root {
  --nav-bg: rgba(10,10,10,0.8);
}

/* ── Light Mode Override ──────────────────────── */
html[data-theme="light"] {
  --bg: #FAF6F0;
  --bg-elevated: #FFFEFA;
  --bg-card: #F0EDE7;
  --gold: #9A7B4A;
  --gold-dim: rgba(154,123,74,0.12);
  --gold-glow: rgba(154,123,74,0.06);
  --text: #1A1918;
  --text-muted: #6B6560;
  --text-dim: #9A9590;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --nav-bg: rgba(250,246,240,0.85);
}
html[data-theme="light"] body::before { opacity: 0.015; }
html[data-theme="light"] .cursor { background: #1A1918; }
html[data-theme="light"] .cursor.hover { background: transparent; border-color: #9A7B4A; }
html[data-theme="light"] #loader { background: #FAF6F0; }
html[data-theme="light"] #loader svg path { stroke: #9A7B4A; }

body, nav, .service-card, .case-study, .more-card, .testimonial-card, .writing-card, .article-card,
.audit-input, .audit-btn, .footer, footer, .exit-modal, .btn-primary, .btn-secondary, .nav-cta {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Theme Toggle Button ──────────────────────── */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%; min-width: 44px; min-height: 44px;
  background: transparent; border: 1px solid var(--border-hover);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.25s ease;
  color: var(--gold);
}
.theme-toggle:hover { background: var(--gold-dim); border-color: var(--gold); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: block; }
html[data-theme="light"] .theme-toggle .moon { display: none; }

/* ── Active Projects Indicator ────────────────── */
.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); letter-spacing: 0.02em;
  padding: 0 8px;
}
.nav-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #5CB882; box-shadow: 0 0 6px rgba(92,184,130,0.5);
  animation: statusPulse 2.4s ease-in-out infinite;
}
@keyframes statusPulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.nav-right { display: flex; align-items: center; gap: 14px; }
@media (max-width: 640px) { .nav-status { display: none; } }

/* ── Back to Top Button ───────────────────────── */
.back-to-top {
  position: fixed; bottom: 24px; left: 24px; z-index: 90;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); text-decoration: none;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--gold-dim); transform: translateY(-2px); }
.back-to-top svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .back-to-top { width: 36px; height: 36px; bottom: 16px; left: 16px; }
}

/* ── Overflow guard (prevent horizontal bleed from scroll sections) ── */
html, body { overflow-x: hidden; }

/* ── Share Bar ────────────────────────────────── */
.share-bar {
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.share-label {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 16px;
}
.share-buttons {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  color: var(--text-muted); text-decoration: none;
  padding: 10px 18px; border: 1px solid var(--border);
  border-radius: 99px; background: var(--bg-card);
  cursor: pointer; transition: all 0.25s ease;
}
.share-btn:hover { color: var(--gold); border-color: var(--border-hover); }
.share-btn svg { width: 14px; height: 14px; }

/* ── Toast ────────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); color: var(--text);
  padding: 12px 24px; border-radius: 6px;
  border: 1px solid var(--border-hover);
  font-family: var(--mono); font-size: 12px;
  opacity: 0; pointer-events: none; z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Reading Progress Bar (blog pages) ────────── */
.read-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 2px;
  background: var(--gold); box-shadow: 0 0 8px rgba(196,168,122,0.4);
  z-index: 9997; transition: width 0.1s linear;
}

/* ── Breadcrumbs ──────────────────────────────── */
.breadcrumbs {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); letter-spacing: 0.04em;
  margin-bottom: 24px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px;
}
.breadcrumbs a {
  color: var(--text-dim); text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--text-dim); opacity: 0.5; }
.breadcrumbs .current { color: var(--text-muted); }

/* ── Blog Author Byline ───────────────────────── */
.byline {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-dim); letter-spacing: 0.02em;
  margin-bottom: 32px; display: flex; align-items: center; gap: 10px;
}
.byline a {
  color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.byline a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.byline .dot { color: var(--text-dim); opacity: 0.5; }

/* =========================================================
   FLOATING WHATSAPP CTA (persistent bottom-right across site)
   ========================================================= */
.wa-float{
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 100;
  transition: transform 200ms ease, box-shadow 200ms ease;
  opacity: 0;
  animation: waAppear 600ms ease-out 800ms forwards;
}
.wa-float:hover{
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.wa-float:active{ transform: scale(0.98); }
.wa-float:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
@keyframes waAppear{
  from{ opacity: 0; transform: translateY(20px); }
  to{ opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px){
  .wa-float{
    width: 52px; height: 52px;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .wa-float svg{ width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce){
  .wa-float{ animation: none; opacity: 1; }
}
