/* ============================================================
   jdookeran.net — style.css
   Single stylesheet for all pages. Load after Tailwind CDN.
   Tailwind handles utilities; this file owns:
     - Design tokens (CSS vars)
     - Custom components (.card, .proof, .kpi, etc.)
     - Typography helpers (.font-display, .font-body)
     - Nav underline animation
     - Reading progress bar
   ============================================================ */


/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */

:root {
  --bg:      #0f1020;   /* deep slate/navy — page background */
  --panel:   #16162a;   /* slightly lighter — card/section panels */
  --text:    #e5e7eb;   /* primary text */
  --muted:   #a1a1b3;   /* secondary/caption text */
  --brand:   #7c3aed;   /* violet — primary accent */
  --brand-2: #c4b5fd;   /* lilac — secondary accent, links */
  --ring:    #a78bfa;   /* focus ring */
}


/* ── 2. TYPOGRAPHY HELPERS ────────────────────────────────── */

.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-body {
  font-family: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}


/* ── 3. NAV UNDERLINE ANIMATION ───────────────────────────── */

.navlink {
  position: relative;
}

.navlink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--brand-2);
  transition: width 0.25s;
}

.navlink:hover::after {
  width: 100%;
}


/* ── 4. READING PROGRESS BAR ──────────────────────────────── */

.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  background: var(--brand-2);
  width: 0;
  z-index: 50;
}


/* ── 5. IMAGE & CARD HELPERS ──────────────────────────────── */

/* Figure / image block with caption */
.figure {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.75rem;
  margin: 1.25rem 0;
}

.figure img {
  border-radius: 0.5rem;
  width: 100%;
  height: auto;
  display: block;
}

.figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Card image backgrounds */
.card-bg {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

/* Base dark scrim across the whole image */
.card-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  z-index: 0;
  transition: opacity 0.25s;
}

/* Bottom gradient where text lives */
.card-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.85) 100%);
  z-index: 0;
  pointer-events: none;
}

.card-bg .content {
  position: relative;
  z-index: 1;
}

/* Subtle text shadow so white type pops on any image */
.card-bg .content .font-display,
.card-bg .content .text-white,
.card-bg .content .text-\[var\(--muted\)\] {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Hover: image brightens slightly, gradient eases */
.card-bg:hover::before { opacity: 0.35; }
.card-bg:hover::after  { opacity: 0.95; }

.bg-cover-center {
  background-size: cover;
  background-position: center;
}

.text-glow {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.35);
}


/* ── 6. LABEL WRAP ────────────────────────────────────────── */
/* Frosted dark label on top of card-bg images                 */

.label-wrap {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  display: inline-block;
}


/* ── 7. PROOF CARDS ───────────────────────────────────────── */
/* "Why work with me" grid on index.html                       */

.proof {
  background: linear-gradient(135deg, var(--panel), rgba(124,58,237,0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
}

.proof-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.proof-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  font-family: 'Rubik', sans-serif;
}

.proof-desc {
  color: var(--muted);
}


/* ── 8. QUOTE / TESTIMONIAL ───────────────────────────────── */

.quote {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
}

.quote blockquote {
  color: var(--text);
  font-style: italic;
}

.quote figcaption {
  color: var(--muted);
  margin-top: 0.5rem;
}


/* ── 9. PRIMARY LANE CARD ─────────────────────────────────── */
/* "Main work" AEO/strategy highlight card on index.html       */

.lane-primary {
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(196,181,253,0.10));
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 1rem;
}


/* ── 10. SERVICE CARDS (text-only) ───────────────────────── */
/* Used on travel.html, ghostwriting.html, tech.html           */

.card {
  background: linear-gradient(135deg, var(--panel), rgba(124,58,237,0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
}

.card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-body {
  color: var(--text);
  opacity: 0.9;
}


/* ── 11. KPI BADGES ───────────────────────────────────────── */
/* Small stat chips on case study cards                        */

.kpi {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: rgba(0, 0, 0, 0.25);
}

.kpi .val {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.badge {
  font-size: 0.7rem;
  opacity: 0.85;
  color: var(--muted);
}


/* ── 12. FILTER CHIPS ─────────────────────────────────────── */

.chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.chip[data-active="true"] {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(196, 181, 253, 0.35);
}


/* ── 13. BUTTONS ──────────────────────────────────────────── */

/* Primary filled button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* Large primary button — contact page, hero CTAs */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
  font-size: 1rem;
  color: #fff;
  background: var(--brand);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}


/* ── 14. CONTACT FORM INPUTS ──────────────────────────────── */

.field {
  width: 100%;
  border-radius: 0.75rem;
  background: #1d1f33;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.field::placeholder {
  color: var(--brand-2);
  opacity: 0.7;
}

.field:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.4), inset 0 1px 2px rgba(0,0,0,0.35);
}


/* ── 15. CONTENT BLOCKS (newsletter / article pages) ─────── */

.callout {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(196,181,253,0.10));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  padding: 1rem;
}

.cta {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(196,181,253,0.10));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  padding: 1rem;
}

/* samples.html variants */
.tldr {
  background: linear-gradient(135deg, var(--panel), rgba(124,58,237,0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
}

.cta-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(196,181,253,0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1rem;
}


/* ── 16. PROSE OVERRIDES ──────────────────────────────────── */
/* For pages using Tailwind's typography plugin (.prose)       */

.prose a {
  color: var(--brand-2);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: 'Playfair Display', Georgia, serif;
}


/* ── 17. FIGURE CAPTIONS ──────────────────────────────────── */

figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}


/* ── 18. ANIMATION UTILITIES ──────────────────────────────── */
/* Used on service pages with .aos-up class                    */

.aos-up {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.10s; }
.delay-3 { transition-delay: 0.15s; }


/* ── 19. CASE STUDY CARD OVERLAY ──────────────────────────── */
/* Used on samples.html                                        */

.card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
}


/* ── 20. DROPDOWN NAV ─────────────────────────────────────── */

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.75rem;
  padding: 0.5rem;
  min-width: 160px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--brand-2);
}
