/* ============================================================
   gusit.de — site.css
   Single stylesheet. Design tokens, mobile-first, dark
   professional theme. Breakpoints: 720px / 1080px.
   System font stack only — no webfonts (GDPR + CSP).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --c-bg: #0a101d;
  --c-bg-raise: #0d1626;
  --c-surface: #121c30;
  --c-surface-2: #172339;
  --c-border: #23304a;
  --c-border-soft: #1a2640;
  --c-text: #e9eef7;
  --c-muted: #a4b1c5;
  --c-faint: #8593aa;
  --c-accent: #2563eb;        /* buttons, fills (AA vs white text) */
  --c-accent-hi: #5e95ff;     /* icons, decorative */
  --c-accent-text: #8fb6ff;   /* link text on dark bg */
  --c-accent-soft: rgba(80, 130, 255, 0.12);
  --c-ok: #34d399;
  --c-err: #f87171;

  /* type */
  --font-sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* 8px spacing scale */
  --sp-1: 0.5rem;   /* 8  */
  --sp-2: 1rem;     /* 16 */
  --sp-3: 1.5rem;   /* 24 */
  --sp-4: 2rem;     /* 32 */
  --sp-6: 3rem;     /* 48 */
  --sp-8: 4rem;     /* 64 */
  --sp-12: 6rem;    /* 96 */

  /* shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-pill: 999px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-2);
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0 0 var(--sp-2); }
ul, ol { margin: 0 0 var(--sp-2); padding-inline-start: 1.25rem; }

a { color: var(--c-accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img, svg { vertical-align: middle; }

::selection { background: var(--c-accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--c-accent-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 70rem; /* 1120px */
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.container-narrow { max-width: 46rem; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke: currentColor;
  fill: none;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-2);
  top: -4rem;
  z-index: 100;
  padding: var(--sp-1) var(--sp-2);
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--sp-2); text-decoration: none; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 16, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 4rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--c-text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--sp-3));
  right: calc(-1 * var(--sp-3));
  background: var(--c-bg-raise);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
}
body.nav-open .site-nav { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0 0 var(--sp-2);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.site-nav ul a {
  display: block;
  padding: var(--sp-1) 0;
  color: var(--c-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav ul a:hover { color: var(--c-text); text-decoration: none; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  color: var(--c-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.lang-toggle:hover {
  color: var(--c-text);
  border-color: var(--c-accent-hi);
  text-decoration: none;
}
.lang-toggle .icon { width: 1em; height: 1em; }

/* Language switcher dropdown */
.lang-switcher { position: relative; }

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--c-bg-raise);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(2, 6, 16, 0.55);
}

.lang-menu a {
  display: block;
  padding: 0.4375rem 0.75rem;
  border-radius: 6px;
  color: var(--c-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.lang-menu a:hover {
  background: var(--c-surface-2);
  color: var(--c-text);
  text-decoration: none;
}
.lang-menu a[aria-current] { color: var(--c-text); font-weight: 700; }

/* Inside the mobile slide-down nav, the menu flows in-panel instead of floating. */
@media (max-width: 719.98px) {
  .site-nav .lang-switcher { position: static; }
  .site-nav .lang-menu {
    position: static;
    min-width: 0;
    margin-top: var(--sp-1);
    background: var(--c-surface);
    box-shadow: none;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    position: static;
    background: none;
    border: 0;
    padding: 0;
  }
  .site-nav ul {
    flex-direction: row;
    gap: var(--sp-3);
    margin: 0;
  }
  .site-nav ul a { padding: 0.25rem 0; font-size: 0.9rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: #3b82f6; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-accent-hi); transform: translateY(-1px); }

.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--sp-8) 0 var(--sp-6);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(56rem 28rem at 85% -20%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(40rem 22rem at -10% 120%, rgba(59, 130, 246, 0.07), transparent 60%);
}
.hero .container { position: relative; max-width: 54rem; }

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-3);
}

.hero-sub {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--c-muted);
  max-width: 44rem;
  margin-bottom: var(--sp-4);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* ---------- Proof-point bar ---------- */
.proof-bar {
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg-raise);
  padding: var(--sp-3) 0;
}
.proof-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
}
.proof-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.proof-list .icon { width: 1em; height: 1em; color: var(--c-accent-hi); }

/* ---------- Sections ---------- */
.section { padding: var(--sp-8) 0; }
.section + .section { border-top: 1px solid var(--c-border-soft); }

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--sp-2);
}
.section-title::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--c-accent);
  margin-bottom: var(--sp-2);
}

.section-sub {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}

.section-intro {
  color: var(--c-muted);
  font-size: 1.0625rem;
  max-width: 40rem;
  margin-bottom: var(--sp-6);
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  padding: var(--sp-4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--c-border); transform: translateY(-2px); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--c-accent-soft);
  color: var(--c-accent-hi);
  margin-bottom: var(--sp-3);
}
.card-icon .icon { width: 24px; height: 24px; }

/* Offers */
.offer-grid {
  display: grid;
  gap: var(--sp-3);
}
@media (min-width: 720px) {
  .offer-grid { grid-template-columns: 1fr 1fr; }
}

.offer h3 { font-size: 1.25rem; }
.offer-promise { color: var(--c-muted); }

.check-list {
  list-style: none;
  margin: var(--sp-3) 0;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
}
.check-list li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--c-text);
}
.check-list .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  color: var(--c-ok);
}

