/*
  modern.css — CaaS Landing Page
  Vinetu Technologies Ltd
  All new sections + Bootstrap 5 overrides + hero scroll fix.
  DO NOT edit style*.css (Aerial/skel-managed).
*/

/* =============================================
   RESPONSIVE TYPOGRAPHY — fluid base font size
   Scales from 16px at ~1280px viewport up to 19px at 1920px+.
   All rem-based values inherit this scaling automatically.
   ============================================= */
html {
  font-size: clamp(16px, 1.1vw, 19px);
}

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --caas-blue:       #2979ff;
  --caas-blue-dark:  #0d47a1;
  --caas-blue-light: #64b5f6;
  --caas-cyan:       #29b6f6;
  --caas-dark:       #060e1d;
  --caas-surface:    #091422;
  --caas-card:       #0d1f38;
  --text-primary:    #e4efff;
  --text-muted:      #c2d8ec;
  --accent:          #29b6f6;
  --border:          rgba(41, 121, 255, 0.22);
  --border-hover:    rgba(41, 121, 255, 0.5);
  --radius:          12px;
  --radius-sm:       8px;
  --shadow:          0 4px 24px rgba(0, 0, 0, 0.55);
  --shadow-hover:    0 8px 48px rgba(41, 182, 246, 0.25);
  --transition:      0.3s ease;
}

/* =============================================
   AERIAL HERO SCROLL OVERRIDE
   Allow page to scroll past the hero section.
   #bg and #overlay stay fixed for parallax effect.
   ============================================= */
body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background-color: var(--caas-dark) !important; /* override Aerial's body { background: #fff } */
}

/* =============================================
   HERO SKY GRADIENT — replaces bg.jpg & overlay.svg
   ============================================= */

/* Force sky-blue gradient over the Aerial bg.jpg (4-color image).
   NOTE: do NOT add a separate background-image: none here —
   the background shorthand already sets background-image to the gradient;
   a separate override would wipe it out and leave a transparent canvas. */
canvas#bg,
#bg {
  background-image: linear-gradient(175deg,
    #010c1e 0%,
    #041733 15%,
    #062b62 35%,
    #0b46a0 55%,
    #1260c8 72%,
    #1976d2 85%,
    #2196f3 100%
  ) !important;
  background-color: #010c1e !important; /* fallback / solid base */
  background-size: cover !important;
  background-repeat: no-repeat !important;
  animation: sky-breathe 18s ease-in-out infinite !important;
}

/* Remove the overlay.svg that creates the 4-color quadrant split */
#overlay {
  background-image: url('images/overlay-pattern.png') !important;
  background-size: 200px auto !important;
  background-attachment: scroll !important;
  opacity: 0.18 !important;
}

/* Subtle slow color pulse on the sky gradient */
@keyframes sky-breathe {
  0%, 100% { filter: brightness(1);    }
  50%       { filter: brightness(1.08); }
}

#wrapper {
  position: relative !important;
  height: 100vh !important;
  min-height: 100vh;
}

#bg,
#overlay {
  position: fixed !important;
}

#main {
  position: absolute !important;
}

/* Canvas hero — position/size override (background set above in sky-gradient block) */
canvas#bg {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
}

/* =============================================
   GLOBAL BASE
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.caas-page section,
.caas-page footer {
  font-family: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
}

/* =============================================
   STICKY NAV
   ============================================= */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  direction: ltr !important; /* always LTR so flags stay on the physical right */
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  background: transparent;
}

#site-nav.scrolled {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 0.65rem 2rem;
}

.nav-brand {
  font-size: clamp(20px, 1.5vw, 26px); /* clamp so it scales on large screens */
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: clamp(0.9rem, 1vw, 1rem);
  font-weight: 500;
  line-height: 1;
  transition: color var(--transition);
}

html[lang="he"] .nav-links a {
  font-size: 14px;
}

.nav-links a:hover {
  color: #fff;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto; /* always stays on the physical right */
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  line-height: 1;
}

.lang-btn .fi {
  width: 1.5em;
  height: 1.1em;
  border-radius: 2px;
  display: block;
}

.lang-btn.active,
.lang-btn:hover {
  border-color: var(--caas-blue);
  box-shadow: 0 0 0 2px rgba(29, 110, 255, 0.4);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
    margin-left: auto; /* push hamburger + flags to the right */
    margin-right: 0.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 17, 23, 0.97);
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    margin: 0; /* reset the desktop auto margin */
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.6rem 2rem;
  }

  .nav-links a {
    font-size: 1rem;
  }
}


/* =============================================
   HERO SECTION ENHANCEMENTS
   ============================================= */
#hero {
  position: relative;
}

