/* =============================================================
   alef software solutions — stylesheet
   Palette derived from the logo: deep indigo-blue → bright azure
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand (from logo) */
  --brand-deep:   #1B2CD6;
  --brand:        #1E5BF0;
  --brand-bright: #2F9BFF;
  --gradient: linear-gradient(115deg, var(--brand-deep) 0%, var(--brand) 45%, var(--brand-bright) 100%);

  /* Surfaces & ink — light */
  --bg:        #ffffff;
  --bg-alt:    #f4f7ff;
  --surface:   #ffffff;
  --ink:       #0a1130;
  --ink-soft:  #4a5578;
  --line:      rgba(10, 17, 48, .10);
  --line-soft: rgba(10, 17, 48, .06);
  --shadow-sm: 0 1px 2px rgba(10, 17, 48, .04), 0 8px 24px rgba(10, 17, 48, .05);
  --shadow-md: 0 2px 4px rgba(10, 17, 48, .05), 0 18px 44px rgba(10, 17, 48, .09);
  --shadow-brand: 0 10px 30px rgba(30, 91, 240, .28);
  --header-bg: rgba(255, 255, 255, .72);

  /* Type */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Poppins', var(--font);

  /* Space */
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 11vw, 9rem);
  --radius: 18px;
  --radius-lg: 26px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-deep:   #3355ff;
    --brand:        #4b86ff;
    --brand-bright: #62b6ff;

    --bg:        #070b1c;
    --bg-alt:    #0a1027;
    --surface:   #0e1533;
    --ink:       #e9eeff;
    --ink-soft:  #9aa6cc;
    --line:      rgba(255, 255, 255, .11);
    --line-soft: rgba(255, 255, 255, .06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 44px rgba(0, 0, 0, .5);
    --shadow-brand: 0 10px 30px rgba(40, 90, 255, .35);
    --header-bg: rgba(7, 11, 28, .7);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .18vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Sticky-header offset for in-page anchors */
section[id] { scroll-margin-top: 92px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: .75rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  --btn-py: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: var(--btn-py) 1.7rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s, background-color .25s, border-color .25s, opacity .2s;
}
.btn--primary {
  background-image: var(--gradient);
  background-color: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(30, 91, 240, .38); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn--sm { --btn-py: .6rem; padding-inline: 1.15rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* =============================================================
   HEADER
   ============================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-stuck { border-bottom-color: var(--line-soft); box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

/* Logo wordmark (CSS reproduction of the logo) */
.logo { display: grid; gap: .1rem; line-height: 1; }
.logo__mark {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -.045em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo__mark--sm { font-size: 1.45rem; }
.logo__dot { -webkit-text-fill-color: var(--brand-bright); color: var(--brand-bright); }
.logo__sub {
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: var(--ink-soft);
}

/* Nav */
.nav { display: flex; align-items: center; gap: 2rem; }
.nav > a:not(.btn) {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding-block: .25rem;
  transition: color .2s;
}
.nav > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.nav > a:not(.btn):hover,
.nav > a.is-active { color: var(--ink); }
.nav > a:not(.btn):hover::after,
.nav > a.is-active::after { transform: scaleX(1); }

.header__tools { display: flex; align-items: center; gap: 1rem; }

/* Language switch */
.lang {
  display: flex;
  align-items: center;
  gap: .1rem;
  padding: .3rem .5rem;
  border: 1px solid var(--line);
  border-radius: 100px;
}
.lang__btn {
  background: none;
  border: 0;
  padding: .15rem .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 100px;
  transition: color .2s;
}
.lang__btn.is-active { color: var(--brand); }
.lang__sep { width: 1px; height: 12px; background: var(--line); }

/* Burger — two bars that cross into an X when open */
.burger {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.burger span {
  position: absolute;
  top: calc(50% - 1px);
  left: calc(50% - 8.5px);
  width: 17px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.burger span:first-child { transform: translateY(-3.5px); }
.burger span:last-child  { transform: translateY(3.5px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: rotate(-45deg); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__aura {
  position: absolute;
  z-index: -1;
  top: -30%;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 32% 38%, rgba(47, 155, 255, .28), transparent 55%),
    radial-gradient(circle at 68% 46%, rgba(27, 44, 214, .26), transparent 55%);
  filter: blur(20px);
  opacity: .9;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero__aura { opacity: .55; } }

.hero__inner { max-width: 880px; }

.hero__title {
  font-size: clamp(2.6rem, 7.2vw, 4.9rem);
  margin-block: 1rem 1.4rem;
  text-wrap: balance;
}
.hero__lead {
  font-size: clamp(1.06rem, 1rem + .5vw, 1.32rem);
  color: var(--ink-soft);
  max-width: 62ch;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.4rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.stat { text-align: center; }
.stat dd {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat dd span { font-size: .6em; }
.stat dt {
  margin-top: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* =============================================================
   SECTIONS
   ============================================================= */
.section { padding-block: var(--section-y); }
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.section__head { max-width: 640px; margin-bottom: clamp(2.75rem, 5vw, 4rem); }
.section__title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin-block: .85rem .9rem;
  text-wrap: balance;
}
.section__lead { color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  padding: 2rem 1.85rem 2.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s, border-color .35s;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 1.3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(27,44,214,.10), rgba(47,155,255,.14));
  color: var(--brand);
}
.card__icon svg { width: 23px; height: 23px; }
.card h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: .6rem; }
.card p { color: var(--ink-soft); font-size: .95rem; text-wrap: pretty; }

/* ---------- Work / references ---------- */
.work {
  display: grid;
  /* wide enough that four projects settle into a balanced 2x2, not 3 + 1 */
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.25rem;
}
.work__item {
  display: flex;
  flex-direction: column;
  padding: 1.9rem 1.85rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s;
}
.work__item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.work__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.tag {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(27,44,214,.10), rgba(47,155,255,.14));
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.work__year { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.work__item h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .65rem; text-wrap: balance; }
.work__item p { color: var(--ink-soft); font-size: .95rem; text-wrap: pretty; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 1.3rem 0 0;
  margin-top: auto;
}
.chips li {
  padding: .28rem .68rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Quote */
.quote {
  max-width: 760px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  text-align: center;
}
.quote blockquote {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.quote blockquote::before { content: '\201E'; }
.quote blockquote::after  { content: '\201C'; }
.quote figcaption {
  margin-top: 1.1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* =============================================================
   CONTACT
   ============================================================= */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact__info { display: grid; gap: 2rem; }
.info__block h3 {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .7rem;
}
.info__block address { font-style: normal; line-height: 1.8; color: var(--ink-soft); }
.info__block address strong { color: var(--ink); font-weight: 700; }

.info__list { list-style: none; padding: 0; display: grid; gap: .7rem; }
.info__list li { display: grid; gap: .1rem; }
.info__label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.info__list a {
  font-weight: 700;
  color: var(--ink);
  width: fit-content;
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}
.info__list a:hover { color: var(--brand); border-color: var(--brand); }
.info__muted { color: var(--ink-soft); }

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }

.field { display: grid; gap: .4rem; }
.field label { font-size: .86rem; font-weight: 600; }
.field .opt { color: var(--ink-soft); font-weight: 500; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: .82rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(30, 91, 240, .14);
}
.field.is-invalid input,
.field.is-invalid textarea { border-color: #e0344a; }

.field__err {
  font-size: .8rem;
  font-weight: 600;
  color: #e0344a;
  display: none;
}
.field.is-invalid .field__err { display: block; }

.field--check { gap: .3rem; }
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  font-size: .86rem;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 500;
}
.check input {
  width: 18px; height: 18px;
  margin-top: .18rem;
  accent-color: var(--brand);
  cursor: pointer;
}
.check a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* honeypot */
.hp { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }

.form__note { font-size: .85rem; color: var(--ink-soft); text-align: center; }
.form__note a { color: var(--brand); font-weight: 700; }

.form__status {
  font-size: .9rem;
  font-weight: 600;
  padding: .85rem 1rem;
  border-radius: 13px;
  display: none;
}
.form__status.is-ok {
  display: block;
  color: #0b7a4b;
  background: rgba(16, 185, 129, .10);
  border: 1px solid rgba(16, 185, 129, .3);
}
.form__status.is-err {
  display: block;
  color: #c62a3e;
  background: rgba(224, 52, 74, .09);
  border: 1px solid rgba(224, 52, 74, .3);
}
@media (prefers-color-scheme: dark) {
  .form__status.is-ok { color: #4ade9f; }
  .form__status.is-err { color: #ff8095; }
}

.status__action {
  display: inline-block;
  margin-top: .6rem;
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Submit spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  padding-block: 3rem 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.footer__brand { display: grid; gap: .3rem; }
.footer__tag { font-size: .85rem; color: var(--ink-soft); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__nav a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color .2s;
}
.footer__nav a:hover { color: var(--brand); }
.footer__copy { font-size: .82rem; color: var(--ink-soft); width: 100%; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }

/* =============================================================
   Reveal on scroll
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 76px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1.25rem var(--gutter) 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    /* visibility flips instantly on open, and only after the fade on close,
       so the menu never gets stuck mid-transition */
    transition: opacity .25s, transform .25s, visibility 0s linear .25s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s, transform .25s, visibility 0s;
  }
  .nav > a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav > a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 1rem; }

  .form__row { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  .lang { padding-inline: .4rem; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   Legal pages (Impressum / Datenschutz)
   ============================================================= */
.legal { max-width: 70ch; }
.legal h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-bottom: 2rem; }
.legal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: .7rem;
}
.legal p, .legal ul { color: var(--ink-soft); }
.legal p + p { margin-top: .9rem; }
.legal ul { padding-left: 1.2rem; margin-top: .6rem; }
.legal li + li { margin-top: .35rem; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--ink); }
.legal .placeholder {
  display: block;
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--brand-bright);
  border-radius: 0 12px 12px 0;
  background: var(--bg-alt);
  font-size: .9rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 2rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.back-link:hover { color: var(--brand); }
