/* ═══════════════════════════════════════
   PEMEC Shared Stylesheet
   All pages reference this file.
═══════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg:   #000;
  --s1:   #0c0c0c;
  --s2:   #131313;
  --s3:   #1a1a1a;
  --ln:   rgba(255,255,255,0.07);
  --ln2:  rgba(255,255,255,0.04);
  --cyan: #13eaff;
  --t0:   #ffffff;
  --t1:   rgba(255,255,255,0.72);
  --t2:   rgba(255,255,255,0.4);
  --font: 'Figtree', system-ui, -apple-system, sans-serif;
  --mono: 'Figtree', system-ui, sans-serif;
  --w:    1080px;
  --sp:   cubic-bezier(0.16,1,0.3,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--t0);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; font-feature-settings: 'rlig' 1, 'calt' 1;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }

/* ── Layout ── */
.w    { max-width: var(--w); margin: 0 auto; padding: 0 36px; }
section { padding: 104px 0; }
.rule { height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(19,234,255,0.18) 30%, rgba(19,234,255,0.22) 50%, rgba(19,234,255,0.18) 70%, transparent 100%); }

/* ── Type ── */
.t-d1 { font-size: clamp(2.6rem,5.2vw,4.8rem);  font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
.t-d2 { font-size: clamp(2rem,3.8vw,3.4rem);    font-weight: 550; line-height: 1.12; letter-spacing: -0.02em; }
.t-h3 { font-size: clamp(1.25rem,2vw,1.6rem);   font-weight: 550; line-height: 1.22; letter-spacing: -0.02em; }
.t-body { font-size: 1.125rem; font-weight: 500; line-height: 1.5; letter-spacing: -0.02em; color: var(--t1); }
section .t-body { text-align: left; }
.t-sm   { font-size: 0.9375rem; font-weight: 500; line-height: 1.5; letter-spacing: -0.02em; color: var(--t1); }
.t-xs   { font-size: 0.8125rem; font-weight: 500; color: var(--t2); }
.t-mono { font-size: 0.7rem; letter-spacing: 0.06em; }

.pill {
  display: inline-block; padding: 5px 14px; margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  font-size: 0.75rem; font-weight: 500; color: var(--t1);
  background: rgba(255,255,255,0.05); letter-spacing: 0.02em;
}
.sec-hd { text-align: center; max-width: 700px; margin: 0 auto 64px; }
.sec-hd .t-body { margin-top: 14px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-weight: 600; font-size: 0.9rem;
  letter-spacing: -0.01em; cursor: pointer; border: none;
  text-decoration: none; white-space: nowrap;
  transition: all 0.18s var(--sp); border-radius: 9px; padding: 13px 22px;
}
.btn-p { background: var(--cyan); color: #000; box-shadow: 0 0 0 1px rgba(19,234,255,0.3), 0 1px 3px rgba(0,0,0,0.4); }
.btn-p:hover { background: #fff; color: #000; box-shadow: 0 0 0 1px rgba(255,255,255,0.4), 0 6px 20px rgba(19,234,255,0.2); transform: translateY(-1px); }
.btn-s { background: transparent; color: var(--t1); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.btn-s:hover { color: var(--t0); border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.04); }
.lnk { display: inline-flex; align-items: center; gap: 5px; font-size: 0.875rem; font-weight: 550; color: var(--t2); text-decoration: none; transition: color 0.15s, gap 0.15s; letter-spacing: -0.01em; }
.lnk:hover { color: var(--cyan); gap: 9px; }

/* ── Nav ── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 800; background: rgba(0,0,0,0.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--ln); transition: border-color 0.3s; }
.nav-i { max-width: var(--w); margin: 0 auto; padding: 0 36px; height: 62px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo img { height: 26px; }
.logo-fb { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.05em; color: var(--t0); display: none; }
.nav-links { display: flex; flex: 1; gap: 1px; }
.nl { font-size: 0.875rem; font-weight: 500; color: var(--t2); text-decoration: none; padding: 6px 12px; border-radius: 7px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.nl:hover { color: var(--t0); background: rgba(255,255,255,0.05); }
.nl.active { color: var(--t0); background: rgba(255,255,255,0.05); }
.nav-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-t { font-size: 0.68rem; color: var(--t2); background: transparent; border: 1px solid var(--ln); border-radius: 6px; padding: 5px 10px; cursor: pointer; transition: all 0.15s; }
.lang-t:hover { color: var(--t1); }
.hbg { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--t2); line-height: 0; }
.mob-m { display: none; position: fixed; top: 62px; inset: 0; background: rgba(0,0,0,0.97); backdrop-filter: blur(24px); z-index: 799; flex-direction: column; padding: 20px 36px; gap: 2px; }
.mob-m.open { display: flex; }
.mob-m .nl { font-size: 1.1rem; padding: 14px 10px; }
.mob-bot { margin-top: auto; padding-bottom: 36px; display: flex; flex-direction: column; gap: 10px; }

/* ── Sub-page hero (no stars/sphere) ── */
.page-hero {
  padding: 140px 0 80px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(19,234,255,0.18) 0%, rgba(19,234,255,0.06) 40%, transparent 70%),
    var(--bg);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none; z-index: 0;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}
.page-hero::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(19,234,255,0.6) 30%, rgba(19,234,255,0.8) 50%, rgba(19,234,255,0.6) 70%, transparent);
  z-index: 2;
}
.page-hero .w { position: relative; z-index: 1; text-align: center; }
.page-hero .pill { margin-bottom: 20px; }
.page-hero .t-d1 { margin-bottom: 18px; max-width: 860px; margin-left: auto; margin-right: auto; }
.page-hero .t-body { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Cards ── */
.dcard {
  background: var(--s2); border-radius: 16px; border: 1px solid var(--ln);
  overflow: hidden; position: relative;
}
.dcard::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(19,234,255,0.35), transparent); z-index: 1;
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 0.78rem; padding: 5px 12px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--ln); color: var(--t1); }

