/* ─────────────────────────────────────────────
   AI Pirates — Shared Stylesheet
   Used by all pages (DE + EN)
───────────────────────────────────────────── */

/* ── Tailwind Utility Replacement (merged from tailwind.css) ── */
.flex          { display: flex; }
.block         { display: block; }
.relative      { position: relative; }
.sticky        { position: sticky; }
.top-0         { top: 0; }
.z-50          { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.px-5          { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-4          { padding-top: 1rem; padding-bottom: 1rem; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.text-white    { color: #fff; }
.border-b          { border-bottom-width: 1px; border-bottom-style: solid; }
.border-white\/5   { border-color: rgb(255 255 255 / 0.05); }
@media (min-width: 1024px) { .lg\:hidden { display: none !important; } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes spinRev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes marqueeX { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Compositing hints for GPU-accelerated animations */
[style*="animation:pulse"],
[style*="animation:floatY"],
[style*="animation:twinkle"],
[style*="animation:spin"],
[style*="animation:spinRev"],
[style*="animation:orbitCW"],
[style*="animation:counterOrbit"] {
  will-change: transform, opacity;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: #020617;
  color: #e2e8f0;
  margin: 0;
  overflow-x: hidden;
}

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 60px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.main-wrap {
  flex: 1;
  min-width: 0;
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main-wrap { margin-left: 60px; }
}

/* ── Blueprint Grid Background ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ── Cards & Glass ── */
.glass {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.12);
  transition: border-color .3s, box-shadow .3s;
}

.glass:hover {
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1023px) {
  header.glass {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
}

.holo {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(0, 240, 255, 0.15);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}

.holo:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.08);
}

/* ── Typography ── */
.label {
  font-size: 11px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #ff2a2a;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .2s;
  cursor: default;
}

.pill:hover { transform: translateY(-1px); }

.grad-c {
  background: linear-gradient(135deg, #00f0ff, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-c { text-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
.glow-r { text-shadow: 0 0 20px rgba(255, 42, 42, 0.4); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.25), transparent);
  margin: 24px 0;
}

/* ── Scrollbar Hide ── */
.noscroll::-webkit-scrollbar { display: none; }
.noscroll { scrollbar-width: none; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sidebar Nav Icons ── */
.nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .2s;
  color: #94a3b8;
}

.nav-icon:hover {
  background: rgba(0, 240, 255, 0.08);
  color: #00f0ff;
}

.nav-icon.active-page {
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.06);
}

/* ── Desktop Top Nav ── */
#top-nav {
  position: fixed;
  top: 0;
  left: 60px;
  right: 0;
  height: 64px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(2, 6, 23, 0);
  border-bottom: 1px solid transparent;
  transition: background .45s ease, border-color .45s ease, backdrop-filter .45s ease, box-shadow .45s ease;
  animation: navSlideDown .9s cubic-bezier(.22, 1, .36, 1) both;
}

@media (min-width: 1024px) {
  #top-nav { display: flex; }
}

#top-nav.scrolled {
  background: rgba(2, 6, 23, 0.88);
  border-bottom-color: rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.top-nav-link {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #94a3b8;
  text-decoration: none;
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}

.top-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 100%;
  height: 1px;
  background: #00f0ff;
  transition: right .25s ease;
}

.top-nav-link:hover { color: #00f0ff; }
.top-nav-link:hover::after { right: 0; }

.top-nav-link.active { color: #e2e8f0; }
.top-nav-link.active::after { right: 0; background: #ff2a2a; }

/* ── Desktop Dropdown ── */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown > .top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown > .top-nav-link .chevron {
  transition: transform .25s ease;
}

.nav-dropdown:hover > .top-nav-link .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  padding: 12px 0;
  margin-top: 12px;
  background: rgba(8, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* invisible bridge so hover doesn't break between trigger and menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown-item {
  display: block;
  padding: 8px 20px;
  font-size: 10px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #94a3b8;
  text-decoration: none;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.06);
}

.nav-dropdown-item.active {
  color: #e2e8f0;
  border-left: 2px solid #ff2a2a;
}

/* ── Mobile Services Toggle ── */
.mobile-services-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-services-toggle .chevron-m {
  transition: transform .25s ease;
  color: #64748b;
}

.mobile-services-toggle.open .chevron-m {
  transform: rotate(180deg);
}

.mobile-services-sub {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0 0 20px;
  border-left: 1px solid rgba(0, 240, 255, 0.15);
}

.mobile-services-sub.open {
  display: flex;
}

/* ── CTA Button ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff2a2a;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  box-shadow: 0 0 0 rgba(255, 42, 42, 0);
}

.btn-cta:hover {
  background: #e01f1f;
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.35);
}

/* ── Team Card ── */
.team-card {
  background: #080f1e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
}

.team-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateY(-4px);
}

/* ── Service Cell ── */
.svc-cell {
  background: #080f1e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 36px;
  transition: background .3s, transform .3s, box-shadow .3s;
}

.svc-cell:hover {
  background: #0d1526;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.svc-bullet {
  transition: color .3s, transform .3s;
  cursor: default;
  color: #94a3b8 !important;
}

.svc-bullet:hover {
  color: #00f0ff !important;
  transform: translateX(4px);
}

/* ── AI Automation Page — Card Hover Effects ── */
.tech-card,
.compliance-card,
.usecase-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.25) !important;
}
.compliance-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3) !important;
}
.usecase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(168, 85, 247, 0.3) !important;
}
.compare-card {
  transition: transform .3s ease, box-shadow .3s ease;
}
.compare-card.good:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.12);
}
.compare-card.bad:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 28px rgba(255, 42, 42, 0.1);
}
.step-card {
  transition: transform .3s ease, border-color .3s ease;
}
.step-card:hover {
  transform: translateX(6px);
  border-color: rgba(0, 240, 255, 0.3) !important;
}
.step-card:hover .step-num {
  color: #00f0ff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}
.step-num {
  transition: color .3s ease, text-shadow .3s ease;
}

/* ── Mobile Overrides ── */
@media (max-width: 768px) {
  section { padding: 60px 0 !important; }
  section > div { padding: 0 20px !important; }
  section [style*="gap:80px"],
  section [style*="gap: 80px"],
  section [style*="gap:60px"],
  section [style*="gap: 60px"] { gap: 32px !important; }
  footer { padding: 24px 20px !important; }
  footer > div { padding: 0 !important; }
  .hero-orbit { display: none !important; }
  .noscroll {
    padding: 0 20px 20px !important;
    gap: 14px !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-padding-left: 20px;
  }
  .noscroll > a {
    min-width: 82vw !important;
    max-width: 82vw !important;
    scroll-snap-align: center !important;
  }
  .noscroll > a > div:first-child { height: 180px !important; }
  .noscroll > a > div:first-child > img { object-fit: cover !important; padding: 0 !important; }

  /* Case study pages: hero + content */
  [style*="height:480px"] { height: 280px !important; }
  [style*="padding:80px 40px"] { padding: 40px 20px !important; }
  [style*="padding:60px 40px"] { padding: 40px 20px !important; }
  [style*="gap:40px"] { gap: 24px !important; }

  /* Case study: stat boxes font size */
  .stat-box { padding: 16px !important; }
}

/* ── Cookie Banner ── */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 240, 255, 0.15);
  padding: 20px 24px;
  font-family: 'Space Grotesk', sans-serif;
}

