/* Sonarfix: single stylesheet, carrying over the look of the original site
   (teal/amber palette, photo hero with glass cards, Inter). Tokens -> base -> components -> pages. */
:root {
  --blue-900: #0e3040;
  --blue-800: #154e68;
  --blue-700: #1b5c7a;
  --blue-600: #246e91;
  --blue-100: #e6f3f8;
  --orange-500: #f5a623;
  --orange-600: #e09412;
  --orange-100: #fef6e4;
  --soft: #f0f8ff;
  --soft-line: #e1effa;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, .12);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1240px;
  --header: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--gray-700); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--blue-800); }
h1, h2, h3 { line-height: 1.25; color: var(--blue-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--blue-900); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { top: 8px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header); gap: 16px; }
.brand img { height: 44px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 12px; }
.site-nav ul { display: flex; gap: 6px; list-style: none; }
.site-nav ul a { display: block; padding: 8px 14px; border-radius: var(--radius-sm); color: var(--gray-700); text-decoration: none; font-weight: 500; font-size: .9rem; transition: all .2s; }
.site-nav ul a:hover { color: var(--blue-700); background: var(--blue-100); }
.site-nav ul a[aria-current='page'] { color: var(--blue-700); background: var(--blue-100); font-weight: 600; }
.langs { display: flex; align-items: center; gap: 6px; margin-left: 10px; font-size: .9rem; }
.langs a { min-width: 32px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--gray-700); font-weight: 600; opacity: .5; transition: opacity .2s; }
.langs a:hover, .langs a[aria-current] { opacity: 1; color: #000; }
.langs span { color: #ccc; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--gray-200); background: #fff; border-radius: 10px; color: var(--blue-900); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn .close { display: none; }
.nav-open .menu-btn .open { display: none; }
.nav-open .menu-btn .close { display: block; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: all .2s; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: .9rem; }
.btn-accent { background: var(--orange-500); color: var(--blue-900); }
.btn-accent:hover { background: var(--orange-600); color: var(--blue-900); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245, 166, 35, .4); }
.btn-outline { background: transparent; color: var(--blue-800); border-color: var(--blue-800); }
.btn-outline:hover { background: var(--blue-800); color: #fff; }
.btn-ghost-inv { background: transparent; color: rgba(255, 255, 255, .9); border-color: rgba(255, 255, 255, .4); }
.btn-ghost-inv:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-white { background: #fff; color: var(--blue-900); }
.btn-white:hover { background: var(--orange-100); color: var(--blue-900); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 96px 0 80px; color: #fff;
  background-image: linear-gradient(rgba(14, 48, 64, .85), rgba(27, 92, 122, .85)), url('/assets/images/portfolio-1.webp');
  background-size: cover; background-position: center; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/svg%3E"); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(245, 166, 35, .15); border: 1px solid rgba(245, 166, 35, .35); color: var(--orange-500); padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600; margin-bottom: 24px; }
.badge-pill::before { content: '\25CF'; font-size: .5rem; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 span { color: var(--orange-500); }
.lead { font-size: 1.05rem; color: var(--gray-600); max-width: 60ch; }
.hero .lead { color: rgba(255, 255, 255, .8); line-height: 1.7; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.glass-stack { display: flex; flex-direction: column; gap: 16px; }
.glass { background: rgba(255, 255, 255, .08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 8px 32px rgba(0, 0, 0, .2); border-radius: var(--radius); padding: 22px 24px; }
.glass h2 { font-size: 1.35rem; font-weight: 800; color: #fff; margin: 0 0 4px; }
.glass p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .95rem; }
.glass-link { color: #fff; font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
.glass-link:hover { color: var(--orange-500); }

/* ---- sections ---- */
.section { padding: 80px 0; }
.section.alt { background: var(--soft); border-block: 1px solid var(--soft-line); }
.sec-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.sec-head p { color: var(--gray-600); margin: 0; }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b87707; margin: 0 0 12px; }
.section-link { margin: 32px 0 0; font-weight: 600; text-align: center; }
.section-link a, .svc a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.section-link a:hover, .svc a:not(.btn):hover { text-decoration: underline; }
.page-head { background: linear-gradient(135deg, var(--blue-900), var(--blue-800)); padding: 64px 0 56px; text-align: center; }
.page-head .label { color: var(--orange-500); }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 16px; }
.page-head .lead { color: rgba(255, 255, 255, .8); margin: 0 auto; font-size: 1.05rem; }

/* ---- grids & cards ---- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 32px; box-shadow: 0 4px 10px rgba(0, 0, 0, .02); display: block; color: inherit; text-decoration: none; transition: all .2s; }
.card h3 { margin-bottom: .5em; color: var(--blue-900); }
.card p { color: var(--gray-600); font-size: .95rem; line-height: 1.75; }
.card p:last-child { margin-bottom: 0; }
a.card:hover { transform: translateY(-5px); border-color: var(--blue-600); box-shadow: var(--shadow-md); }
.card.service { display: flex; flex-direction: column; padding: 36px 28px; }
.card.service p { flex: 1; }
.card.plain { box-shadow: none; }
.card.big h3 { font-size: 1.35rem; }
.ico { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--blue-100); color: var(--blue-700); margin-bottom: 22px; }
.ico .icon { width: 26px; height: 26px; }
.more { display: inline-flex; align-items: center; gap: 6px; color: #b87707; font-weight: 700; font-size: .875rem; margin-top: 18px; transition: gap .2s; }
a.card:hover .more { gap: 10px; color: var(--orange-600); }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b87707; margin: 0 0 8px; }
.meta { font-size: .9rem; color: var(--gray-600); margin: 0 0 .4em; }
.meta strong { color: var(--gray-900); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--blue-900); background: var(--orange-100); border: 1px solid #f7d58f; border-radius: 999px; padding: 4px 10px; }
.card.project, .card.article-card { padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.card.project img, .card.article-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.card.project:hover img, a.card.article-card:hover img { transform: scale(1.05); }
.card-body { padding: 20px 24px 24px; background: #fff; position: relative; }
.card.project h3 { font-size: 1rem; line-height: 1.4; }
.inst-top { display: flex; align-items: flex-start; justify-content: space-between; }

/* ---- services page ---- */
.svc-list { padding-top: 24px; padding-bottom: 24px; }
.svc { display: grid; grid-template-columns: 56px 1fr; gap: 24px; padding: 48px 0; border-bottom: 1px solid var(--gray-200); }
.svc:last-child { border-bottom: 0; }
.svc .ico { margin: 0; }
.svc p { max-width: 70ch; color: var(--gray-600); }
.checks { list-style: none; display: grid; gap: 8px; margin: 0 0 20px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checks .icon { color: var(--blue-700); margin-top: .2em; }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 20px; }
.roles div { background: var(--soft); border: 1px solid var(--soft-line); border-radius: 10px; padding: 14px 16px; }
.roles dt { font-weight: 700; color: var(--blue-900); }
.roles dd { margin: 2px 0 0; color: var(--gray-600); font-size: .92rem; }
.card.app { padding: 28px; }

/* ---- technology page ---- */
.sw-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.sw-grid li { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); min-height: 84px; display: flex; align-items: center; justify-content: center; padding: 16px 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, .02); }
.sw-grid img { max-height: 40px; max-width: 100%; width: auto; object-fit: contain; }
.sw-text { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; justify-content: center; }
.sw-text li { border: 1px solid var(--gray-200); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .9rem; color: var(--blue-900); }
.fineprint { font-size: .82rem; color: var(--gray-600); max-width: 70ch; margin: 16px auto 0; text-align: center; }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 48px; align-items: start; }
.facts h2 { font-size: 1.1rem; }
.facts dl { margin: 0; }
.facts dl div { padding: 12px 0; border-top: 1px solid var(--gray-200); }
.facts dt { font-size: .75rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; color: var(--gray-900); }

/* ---- articles ---- */
.article { max-width: 860px; padding-top: 48px; padding-bottom: 24px; }
.crumbs { font-size: .9rem; margin-bottom: 20px; }
.article header { margin-bottom: 28px; }
.article header .meta { margin: 0; }
.article h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose p { color: var(--gray-700); max-width: 72ch; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose figure { margin: 28px 0; }
.prose figure img { width: 100%; border-radius: 10px; background: #fff; }
.prose figcaption { font-size: .85rem; color: var(--gray-600); margin-top: 8px; line-height: 1.5; }
.prose ol, .prose ul { padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: .3em; }
.callout { background: var(--blue-100); border-left: 4px solid var(--blue-700); padding: 16px 20px; border-radius: 10px; margin: 24px 0; }
.article hr { border: 0; border-top: 1px solid var(--gray-200); margin: 36px 0; }
.article .prose ol { font-size: .92rem; line-height: 1.7; }

/* ---- form ---- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--blue-900); }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--gray-900); background: #fff; border: 1px solid #b9c7ce; border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(245, 166, 35, .55); border-color: var(--blue-700); }
.hint { font-size: .85rem; color: var(--gray-600); margin: -8px 0 0; }
.form-error { background: #fde8e8; color: #8a1c1c; border-radius: 10px; padding: 10px 14px; margin: 0; font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- CTA band ---- */
.cta-band { background: linear-gradient(135deg, var(--blue-900), var(--blue-800)); padding: 80px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; margin-bottom: 16px; }
.cta-band p { color: rgba(255, 255, 255, .75); font-size: 1.05rem; margin: 0 auto 36px; max-width: 480px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---- footer ---- */
.site-footer { background: var(--blue-900); color: rgba(255, 255, 255, .75); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.6fr; gap: 40px; }
.footer-logo { filter: brightness(0) invert(1); height: 36px; width: auto; margin-bottom: 16px; }
.muted-inv { color: rgba(255, 255, 255, .55); font-size: .875rem; line-height: 1.8; max-width: 300px; }
.footer-h { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; display: grid; gap: 2px; }
.footer-links a, .site-footer address a { color: rgba(255, 255, 255, .75); text-decoration: none; font-size: .9rem; }
.footer-links a { display: inline-block; padding: 6px 0; }
.footer-links a:hover, .site-footer address a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; display: grid; gap: 12px; font-size: .9rem; }
.site-footer address p { display: flex; gap: 10px; margin: 0; align-items: flex-start; }
.site-footer address .icon { margin-top: .25em; color: var(--orange-500); }
.social { gap: 16px !important; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding: 24px; font-size: .85rem; color: rgba(255, 255, 255, .55); }
.footer-bottom p { margin: 0; }

.wa-fab { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); z-index: 90; transition: transform .2s; }
.wa-fab:hover { transform: scale(1.08); color: #fff; }
.wa-fab .icon { width: 30px; height: 30px; fill: #fff; stroke: none; }
.page-quote .wa-fab { display: none; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .menu-btn { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: var(--header); background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: 0 8px 16px rgba(0, 0, 0, .08); flex-direction: column; align-items: stretch; padding: 12px 24px 20px; gap: 12px; display: none; }
  .nav-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px; }
  .langs { margin-left: 0; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4, .roles, .form .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .svc { grid-template-columns: 1fr; gap: 12px; padding: 36px 0; }
  .hero { padding: 56px 0 48px; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .page-head { padding: 44px 0 36px; }
  .cta-band { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* real software logos (square files) */
.sw-grid li { min-height: 100px; }
.sw-grid img { max-height: 64px; height: auto; }

/* header copied from the home page */
#header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
#header .container { width: 100%; max-width: 1350px; margin: 0 auto; padding: 0 24px; }
#header .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
#header .nav-logo { display: flex; align-items: center; }
#header .nav-logo .logo-img { height: 44px; width: auto; display: block; object-fit: contain; }
#header .nav-menu { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; align-items: center; }
/* same order as the original so the cascade matches (the old pages also load Bootstrap: block nav links, 1.5 line-height buttons) */
#header .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 8px; font-weight: 600; font-size: .95rem; line-height: 1.5; cursor: pointer; border: none; min-height: 0; transition: all .2s ease; }
#header .btn-primary { background: var(--orange-500); color: #fff; }
#header .btn-primary:hover { background: var(--orange-600); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249, 115, 22, .35); }
#header .nav-link:not(.btn) { display: block; }
#header .nav-link { padding: 8px 14px; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--gray-700); text-decoration: none; transition: all .2s ease; }
#header .nav-link:hover, #header .nav-link.active { color: var(--blue-700); background: var(--blue-100); }
#header .nav-cta { margin-left: 8px; padding: 9px 20px; }
#header .language-switcher { display: flex; align-items: center; gap: 6px; margin-left: 15px; }
#header .language-switcher a { display: flex; align-items: center; gap: 3px; text-decoration: none; color: var(--gray-700); font-weight: 600; opacity: .5; transition: all .3s ease; }
#header .language-switcher a:hover, #header .language-switcher a.active { opacity: 1; color: #000; }
#header .language-switcher a:hover .fi { transform: scale(1.25); transition: transform .3s ease; }
#header .language-switcher .fi { transition: transform .3s ease; display: inline-block; }
#header .language-switcher .separator { color: #ccc; font-size: .9em; }
#header .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: none; }
#header .hamburger span { display: block; width: 24px; height: 2px; background: var(--gray-900); border-radius: 2px; transition: all .3s; }
#header .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#header .hamburger.active span:nth-child(2) { opacity: 0; }
#header .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
@media (max-width: 768px) {
  #header .hamburger { display: flex; }
  #header .nav-menu { display: none; flex-direction: column; align-items: stretch; gap: 4px; position: absolute; top: 68px; left: 0; right: 0; background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--gray-200); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
  #header .nav-menu.open { display: flex; }
  #header .nav-cta { margin: 4px 0; }
  #header .language-switcher { margin: 8px 0 0; }
}
