/* Roman Web- & Tool-Entwicklung — global styles */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #08090C;
  --surface: #0F1117;
  --surface-2: #15171F;
  --line: #1E2230;
  --line-strong: #2A2F40;
  --ink: #F4F6FA;
  --muted: #8A90A3;
  --accent-from: #6EC1FF;
  --accent-mid: #849BFF;
  --accent-to: #B178FF;
  --accent-from-rgb: 110, 193, 255;
  --accent-mid-rgb: 132, 155, 255;
  --accent-to-rgb: 177, 120, 255;
  --accent-gradient: linear-gradient(90deg, var(--accent-from) 0%, var(--accent-mid) 48%, var(--accent-to) 100%);
  --accent-gradient-soft: linear-gradient(90deg, rgba(var(--accent-from-rgb), 0.16), rgba(var(--accent-to-rgb), 0.12));
  --cyan: var(--accent-from);
  --violet: var(--accent-to);
}

html, body { background: var(--bg); }
body { font-feature-settings: "ss01", "ss02", "cv11"; }

/* Page-wide subtle grain + radial wash so the dark never looks flat. */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(var(--accent-from-rgb),0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(var(--accent-to-rgb),0.08), transparent 60%);
}
#root { position: relative; z-index: 1; }

/* Hairline borders that pick up the cool tint */
.hairline { border: 1px solid var(--line); }
.hairline-strong { border: 1px solid var(--line-strong); }

/* Glass surfaces */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-strong {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Cyan ring on focus / hover */
.ring-cyan-glow { box-shadow: 0 0 0 1px rgba(var(--accent-from-rgb),0.45), 0 8px 40px -10px rgba(var(--accent-to-rgb),0.30); }

/* Headline display sizing & balance */
.display {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* Animated gradient — subtle, slow, never loud */
.grad-anim {
  background: conic-gradient(from 180deg at 50% 50%,
    rgba(var(--accent-from-rgb),0.0) 0deg,
    rgba(var(--accent-from-rgb),0.20) 60deg,
    rgba(var(--accent-to-rgb),0.16) 180deg,
    rgba(var(--accent-mid-rgb),0.10) 300deg,
    rgba(var(--accent-from-rgb),0.0) 360deg);
  filter: blur(60px);
  animation: spin 24s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Marquee track */
.marquee { display: flex; gap: 48px; animation: marquee 60s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Section divider with hairline + monospace tick */
.section-edge {
  border-top: 1px solid var(--line);
}

/* Striped placeholder used for imagery */
.stripes {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.025) 0 12px,
    rgba(255,255,255,0) 12px 24px
  );
  background-color: var(--surface-2);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  font-weight: 500;
  font-size: 14.5px;
  border-radius: 10px;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #061625;
  border: 1px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 44px -14px rgba(var(--accent-mid-rgb),0.62);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: #3A4159; background: rgba(255,255,255,0.02); }

.btn-cyan {
  background: var(--accent-gradient);
  color: #06222E;
  border: 1px solid transparent;
  font-weight: 600;
}
.btn-cyan:hover { box-shadow: 0 10px 44px -12px rgba(var(--accent-mid-rgb),0.65); transform: translateY(-1px); }

/* Card lift on hover */
.card-lift { transition: transform 280ms cubic-bezier(.2,.7,.2,1), border-color 280ms ease, background 280ms ease; }
.card-lift:hover { transform: translateY(-3px); border-color: var(--line-strong); }

/* Custom scrollbar in dark theme */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0A0C12; }
::-webkit-scrollbar-thumb { background: #1E2230; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2A2F40; }

/* Number ticker */
.tabular { font-variant-numeric: tabular-nums; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent-from);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Tooltip-ish small caps tag */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,0.015);
}
.tag-cyan {
  color: #D7E7FF;
  border-color: rgba(var(--accent-mid-rgb),0.42);
  background: var(--accent-gradient-soft);
}

/* Subtle pulse */
@keyframes pulse-soft { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.pulse-soft { animation: pulse-soft 2.4s ease-in-out infinite; }

/* Dotted backdrop for hero stage */
.dotted {
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Section transitions */
section { scroll-margin-top: 88px; }

/* Gradient text utility (used for the cycling headline word). */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

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

.accent-line {
  background: var(--accent-gradient);
}

.floating-icons-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-tool-icon {
  position: absolute;
  opacity: 1;
  --repel-x: 0px;
  --repel-y: 0px;
  transform: translate(var(--repel-x), var(--repel-y));
  transition: transform 170ms cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

.floating-tool-icon-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bubble-size, 5.3rem);
  height: var(--bubble-size, 5.3rem);
  border-radius: 1.55rem;
  color: var(--icon-color, var(--accent-from));
  background:
    radial-gradient(circle at 50% 35%, var(--icon-glow, rgba(var(--accent-from-rgb),0.16)), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.02)),
    #101116;
  border: 1px solid rgba(255,255,255,0.055);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.12),
    0 20px 50px -25px rgba(0,0,0,0.88),
    0 12px 34px -28px var(--icon-color, var(--accent-from));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: floating-icon-drift var(--float-duration, 7s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

.floating-tool-icon-shell svg {
  width: var(--symbol-size, 2.35rem);
  height: var(--symbol-size, 2.35rem);
  color: currentColor;
  filter: drop-shadow(0 8px 18px var(--icon-glow, rgba(var(--accent-from-rgb),0.2)));
}

@keyframes floating-icon-drift {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  25% { transform: translate3d(8px,-10px,0) rotate(4deg); }
  50% { transform: translate3d(0,-16px,0) rotate(-2deg); }
  75% { transform: translate3d(-9px,-7px,0) rotate(-5deg); }
}

@media (max-width: 640px) {
  .floating-tool-icon:nth-child(n+5) { display: none; }
  .floating-tool-icon { opacity: 0.88; }
  .floating-tool-icon-shell {
    width: calc(var(--bubble-size, 5.3rem) * 0.64);
    height: calc(var(--bubble-size, 5.3rem) * 0.64);
    border-radius: 1.05rem;
  }
  .floating-tool-icon-shell svg {
    width: calc(var(--symbol-size, 2.35rem) * 0.64);
    height: calc(var(--symbol-size, 2.35rem) * 0.64);
  }
}

.animated-shader-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #05060a;
}

.animated-shader-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
}

.webgl-shader-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000;
}

.webgl-shader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Beams background — slow pulse on the noise overlay */
@keyframes beams-pulse {
  0%, 100% { opacity: 0.05; }
  50%      { opacity: 0.15; }
}
.beams-pulse { animation: beams-pulse 10s ease-in-out infinite; }

/* Failsafe: if script-driven animations fail (paused iframe, throttled tab, etc.),
   ensure inline opacity:0/transform overrides don't permanently hide content.
   Adds a slow CSS reveal that runs in parallel and wins after the delay. */
@keyframes __mfail_reveal {
  from { opacity: var(--mfail-from, 0); }
  to   { opacity: 1; }
}
.no-fm-failsafe-disabled {} /* allow opt-out */

/* Override inline opacity:0 with CSS after a guaranteed delay (CSS animations
   don't rely on requestAnimationFrame and run on the compositor). */
html body div[style*="opacity: 0"],
html body span[style*="opacity: 0"],
html body section div[style*="opacity:0"] {
  animation: __mfail_reveal 0.6s ease-out 1.2s forwards;
}
html body h1[style*="opacity: 0"],
html body h2[style*="opacity: 0"],
html body p[style*="opacity: 0"] {
  animation: __mfail_reveal 0.6s ease-out 1.2s forwards;
}
