/*
Theme Name: Khanny Solutions
Theme URI: https://khannysolutions.com
Author: Khanny Solutions
Author URI: https://khannysolutions.com
Description: A modern, AI-focused one-page business theme for Khanny Solutions, built around AI Solutions, Business Consulting, Digital Marketing, Web Development and IT Solutions.
Version: 1.0.7
Requires at least: 6.0
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: khanny-solutions
*/

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #0A0B1E;
  color: #F5F5FA;
  font-family: 'Work Sans', sans-serif;
}

a { color: #F5F5FA; text-decoration: none; }
a:hover { color: #C084FC; }

img { max-width: 100%; }

.khs-nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.khs-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: #D7D7E4;
}
.khs-nav-links a:hover { color: #C084FC; }

@keyframes khs-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes khs-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Standard WP page content (page.php / index.php fallback) */
.khs-page-content { color: #D7D7E4; line-height: 1.7; font-size: 16px; }
.khs-page-content a { color: #C084FC; text-decoration: underline; }
.khs-page-content h1, .khs-page-content h2, .khs-page-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: #FFFFFF;
}

/* ---------- Motion: floating background orbs (hero) ---------- */
@keyframes khs-orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -24px) scale(1.08); }
}
@keyframes khs-orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-26px, 22px) scale(1.05); }
}
.khs-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.khs-orb-1 {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, #A855F7, transparent 70%);
  animation: khs-orb-float-1 14s ease-in-out infinite;
}
.khs-orb-2 {
  width: 380px;
  height: 380px;
  bottom: -160px;
  right: -80px;
  background: radial-gradient(circle, #38BDF8, transparent 70%);
  animation: khs-orb-float-2 16s ease-in-out infinite;
}

/* Pulsing eyebrow dot */
@keyframes khs-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(192,132,252,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(192,132,252,0); }
  100% { box-shadow: 0 0 0 0 rgba(192,132,252,0); }
}
.khs-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C084FC;
  animation: khs-pulse-dot 2s infinite;
}

