/* ============================================
   Theia Software: design tokens
   ============================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --navy: #0c1d35;
  --navy-2: #143059;
  --text: #16263c;
  --text-dim: #5b6b81;
  --text-faint: #8695a8;
  --border: #e2e8f1;
  --accent: #1a4fb0;
  --accent-soft: #eaf0fb;
  --cta: #e2622c;
  --cta-dark: #c8511f;
  --radius: 12px;
  --radius-sm: 6px;
  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1180px;
  --shadow-card: 0 2px 4px rgba(12,29,53,0.04), 0 12px 32px -12px rgba(12,29,53,0.12);
  --shadow-card-hover: 0 4px 8px rgba(12,29,53,0.06), 0 20px 44px -14px rgba(12,29,53,0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
/* grid/flex children must be allowed to shrink below their content width,
   otherwise the code block forces the whole page wider than the screen */
.hero-inner > *, .about-inner > *, .about-side > *, .contact-inner > *,
.card-grid > *, .work-grid > *, .capability-grid > *, .process-list > * { min-width: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.18; margin: 0 0 0.5em; color: var(--navy); }
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.accent-word { color: var(--accent); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Utility bar ---------- */
.utility-bar { background: var(--navy); color: #c6d3e4; font-size: 13.5px; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 46px; flex-wrap: wrap; }
.utility-inner span, .utility-inner a { display: inline-flex; align-items: center; gap: 8px; }
.utility-inner a:hover { color: #fff; }
.utility-inner svg { width: 16px; height: 16px; color: var(--cta); }
.utility-right { display: flex; gap: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 10px rgba(12,29,53,0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-size: 18px; color: var(--navy); }
.brand-mark { display: flex; align-items: center; }
.brand-mark img { display: block; width: 34px; height: 34px; border-radius: 50%; }
.brand-name strong { font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; }
.main-nav a { color: var(--text); transition: color .15s; }
.main-nav a:hover { color: var(--accent); }
.nav-cta {
  color: #fff !important; background: var(--cta);
  padding: 11px 22px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgba(226,98,44,0.6);
}
.nav-cta:hover { background: var(--cta-dark); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  background: #fff; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; display: flex; gap: 4px;
}
.lang-toggle .sep { opacity: .4; }
.lang-toggle[data-active="en"] span[data-lang-label="en"],
.lang-toggle[data-active="ro"] span[data-lang-label="ro"] { color: var(--accent); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero: full-bleed dark tech banner ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy);
  padding: 104px 0 108px;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 90% at 78% 45%, rgba(26,79,176,0.55), transparent 70%),
    radial-gradient(ellipse 60% 70% at 12% 90%, rgba(20,48,89,0.9), transparent 70%),
    linear-gradient(120deg, #0a1a30 0%, #0c1d35 45%, #10294a 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(140,180,235,0.5) 1px, transparent 1.4px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 5%, transparent 72%);
  opacity: .55;
  animation: driftGrid 26s linear infinite;
}
@keyframes driftGrid { to { background-position: 34px 34px; } }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-lines path { fill: none; stroke: rgba(130,180,245,0.42); stroke-width: 1.2; }
.hero-lines circle { fill: rgba(150,195,255,0.9); stroke: none; }
.hero-lines .pulse { animation: nodePulse 3.4s ease-in-out infinite; }
.hero-lines .pulse:nth-of-type(2) { animation-delay: .7s; }
.hero-lines .pulse:nth-of-type(3) { animation-delay: 1.4s; }
.hero-lines .pulse:nth-of-type(4) { animation-delay: 2.1s; }
@keyframes nodePulse { 0%,100% { opacity: .35; r: 3; } 50% { opacity: 1; r: 5; } }

.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero h1, .hero p { color: #fff; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  color: #8fb7ef; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.02em; margin-bottom: 22px; color: #fff; }
.hero h1 .accent-word { color: #6fa4f5; }
.hero-lead { font-size: 17.5px; max-width: 620px; margin-bottom: 30px; color: #c3d2e6 !important; }
.hero-highlight {
  display: flex; align-items: flex-start; gap: 13px; max-width: 610px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-left: 3px solid var(--cta);
  border-radius: var(--radius-sm);
  padding: 15px 20px; margin-bottom: 34px;
  backdrop-filter: blur(2px);
}
.hero-highlight-icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--cta); }
.hero-highlight-icon svg { width: 20px; height: 20px; stroke-width: 1.9; }
.hero-highlight p { margin: 0; font-size: 14.5px; font-weight: 500; color: #fff !important; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--cta); color: #fff; box-shadow: 0 10px 26px -10px rgba(226,98,44,0.75); }
.btn-primary:hover { background: var(--cta-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-sm { padding: 11px 22px; font-size: 14px; }
.section .btn-ghost { border-color: var(--border); color: var(--accent); }
.section .btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- Stats band (overlaps hero, like market sites) ---------- */
.stats-band { background: var(--bg); position: relative; z-index: 3; }
.stats-band .container { padding-top: 0; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-card); margin-top: -46px; overflow: hidden;
}
.hero-stats li { padding: 28px 30px; text-align: center; border-right: 1px solid var(--border); }
.hero-stats li:last-child { border-right: none; }
.hero-stats strong {
  display: block; font-family: var(--font-head); font-size: 30px; color: var(--accent);
  line-height: 1.1; margin-bottom: 4px;
}
.hero-stats span { font-size: 13.5px; color: var(--text-dim); }

/* ---------- Capability strip ---------- */
.capability-strip { padding: 76px 0 12px; }
.capability-title { font-size: clamp(22px, 2.8vw, 30px); max-width: 760px; margin: 6px 0 34px; }
.capability-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.capability-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 20px; transition: box-shadow .18s, transform .18s;
}
.capability-item:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.capability-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.capability-icon svg { width: 22px; height: 22px; }
.capability-item h3 { font-size: 16px; margin-bottom: 7px; }
.capability-item p { font-size: 13.5px; margin: 0; line-height: 1.55; }
.capability-footnote { margin-top: 28px; font-size: 13.5px; color: var(--text-faint); max-width: 780px; }

/* ---------- Stack strip ---------- */
.stack-strip { background: var(--bg-alt); padding: 42px 0; margin-top: 64px; }
.stack-strip-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint);
  margin-bottom: 20px; text-align: center;
}
.stack-marquee { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.stack-marquee li {
  font-family: var(--font-head); font-size: 13.5px; color: var(--text-dim); font-weight: 500;
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 20px;
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }
.section-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.015em; max-width: 740px; }
.section-lead { font-size: 16.5px; max-width: 660px; margin-top: 14px; margin-bottom: 48px; }

/* Services grid */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 30px; transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-2) 100%);
  border-color: transparent; color: #fff;
}
.card-featured h3 { color: #fff; }
.card-featured p { color: #c3d2e6; }
.card-featured .card-icon { background: rgba(255,255,255,0.12); color: #8fb7ef; }
.card-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--cta); padding: 5px 13px; border-radius: 999px; margin-bottom: 18px;
}
.services-note {
  margin-top: 26px; padding: 30px 34px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid #d6e2f7;
}
.services-note p { margin: 0; font-size: 15px; max-width: 640px; color: var(--text); }
.card-icon {
  width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 11px; }
.card p { font-size: 14.5px; margin: 0; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s;
  border-top: 3px solid var(--accent);
}
.work-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.work-card-featured { grid-column: span 2; border-top-color: var(--cta); }
.work-tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cta); margin-bottom: 12px; }
.work-card h3 { font-size: 20px; margin-bottom: 11px; }
.work-card p { font-size: 14.5px; flex: 1; }
.work-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.work-stack li { font-size: 11.5px; padding: 5px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-dim); }