/* ── FAQ ── */
.faq-items { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--ln2); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; gap: 20px; user-select: none; }
.faq-qt { font-size: 0.95rem; font-weight: 550; color: var(--t1); transition: color 0.15s; }
.faq-q:hover .faq-qt { color: var(--t0); }
.faq-ic { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.04); border: 1px solid var(--ln); display: flex; align-items: center; justify-content: center; color: var(--t2); font-size: 1rem; line-height: 1; transition: all 0.2s; flex-shrink: 0; }
.faq-item.open .faq-ic { background: rgba(19,234,255,0.1); border-color: rgba(19,234,255,0.25); color: var(--cyan); transform: rotate(45deg); }
.faq-item.open .faq-qt { color: var(--t0); }
.faq-a  { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-ai { padding-bottom: 20px; font-size: 0.9rem; color: var(--t1); line-height: 1.5; }
.faq-item.open .faq-a { max-height: 300px; }

/* ── CTA box ── */
.cta-box { padding: 0 36px 100px; max-width: var(--w); margin: 0 auto; }
.cta-inner {
  background: radial-gradient(ellipse 90% 130% at 50% 110%, rgba(19,234,255,0.09) 0%, transparent 65%), var(--s1);
  border: 1px solid rgba(19,234,255,0.11); border-radius: 20px; padding: 88px 48px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-inner::before { content: ''; position: absolute; bottom: -1px; left: 25%; right: 25%; height: 1px; background: linear-gradient(90deg, transparent, rgba(19,234,255,0.35), transparent); }
.cta-inner .t-d2  { max-width: 520px; margin: 0 auto 16px; }
.cta-inner .t-body{ max-width: 400px; margin: 0 auto 36px; }


/* ── Scroll reveal ── */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--sp), transform 0.7s var(--sp); }
.rv.in { opacity: 1; transform: translateY(0); }
.rv.d1{transition-delay:.1s} .rv.d2{transition-delay:.2s} .rv.d3{transition-delay:.3s} .rv.d4{transition-delay:.4s}

