/* ============================================================
   TK WEB SOLUTIONS — LOWER PAGE VISUAL REPAIR
   css/lower-page-repair.css | v1.0 — 2026-09-08

   PURPOSE:
   Targeted repairs for the lower half of index.html —
   from Founder Story section down to the footer.

   RULES:
   - Component-level fixes only (no global overrides)
   - No new backgrounds, gradients, or decorations
   - Every rule fixes a specific visual problem
   - Preserve all content and functionality
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   1. FOUNDER STORY SECTION
   Background: #060d1f dark navy (managed by inline <style>)
   PROBLEM: home-rhythm was overriding to white — NOW FIXED
   Here we only ensure readability of the story text.
   ══════════════════════════════════════════════════════════ */

/* Ensure the founder section background is never white */
.tk-master-founder-sec {
  background: #060d1f;
  color: #fff;
  padding: 90px 6%;
  position: relative;
  overflow: hidden;
}

/* Ensure glows stay BEHIND content — never above z-index 1 */
.tk-founder-mesh-bg,
.tk-fglow-1,
.tk-fglow-2 {
  position: absolute;
  z-index: 0 !important;
  pointer-events: none !important;
}

.tk-fglow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(26,86,255,0.18) 0%, transparent 70%);
  top: 10%;
  left: -100px;
}

.tk-fglow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0,229,255,0.14) 0%, transparent 70%);
  bottom: 10%;
  right: -100px;
}

/* All content inside founder section must be above decorations */
.tk-founder-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header Block */
.tk-founder-header {
  text-align: center;
  margin-bottom: 48px;
}

.tk-founder-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.25);
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.tk-pulsing-dot {
  width: 8px;
  height: 8px;
  background: #00e5ff;
  border-radius: 50%;
  animation: tkPulse 1.5s infinite;
}

@keyframes tkPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.tk-founder-main-h {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.tk-grad-accent {
  background: linear-gradient(135deg, #1a56ff, #00e5ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tk-founder-lead-p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin: 0 auto;
  max-width: 650px;
}

/* Master Grid */
.tk-founder-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 50px;
  align-items: start;
}

/* Portrait & Identity Left Column */
.tk-portrait-card {
  background: rgba(10,15,30,0.92);
  border: 1.5px solid rgba(26,86,255,0.28);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.tk-portrait-wrap {
  position: relative;
  margin-bottom: 20px;
}

.tk-portrait-aura {
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1a56ff, #00e5ff, #7c3aed);
  opacity: 0.5 !important;
  filter: blur(12px) !important;
  z-index: 0;
}

.tk-portrait-box {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(26, 86, 255, 0.3) !important;
  z-index: 1;
  background: linear-gradient(135deg, rgba(26, 86, 255, 0.18), rgba(0, 229, 255, 0.14)) !important;
  box-shadow: 0 12px 36px rgba(26, 86, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tk-portrait-box:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 48px rgba(26, 86, 255, 0.18) !important;
}

.tk-portrait-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 14px;
  border: none !important;
}

.tk-portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 13, 31, 0.88) 0%, rgba(6, 13, 31, 0.15) 40%, transparent 68%);
}

.tk-portrait-bottom-meta {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
}

.tk-portrait-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,229,255,0.22);
  border: 1px solid rgba(0,229,255,0.45);
  color: #00e5ff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.tk-portrait-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

/* Identity Details */
.tk-identity-content {
  margin-top: 14px;
}

.tk-edu-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(26,86,255,0.15);
  border: 1px solid rgba(26,86,255,0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
}

.tk-edu-badge i {
  color: #00e5ff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tk-edu-badge strong {
  color: #fff;
}

.tk-status-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.tk-status-dot {
  width: 9px;
  height: 9px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  flex-shrink: 0;
}

.tk-status-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: 1px;
}

.tk-status-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}

.tk-pillar-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tk-pillar-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}

.tk-pillar-num {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #00e5ff;
  display: block;
  line-height: 1.2;
}

.tk-pillar-lbl {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  display: block;
  margin-top: 2px;
}