#cookie-banner .cookie-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

#cookie-banner p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  flex: 1;
  min-width: 240px;
  line-height: 1.6;
}

#cookie-banner a { color: #00f0ff; text-decoration: underline; }

#cookie-banner .cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }

.btn-accept {
  background: #00f0ff;
  color: #020617;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-reject {
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
}

/* ── Easter Egg Styles ── */
.ee-overlay{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;flex-direction:column;background:rgba(2,6,23,.95);opacity:0;transition:opacity .4s;pointer-events:none}
.ee-overlay.active{opacity:1;pointer-events:auto}
.ee-skull{font-size:120px;animation:ee-pulse 1s ease-in-out infinite alternate}
.ee-title{font-family:'Space Grotesk',sans-serif;font-size:clamp(24px,5vw,48px);font-weight:700;color:#00f0ff;text-shadow:0 0 30px rgba(0,240,255,.6),0 0 60px rgba(0,240,255,.3);margin-top:16px;text-align:center}
.ee-sub{font-size:14px;color:#94a3b8;margin-top:12px;letter-spacing:.15em;font-family:'Courier New',monospace}
@keyframes ee-pulse{from{transform:scale(1);filter:drop-shadow(0 0 20px #ff2d55)}to{transform:scale(1.1);filter:drop-shadow(0 0 40px #00f0ff)}}
@keyframes ee-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
@keyframes ee-flash{0%{opacity:0}50%{opacity:.3}100%{opacity:0}}
.ee-flash{position:fixed;inset:0;background:#00f0ff;z-index:99998;animation:ee-flash .3s ease-out forwards;pointer-events:none}
.ee-toast{position:fixed;bottom:24px;right:24px;z-index:99999;background:rgba(2,6,23,.9);border:1px solid #00f0ff;color:#00f0ff;padding:12px 20px;border-radius:8px;font-family:'Space Grotesk',sans-serif;font-size:14px;box-shadow:0 0 20px rgba(0,240,255,.3);opacity:0;transform:translateY(20px);transition:opacity .3s,transform .3s}
.ee-toast.show{opacity:1;transform:translateY(0)}
.ee-canvas{position:fixed;inset:0;z-index:99998;pointer-events:none;opacity:1;transition:opacity 1s}
.ee-canvas.fade{opacity:0}

/* ── Footer Responsive ── */
footer > div:first-child > div:last-child {
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
}

footer > div:first-child > div:last-child a {
  font-size: 11px !important;
}

@media (max-width: 640px) {
  footer > div:first-child > div:last-child {
    gap: 12px 16px;
    justify-content: flex-start;
  }
}

/* ── Portfolio Case Cards: Mobile Touch CTA ── */
@media (hover: none), (max-width: 768px) {
  .case-overlay {
    opacity: 1 !important;
    background: linear-gradient(transparent 40%, rgba(2,6,23,0.75)) !important;
  }
  .case-overlay-btn {
    position: absolute;
    bottom: 12px;
  }
}

/* ── Skip to Content ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  background: #00f0ff;
  color: #020617;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top .2s;
}

.skip-link:focus {
  top: 0;
}

/* ── Screen Reader Only (Accessibility) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
