:root {
  --bg: #ffffff;
  --surface: #f7fbff;
  --surface-strong: #eef7ff;
  --ink: #0b1f3a;
  --muted: #5b6f86;
  --line: #d8e8f5;
  --primary: #0f63c9;
  --primary-dark: #0f3d91;
  --accent: #0ea5e9;
  --success: #16a67a;
  --gold: #f2b84b;
  --danger: #cf3f3f;
  --shadow: 0 18px 50px rgba(15, 61, 145, .12);
  --radius: 8px;
}

[data-theme="dark"] {
  --bg: #071425;
  --surface: #0e1f35;
  --surface-strong: #122a46;
  --ink: #e9f4ff;
  --muted: #a8bbce;
  --line: #24435f;
  --shadow: 0 20px 60px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.page-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg); transition: opacity .35s ease, visibility .35s ease; }
.page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader span { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }

.topbar { background: var(--primary-dark); color: #eaf7ff; font-size: .88rem; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 22px; flex-wrap: wrap; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; }
.topbar svg, .site-footer svg { width: 16px; height: 16px; }
.site-header { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.navbar { min-height: 78px; display: flex; align-items: center; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink); }
.brand img { width: 50px; height: 50px; }
.brand span span { display: block; color: var(--primary); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.nav-menu { display: flex; align-items: center; gap: 5px; }
.nav-menu a:not(.btn), .theme-toggle, .nav-toggle { border: 0; background: transparent; color: var(--ink); border-radius: var(--radius); padding: 10px 12px; font-weight: 700; font-size: .94rem; }
.nav-menu a.active, .nav-menu a:hover, .theme-toggle:hover, .nav-toggle:hover { color: var(--primary); background: var(--surface-strong); }
.nav-toggle { display: none; }
.theme-toggle svg, .nav-toggle svg { width: 20px; height: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 99, 201, .22);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--primary-dark); box-shadow: 0 14px 30px rgba(15, 99, 201, .28); }
.btn-outline { background: transparent; color: var(--primary); box-shadow: none; }
.btn-outline:hover { color: #fff; }
.btn-small { min-height: 40px; padding: 9px 14px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }

.hero { position: relative; background: linear-gradient(135deg, var(--surface) 0%, #ffffff 48%, var(--surface-strong) 100%); overflow: hidden; }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #071425 0%, #0d1e35 55%, #112e4d 100%); }
.hero-slide { display: none; padding: 78px 0 58px; min-height: 650px; }
.hero-slide.active { display: block; animation: fadeUp .45s ease both; }
.hero-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 54px; align-items: center; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: .83rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4.7rem); line-height: 1.04; margin: 14px 0 18px; max-width: 820px; letter-spacing: 0; }
.hero p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 680px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-proof { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); }
.hero-proof strong { display: block; color: var(--ink); font-size: 1.35rem; }
.hero-visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.hero-visual img { width: min(100%, 580px); filter: drop-shadow(0 28px 46px rgba(15, 61, 145, .18)); }
.floating-badge {
  position: absolute;
  right: 0;
  bottom: 54px;
  width: min(230px, 48%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.floating-badge span { display: flex; align-items: center; gap: 8px; color: var(--success); font-weight: 900; }
.slider-controls { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 8px; }
.slider-dot { width: 36px; height: 5px; border: 0; border-radius: 8px; background: #b9d5ec; }
.slider-dot.active { background: var(--primary); }

.section { padding: 86px 0; }
.section-muted { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 34px; }
.section-head h2, .newsletter-wrap h2 { margin: 8px 0 0; font-size: clamp(1.85rem, 3vw, 2.8rem); line-height: 1.13; letter-spacing: 0; }
.section-head p { color: var(--muted); max-width: 620px; margin: 8px 0 0; }
.section-action { margin-top: 28px; }
.text-link { display: inline-flex; margin-top: 14px; color: var(--primary); font-weight: 900; }
.text-link:hover { color: var(--primary-dark); text-decoration: underline; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card, .project-card, .post-card, .testimonial-card, .feature-card, .stat-card, .faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 61, 145, .06);
}
.service-card, .feature-card, .stat-card { padding: 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover, .feature-card:hover, .project-card:hover, .post-card:hover { transform: translateY(-6px); border-color: #8bd0ff; box-shadow: var(--shadow); }
.icon-box { width: 50px; height: 50px; display: grid; place-items: center; border-radius: var(--radius); background: linear-gradient(135deg, var(--surface-strong), #def4ff); color: var(--primary); margin-bottom: 18px; }
[data-theme="dark"] .icon-box { background: #132f52; }
.icon-box svg { width: 25px; height: 25px; }
.service-card h3, .feature-card h3, .project-card h3, .post-card h3 { margin: 0 0 10px; font-size: 1.18rem; }
.service-card p, .feature-card p, .project-card p, .post-card p, .testimonial-card p { color: var(--muted); margin: 0; }

.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.about-image { position: relative; min-height: 460px; border-radius: var(--radius); overflow: hidden; background: var(--surface-strong); border: 1px solid var(--line); }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-content p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.check-list svg { color: var(--success); width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; }
.split-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card { text-align: center; }
.stat-card strong { display: block; font-size: 2.4rem; line-height: 1; color: var(--primary); }
.stat-card span { color: var(--muted); font-weight: 700; }

.project-card, .post-card { overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.project-thumb, .post-thumb { aspect-ratio: 16 / 10; background: var(--surface-strong); overflow: hidden; }
.project-thumb img, .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-body, .post-body { padding: 20px; }
.tag { display: inline-flex; border-radius: 999px; padding: 5px 10px; background: #e7f4ff; color: var(--primary-dark); font-weight: 800; font-size: .78rem; margin-bottom: 12px; }
[data-theme="dark"] .tag { background: #173a60; color: #bdeafe; }
.portfolio-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.filter-btn { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--radius); padding: 9px 13px; font-weight: 800; }
.filter-btn.active, .filter-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.testimonial-wrap { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform .35s ease; }
.testimonial-card { min-width: 100%; padding: 30px; }
.testimonial-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.testimonial-person { display: flex; align-items: center; gap: 14px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); font-weight: 900; }
.rating { color: var(--gold); letter-spacing: 0; }
.carousel-controls { display: flex; gap: 10px; margin-top: 16px; }
.carousel-controls button { width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: grid; place-items: center; }
.carousel-controls button:hover { background: var(--primary); color: #fff; }

.contact-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.contact-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--bg);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(14, 165, 233, .14); }
textarea { resize: vertical; min-height: 130px; }
.form-error { color: var(--danger); font-size: .86rem; min-height: 18px; }
.alert { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; font-weight: 700; }
.alert.success { background: #e7fbf4; color: #08764f; border: 1px solid #9ce8ca; }
.alert.error { background: #fff0f0; color: #9c2626; border: 1px solid #f4bbbb; }

.info-list { display: grid; gap: 18px; margin-top: 24px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item svg { color: var(--primary); width: 22px; height: 22px; margin-top: 3px; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 340px; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

.faq-list { display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
.faq-question { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 900; text-align: left; }
.faq-answer { padding: 0 20px 18px; color: var(--muted); display: none; }
.faq-item.open .faq-answer { display: block; }

.page-hero { padding: 74px 0; background: linear-gradient(135deg, var(--surface), var(--surface-strong)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.1; margin: 12px 0; max-width: 860px; letter-spacing: 0; }
.page-hero p { max-width: 780px; color: var(--muted); font-size: 1.08rem; }
.breadcrumb { color: var(--muted); font-weight: 800; font-size: .9rem; }

.content-body { color: var(--muted); }
.content-body h2, .content-body h3 { color: var(--ink); line-height: 1.15; }
.content-body a { color: var(--primary); font-weight: 800; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.article-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.article-card > img { border-radius: var(--radius); margin-bottom: 22px; border: 1px solid var(--line); }
.sidebar-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 120px; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.newsletter-section { background: var(--primary-dark); color: #fff; padding: 54px 0; }
.newsletter-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.newsletter-section .section-kicker { color: #bdeafe; }
.newsletter-form { display: flex; gap: 12px; }
.newsletter-form input { background: #fff; color: #0b1f3a; border-color: transparent; }
.site-footer { background: #071425; color: #d9e8f5; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap: 34px; padding: 58px 0; }
.footer-brand img { width: 48px; height: 48px; }
.footer-brand span { color: #fff; }
.footer-about p { color: #a8bbce; margin: 18px 0; }
.site-footer h3 { color: #fff; margin: 0 0 15px; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a:hover, .footer-contact a:hover, .footer-bottom a:hover { color: #7dd3fc; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: #a8bbce; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a { width: 38px; height: 38px; border-radius: var(--radius); display: grid; place-items: center; background: #102a46; color: #fff; }
.footer-bottom { border-top: 1px solid #183451; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 18px; padding: 18px 0; color: #a8bbce; font-size: .92rem; }
.footer-bottom p { margin: 0; }

.whatsapp-float, .back-to-top {
  position: fixed;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  border: 0;
  z-index: 900;
  box-shadow: var(--shadow);
}
.whatsapp-float { bottom: 82px; background: #25d366; }
.back-to-top { bottom: 24px; background: var(--primary); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover, .whatsapp-float:hover { transform: translateY(-2px); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .topbar-inner { justify-content: center; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a, .theme-toggle { width: 100%; justify-content: flex-start; }
  .hero-slide { min-height: auto; padding: 52px 0; }
  .hero-grid, .about-grid, .contact-panel, .newsletter-wrap, .article-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; }
  .grid-3, .grid-4, .stats-strip, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1160px); }
  .topbar { display: none; }
  .navbar { min-height: 68px; }
  .brand img { width: 42px; height: 42px; }
  .brand > span { font-size: .92rem; }
  .hero h1, .page-hero h1 { word-break: break-word; }
  .section { padding: 60px 0; }
  .section-head { display: block; }
  .grid-3, .grid-4, .stats-strip, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .floating-badge { position: static; width: 100%; margin-top: -20px; }
  .hero-proof { gap: 14px; }
  .hero-proof div { flex: 1 1 120px; }
  .newsletter-form { flex-direction: column; }
  .footer-bottom-inner { flex-direction: column; }
  .testimonial-card { padding: 22px; }
  .testimonial-top { align-items: flex-start; flex-direction: column; }
}
