/* =============================================
   RESET & BASE VARIABLES
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0A0A0A;
  --bg-card: #141414;
  --ink: #FFFFFF;
  --ink-muted: #8E8E8E;
  --accent: #FF5C35;
  --accent2: #CEEF5A;
  --white: #FFFFFF;
  --border: rgba(255, 255, 255, 0.08);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Theme specific variables */
  --nav-bg: rgba(10, 10, 10, 0.88);
  --bubble-bg: #1C1C1C;
  --bubble-color: var(--white);
  --bubble-border: rgba(255, 255, 255, 0.08);
  --bubble-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --cursor-ring: rgba(255, 255, 255, 0.3);
  --service-hover-bg: #1C1C1C;
  --btn-ghost-border: rgba(255, 255, 255, 0.15);

  --footer-bg: #050505;
  --footer-border: rgba(255, 255, 255, 0.05);
  --footer-brand: #FFFFFF;
  --footer-text: rgba(255, 255, 255, 0.35);
  --footer-title: rgba(255, 255, 255, 0.3);
  --footer-link: rgba(255, 255, 255, 0.5);
  --footer-link-hover: #FFFFFF;
  --footer-copy: rgba(255, 255, 255, 0.25);
}

body.light-theme {
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-muted: #5F5F5F;
  --accent: #D93F16;
  --border: rgba(0, 0, 0, 0.08);

  --nav-bg: rgba(250, 250, 250, 0.88);
  --bubble-bg: #FFFFFF;
  --bubble-color: var(--ink);
  --bubble-border: rgba(0, 0, 0, 0.08);
  --bubble-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --cursor-ring: rgba(0, 0, 0, 0.2);
  --service-hover-bg: #EDEDED;
  --btn-ghost-border: rgba(0, 0, 0, 0.15);

  --footer-bg: #FAFAFC;
  --footer-border: rgba(0, 0, 0, 0.05);
  --footer-brand: #0A0A0A;
  --footer-text: rgba(0, 0, 0, 0.68);
  --footer-title: rgba(0, 0, 0, 0.6);
  --footer-link: rgba(0, 0, 0, 0.72);
  --footer-link-hover: #0A0A0A;
  --footer-copy: rgba(0, 0, 0, 0.55);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s ease, color 0.4s ease;
}
::selection { background: var(--ink); color: var(--bg); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 2px; }

/* =============================================
   CUSTOM CURSOR
============================================= */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-spring), height 0.4s var(--ease-spring), background 0.3s, opacity 0.3s;
}
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  border: 1.5px solid var(--cursor-ring);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ease-spring), height 0.5s var(--ease-spring), border-color 0.3s, background 0.3s;
}
body.cursor-link #cursor-dot { background: var(--accent); width: 14px; height: 14px; }
body.cursor-link #cursor-ring { border-color: rgba(255,90,31,0.3); width: 50px; height: 50px; }

/* =============================================
   NAVIGATION
============================================= */
#nav {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, top 0.4s, width 0.4s, border-radius 0.4s, box-shadow 0.4s, border 0.4s;
}
#nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  padding: 12px 32px;
  top: 18px;
  width: calc(100% - 48px);
  max-width: 1200px;
  border-radius: 100px;
}
.nav-logo-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-logo-subtitle {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-top: 3px;
  transition: color 0.4s ease;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}
.theme-btn:hover {
  background: var(--border);
  transform: scale(1.08);
}
.theme-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.4s var(--ease-spring);
}
.theme-btn:hover svg {
  transform: rotate(20deg);
}
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
body.light-theme .theme-icon-sun { display: none; }
body.light-theme .theme-icon-moon { display: block; }

.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 11px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-spring);
}
.nav-cta:hover { background: var(--accent); color: white; transform: translateY(-2px); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }

#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9990;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
#mobile-menu.open { display: flex; }
#mobile-menu a { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; color: var(--ink); text-decoration: none; }
#mobile-close { position: absolute; top: 20px; right: 32px; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--ink); }

@media (max-width: 768px) {
  #nav { padding: 18px 24px; }
  #nav.scrolled {
    width: calc(100% - 24px);
    padding: 10px 20px;
    top: 12px;
  }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

