:root {
  --blue: #3f66a0;
  --blue-dark: #2c4a78;
  --blue-darker: #1f3557;
  --gold: #f2c230;
  --gold-dark: #d9a615;
  --red: #e8262a;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --gray: #6b7280;
  --line: #e6e9ef;
  --paper: #f7f8fb;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(31, 53, 87, 0.18);
  --font-head: 'Fredoka', 'Nunito', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.1em; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; color: var(--blue-darker); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Topbar */
.topbar {
  background: var(--blue-darker);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 8px 24px;
  flex-wrap: wrap;
}
.topbar a:hover { color: var(--gold); }
.topbar-addr { opacity: 0.9; }
.icon { margin-right: 4px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); color: var(--blue-darker); font-size: 1.02rem; }
.brand-text small { color: var(--gray); font-size: 0.72rem; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-weight: 500; color: var(--ink-soft); font-size: 0.94rem; transition: color 0.2s; }
.nav a:hover { color: var(--blue); }
.nav-cta {
  background: var(--gold);
  color: var(--blue-darker) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-dark); color: var(--white) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--blue-darker); border-radius: 2px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fdf9ec 0%, var(--white) 60%);
  padding: 72px 0 56px;
}
.hero-waves {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(63,102,160,0.10), transparent 60%),
    repeating-linear-gradient(100deg, rgba(242,194,48,0.10) 0 2px, transparent 2px 22px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 10px;
}
.hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin-bottom: 16px; }
.hero-lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-quote {
  margin: 0;
  padding: 14px 18px;
  border-left: 4px solid var(--gold);
  background: var(--paper);
  color: var(--blue-darker);
  font-family: var(--font-head);
  font-style: italic;
  border-radius: 0 10px 10px 0;
  max-width: 44ch;
}
.hero-figure {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo {
  width: min(280px, 60vw);
  filter: drop-shadow(0 20px 30px rgba(232,38,42,0.15));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 8px 20px -8px rgba(63,102,160,0.6); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--blue-darker); }
.btn-ghost:hover { border-color: var(--blue); transform: translateY(-2px); }

/* Stats */
.stats { background: var(--blue-darker); color: var(--white); padding: 28px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); }
.stat span { font-size: 0.82rem; color: rgba(255,255,255,0.78); }

/* Section generic */
.section { padding: 76px 0; }
.section-label {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.section-label.light { color: var(--gold); }
.section h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.section-lead { color: var(--ink-soft); max-width: 62ch; margin-bottom: 36px; }

/* About */
.about { background: var(--paper); }
.about-copy p { color: var(--ink-soft); }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.vm-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.vm-card h3 { color: var(--blue); margin-bottom: 10px; }
.vm-card p, .vm-card li { color: var(--ink-soft); font-size: 0.95rem; }
.vm-card ol { margin: 0; }
.vm-card li { margin-bottom: 6px; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-card.featured { background: linear-gradient(150deg, var(--blue) 0%, var(--blue-dark) 100%); color: var(--white); border: none; }
.service-card.featured h3, .service-card.featured .service-num { color: var(--white); }
.service-card.featured p { color: rgba(255,255,255,0.88); }
.service-num { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold); margin-bottom: 10px; }
.service-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }

/* Technologies */
.tech { background: var(--blue-darker); color: var(--white); }
.tech-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
.tech .section-label { color: var(--gold); }
.tech h2 { color: var(--white); }
.tech-copy p { color: rgba(255,255,255,0.8); }
.tech-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tech-list li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tech-list strong { color: var(--gold); font-family: var(--font-head); font-size: 0.98rem; }
.tech-list span { color: rgba(255,255,255,0.82); font-size: 0.9rem; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.team-card { text-align: center; }
.team-card img {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 4px solid var(--paper);
  box-shadow: var(--shadow);
}
.team-card h3 { font-size: 0.96rem; margin-bottom: 4px; }
.team-card .role { color: var(--red); font-weight: 600; font-size: 0.82rem; margin-bottom: 8px; }
.team-card p:not(.role) { color: var(--gray); font-size: 0.85rem; }
a.team-card { display: block; border-radius: 16px; padding: 14px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
a.team-card:hover { transform: translateY(-4px); background: var(--white); box-shadow: var(--shadow); }
a.team-card:hover img { box-shadow: 0 0 0 3px var(--gold); }
.profile-link { display: inline-block; margin-top: 10px; color: var(--blue); font-weight: 700; font-size: 0.82rem; }
a.team-card:hover .profile-link { color: var(--red); }

/* Portfolio */
.portfolio { background: var(--paper); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pf-card {
  background: var(--white);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--line);
}
.pf-year {
  display: inline-block;
  background: rgba(63,102,160,0.1);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.pf-card h3 { font-size: 1rem; margin-bottom: 8px; }
.pf-card p { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }

/* Legal */
.legal-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
.legal-sub { margin-top: 24px; color: var(--blue); font-size: 1.05rem; }
.kbli-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.kbli-list li { background: var(--paper); border-radius: 10px; padding: 12px 16px; font-size: 0.92rem; color: var(--ink-soft); }
.kbli-list strong { color: var(--blue-darker); }
.legal-card {
  background: var(--blue-darker);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
}
.legal-card h3 { color: var(--gold); margin-bottom: 16px; }
.legal-card dl { margin: 0; display: grid; gap: 12px; }
.legal-card dt { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.6); }
.legal-card dd { margin: 2px 0 0; font-size: 0.94rem; }

/* Contact */
.contact { background: linear-gradient(150deg, var(--blue) 0%, var(--blue-darker) 100%); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact h2 { color: var(--white); }
.contact-copy p { color: rgba(255,255,255,0.85); }
.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 16px 18px;
  transition: background 0.2s;
}
a.contact-card:hover { background: rgba(255,255,255,0.16); }
.contact-card .icon { font-size: 1.3rem; }
.contact-card strong { display: block; font-family: var(--font-head); color: var(--gold); font-size: 0.92rem; }
.contact-card span { font-size: 0.9rem; color: rgba(255,255,255,0.9); }

/* Footer */
.site-footer { background: var(--blue-darker); color: rgba(255,255,255,0.7); padding: 26px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; }
.footer-brand img { width: 26px; }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--blue-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-logo { width: 160px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid, .legal-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar-inner { font-size: 0.78rem; gap: 16px; }
  .nav {
    position: fixed;
    top: 0; right: -100%;
    width: min(78vw, 320px);
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 28px;
    gap: 22px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
  }
  .nav.open { right: 0; }
  .nav-toggle { display: flex; }
  .services-grid, .team-grid, .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .services-grid, .team-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 56px 0; }
}
