/* ============ Design Tokens ============ */
:root {
  --navy: #0B1F33;
  --navy-2: #0e2742;
  --blue: #2b6bff;
  --blue-2: #00c2ff;
  --grad: linear-gradient(120deg, #2b6bff 0%, #00c2ff 100%);

  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --surface: #ffffff;
  --text: #0B1F33;
  --muted: #5a6b7e;
  --border: #e6ecf3;
  --shadow: 0 10px 40px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 31, 51, 0.14);
  --radius: 18px;
  --maxw: 1180px;
  --glass: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] {
  --bg: #07111d;
  --bg-alt: #0b1b2c;
  --surface: #0f2238;
  --text: #eaf1f9;
  --muted: #9fb2c6;
  --border: #1c3450;
  --glass: rgba(15, 34, 56, 0.6);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
h1, h2, h3, h4, h5, .brand-text { font-family: "Plus Jakarta Sans", sans-serif; line-height: 1.15; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* ============ Loader ============ */
#loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 9999;
  display: grid; place-items: center; transition: opacity .5s ease, visibility .5s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 10000;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 16px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(43,107,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(43,107,255,.45); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-block { width: 100%; }

/* ============ Navbar ============ */
#navbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); background: var(--glass);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s, background .3s;
}
#navbar.scrolled { border-color: var(--border); box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--grad);
  box-shadow: 0 4px 14px rgba(43,107,255,.5); position: relative;
}
.brand-mark::after { content:""; position:absolute; inset:7px; border-radius:4px; background: var(--bg); }
.accent { color: var(--blue); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background:var(--grad); transition:width .25s; }
.nav-links a:hover::after { width:100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: background .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
#themeToggle .moon { display: none; }
html[data-theme="dark"] #themeToggle .sun { display: none; }
html[data-theme="dark"] #themeToggle .moon { display: block; }
.menu-toggle { display: none; }

/* ============ Hero ============ */
.hero { position: relative; padding: clamp(70px, 12vw, 140px) 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 14s ease-in-out infinite; }
.orb-1 { width: 480px; height: 480px; background: radial-gradient(circle, #2b6bff, transparent 70%); top: -120px; left: -80px; }
.orb-2 { width: 420px; height: 420px; background: radial-gradient(circle, #00c2ff, transparent 70%); bottom: -140px; right: -60px; animation-delay: -5s; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, 30px); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .25;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
}
.float-icons .fi {
  position: absolute; left: var(--x); top: var(--y); font-size: 1.8rem;
  animation: floaty 6s ease-in-out infinite; animation-delay: var(--d); opacity: .8;
  filter: drop-shadow(0 6px 14px rgba(43,107,255,.25));
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(4deg); } }

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }
.eyebrow {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--blue);
  background: rgba(43,107,255,.1); border: 1px solid rgba(43,107,255,.2); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; margin-bottom: 22px; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 64px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px; box-shadow: var(--shadow); }
.stat .num { font-family: "Plus Jakarta Sans"; font-size: 2.1rem; font-weight: 800; color: var(--text); }
.stat .plus { font-size: 1.6rem; font-weight: 800; color: var(--blue); }
.stat .label { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* ============ Sections ============ */
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.kicker { display: inline-block; color: var(--blue); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.section h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.about-grid p { color: var(--muted); margin-bottom: 14px; }
.about-points { list-style: none; display: grid; gap: 14px; }
.about-points li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.about-points strong { display: block; }
.about-points span { color: var(--muted); font-size: .92rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(43,107,255,.4); }
.card-icon { font-size: 2rem; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: rgba(43,107,255,.1); margin-bottom: 18px; }
.card h3 { font-size: 1.2rem; margin-bottom: 14px; }
.card ul { list-style: none; display: grid; gap: 8px; }
.card ul li { color: var(--muted); font-size: .94rem; padding-left: 20px; position: relative; }
.card ul li::before { content: "▸"; color: var(--blue); position: absolute; left: 0; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 20px; font-weight: 600; box-shadow: var(--shadow); transition: transform .25s, border-color .25s; }
.why-item:hover { transform: translateY(-4px); border-color: rgba(43,107,255,.4); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chips span {
  padding: 11px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); transition: transform .2s, color .2s, border-color .2s;
}
.chips span:hover { transform: translateY(-3px); color: var(--blue); border-color: var(--blue); }

/* Timeline */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px; counter-reset: step; }
.timeline li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 16px; text-align: center; box-shadow: var(--shadow); position: relative; }
.timeline .step { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.timeline h4 { font-size: 1rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: .82rem; }

/* Projects */
.projects { grid-template-columns: repeat(4, 1fr); }
.project-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); background: rgba(43,107,255,.1); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.project h3 { font-size: 1.08rem; }
.project p { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* Quotes */
.quotes { grid-template-columns: repeat(3, 1fr); }
.quotes blockquote { font-size: 1.05rem; line-height: 1.6; }
.quotes cite { display: block; margin-top: 18px; font-style: normal; font-weight: 600; color: var(--blue); font-size: .9rem; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.5rem; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 18px; }

/* CTA */
.cta-section { text-align: center; }
.cta { background: var(--navy); color: #fff; border-radius: 28px; padding: clamp(40px, 7vw, 80px) 30px; position: relative; overflow: hidden; }
.cta::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 20% 0%, rgba(43,107,255,.4), transparent 50%), radial-gradient(circle at 80% 100%, rgba(0,194,255,.35), transparent 50%); }
.cta > * { position: relative; }
.cta h2 { color: #fff; }
.cta p { color: #b8c6d6; margin: 14px 0 28px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info { list-style: none; display: grid; gap: 14px; margin: 24px 0; }
.contact-info li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.contact-info a:hover { color: var(--blue); }
.social { display: flex; gap: 16px; }
.social a { font-weight: 600; color: var(--blue); }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form select, .contact-form textarea {
  font-family: inherit; font-size: .95rem; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,107,255,.15);
}
.form-note { font-size: .8rem; color: var(--muted); text-align: center; }

/* Footer */
.footer { background: var(--navy); color: #c4d2e0; padding: 64px 0 30px; }
html[data-theme="dark"] .footer { background: #050d16; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-brand .brand-text { color: #fff; font-size: 1.3rem; }
.footer-brand p { margin-top: 12px; max-width: 280px; font-size: .92rem; }
.footer h5 { color: #fff; margin-bottom: 16px; font-size: .95rem; }
.footer a { display: block; color: #9fb2c6; font-size: .92rem; margin-bottom: 10px; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-news p { font-size: .9rem; margin-bottom: 14px; }
.news-form { display: flex; gap: 8px; margin-bottom: 16px; }
.news-form input { flex: 1; padding: 11px 14px; border-radius: 10px; border: 1px solid #1c3450; background: #0c1a2b; color: #fff; }
.news-form .btn { padding: 11px 18px; }
.footer .social a { display: inline; }
.copyright { text-align: center; padding-top: 30px; margin-top: 40px; border-top: 1px solid #1c3450; font-size: .85rem; color: #8499ad; }

/* Floating widgets */
.float-btn {
  position: fixed; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.3rem; cursor: pointer; z-index: 90; box-shadow: var(--shadow-lg); border: none; color: #fff;
  transition: transform .2s, opacity .3s;
}
.float-btn:hover { transform: scale(1.1); }
.whatsapp { right: 24px; bottom: 90px; background: #25d366; }
.to-top { right: 24px; bottom: 24px; background: var(--navy); opacity: 0; pointer-events: none; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Chatbot */
.chat-toggle {
  position: fixed; left: 24px; bottom: 24px; z-index: 90; padding: 13px 22px; border-radius: 999px;
  background: var(--grad); color: #fff; border: none; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg);
  font-family: inherit; transition: transform .2s;
}
.chat-toggle:hover { transform: translateY(-2px); }
.chat-panel {
  position: fixed; left: 24px; bottom: 86px; z-index: 91; width: 320px; max-width: calc(100vw - 48px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-head { background: var(--navy); color: #fff; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-head button { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-body { padding: 18px; }
.chat-body .bot { background: var(--bg-alt); padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin-bottom: 14px; }
.chat-quick { display: flex; flex-direction: column; gap: 8px; }
.chat-quick a { background: rgba(43,107,255,.1); color: var(--blue); padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .9rem; text-align: center; }
.chat-hint { font-size: .75rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* Cookie */
.cookie {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 95; background: var(--navy); color: #dbe6f1;
  padding: 16px 24px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: .9rem;
  box-shadow: 0 -10px 30px rgba(0,0,0,.2);
}
.cookie .btn { padding: 9px 22px; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards, .projects, .quotes { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; background: var(--bg); flex-direction: column; gap: 0;
    padding: 12px 24px 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    transform: translateY(-130%); transition: transform .35s ease; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 0; }
  .menu-toggle { display: grid; }
  .nav-cta { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-form .row { grid-template-columns: 1fr; }
  .chat-toggle { left: 16px; font-size: .9rem; padding: 11px 16px; }
}
@media (max-width: 540px) {
  .cards, .projects, .quotes, .why-grid, .timeline, .footer-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