/* =============================================
   SERVICE DETAIL TEMPLATE
============================================= */
.service-header {
  padding: 160px 48px 60px;
  max-width: 1280px;
  margin: 0 auto;
}
.service-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.service-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.service-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 120px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
.service-content-left {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.service-intro {
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 500;
}
.service-body-text {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.75;
}
.service-section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.service-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service-image-right {
  position: sticky;
  top: 120px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
body.light-theme .service-image-right {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}
.service-image-right img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 80px;
  }
  .service-image-right {
    position: static;
  }
  .service-header {
    padding-left: 24px;
    padding-right: 24px;
  }
  .service-grid {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--footer-bg);
  padding: 60px 48px 36px;
  border-top: 1px solid var(--footer-border);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--footer-border);
  transition: border-color 0.4s ease;
}
.footer-brand { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--footer-brand); letter-spacing: -0.02em; margin-bottom: 12px; transition: color 0.4s ease; }
.footer-brand .accent { color: var(--accent); }
.footer-tagline { font-size: 0.85rem; color: var(--footer-text); line-height: 1.6; transition: color 0.4s ease; }
.footer-col-title { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--footer-title); margin-bottom: 16px; transition: color 0.4s ease; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.875rem;
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--footer-link-hover); }
.footer-bottom {
  max-width: 1280px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.78rem; color: var(--footer-copy); transition: color 0.4s ease; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a { font-size: 0.78rem; color: var(--footer-text); text-decoration: none; transition: color 0.2s; }
.footer-socials a:hover { color: var(--footer-link-hover); }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  footer { padding: 48px 24px 28px; }
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

/* =============================================
   ACCESSIBILITY & SKIP LINK
============================================= */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent);
  color: var(--white);
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 4px;
  z-index: 10001;
  text-decoration: none;
  font-size: 0.85rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 20px;
  outline: 2px solid var(--white);
}

/* =============================================
   TRUST SIGNALS SECTION
============================================= */
.trust-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px;
  border-top: 1px solid var(--border);
}
.trust-inner {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.trust-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.trust-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.trust-heading em {
  font-style: normal;
  font-weight: 300;
  color: var(--ink-muted);
}

/* Before/After Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: transform 0.4s var(--ease-spring), border-color 0.3s;
}
.metric-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 92, 53, 0.3);
}
.metric-value {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.metric-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.metric-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Case Study & Testimonial Row */
.trust-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}
.case-study-card, .testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.case-study-card .tag, .testimonial-card .tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 92, 53, 0.1);
  padding: 4px 10px;
  border-radius: 100px;
  width: fit-content;
  letter-spacing: 0.08em;
}
.case-study-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}
.case-study-card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.case-study-metric {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.case-study-metric .value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.case-study-metric .lbl {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.testimonial-card .quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  font-style: italic;
}
.client-info {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.client-avatar-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.client-avatar-name strong {
  font-size: 0.9rem;
  color: var(--ink);
}
.client-avatar-name span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Logos Strip */
.trust-logos {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logo-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.logo-row {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}
.logo-item {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.4;
  letter-spacing: -0.02em;
}

/* Book SEO Audit CTA Box */
.audit-cta-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  transition: border-color 0.3s;
}
.audit-cta-box:hover {
  border-color: var(--accent);
}
.audit-cta-text h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.audit-cta-text p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  max-width: 560px;
  line-height: 1.6;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.3s var(--ease-spring);
}
.btn-primary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
}

/* =============================================
   FAQ SECTION (ACCORDION)
============================================= */
.faq-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px 120px;
  border-top: 1px solid var(--border);
}
.faq-section .section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.faq-section .section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 48px;
}
.faq-list {
  max-width: 860px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  cursor: pointer;
  gap: 24px;
}
.faq-q-text {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--ink);
  transition: transform 0.4s var(--ease-spring), background 0.3s, border-color 0.3s;
  flex-shrink: 0;
  line-height: 1;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s var(--ease-spring), padding 0.3s;
}
.faq-item.open .faq-answer {
  max-height: 400px;
}
.faq-answer-inner {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
  padding-bottom: 22px;
  max-width: 720px;
}

/* =============================================
   RESPONSIVE LAYOUT UPDATES
============================================= */
@media (max-width: 960px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .trust-showcase {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .audit-cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
  }
  .audit-cta-action {
    width: 100%;
  }
  .audit-cta-action .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .trust-section, .faq-section {
    padding: 60px 24px;
  }
  .case-study-card, .testimonial-card {
    padding: 28px;
  }
  .audit-cta-box {
    padding: 24px;
  }
}

/* =============================================
   ACCESSIBILITY KEYBOARD FOCUS STATES
============================================= */
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 4px;
}

/* =============================================
   ACCESSIBILITY REDUCED MOTION SUPPORT
============================================= */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  /* Disable custom cursors */
  #cursor-dot, #cursor-ring {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