/* ── Responsive ── */
@media(max-width:900px){
  .nav-links{display:none} .hbg{display:block}
  section{padding:80px 0}
}
@media(max-width:600px){
  section{padding:64px 0} .w{padding:0 20px}
  .cta-box{padding:0 20px 64px} .cta-inner{padding:56px 24px}
  .page-hero{padding:120px 0 60px}
}

/* ── Dropdown Navigation ── */
.nav-drop {
  position: relative;
  display: inline-flex; align-items: center; height: 100%;
}
.nav-drop-menu {
  position: absolute;
  /* top: 100% with padding-top bridges hover gap without breaking pointer */
  top: 100%; left: 50%;
  transform: translateX(-50%);
  padding-top: 8px;           /* visual gap — part of element so hover stays */
  opacity: 0; pointer-events: none; display: flex; flex-direction: column;
  transition: opacity 0.18s ease;
}
.nav-drop-menu-inner {
  background: rgba(10,10,10,0.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--ln); border-radius: 12px;
  padding: 6px; min-width: 240px; z-index: 900;
  display: flex; flex-direction: column;
}
.nav-drop:hover .nav-drop-menu {
  opacity: 1; pointer-events: auto;
}
.nav-drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--t2);
  font-size: 0.85rem; font-weight: 500;
  transition: background 0.12s, color 0.12s; white-space: nowrap;
}
.nav-drop-item:hover { background: rgba(255,255,255,0.05); color: var(--t0); }
.nav-drop-item-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(19,234,255,0.4); flex-shrink: 0; }
.nl-arrow {
  display: inline-block; margin-left: 5px; vertical-align: middle;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(19,234,255,0.7);
  position: relative; top: -1px;
}

/* ── New Footer ── */
footer {
  background:
    radial-gradient(ellipse 55% 90% at 15% 0%, rgba(19,234,255,0.06) 0%, transparent 55%),
    var(--s1);
  border-top: 1px solid rgba(19,234,255,0.1);
  padding: 0;
}
.foot-main {
  max-width: var(--w); margin: 0 auto; padding: 72px 36px 60px;
  display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 60px; align-items: start;
}
.foot-brand-name {
  font-size: 2.4rem; font-weight: 700; color: var(--cyan);
  letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px;
}
.foot-tagline-big {
  font-size: 1.7rem; font-weight: 600; color: var(--t0);
  letter-spacing: -0.03em; line-height: 1.2;
}
.foot-nav-label {
  font-size: 0.82rem; font-weight: 600; color: var(--t2);
  margin-bottom: 16px; letter-spacing: 0.02em;
}
.foot-nav-links { display: flex; flex-direction: column; gap: 10px; }
.foot-nav-link {
  font-size: 0.95rem; color: var(--t1); text-decoration: none;
  transition: color 0.15s; font-weight: 500;
}
.foot-nav-link:hover { color: var(--t0); }
.foot-bottom {
  border-top: 1px solid var(--ln); padding: 18px 36px;
}
.foot-bottom-inner {
  max-width: var(--w); margin: 0 auto;
}
.foot-copy-italic {
  font-size: 0.8rem; color: var(--t2); font-style: italic;
}
@media(max-width:700px){
  .foot-main { grid-template-columns: 1fr; gap: 48px; padding: 48px 20px 40px; }
  .foot-bottom { padding: 16px 20px; }
}
/* ── Barrierefreiheit / WCAG 2.1 AA ──
   Pemec ist als Kleinstunternehmen + B2B von BFSG befreit.
   Grundlegende Accessibility-Standards trotzdem implementiert.
───────────────────────────────────── */

/* Skip-Link: ermöglicht Tastaturnutzern direkten Sprung zum Inhalt */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 9999;
  background: #13eaff; color: #000; padding: 8px 16px;
  border-radius: 0 0 8px 8px; font-size: 0.875rem; font-weight: 700;
  text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Fokus-Indikatoren für Tastaturnavigation (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #13eaff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Farbkontrast-Anpassungen (WCAG 1.4.3 — mind. 4.5:1 für Normaltext) */
/* rgba(255,255,255,0.72) auf #000 = ~7:1 ✓ */
/* rgba(255,255,255,0.4)  auf #000 = ~3:1 — nur für große Texte/UI */

/* Animationen reduzieren für Nutzer mit Bewegungsempfindlichkeit (WCAG 2.3.3) */
@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;
  }
  .rv { opacity: 1; transform: none; }
}

