/* ==========================================================================
   comci technology UG — stylesheet
   Clean corporate light · mobile-first · no external dependencies
   ========================================================================== */

:root {
  --bg:          #ffffff;
  --bg-alt:      #f4f7fb;
  --surface:     #ffffff;
  --border:      #e4e9f1;
  --text:        #0f172a;
  --text-muted:  #536079;
  --accent:      #1e5fd6;
  --accent-dark: #17489f;
  --accent-soft: #e9f1fe;
  --brand:       #4f9a35;  /* beech-leaf green — identity only (logo, wordmark dot); never interactive */
  --brand-dark:  #2e6b22;
  --ok:          #179d6b;
  --shadow-sm:   0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md:   0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg:   0 24px 60px -20px rgba(15, 23, 42, .28);
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1120px;
  --font:        system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
                 "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono:        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

img, svg { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
}

.muted { color: var(--text-muted); }

/* skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 650; font-size: 1rem;
  padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 0; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--text); }
.brand-mark { height: 1.15em; width: auto; margin-right: .34em; flex: none; }
.brand .dot { color: var(--brand); }
.brand .tech { font-weight: 500; color: var(--text); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-links { display: none; }
.nav-links a { color: var(--text); font-weight: 550; font-size: .98rem; }
.nav-links a:hover { color: var(--accent); }
/* header CTA: hidden on mobile (it lives in the hamburger menu); shown ≥900px.
   Compact vs. the hero button so it fits the header row. */
.nav-book { display: none; padding: 9px 18px; font-size: .9rem; }

/* language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button, .lang-switch a {
  font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  padding: 6px 10px; border: 0; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: background .14s, color .14s; text-decoration: none;
}
.lang-switch button[aria-pressed="true"], .lang-switch a[aria-current="true"] { background: var(--accent); color: #fff; }
.lang-switch button:hover:not([aria-pressed="true"]), .lang-switch a:hover:not([aria-current="true"]) { background: var(--accent-soft); color: var(--accent); }

/* language switch in footer */
.footer-lang { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.footer-lang-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }

/* mobile menu toggle */
.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 10px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile dropdown panel */
.mobile-nav {
  display: none; border-top: 1px solid var(--border); background: var(--surface);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 14px 20px; color: var(--text); font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:hover { background: var(--bg-alt); color: var(--accent); }

/* ---------- hero -------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 100% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
}
.hero-inner { padding-block: 56px 44px; display: grid; gap: 40px; }
.hero-title { margin-bottom: .5em; }
.hero-lead { font-size: 1.15rem; color: var(--text-muted); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* hero product card (monitoring mock) */
.hero-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px;
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-card-title { font-size: .82rem; font-weight: 700; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.pill-ok { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--ok); background: rgba(23,157,107,.1); padding: 4px 10px; border-radius: 999px; }
.pill-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(23,157,107,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(23,157,107,.5); } 70% { box-shadow: 0 0 0 8px rgba(23,157,107,0); } 100% { box-shadow: 0 0 0 0 rgba(23,157,107,0); } }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.metric { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 10px 12px; }
.metric .k { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.metric .v { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 64px; }

/* ---------- vista band (full-width photo divider) ----------------------- */
.vista {
  position: relative;
  min-height: 300px;
  background-color: #0f2545;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .68) 100%),
    url("../assets/img/vista-narrow.jpg?v=3");
  background-size: cover, cover;
  background-position: center, center 45%;
  background-repeat: no-repeat, no-repeat;
  display: flex;
  align-items: flex-end;
}
.vista-caption { padding-block: 0 14px; position: relative; z-index: 1; }
.vista-caption p {
  margin: 0; color: #fff; font-weight: 750;
  font-size: clamp(1.15rem, 3vw, 1.7rem); letter-spacing: -0.01em;
  max-width: 20ch; text-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 24px rgba(0, 0, 0, .4);
}
@media (min-width: 720px) {
  .vista {
    min-height: 440px;
    background-image:
      linear-gradient(180deg, rgba(15, 23, 42, 0) 38%, rgba(15, 23, 42, .6) 100%),
      url("../assets/img/vista-wide.jpg?v=3");
  }
}

/* Scroll reveal: a grid of white tiles hides the photo, then clears
   piece-by-piece as the band scrolls into view — the picture assembles,
   like the full picture forming during a business analysis. Built and
   driven by JS (wireVista); purely decorative. */
.vista-tiles {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  gap: 0;
  pointer-events: none;
}
.vista-tiles .tile {
  background: #fff;
  /* 1px white halo overlaps neighbours so the tiled cover reads as one
     seamless white surface — no visible grid until a tile clears. */
  box-shadow: 0 0 0 1px #fff;
  transition: opacity .55s ease, transform .55s ease;
  will-change: opacity, transform;
}
.vista-tiles .tile.gone {
  opacity: 0;
  transform: scale(.72);
}
@media (prefers-reduced-motion: reduce) {
  .vista-tiles { display: none; }
}

/* ---------- sections ---------------------------------------------------- */
section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 56ch; margin-bottom: 34px; }

/* services grid */
.cards { display: grid; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d3ddec; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-muted); margin: 0; font-size: .98rem; }