/* CTA buttons inside the Aerial hero */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-primary-caas {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--caas-blue);
  color: #fff;
  border: 2px solid var(--caas-blue);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary-caas:hover {
  background: var(--caas-blue-light);
  border-color: var(--caas-blue-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary-caas {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-secondary-caas:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

/* Scroll chevron */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  text-decoration: none;
  z-index: 10;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* =============================================
   SHARED SECTION STYLES
   ============================================= */
.caas-section {
  padding: 6rem 0;
  background: var(--caas-dark);
}

.caas-section.alt {
  background: var(--caas-surface);
}

.section-eyebrow {
  display: block;
  font-size: clamp(0.75rem, 0.85vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--caas-blue-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 2.5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* Ensure muted text in cards/steps meets contrast on dark card backgrounds */
.feature-card p,
.value-prop p,
.step-content p,
.eco-card p {
  color: #c2d8ec;
}

.section-subtitle.centered {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .caas-section {
    padding: 4rem 0;
  }
  /* clamp() already handles mobile minimums; these are safety overrides */
  .section-title {
    font-size: 1.75rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }
}

/* =============================================
   WHAT IS CAAS
   ============================================= */
#what-is-caas .intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 280px;
}

.cloud-diagram {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cloud-diagram .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: pulse-ring 4s ease-in-out infinite;
}

.cloud-diagram .ring-1 { width: 80px;  height: 80px;  animation-delay: 0s; }
.cloud-diagram .ring-2 { width: 140px; height: 140px; animation-delay: 0.5s; }
.cloud-diagram .ring-3 { width: 200px; height: 200px; animation-delay: 1s; }
.cloud-diagram .ring-4 { width: 240px; height: 240px; animation-delay: 1.5s; }

.cloud-diagram .core {
  width: 64px;
  height: 64px;
  background: var(--caas-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  z-index: 1;
  box-shadow: 0 0 48px rgba(13, 220, 255, 0.55);
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%       { opacity: 0.4;  transform: scale(1.04); }
}

/* =============================================
   FEATURE CARDS
   ============================================= */
.feature-card {
  background: var(--caas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--caas-blue), var(--caas-blue-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: rgba(29, 110, 255, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--caas-blue-light);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: clamp(1rem, 1.15vw, 1.2rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* =============================================
   WHY PARTNER
   ============================================= */
.value-prop {
  text-align: center;
  padding: 2rem 1.5rem;
}

.value-prop .vp-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--caas-blue-dark), var(--caas-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 20px rgba(29, 110, 255, 0.3);
}

.value-prop h3 {
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.value-prop p {
  font-size: clamp(1.05rem, 1.15vw, 1.2rem);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* =============================================
   HOW IT WORKS — STEPS
   ============================================= */
.steps-container {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.step-item:last-child {
  margin-bottom: 0;
}

/* Connector line */
.step-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: -2.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--caas-blue), transparent);
}

html[dir="rtl"] .step-item:not(:last-child)::before {
  left: auto;
  right: 23px;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--caas-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(29, 110, 255, 0.15);
}

.step-content h3 {
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  padding-top: 0.6rem;
}

.step-content p {
  font-size: clamp(1.05rem, 1.15vw, 1.2rem);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* =============================================
   ECOSYSTEM CARDS
   ============================================= */
.eco-card {
  display: block;
  background: var(--caas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-decoration: none;
  transition: all var(--transition);
  height: 100%;
}

.eco-card:hover {
  border-color: var(--caas-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.eco-card .eco-logo {
  font-size: 2.5rem;
  color: var(--caas-blue-light);
  margin-bottom: 1rem;
}

.eco-card h3 {
  font-size: clamp(1.1rem, 1.3vw, 1.35rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.eco-card p {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.eco-card .eco-link {
  font-size: clamp(0.85rem, 0.9vw, 0.95rem);
  color: var(--caas-blue-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eco-card:hover .eco-link {
  color: var(--accent);
}

/* =============================================
   CONTACT FORM
   ============================================= */
#contact {
  background: var(--caas-surface);
}

.contact-form-wrap {
  background: var(--caas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.contact-form-wrap .form-label {
  color: #9ec0d8; /* brighter than text-muted for small labels */
  font-size: clamp(0.85rem, 0.95vw, 0.95rem);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.contact-form-wrap .form-control,
.contact-form-wrap .form-select {
  background: var(--caas-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form-wrap .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.contact-form-wrap .form-control:focus,
.contact-form-wrap .form-select:focus {
  background: var(--caas-surface);
  border-color: var(--caas-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(29, 110, 255, 0.2);
  outline: none;
}

.btn-submit {
  background: var(--caas-blue);
  border: 2px solid var(--caas-blue);
  color: #fff;
  padding: 0.75rem 2.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}

.btn-submit:hover {
  background: var(--caas-blue-light);
  border-color: var(--caas-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.contact-alt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: clamp(0.9rem, 1vw, 1rem);
  color: var(--text-muted);
}

.contact-alt a {
  color: var(--caas-blue-light);
  text-decoration: none;
}

.contact-alt a:hover {
  color: var(--accent);
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: #080c10;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  font-size: clamp(0.88rem, 0.95vw, 1rem);
  color: #8baec8; /* improved contrast on near-black footer */
}

#site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

#site-footer a:hover {
  color: var(--caas-blue-light);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li::before {
  content: none;
}

.footer-sep {
  color: var(--border);
}

/* =============================================
   HERO TEXT — pin to white so Bootstrap RTL body
   color reset (#212529) cannot bleed in
   ============================================= */
#header h1,
#header p,
#header nav a,
#footer {
  color: #fff !important;
}

/* Hebrew nav: reverse item order for RTL reading direction */
html[lang="he"] .nav-links {
  flex-direction: row-reverse;
}

/* RTL text adjustments */
html[dir="rtl"] .section-subtitle {
  direction: rtl;
}

html[dir="rtl"] .step-content {
  text-align: right;
}

html[dir="rtl"] .eco-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .footer-links {
  direction: rtl;
}

/* =============================================
   UTILITIES
   ============================================= */
.text-caas-blue { color: var(--caas-blue-light) !important; }
.text-muted-caas { color: var(--text-muted) !important; }
.bg-dark-caas { background-color: var(--caas-dark) !important; }

/* Override Bootstrap primary color for buttons/links in new sections */
.btn-caas {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--caas-blue);
  --bs-btn-border-color: var(--caas-blue);
  --bs-btn-hover-bg: var(--caas-blue-light);
  --bs-btn-hover-border-color: var(--caas-blue-light);
  border-radius: 50px;
  font-weight: 600;
}

/* Divider */
.caas-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* AOS overrides for dark background */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* =============================================
   HERO CLOUD ANIMATIONS
   Clouds float right-to-left across the sky gradient hero.
   z-index sits between the overlay (fixed) and #main content.
   ============================================= */
.hero-clouds {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

/* Cloud shape: rect base + two rounded bumps via pseudo-elements */
.hero-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 100px;
  animation: cloud-drift linear infinite;
}

.hero-cloud::before,
.hero-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

/* Left bump (larger) */
.hero-cloud::before {
  width: 52%;
  height: 230%;
  top: -95%;
  left: 12%;
}

/* Right bump (smaller) */
.hero-cloud::after {
  width: 36%;
  height: 190%;
  top: -78%;
  right: 16%;
}

/* Individual cloud: size / vertical position / speed / start offset */
.hc-1 {
  width: 340px; height: 72px;
  top: 12%;
  animation-duration: 48s;
  animation-delay: -4s;
  opacity: 0.65;
}
.hc-2 {
  width: 220px; height: 52px;
  top: 30%;
  animation-duration: 64s;
  animation-delay: -18s;
  opacity: 0.45;
}
.hc-3 {
  width: 460px; height: 90px;
  top: 52%;
  animation-duration: 80s;
  animation-delay: -36s;
  opacity: 0.30;
}
.hc-4 {
  width: 190px; height: 46px;
  top: 68%;
  animation-duration: 55s;
  animation-delay: -25s;
  opacity: 0.55;
}
.hc-5 {
  width: 280px; height: 60px;
  top: 22%;
  animation-duration: 70s;
  animation-delay: -50s;
  opacity: 0.40;
}
.hc-6 {
  width: 150px; height: 38px;
  top: 80%;
  animation-duration: 42s;
  animation-delay: -10s;
  opacity: 0.50;
}

/* Drift: clouds enter from the right and exit off the left */
@keyframes cloud-drift {
  0%   { transform: translateX(110vw); }
  100% { transform: translateX(-600px); }
}

/* Hide hero clouds once below the hero (sections cover with solid bg) */
@media (max-width: 768px) {
  .hc-3, .hc-5 { display: none; } /* fewer clouds on mobile for perf */
}

/* =============================================
   SECTION SUBTLE ANIMATION — pulsing border on feature icons
   ============================================= */
.feature-icon {
  animation: icon-glow 4s ease-in-out infinite;
}

@keyframes icon-glow {
  0%, 100% { box-shadow: 0 0 0   0   rgba(100, 181, 246, 0); }
  50%       { box-shadow: 0 0 16px 4px rgba(100, 181, 246, 0.2); }
}

/* Step number gentle pulse */
.step-number {
  animation: step-pulse 3s ease-in-out infinite;
}

@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.15); }
  50%       { box-shadow: 0 0 0 8px rgba(41, 121, 255, 0.28); }
}