/* ── Mobile & Tablet Optimierungen ──────────────────────
   Systematisch geprüft und ergänzt für 390px (iPhone)
   und 768px (iPad)
───────────────────────────────────────────────────── */

/* Tablet (768px) */
@media(max-width:768px){
  /* FAQ: linke sticky Spalte kollabieren */
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq-left   { position: static; margin-bottom: 0; }

  /* Footer: 3-Spalten → 1-Spalte */
  .foot-main  { grid-template-columns: 1fr; gap: 36px; padding: 48px 20px 36px; }
  .foot-bottom{ padding: 16px 20px; }

  /* Abstände verkleinern */
  .twocol { gap: 36px; }
  section { padding: 80px 0; }
}

/* Mobile (600px) */
@media(max-width:600px){
  /* Touch-Targets: mind. 44px */
  .hbg      { padding: 8px; min-width: 44px; min-height: 44px; display:flex; align-items:center; justify-content:center; }
  .lang-t   { padding: 8px 12px; min-height: 44px; display:flex; align-items:center; }

  /* Context Strip */
  .ctx-i    { height: auto; min-height: 46px; flex-wrap: wrap; padding: 8px 20px; gap: 0; }
  .ctx-item { padding: 6px 12px; height: auto; }
  .ctx-item:nth-child(n+3) { display: none; }

  /* Hero */
  .hero-c   { padding: 56px 20px 64px; }
  .hero-pill{ margin-bottom: 24px; }
  .sec-hd   { margin-bottom: 40px; }

  /* Karten-Padding reduzieren */
  .ap-card  { padding: 22px 18px; }
  .svc-card { padding: 22px 18px; }
  .fit-col  { padding: 22px 18px; }
  .dcard    { border-radius: 12px; }

  /* Prozess: Verbindungslinie ausblenden */
  .proc-grid::before { display: none; }
  .proc-step{ padding: 22px 18px; }

  /* Abstände */
  section   { padding: 60px 0; }
  .w        { padding: 0 18px; }
  .twocol   { gap: 28px; }
  .nav-i    { padding: 0 20px; }
  .mob-m    { padding: 16px 20px; }

  /* Body-Text etwas kleiner */
  .t-body   { font-size: 1rem; line-height: 1.65; }
  .t-sm     { font-size: 0.875rem; }

  /* CRM Card: kein fixes min-height auf Mobile */
  .crm-col  { min-height: 0 !important; position: static !important; }
  #crmCard  { position: static !important; }

  /* Footer */
  .foot-brand-name   { font-size: 1.8rem; }
  .foot-tagline-big  { font-size: 1.3rem; }
}

/* Sehr kleines Mobile (390px iPhone) */
@media(max-width:420px){
  .t-d1 { font-size: clamp(2rem,8vw,2.6rem); }
  .t-d2 { font-size: clamp(1.6rem,6.5vw,2rem); }
  .t-h3 { font-size: clamp(1.1rem,5vw,1.4rem); }
  section { padding: 48px 0; }
  .w     { padding: 0 16px; }
  .btn   { padding: 11px 18px; font-size: 0.85rem; }
  .ap-card, .svc-card, .fit-col, .proc-step { padding: 18px 16px; }
}

/* ── Premium Card Backgrounds ── */
/* Subtle inner glow from the cyan top accent — creates depth */
.dcard,
.svc-card,
.ap-card,
.proc-step,
.fit-col,
.pcard {
  background-image:
    radial-gradient(ellipse 85% 55% at 50% -5%,
      rgba(19,234,255,0.055) 0%,
      transparent 70%
    ),
    linear-gradient(180deg,
      rgba(255,255,255,0.018) 0%,
      transparent 45%
    ) !important;
  background-color: var(--s2) !important;
}