/* services journey — a numbered walk-through read top to bottom */
.journey { list-style: none; margin: 0; padding: 0; max-width: 780px; }
.journey-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding-bottom: 34px; }
.journey-step:last-child { padding-bottom: 0; }
.journey-num {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 1.05rem;
  font-variant-numeric: tabular-nums; position: relative; z-index: 1;
}
/* connector line between steps */
.journey-step:not(:last-child)::before {
  content: ""; position: absolute; left: 23px; top: 52px; bottom: 4px; width: 2px;
  background: linear-gradient(var(--accent-soft), var(--border));
}
.journey-body { padding-top: 4px; }
.journey-body h3 { margin: 6px 0 .35rem; }
.journey-body p { color: var(--text-muted); margin: 0; }

/* feature strip (SaaS product) */
.feature { display: grid; gap: 36px; align-items: center; }
.feature-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.feature-list li::before {
  content: ""; flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231e5fd6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.feature-visual {
  background: linear-gradient(160deg, #0f2545, #1e5fd6); border-radius: var(--radius);
  padding: 28px; color: #fff; box-shadow: var(--shadow-lg);
}
.feature-visual .row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.feature-visual .row:last-child { border-bottom: 0; }
.feature-visual .name { font-weight: 600; }
.feature-visual .stat { font-variant-numeric: tabular-nums; font-weight: 700; }
.feature-visual .up { color: #7ef2c2; font-size: .85rem; font-weight: 700; }

/* portfolio cards */
.work-card { display: flex; flex-direction: column; }
.work-logo { align-self: flex-start; height: 34px; width: auto; margin-bottom: 16px; }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.work-tag { font-size: .74rem; font-weight: 700; letter-spacing: .03em; color: var(--text-muted); text-transform: uppercase; }
.work-status {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; margin-left: auto;
}
.work-card p { flex: 1; }
.work-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-weight: 650; font-size: .95rem;
}
.work-link svg { transition: transform .15s ease; }
.work-link:hover svg { transform: translate(2px, -2px); }

/* about */
.about-body { max-width: 62ch; font-size: 1.08rem; color: var(--text-muted); }

/* contact / CTA */
.cta {
  background: linear-gradient(160deg, #142a4d, #1e5fd6);
  color: #fff; border-radius: calc(var(--radius) + 6px); padding: 44px 28px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); max-width: 52ch; margin-inline: auto; }
.cta .btn-primary { background: #fff; color: var(--accent-dark); margin-top: 1.2rem; }
.cta .btn-primary:hover { background: #eef3ff; color: var(--accent-dark); }

/* ---------- footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 44px 0 28px; }
.footer-grid { display: grid; gap: 26px; }
.footer-brand .brand { font-size: 1.15rem; }
.footer-tagline { color: var(--text-muted); font-size: .95rem; max-width: 36ch; margin-top: .6rem; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 0 0 .8rem; }
.footer-col a { display: block; color: var(--text); font-size: .95rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between;
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted);
}

/* ---------- legal (impressum / datenschutz) ----------------------------- */
.legal { padding: 44px 0 64px; }
.legal .container { max-width: 800px; }
.legal h1 { margin-bottom: 1.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal h3 { margin-top: 1.4rem; }
.legal p, .legal address { color: var(--text-muted); font-style: normal; }
.legal address { margin-bottom: 1.4rem; line-height: 1.5; }
.legal .back { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }
.placeholder { background: #fff6d6; border: 1px dashed #d9b64a; border-radius: 6px; padding: 1px 6px; font-weight: 600; color: #7a5b00; }

/* ---------- component one-offs (no inline styles → strict CSP needs no 'unsafe-inline') ---------- */
.feature-cta { margin-top: 1.4rem; }
.founder { margin-top: 22px; display: grid; gap: 20px; grid-template-columns: auto 1fr; align-items: center; }
.founder-avatar { width: 64px; height: 64px; border-radius: 50%; font-size: 1.4rem; font-weight: 800; }
.founder-name { margin: .1rem 0; }
.founder-role { margin: .1rem 0 .6rem; font-weight: 600; }
.founder-bio { margin: 0; }
.cta-alt { margin-top: 1rem; font-size: .95rem; }
.cta-email { color: #fff; text-decoration: underline; }
.legal-note { font-size: .9rem; }
.footer-lang-tight { margin-top: 0; margin-bottom: 16px; }
.footer-bottom-flush { border-top: 0; margin-top: 0; }

/* ---------- utilities --------------------------------------------------- */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(30,95,214,.45); outline-offset: 2px; border-radius: 6px; }

/* ---------- responsive: tablet ----------------------------------------- */
@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 1.05fr .95fr; align-items: center; padding-block: 84px 72px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  /* offering: 2x2 (wider cards) instead of a lopsided 3+1 */
  #services .cards { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  section { padding: 72px 0; }
}

/* ---------- responsive: desktop ---------------------------------------- */
@media (min-width: 900px) {
  .nav-links { display: flex; align-items: center; gap: 1.6rem; }
  .nav-book { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
