/* ============================================================
   FABULOUS CODE — Software agency
   Foundry identity, extended from the FABULOUS holding site
   ============================================================ */

:root {
  --ink:        #0A0A0C;
  --ink-panel:  #131318;
  --bone:       #EDEBE4;
  --bone-dim:   #9A9AA3;
  --muted:      #83838C;
  --line:       rgba(237, 235, 228, 0.10);
  --line-soft:  rgba(237, 235, 228, 0.06);
  --cobalt:     #4B57FF;
  --cobalt-hi:  #6B78FF;
  --gold:       #E8B23A;
  --gold-hi:    #F6CB5E;

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body:    "Archivo", system-ui, -apple-system, sans-serif;
  --ff-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --edge: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1180px;
}

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

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

body.site {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--ff-body);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--cobalt); color: #fff; }

/* ============================================================
   Atmosphere — furnace glow, automation lattice, grain
   ============================================================ */
.atmosphere { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.lattice {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 96px);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
  opacity: 0.7;
}

.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.glow--cobalt {
  top: -18vmax; left: -12vmax; width: 55vmax; height: 55vmax;
  background: radial-gradient(circle, rgba(75,87,255,0.55), transparent 62%);
}
.glow--gold {
  top: 40vmax; right: -14vmax; width: 58vmax; height: 58vmax;
  background: radial-gradient(circle, rgba(232,178,58,0.42), transparent 60%);
}

.grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Shell — scrolling layout
   ============================================================ */
.shell {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vh, 2rem) var(--edge) 0;
}

/* ---- topbar ------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding: clamp(0.7rem, 1.6vh, 1rem) var(--edge);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brandmark {
  display: inline-flex; align-items: baseline; gap: 0.4em;
  font-family: var(--ff-display); font-weight: 800;
  font-size: 0.95rem; letter-spacing: 0.14em;
  color: var(--bone);
}
.brandmark span { color: var(--muted); font-weight: 700; }
.topbar__meta {
  font-family: var(--ff-mono); font-size: 0.7rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted);
}
.topbar__actions { display: flex; align-items: center; gap: 0.9rem; }

@media (max-width: 760px) { .topbar__meta { display: none; } }

/* ---- buttons ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.7rem 1.15rem; border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--bone);
  transition: color .25s, border-color .25s, background .25s, transform .25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }
.btn--primary {
  color: var(--ink);
  background: linear-gradient(96deg, var(--gold-hi), var(--gold));
  border-color: var(--gold);
  font-weight: 600;
}
.btn--primary:hover { box-shadow: 0 10px 30px -12px rgba(232,178,58,0.6); }
.btn--ghost:hover { color: var(--gold); border-color: rgba(232,178,58,0.5); }

@media (max-width: 540px) {
  .topbar__actions .btn--ghost { display: none; }
  .topbar__inner { gap: 0.6rem; }
  .brandmark { letter-spacing: 0.08em; }
  .topbar .btn {
    padding: 0.6rem 0.85rem;
    font-size: 0.66rem; letter-spacing: 0.08em;
    white-space: nowrap;
  }
}

/* ============================================================
   Section scaffolding
   ============================================================ */
.section { padding: clamp(3.5rem, 9vh, 7rem) 0; }
.section--tight { padding: clamp(2.5rem, 6vh, 4.5rem) 0; }