/* ---------- Motion: scroll reveal ---------- */
.khs-reveal {
  opacity: 0;
  /* translate3d (not translateY) forces its own GPU compositing layer.
     Without this, iOS Safari can "ghost" — paint a faint duplicate of the
     element's pre-transition frame — while a transform transition runs
     near a position:sticky ancestor (our sticky nav), which is what made
     the hero buttons look doubled in screenshots. backface-visibility +
     will-change reinforce the same fix. */
  transform: translate3d(0, 28px, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: opacity, transform;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.khs-reveal.khs-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .khs-reveal { opacity: 1; transform: none; transition: none; }
  .khs-orb, .khs-pulse-dot, .khs-call-fab-ring { animation: none !important; }
}

/* ---------- Hero visual: AI performance card ---------- */
.khs-hero-visual-glow {
  position: absolute;
  inset: -24px;
  background:
    radial-gradient(circle at 25% 20%, rgba(168,85,247,0.35), transparent 60%),
    radial-gradient(circle at 80% 85%, rgba(56,189,248,0.3), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.khs-bar { transform-origin: bottom; }
@keyframes khs-bar-grow {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
@keyframes khs-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .khs-bar, [style*="khs-badge-float"] { animation: none !important; }
}

/* ---------- Card hover lift (service cards / pricing / other-services) ---------- */
.khs-services-grid > div,
.khs-pricing-card,
.khs-otherservices-grid > a {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.khs-services-grid > div:hover,
.khs-pricing-card:hover,
.khs-otherservices-grid > a:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* ---------- Stats band ---------- */
.khs-stats-grid { }

/* Homepage pricing section styling now lives inline in front-page.php,
   scoped under #pricing, so it matches the approved HTML preview exactly. */

/* ---------- Floating call button ---------- */
@keyframes khs-fab-ring {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.9); opacity: 0; }
}
.khs-call-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A855F7, #3B82F6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(124,58,237,0.45);
}
.khs-call-fab:hover { color: #FFFFFF; }
.khs-call-fab-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #A855F7;
  animation: khs-fab-ring 2.2s ease-out infinite;
}

/* ---------- Contact form ---------- */
.khs-banner {
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.khs-banner strong { display: block; margin-bottom: 2px; font-family: 'Space Grotesk', sans-serif; }
.khs-banner-success { background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.35); color: #BBF7D0; }
.khs-banner-error { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.35); color: #FECACA; }

.khs-form { display: flex; flex-direction: column; gap: 22px; }
.khs-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.khs-field { display: flex; flex-direction: column; gap: 8px; }
.khs-field label { font-size: 14px; font-weight: 600; color: #D7D7E4; }
.khs-field input[type="text"],
.khs-field input[type="email"],
.khs-field input[type="tel"],
.khs-field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  color: #F5F5FA;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  width: 100%;
}
.khs-field input:focus,
.khs-field textarea:focus {
  outline: none;
  border-color: #A855F7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}
.khs-field textarea { resize: vertical; min-height: 90px; }
.khs-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.khs-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #D7D7E4; cursor: pointer; }
.khs-checkbox input { width: 16px; height: 16px; accent-color: #A855F7; }
.khs-hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }
.khs-btn-submit {
  align-self: flex-start;
  background: linear-gradient(90deg, #A855F7, #3B82F6);
  color: #FFFFFF;
  border: none;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
}
.khs-btn-submit:hover { color: #FFFFFF; opacity: 0.92; }

/* ---------- Footer slogan: one line on every screen size ---------- */
.khs-footer-slogan {
  white-space: nowrap;
  max-width: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .khs-hero-grid { grid-template-columns: 1fr !important; }
  .khs-services-grid { grid-template-columns: 1fr !important; }
  .khs-services-grid > div { grid-column: span 1 !important; }
  .khs-approach-grid { grid-template-columns: 1fr !important; }
  .khs-feature-grid { grid-template-columns: 1fr !important; }
  .khs-otherservices-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .khs-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .khs-footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .khs-pricing-grid { grid-template-columns: 1fr !important; }
  .khs-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .khs-hero-h1 { font-size: 40px !important; }
  .khs-section-h2 { font-size: 30px !important; }
}

@media (max-width: 640px) {
  /* Mobile header: logo left, nav links right, same row */
  .khs-nav-inner {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding: 12px 20px !important;
    gap: 22px !important;
  }
  .khs-nav-inner > a:first-child img { height: 36px !important; }
  /* Links sit right after the logo and spread evenly across the row,
     capped so they don't drift to the far edge on wider phones. */
  .khs-nav-inner .khs-nav-links {
    flex: 1 1 auto;
    max-width: 300px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px !important;
    margin-left: 0;
  }
  .khs-nav-links a { font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; transition: color 0.2s ease; }
  .khs-nav-inner .custom-logo { height: 36px; width: auto; display: block; }
  .khs-nav-cta { display: none !important; }
  /* Footer slogan: shrink with screen width on phones so it fits one line */
  .khs-footer-slogan { font-size: min(14px, 3.05vw) !important; }
  .khs-process-grid { grid-template-columns: 1fr !important; }
  .khs-otherservices-grid { grid-template-columns: 1fr !important; }
  .khs-stats-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .khs-field-row { grid-template-columns: 1fr !important; }
  .khs-hero-h1 { font-size: 32px !important; }
  .khs-section-h2 { font-size: 26px !important; }
  .khs-pad-section { padding-left: 24px !important; padding-right: 24px !important; }
  .khs-call-fab { right: 16px !important; bottom: 16px !important; width: 52px !important; height: 52px !important; }
}

@media (max-width: 360px) {
  .khs-nav-inner { padding: 12px 16px !important; gap: 16px !important; }
  .khs-nav-links a { font-size: 12.5px; }
}

/* Smooth scrolling for the in-page nav links; offset so section headings
   aren't hidden under the sticky nav. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id], div[id] { scroll-margin-top: 90px; }

/* ---------- reCAPTCHA badge ----------
   Loaded by a plugin, not this theme. Hidden with visibility (not display:none)
   so reCAPTCHA keeps working. Google requires the text notice shown under the
   contact form (.khs-recaptcha-note) when the badge is hidden. */
.grecaptcha-badge { visibility: hidden !important; }
.khs-recaptcha-note { font-size: 12px; color: #8A8AA3; line-height: 1.6; margin: 0; }
.khs-recaptcha-note a { color: #C084FC; text-decoration: underline; }
