/* GLOBAL VARIABLES */
:root {
  --primary: #8bb4f8;
  --primary2: #cc9bf4;
  --text: #111827;
  --soft: #6b7280;
  --card: rgba(255, 255, 255, 0.8);
  --bg: #fdfdff;
  --header-bg: rgba(255, 255, 255, 0.75);
  --header-border: rgba(0, 0, 0, 0.06);
  --mobile-menu-bg: rgba(255, 255, 255, 0.97);
  --mobile-menu-border: rgba(0, 0, 0, 0.08);
  --select-bg: #ffffff;
  --select-color: #333;
  --select-border: #ddd;
  --footer-color: #9ca3af;
  
  /* Typography Variables */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-main);
}

body.dark-mode {
  --text: #f1f5f9;
  --soft: #94a3b8;
  --card: rgba(30, 41, 59, 0.85);
  --bg: #0f172a;
  --header-bg: rgba(15, 23, 42, 0.85);
  --header-border: rgba(255, 255, 255, 0.08);
  --mobile-menu-bg: rgba(15, 23, 42, 0.97);
  --mobile-menu-border: rgba(255, 255, 255, 0.08);
  --select-bg: #1e293b;
  --select-color: #e2e8f0;
  --select-border: #334155;
  --footer-color: #475569;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

html {
    scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background .4s, color .4s;
}

canvas#bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* PRELOADER */
#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s;
}
body.dark-mode #preloader { background: #0f172a; }
#preloader.fade { opacity: 0; pointer-events: none; }

#preloader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(204, 155, 244, 0) 0%, rgba(204, 155, 244, .6) 30%, rgba(139, 180, 248, .7) 50%, rgba(204, 155, 244, .6) 70%, rgba(139, 180, 248, 0) 100%);
  background-size: 300% 300%;
  opacity: 0;
  animation: shimmerIn 1.2s ease 2s forwards;
  pointer-events: none;
}
@keyframes shimmerIn { 0% { opacity: 0; background-position: 0% 50%; } 40% { opacity: 1; background-position: 50% 50%; } 100% { opacity: 0; background-position: 100% 50%; } }

.intro-logo { opacity: 0; transform: scale(1.2); filter: blur(20px); animation: logoReveal 2s cubic-bezier(.16, 1, .3, 1) forwards; }
.intro-logo.spin { width: 100px; animation: logoReveal 2s cubic-bezier(.16, 1, .3, 1) forwards, spinLogo 1.5s linear 0.3s infinite; }
.intro-logo.text { width: 180px; }
@keyframes logoReveal { to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes spinLogo { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.hero-logo-wrap { display: flex; justify-content: center; align-items: center; margin: 0 auto 8px; }
.hero-logo-o { height: 1.2em; width: auto; object-fit: contain; animation: spinPause 4s linear infinite; }
.hero-logo-du { height: 1.2em; width: auto; object-fit: contain; }
@keyframes spinPause { 0% { transform: rotate(0deg); } 75% { transform: rotate(-360deg); } 100% { transform: rotate(-360deg); } }

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 10px 5%;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  z-index: 1000;
  min-height: 60px;
  transition: background .4s, border-color .4s;
}
@media(min-width:992px) { header { padding: 10px 6%; } }
header.top-header { top: 0; }

.header-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.header-logo-img { height: 36px; width: auto; object-fit: contain; display: block; }
@media(min-width:992px) { .header-logo-img { height: 40px; } }

.desktop-right { display: none; }
@media(min-width:992px) { .desktop-right { display: flex; align-items: center; flex-grow: 1; justify-content: space-between; margin-left: 40px; } }

nav { display: flex; align-items: center; margin: 0 auto; }
nav a { margin-left: 28px; text-decoration: none; color: var(--soft); font-size: 14px; font-weight: 500; transition: color .3s; }
nav a:hover, nav a.active { color: var(--text); }

.mobile-menu-btn { display: block; font-size: 24px; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; line-height: 1; }
@media(min-width:992px) { .mobile-menu-btn { display: none; } }

.desktop-right.show { display: flex !important; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--mobile-menu-bg); backdrop-filter: blur(20px); padding: 24px 20px; border-bottom: 1px solid var(--mobile-menu-border); box-shadow: 0 12px 40px rgba(0, 0, 0, .1); gap: 20px; align-items: center; }
.mobile-menu-logo { display: none; }
.burger-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.burger-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 2px;
}
.burger-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.burger-lines span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
}
@media (min-width: 992px) {
  .burger-logo-wrap { display: none; }
}
.desktop-right.show .mobile-menu-logo { display: block; margin: 0 auto; }
.desktop-right.show nav { flex-direction: column; align-items: center; gap: 16px; margin: 0; }
.desktop-right.show nav a { margin: 0; font-size: 18px; text-align: center; display: block; width: 100%; }
.desktop-right.show .header-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(139, 180, 248, 0.1);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid rgba(139, 180, 248, 0.15);
  }

  .lang-switcher button {
    background: transparent;
    border: none;
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: all .2s;
  }

  .lang-switcher button:hover {
    color: var(--text);
  }

  .lang-switcher button.active {
    background: var(--bg);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  .dark-mode-toggle { width: 46px; height: 46px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--primary2), var(--primary)); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .4s cubic-bezier(.16, 1, .3, 1); box-shadow: 0 4px 16px rgba(139, 180, 248, .4); padding: 0; flex-shrink: 0; }