.tk-social-strip {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.tk-soc-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(26,86,255,0.18);
  border: 1px solid rgba(26,86,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  font-size: 1rem;
  transition: all 0.25s;
  text-decoration: none;
}

.tk-soc-btn:hover {
  background: #1a56ff;
  color: #fff;
  transform: translateY(-2px);
  border-color: #00e5ff;
  box-shadow: 0 4px 15px rgba(26,86,255,0.45);
}

/* Right Column Story Narrative & Reading Measure (Issue 7 Fix) */
.tk-founder-col-right {
  max-width: 720px;
}

.tk-quote-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,229,255,0.08);
  border-left: 3px solid rgba(0,229,255,0.6);
  padding: 10px 18px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #e2f8ff;
}

.tk-story-h {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 22px;
}

.tk-story-body {
  max-width: 720px;
}

.tk-story-body p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.75;
  font-size: 1rem;
  margin-bottom: 18px;
  text-align: left;
}

.tk-story-body strong {
  color: #fff;
  font-weight: 700;
}

.tk-tagline-card {
  background: rgba(26, 86, 255, 0.1);
  border: 1px solid rgba(26, 86, 255, 0.25);
  border-radius: 14px;
  padding: 18px 24px;
  margin: 26px 0 32px;
  text-align: center;
  max-width: 720px;
}