/* Process */
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; list-style: none; margin-top: 44px; }
.process-list li {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px 28px; position: relative; overflow: hidden;
}
.process-list li::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
}
.process-num {
  font-family: var(--font-head); font-size: 44px; color: #d6e2f7; font-weight: 700;
  display: block; line-height: 1; margin-bottom: 14px;
}
.process-list h3 { font-size: 17px; margin-bottom: 9px; }
.process-list p { font-size: 14px; margin: 0; }

/* About */
.about-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 60px; align-items: start; }
.pull-quote {
  margin: 6px 0 28px; padding: 6px 0 6px 24px; border-left: 3px solid var(--cta);
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; color: var(--navy);
}
.about-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about-badges span {
  font-size: 13px; padding: 9px 16px; background: #fff; border: 1px solid var(--border);
  border-radius: 999px; color: var(--text-dim);
}
.about-side { display: flex; flex-direction: column; gap: 22px; }
.about-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-card); }
.about-card h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 20px; font-weight: 700; }
.about-card dl div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 14px; }
.about-card dl div:first-child { border-top: none; }
.about-card dt { color: var(--text-faint); }
.about-card dd { margin: 0; text-align: right; font-weight: 500; color: var(--text); }

/* Code window (real snippet, human signature) */
.code-window {
  background: var(--navy); border-radius: var(--radius); overflow: hidden; max-width: 100%;
  box-shadow: 0 20px 44px -18px rgba(12,29,53,0.45);
}
.code-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.09); }
.code-bar span:not(.code-filename) { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.22); display: inline-block; }
.code-filename { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: #90a3bd; }
.code-body { margin: 0; padding: 20px 22px; font-family: var(--font-mono); font-size: 12.2px; line-height: 1.85; color: #b8c7de; overflow-x: auto; }
.tok-kw { color: #ff9a63; }
.tok-type { color: #78b6f0; }
.tok-com { color: #6c819c; font-style: italic; }
.code-cursor { display: inline-block; width: 7px; height: 13px; background: var(--cta); margin-left: 2px; vertical-align: -2px; animation: cursorBlink 1.05s step-end infinite; }
@keyframes cursorBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .code-cursor, .hero-bg::after, .hero-lines .pulse { animation: none; }
}

/* Contact */
.contact-section { background: var(--bg-alt); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 60px; }
.contact-details { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; font-size: 15.5px; }
.contact-details li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.contact-details svg { width: 19px; height: 19px; color: var(--cta); flex: none; }
.contact-details a:hover { color: var(--accent); }
.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-card); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-row input, .form-row textarea {
  width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 15px; color: var(--text); font-family: var(--font-body); font-size: 14.5px; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.contact-form .btn { width: 100%; }
.form-status { margin: 14px 0 0; font-size: 13.5px; min-height: 1.2em; }
.form-status.ok { color: #1a8a5c; }
.form-status.err { color: #c0392b; }

/* Footer */
.site-footer { background: var(--navy); color: #9db0c8; padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .card-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card-featured { grid-column: span 2; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .utility-bar { display: none; }
  .header-inner { height: 64px; }
  .brand { font-size: 16.5px; gap: 9px; }
  .brand-mark img { width: 30px; height: 30px; }
  .main-nav { position: fixed; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 20px; transform: translateY(-8px);
    opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; box-shadow: 0 12px 24px -12px rgba(12,29,53,0.2); }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav a { padding: 13px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .main-nav .nav-cta { margin-top: 14px; text-align: center; justify-content: center; }
  .menu-toggle { display: block; }
  .card-grid, .work-grid, .process-list { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card-featured { grid-column: span 1; }
  .hero { padding: 64px 0 76px; }
  .section { padding: 60px 0; }
  .capability-strip { padding: 56px 0 0; }
  .hero-stats { grid-template-columns: 1fr; margin-top: -32px; }
  .hero-stats li { border-right: none; border-bottom: 1px solid var(--border); padding: 20px 24px; }
  .hero-stats li:last-child { border-bottom: none; }
  .hero-stats strong { font-size: 26px; }
  .stack-strip { margin-top: 44px; padding: 32px 0; }

  /* hero: tighter type, full-width buttons, calmer background */
  .container { padding: 0 20px; }
  .hero h1 { font-size: 30px; line-height: 1.22; }
  .hero-lead { font-size: 15.5px; margin-bottom: 24px; }
  .eyebrow { font-size: 11px; letter-spacing: .1em; margin-bottom: 14px; }
  .hero-highlight { padding: 14px 16px; gap: 11px; margin-bottom: 28px; }
  .hero-highlight p { font-size: 13.5px; }
  .hero-lines { opacity: .35; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .btn { padding: 14px 24px; }

  /* sections */
  .section h2 { font-size: 26px; }
  .section-lead { font-size: 15px; margin-bottom: 32px; }
  .capability-title { font-size: 21px; margin-bottom: 24px; }
  .capability-grid { grid-template-columns: 1fr; gap: 14px; }
  .capability-item {
    padding: 20px; display: grid; grid-template-columns: 42px 1fr;
    column-gap: 15px; row-gap: 5px; align-items: start;
  }
  .capability-icon { margin-bottom: 0; width: 42px; height: 42px; grid-row: 1 / span 2; }
  .capability-item h3 { margin-bottom: 0; grid-column: 2; align-self: center; }
  .capability-item p { grid-column: 2; }
  .card, .work-card { padding: 24px 22px; }
  .card h3, .work-card h3 { font-size: 17.5px; }
  .services-note { padding: 24px 22px; }
  .services-note .btn { width: 100%; }
  .process-list { gap: 14px; margin-top: 30px; }
  .process-list li { padding: 22px 22px 20px; }
  .process-num { font-size: 34px; margin-bottom: 10px; }

  /* about + code window */
  .about-inner, .contact-inner { gap: 34px; }
  .pull-quote { font-size: 18px; padding-left: 18px; }
  .about-card, .contact-form { padding: 24px 20px; }
  .about-card dl div { flex-direction: column; gap: 2px; align-items: flex-start; }
  .about-card dd { text-align: left; }
  .code-body { font-size: 10.5px; padding: 16px; line-height: 1.75; }
  .code-filename { font-size: 11px; }

  .footer-inner { flex-direction: column; gap: 6px; }
}