.dark-mode-toggle:hover { transform: translateY(-2px) scale(1.08); }
.dark-mode-toggle:active { transform: scale(.93); }
body.dark-mode .dark-mode-toggle { background: linear-gradient(135deg, #1e1b4b, #4338ca); }
.dark-mode-icon { font-size: 20px; display: block; line-height: 1; transition: transform .5s; }
.dark-mode-toggle:hover .dark-mode-icon { transform: rotate(20deg); }

.btn { padding: 14px 30px; border: none; border-radius: 40px; background: linear-gradient(90deg, var(--primary2), var(--primary)); color: #fff; font-weight: 600; cursor: pointer; transition: .3s; font-family: 'Inter', sans-serif; text-decoration: none; display: inline-block;}
.btn:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(139, 180, 248, .4); }

section { padding: 100px 5%; }
@media(min-width:768px) { section { padding: 160px 8%; } }

.container { max-width: 1200px; margin: auto; }
.sec-label { display: inline-block; background: rgba(139, 180, 248, .1); color: var(--primary); font-size: 11px; font-weight: 700; padding: 5px 16px; border-radius: 100px; letter-spacing: 1.3px; text-transform: uppercase; margin-bottom: 18px; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* TRANSLATION & OTHER HACKS */
.goog-te-banner-frame, iframe.goog-te-banner-frame, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-ZVi9od-ORHb-OEVmcd, #goog-gt-tt { display: none !important; }
body, html { top: 0px !important; position: static !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .5; transform: scale(1.3) } }

/* FOOTER */
.footer-full { padding: 60px 5% 36px; }
@media(min-width:768px) { .footer-full { padding: 80px 8% 44px; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin-bottom: 48px; }
@media(min-width:768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand-desc { color: var(--soft); font-size: 14px; line-height: 1.75; margin-top: 16px; max-width: 260px; }
.fbrand-logo { height: 36px; width: auto; object-fit: contain; }
.footer-col h4 { font-size: 14px; font-weight: 800; margin-bottom: 18px; background: linear-gradient(90deg, var(--primary2), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.footer-col a { display: block; color: var(--soft); text-decoration: none; font-size: 14px; margin-bottom: 12px; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 26px; border-top: 1px solid rgba(139, 180, 248, .12); font-size: 13px; color: var(--footer-color); }
@media(max-width: 991px) {
  .footer-col { display: none; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-brand-desc { text-align: center; margin-left: auto; margin-right: auto; }
  .footer-bottom { justify-content: center; text-align: center; flex-direction: column; }
}
.f-socials { display: flex; gap: 10px; }
.fsoc { width: 36px; height: 36px; border-radius: 10px; background: rgba(139, 180, 248, .08); border: 1px solid rgba(139, 180, 248, .15); display: flex; align-items: center; justify-content: center; color: var(--soft); text-decoration: none; font-size: 13px; font-weight: 800; transition: all .25s; }
.fsoc:hover { background: linear-gradient(135deg, var(--primary2), var(--primary)); color: #fff; border-color: transparent; transform: translateY(-2px); }

/* ═══════════════════════════════════════════════════
   APPLE-QUALITY IMPROVEMENTS v2.0
   - Better typography scale
   - Refined button system
   - Micro-interactions
   - Better spacing rhythm
   - Improved focus states
   - Smooth transitions everywhere
═══════════════════════════════════════════════════ */

/* Better font rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Refined type scale */
body { 
  font-size: 16px; 
  line-height: 1.6; 
  letter-spacing: -0.011em; 
  font-weight: 400;
}

h1, h2, h3, h4 { 
  font-family: var(--font-heading);
  letter-spacing: -0.03em; 
  line-height: 1.15; 
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }

p { line-height: 1.75; color: var(--soft); }

/* Apple-style button system */
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-apple-primary {
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 180, 248, 0.3);
}
.btn-apple-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(139, 180, 248, 0.45);
}
.btn-apple-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(139, 180, 248, 0.2);
}

.btn-apple-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(139, 180, 248, 0.35);
}
.btn-apple-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(139, 180, 248, 0.06);
  transform: translateY(-2px);
}
.btn-apple-outline:active { transform: scale(0.97); }

/* Focus states (accessibility) */
.btn-apple:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Lang switcher - refined */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(139, 180, 248, 0.08);
  padding: 3px;
  border-radius: 22px;
  border: 1px solid rgba(139, 180, 248, 0.15);
}
.lang-switcher button {
  background: transparent;
  border: none;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  letter-spacing: 0.5px;
  font-family: var(--font-main);
}
.lang-switcher button:hover { color: var(--text); }
.lang-switcher button.active {
  background: var(--bg);
  color: var(--primary);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08), 0 0 0 1px rgba(139,180,248,0.15);
}
body.dark-mode .lang-switcher button.active {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* Navigation - refined active state */
nav a { position: relative; }
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
  border-radius: 1px;
}
nav a:hover::after { transform: scaleX(1); }

/* Cards - Apple-style subtle shadow */
.feat-card, .step-card, .door-card, .tar-card, .biz-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.3s ease;
}