.offer-proof {
  margin: 0;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--c-border-soft);
  font-size: 0.875rem;
  color: var(--c-faint);
}

/* ---------- How we work ---------- */
.steps {
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  display: grid;
  gap: var(--sp-3);
  counter-reset: step;
}
@media (min-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step { counter-increment: step; }
.step::before {
  content: "0" counter(step);
  display: block;
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--c-accent-hi);
  margin-bottom: var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.25rem; }
.step p { color: var(--c-muted); margin: 0; }

.engagement-strip {
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius-sm);
  background: var(--c-bg-raise);
  font-size: 0.875rem;
  color: var(--c-muted);
  letter-spacing: 0.01em;
}

/* ---------- Luca AI section ---------- */
.section-luca {
  background:
    radial-gradient(48rem 24rem at 70% 0%, rgba(59, 130, 246, 0.1), transparent 65%),
    var(--c-bg-raise);
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
}
.section-luca .container { max-width: 50rem; }
.section-luca p { color: var(--c-muted); font-size: 1.0625rem; }

.luca-pull {
  color: var(--c-text) !important;
  font-weight: 600;
  border-inline-start: 3px solid var(--c-accent);
  padding-inline-start: var(--sp-2);
}

.luca-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* ---------- About / values ---------- */
.about-narrative { max-width: 46rem; }
.about-narrative p { color: var(--c-muted); font-size: 1.0625rem; }
.about-heading { font-size: 1.375rem; margin-top: var(--sp-6); }

.values-grid {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
@media (min-width: 720px) {
  .values-grid { grid-template-columns: 1fr 1fr; }
}
.value h4 { font-size: 1.0625rem; margin-bottom: var(--sp-1); }
.value p { margin: 0; color: var(--c-muted); font-size: 0.9375rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-4);
}
@media (min-width: 1080px) {
  .contact-grid { grid-template-columns: 2fr 3fr; }
}

.contact-details p { color: var(--c-muted); }
.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.contact-line .icon { color: var(--c-accent-hi); margin-top: 0.25rem; }

.contact-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.contact-form h3 { font-size: 1.25rem; }

.form-legend { font-size: 0.8125rem; color: var(--c-faint); }

.field { margin-bottom: var(--sp-3); }

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  font: inherit;
  color: var(--c-text);
  background: var(--c-bg-raise);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--c-faint); opacity: 1; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent-hi);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--c-err); }

.field textarea { resize: vertical; min-height: 8rem; }

.field-error {
  margin: var(--sp-1) 0 0;
  font-size: 0.8125rem;
  color: var(--c-err);
}

/* honeypot — hidden from humans, present for bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile { margin-bottom: var(--sp-3); min-height: 65px; }

.form-privacy { font-size: 0.8125rem; color: var(--c-faint); }

.form-msg {
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
}
.form-msg.is-ok {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--c-ok);
}
.form-msg.is-err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--c-err);
}

/* ---------- Prose (legal pages, case studies) ---------- */
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: var(--sp-2); }
.prose h2 { font-size: 1.375rem; margin-top: var(--sp-6); }
.prose p, .prose li { color: var(--c-muted); }
.prose strong { color: var(--c-text); }
.prose ul { display: grid; gap: var(--sp-1); }

.page-head { padding: var(--sp-8) 0 var(--sp-4); }
.page-head .intro {
  font-size: 1.0625rem;
  color: var(--c-muted);
  max-width: 44rem;
  margin: 0;
}

.date-line { color: var(--c-faint); font-size: 0.9375rem; }

/* ---------- Work page ---------- */
.case-study {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--c-border-soft);
}
.case-study .container { max-width: 50rem; }
.case-study h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--sp-1); }

.case-context {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-accent-hi);
  margin-bottom: var(--sp-3);
}

.cta-final {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--c-border-soft);
  text-align: center;
}
.cta-final p {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

/* ---------- 404 ---------- */
.page-404 { padding: var(--sp-12) 0; }
.page-404 section { margin-bottom: var(--sp-8); }
.page-404 h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.page-404 p { color: var(--c-muted); max-width: 38rem; margin-bottom: var(--sp-3); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-border-soft);
  background: var(--c-bg-raise);
  padding: var(--sp-6) 0 var(--sp-4);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-tagline { font-weight: 600; color: var(--c-text); }
.footer-trust {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--c-muted);
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-faint);
  margin-bottom: var(--sp-2);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
}
.footer-col a { color: var(--c-muted); }
.footer-col a:hover { color: var(--c-text); }

.footer-meta {
  border-top: 1px solid var(--c-border-soft);
  padding-top: var(--sp-3);
  color: var(--c-faint);
  font-size: 0.8125rem;
}
.footer-meta p { margin-bottom: var(--sp-1); }

/* ---------- RTL (Arabic) ----------
   Layout flips automatically: flex/grid follow the writing mode, and the
   handful of start-edge rules above use CSS logical properties. The
   overrides below cover what logical properties cannot express. */

/* Arabic joined script must never be letter-spaced. */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] .brand,
[dir="rtl"] .proof-list li,
[dir="rtl"] .engagement-strip,
[dir="rtl"] .case-context,
[dir="rtl"] .footer-heading,
[dir="rtl"] .step::before { letter-spacing: 0; }

/* Email addresses are LTR runs; keep the caret order Latin while the
   field stays visually aligned with the RTL form. */
[dir="rtl"] .field input[type="email"] { direction: ltr; text-align: right; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card:hover, .btn:hover { transform: none; }
}