.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: clamp(1.6rem, 4vh, 2.8rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow__tick {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(232,178,58,0.18);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.label {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone);
}
.label::before { content: "// "; color: var(--cobalt-hi); }
.label__count {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; color: var(--muted);
}

.section__title {
  font-family: var(--ff-display); font-weight: 800;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1.02; letter-spacing: -0.015em; color: var(--bone);
  max-width: 22ch; text-wrap: balance;
}
.section__intro {
  max-width: 52ch; margin-top: 0.9rem;
  font-size: clamp(1rem, 0.97rem + 0.3vw, 1.15rem);
  color: #C9C7BE; line-height: 1.6;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(2.5rem, 8vh, 6rem) 0 clamp(2.5rem, 6vh, 4.5rem);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(0.9rem, 2.2vh, 1.6rem);
}
.wordmark {
  font-family: var(--ff-display); font-weight: 900;
  font-size: clamp(2.9rem, 11.5vw, 11rem);
  line-height: 0.9; letter-spacing: -0.02em;
  background: linear-gradient(96deg,
    #F4F1E6 12%, var(--gold-hi) 34%, #F4F1E6 52%, #D9D4C6 74%, #F4F1E6 92%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 9s ease-in-out infinite;
  text-wrap: balance;
}
.wordmark span {
  display: block;
  background: none; -webkit-text-fill-color: initial; color: var(--muted);
  font-weight: 800;
  font-size: clamp(1.9rem, 7vw, 6.6rem);
  letter-spacing: 0.02em;
}
@keyframes sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.lede {
  max-width: 50ch;
  font-size: clamp(1.05rem, 0.98rem + 0.6vw, 1.5rem);
  line-height: 1.5; color: #C9C7BE;
}
.lede em { font-style: normal; color: var(--bone); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 4vw, 3rem);
  margin-top: clamp(1rem, 3vh, 2rem);
  padding-top: clamp(1rem, 3vh, 1.8rem);
  border-top: 1px solid var(--line);
  width: 100%;
}
.stat__num {
  font-family: var(--ff-display); font-weight: 800;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  color: var(--bone); line-height: 1;
}
.stat__label {
  margin-top: 0.35rem;
  font-family: var(--ff-mono); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

/* ============================================================
   Press / references row
   ============================================================ */
.press {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: clamp(1rem, 4vw, 2.6rem);
  padding: clamp(1.4rem, 4vh, 2.2rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.press__label {
  font-family: var(--ff-mono); font-size: 0.66rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.press__logos {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: clamp(0.9rem, 3.5vw, 2.4rem);
}
.press__logos span {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.25rem);
  color: var(--bone-dim); letter-spacing: 0.01em;
  opacity: 0.72; transition: opacity .25s, color .25s;
}
.press__logos span:hover { opacity: 1; color: var(--bone); }

/* ============================================================
   Services grid — reuses the venture card treatment
   ============================================================ */
.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.7rem, 1.4vw, 1.1rem);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: clamp(1.15rem, 2vw, 1.7rem);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, background .3s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 20% 0%, rgba(75,87,255,0.14), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: rgba(232,178,58,0.4); }
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }
.card:hover::after, .card:focus-within::after { opacity: 1; }

.card__index {
  font-family: var(--ff-mono); font-size: 0.66rem;
  letter-spacing: 0.16em; color: var(--cobalt-hi);
}
.card__title {
  font-family: var(--ff-display); font-weight: 800;
  font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.6rem);
  line-height: 1.05; letter-spacing: -0.01em; color: var(--bone);
}
.card__desc { font-size: 0.92rem; line-height: 1.55; color: #B4B2AA; flex: 1; }
.card__tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  font-family: var(--ff-mono); font-size: 0.64rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin-top: 0.2rem;
}
.card__tags span::before { content: "· "; color: var(--gold); }

/* ============================================================
   Strengths — "Was macht uns FABULOUS?"
   ============================================================ */
.why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.6rem);
}
.why__item {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.why__mark {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; color: var(--gold);
}
.why__title {
  font-family: var(--ff-display); font-weight: 700;
  font-size: 1.12rem; color: var(--bone);
}
.why__desc { font-size: 0.92rem; line-height: 1.55; color: #B4B2AA; }

/* ============================================================
   Process — Intro Call → Konzept → Umsetzung
   ============================================================ */
.steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
  counter-reset: step;
}
.step {
  position: relative;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: clamp(1.2rem, 2vw, 1.8rem);
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}
.step__num {
  font-family: var(--ff-mono); font-size: 0.78rem;
  color: var(--cobalt-hi); letter-spacing: 0.16em;
}
.step__title {
  font-family: var(--ff-display); font-weight: 800;
  font-size: 1.35rem; color: var(--bone); letter-spacing: -0.01em;
}
.step__desc { font-size: 0.92rem; line-height: 1.55; color: #B4B2AA; }

/* ============================================================
   Contact / CTA
   ============================================================ */
.contact {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(2rem, 6vw, 4rem);
  background: linear-gradient(160deg, rgba(75,87,255,0.10), rgba(232,178,58,0.06) 70%, transparent);
}
.contact::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(80% 120% at 10% 0%, rgba(75,87,255,0.18), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(232,178,58,0.16), transparent 55%);
  opacity: 0.9;
}
.contact > * { position: relative; z-index: 1; }
.contact__title {
  font-family: var(--ff-display); font-weight: 900;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.4rem);
  line-height: 1; letter-spacing: -0.02em; color: var(--bone);
  max-width: 18ch; text-wrap: balance;
}
.contact__intro {
  max-width: 48ch; margin-top: 1rem; color: #D6D4CB; line-height: 1.6;
  font-size: clamp(1rem, 0.97rem + 0.3vw, 1.15rem);
}
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.contact__direct {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  margin-top: 2rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.contact__direct a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  color: var(--bone); transition: color .2s;
}
.contact__direct a:hover { color: var(--gold); }
.contact__direct a span { color: var(--muted); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-top: clamp(3rem, 8vh, 6rem);
  padding: clamp(1.2rem, 3vh, 2rem) 0 clamp(2rem, 4vh, 3rem);
  border-top: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--muted);
}
.footer__copy { color: var(--bone); }
.footer__by { text-transform: uppercase; letter-spacing: 0.16em; }
.footer__by a { color: var(--muted); transition: color .2s; }
.footer__by a:hover { color: var(--gold); }
.footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer__links a { transition: color .2s; }
.footer__links a:hover { color: var(--gold); }
.footer__links a:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }

/* ============================================================
   Load reveal
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms + 60ms);
}
.reveal-in [data-reveal] { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid, .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark { animation: none; background-position: 0 50%; }
  .eyebrow__tick { animation: none; }
  .glow { transition: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}