/* Inputs - refined */
input, textarea, select {
  font-family: var(--font-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
}

/* Sec label - refined */
.sec-label {
  background: linear-gradient(135deg, rgba(204, 155, 244, 0.1), rgba(139, 180, 248, 0.1));
  border: 1px solid rgba(139, 180, 248, 0.2);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* Trust pills - tighter */
.trust-pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(139, 180, 248, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--soft);
  backdrop-filter: blur(10px);
  letter-spacing: -0.01em;
}
body.dark-mode .trust-pill {
  background: rgba(30, 41, 59, 0.6);
}

/* Door cards - Apple reveal */
.doors-grid { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.doors-grid.visible { opacity: 1; transform: translateY(0); }
.door-card { transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s, border-color 0.3s; }
.door-card:hover { transform: translateY(-10px); box-shadow: 0 24px 60px rgba(139, 180, 248, 0.2); border-color: rgba(139, 180, 248, 0.3); }

/* Feat cards stagger */
.feat-card { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.feat-card.visible { opacity: 1; transform: translateY(0); }

/* Steps - numbered circles refined */
.step-num {
  box-shadow: 0 4px 16px rgba(139, 180, 248, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover .step-num {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(139, 180, 248, 0.45);
}

/* Header scroll effect */
header {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
header.scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
body.dark-mode header.scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.2);
}

/* Smooth section transitions */
section { padding-top: 100px; padding-bottom: 80px; }
@media(min-width:768px) { section { padding-top: 140px; padding-bottom: 100px; } }

/* Product tabs - Apple segmented control */
.product-tabs {
  display: flex;
  gap: 6px;
  background: rgba(139, 180, 248, 0.08);
  padding: 4px;
  border-radius: 16px;
  border: 1px solid rgba(139, 180, 248, 0.12);
  width: fit-content;
  margin-bottom: 28px;
}
.ptab {
  padding: 9px 20px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: var(--font-main);
  white-space: nowrap;
}
.ptab.active {
  background: var(--bg);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(139,180,248,0.15);
}
body.dark-mode .ptab.active {
  background: rgba(30, 41, 59, 0.9);
}
.ptab:hover:not(.active) { color: var(--text); }

/* FAQ - refined open state */
.faq-item { transition: border-color 0.2s ease; }
.faq-q { letter-spacing: -0.01em; }
.faq-a { letter-spacing: -0.005em; }

/* Form inputs - Apple-style */
.finput, .fsel {
  border-radius: 12px;
  font-size: 15px;
  padding: 13px 16px;
  border: 1.5px solid rgba(139, 180, 248, 0.2);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.finput:focus, .fsel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 180, 248, 0.12);
}
.fsubmit {
  padding: 16px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  color: #fff;
  width: 100%;
  margin-top: 16px;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fsubmit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 180, 248, 0.4);
}
.fsubmit:active { transform: scale(0.98); }

/* Trust row */
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
@media(min-width:992px) { .trust-row { justify-content: flex-start; } }

/* Scrollbar - subtle */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 180, 248, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 180, 248, 0.45); }

/* Selection color */
::selection { background: rgba(139, 180, 248, 0.25); color: var(--text); }

/* Header scroll indicator */
@keyframes headerShrink {
  to { padding-top: 8px; padding-bottom: 8px; }
}