.tk-tagline-sub {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tk-tagline-motto {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(90deg, #60a5fa, #00e5ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Master Unified Action Buttons */
.tk-founder-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tk-f-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 12px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
}

.tk-f-btn-primary {
  background: #1a56ff;
  color: #fff;
  box-shadow: 0 6px 20px rgba(26,86,255,0.4);
}

.tk-f-btn-primary:hover {
  background: #0d3acc;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(26,86,255,0.55);
}

.tk-f-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.tk-f-btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: #00e5ff;
  transform: translateY(-2px);
  color: #00e5ff;
}

.tk-f-btn-wa {
  background: rgba(37,211,102,0.15);
  color: #22c55e;
  border: 1px solid rgba(37,211,102,0.4);
}

.tk-f-btn-wa:hover {
  background: #25d366;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.45);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .tk-founder-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tk-portrait-card {
    max-width: 440px;
    margin: 0 auto;
  }
  .tk-founder-header {
    text-align: center;
    margin-bottom: 36px;
  }
  .tk-founder-col-right {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .tk-master-founder-sec {
    padding: 70px 5%;
  }
  .tk-portrait-card {
    padding: 16px;
  }
  .tk-story-body p {
    font-size: 0.9375rem;
    line-height: 1.75;
  }
  .tk-founder-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .tk-f-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════
   2. PROCESS SECTION (uses .section-light class)
   Background should be off-white — clean
   ══════════════════════════════════════════════════════════ */

.section-light {
  background: #f7f9fc;
}

/* Process cards — clean on off-white */
.proc-card {
  background: transparent;
}

.proc-card:hover {
  background: #eef2fb;
}

.proc-card h3,
#process .proc-card h3 {
  color: #0f172a;
  font-family: 'Syne', sans-serif;
}

.proc-card p {
  color: #475569;
}

/* Step number circle — visible */
.proc-num {
  background: linear-gradient(135deg, #1a56ff, #4f46e5);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 86, 255, 0.3);
}

/* ══════════════════════════════════════════════════════════
   3. TESTIMONIALS / COMMITMENTS SECTION
   Background: white — clean card surface
   ══════════════════════════════════════════════════════════ */

#testimonials .testi-card {
  position: relative;
  overflow: hidden;
}

/* Remove the quote decoration from competing with text */
#testimonials .testi-quote {
  color: rgba(26, 86, 255, 0.06);
  font-size: 3rem;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   4. CTA BANNER
   Dark navy box — keep white text readable
   ══════════════════════════════════════════════════════════ */

.cta-box {
  position: relative;
  overflow: hidden;
}

/* Ensure CTA decorative pseudo-elements stay behind text */
.cta-box::before,
.cta-box::after {
  z-index: 0 !important;
  pointer-events: none;
}

.cta-box h2,
.cta-box > p {
  position: relative;
  z-index: 1;
}

.cta-btns {
  position: relative;
  z-index: 1;
}

/* CTA slogan */
.cta-slogan {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════════════════
   5. CONTACT SECTION
   Background: white
   ══════════════════════════════════════════════════════════ */

.contact-grid {
  position: relative;
  z-index: 1;
}

/* Contact form inputs — clear contrast */
.cform input,
.cform select,
.cform textarea {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

.cform input:focus,
.cform select:focus,
.cform textarea:focus {
  border-color: #1a56ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 86, 255, 0.08);
}

.cform input::placeholder,
.cform textarea::placeholder {
  color: #94a3b8;
}

/* Form labels */
.fg label {
  color: #1e293b;
  font-weight: 600;
}

/* Submit button */
.form-submit {
  background: linear-gradient(135deg, #1a56ff, #4f46e5);
  color: #fff;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   6. OFFERS SECTION (inline bg:#ffffff — safe)
   Cards on white — ensure clean separation
   ══════════════════════════════════════════════════════════ */

#offers h2 {
  color: #0b1736;
}

#offers > div > p {
  color: #475569;
}

/* ══════════════════════════════════════════════════════════
   7. FREE AUDIT SECTION (inline dark bg — safe)
   Dark section with form — readable form fields
   ══════════════════════════════════════════════════════════ */

#free-audit input {
  background: #030712;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  border-radius: 12px;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

#free-audit input:focus {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

#free-audit input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

#free-audit label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

/* ══════════════════════════════════════════════════════════
   8. PAYMENT SECTION (inline bg:#f8fafc — safe)
   Off-white section — form fields are inline styled, fine
   ══════════════════════════════════════════════════════════ */

#payment h2 {
  color: #fff;
}

#payment p {
  color: rgba(255,255,255,0.7);
}

/* ══════════════════════════════════════════════════════════
   9. FOOTER — Supplemental contrast (footer.css is primary)
   ══════════════════════════════════════════════════════════ */

/* Ensure footer social icons are visible (supplement footer.css) */
.footer-soc {
  color: rgba(255, 255, 255, 0.65);
}

.footer-soc:hover {
  background: #1a56ff;
  border-color: #1a56ff;
  color: #fff;
}

/* Footer column links — high contrast */
.footer-col ul a {
  color: rgba(255, 255, 255, 0.86);
}

.footer-col ul a:hover {
  color: #00e5ff;
}

/* Footer bottom bar — keep legible */
.footer-bottom {
  color: rgba(255, 255, 255, 0.82);
}

.footer-bottom strong {
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════
   10. CLOCK — Responsive positioning
   PRESERVE: functionality, visibility, time display
   FIX: min-width too wide on mobile; reposition to avoid
        covering content
   ══════════════════════════════════════════════════════════ */

#tk-clock {
  /* Desktop: bottom-center — fine, stays above footer area */
  z-index: 900;
}

@media (max-width: 768px) {
  #tk-clock {
    /* On mobile: move to bottom-right corner, compact size */
    left: auto !important;
    right: 72px;
    bottom: 80px !important;
    transform: none !important;
    min-width: 0 !important;
    padding: 7px 14px !important;
    border-radius: 40px !important;
    /* Reduce text size on mobile */
    font-size: 0.85rem;
  }

  .clk-time {
    font-size: 1rem !important;
    gap: 2px !important;
  }

  .clk-seg {
    padding: 2px 5px !important;
    font-size: 0.9rem !important;
  }

  .clk-right {
    display: none; /* Hide date/day on mobile to keep compact */
  }

  .clk-divider {
    display: none;
  }

  .clk-ampm {
    font-size: 0.45rem !important;
  }
}

@media (max-width: 480px) {
  #tk-clock {
    right: 10px;
    bottom: 90px !important;
    padding: 5px 10px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   11. FLOATING WIDGETS (WhatsApp, Telegram, Phone, Instagram)
   Fix: position:fixed right side — ensure they don't overlap
        with clock on mobile
   ══════════════════════════════════════════════════════════ */

.floats {
  position: fixed;
  right: 16px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

@media (max-width: 768px) {
  .floats {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; /* Above mobile sticky bar */
    right: 12px !important;
  }

  .fl {
    /* Keep compact on mobile */
    max-width: 46px !important;
    padding: 9px 10px !important;
    min-height: 40px !important;
  }

  .fl span {
    display: none !important; /* Always hide label on mobile */
  }
}

/* Scroll-to-top button positioning */
.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 260px;
  z-index: 998;
}

@media (max-width: 768px) {
  .scroll-top {
    right: 12px;
    bottom: 240px;
  }
}

/* AI FAB — left side, does not conflict with right-side floats */
.ai-fab {
  z-index: 1001;
}

.ai-win {
  z-index: 1002;
}

/* ══════════════════════════════════════════════════════════
   12. MOBILE STICKY BAR
   Ensure it stays at very bottom and doesn't overlap clock
   ══════════════════════════════════════════════════════════ */

#mobileStickyBar {
  z-index: 1000;
  padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
}

/* ══════════════════════════════════════════════════════════
   13. GUIDE MASCOT WIDGET
   Ensure it doesn't cover content — right side, positioned
   above floating buttons
   ══════════════════════════════════════════════════════════ */

#guideWrap {
  z-index: 990;
}

/* ══════════════════════════════════════════════════════════
   14. PORTFOLIO / PROJECT CARDS
   On dark navy .portfolio-section background
   Cards should be readable
   ══════════════════════════════════════════════════════════ */

.proj-name {
  color: #fff;
  font-family: 'Syne', sans-serif;
}

.proj-desc {
  color: rgba(255, 255, 255, 0.52);
}

.proj-type {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Ensure portfolio grid never causes horizontal scroll */
@media (max-width: 768px) {
  .proj-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    transform: none !important;
    flex-wrap: wrap !important;
  }

  .car-row-wrap {
    overflow: visible !important;
  }

  .proj-card {
    width: 100% !important;
    max-width: 100% !important;
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    transition-delay: 0s !important;
  }
}

/* ══════════════════════════════════════════════════════════
   15. SECTION-LIGHT CLASS REPAIR
   Used by #process
   ══════════════════════════════════════════════════════════ */

.section-light {
  background: #f7f9fc;
  padding: 80px 6%;
}

@media (max-width: 768px) {
  .section-light {
    padding: 60px 5%;
  }
}

/* ══════════════════════════════════════════════════════════
   16. KNOWLEDGE / BLOG TEASER SECTION
   The section above footer with FAQ/Schema content
   ══════════════════════════════════════════════════════════ */

/* Blog/knowledge section text contrast */
[id*="faq"], [id*="schema"], [id*="knowledge"] {
  color: #374151;
}

/* ══════════════════════════════════════════════════════════
   17. NO HORIZONTAL OVERFLOW — global safety rule
   ══════════════════════════════════════════════════════════ */

body {
  overflow-x: hidden;
}

.tk-master-founder-sec,
#offers,
#free-audit,
#payment,
.portfolio-section {
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════
   18. REDUCED MOTION ACCESSIBILITY
   ══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .tk-portrait-aura,
  .tk-pulsing-dot,
  .tk-founder-glow,
  #tk-clock::after,
  .clk-dot,
  .clk-colon,
  .clk-seg.flip,
  .proj-card,
  .svc-card,
  .fl {
    animation: none !important;
    transition: none !important;
  }
}

/* ══════════════════════════════════════════════════════════
   19. FOCUS VISIBILITY — Accessibility
   ══════════════════════════════════════════════════════════ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1a56ff;
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
   20. APP SECTION — ensure dark bg stays dark (protection)
   The inline style has background:linear-gradient(#020b1a...)
   This rule ensures no external CSS overrides it.
   ══════════════════════════════════════════════════════════ */

#app .tk-app-cards * {
  position: relative;
  z-index: 1;
}
