/* FibraSec — site stylesheet
   Palette derived from the logo: magenta-purple + steel blue,
   deep aubergine for dark bands. Mobile-first. */

:root {
  --purple: #8e2a8e;
  --blue: #4c77b5;
  --deep: #2b1240;
  --deep-2: #1f0c30;
  --ink: #2a2135;
  --muted: #6b6178;
  --paper: #ffffff;
  --paper-2: #f7f5fb;
  --line: #e8e3f0;
  --trace: linear-gradient(90deg, var(--purple), var(--blue));
  --font-display: 'Sora', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; }

.accent-blue { color: var(--blue); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8em 1.6em;
  border-radius: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.btn-solid {
  background: var(--purple);
  color: #fff;
}

.btn-solid:hover {
  background: #7a2379;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(142, 42, 142, 0.28);
}

.btn-ghost {
  color: var(--purple);
  border: 2px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(43, 18, 64, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.logo img { width: auto; height: 44px; }

.site-nav {
  display: none;
  gap: 2rem;
  margin-left: auto;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35em 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.header-cta { display: none; }

.menu-toggle {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.mobile-menu[hidden] { display: none; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 1.25rem 1.5rem;
  display: grid;
  gap: 0.25rem;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.7em 0;
}

.mobile-menu .btn { margin-top: 0.75rem; text-align: center; color: #fff; }

body.menu-open { overflow: hidden; }

@media (min-width: 800px) {
  .site-nav { display: flex; }
  .header-cta { display: inline-block; }
  .menu-toggle, .mobile-menu { display: none; }
}

/* ---------- Sections ---------- */

section { padding: clamp(4rem, 9vw, 7rem) 0; }

main { padding-top: 72px; }

section[id] { scroll-margin-top: 72px; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(60rem 30rem at 110% -10%, rgba(76, 119, 181, 0.22), transparent 60%),
    radial-gradient(50rem 28rem at -20% 110%, rgba(142, 42, 142, 0.16), transparent 60%),
    linear-gradient(180deg, #f2ecf9 0%, #faf8fd 100%);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 { margin: 0 0 1.25rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-art { display: none; }

@media (min-width: 800px) {
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; }
  .hero-art { display: block; }
  .hero-art svg { width: 100%; max-width: 24rem; margin-inline: auto; }
}

/* trace draw-in on load */
.trace {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 1.4s ease forwards;
}

.t2 { animation-delay: 0.2s; }
.t3 { animation-delay: 0.7s; animation-duration: 0.9s; }
.t4 { animation-delay: 0.9s; animation-duration: 0.9s; }

.node {
  opacity: 0;
  animation: pop 0.4s ease forwards;
}

.n1 { animation-delay: 1.1s; }
.n2 { animation-delay: 1.25s; }
.n3 { animation-delay: 1.4s; }
.n4 { animation-delay: 1.55s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .trace { stroke-dashoffset: 0; }
  .node { opacity: 1; }
}

/* ---------- Services ---------- */

.services { background: var(--paper-2); }

.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 800px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* top trace accent */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5rem;
  height: 3px;
  background: var(--trace);
  transition: width 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(142, 42, 142, 0.35);
  box-shadow: 0 16px 40px rgba(43, 18, 64, 0.1);
}

.card:hover::before { width: 100%; }

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
}

.card h3 { margin-bottom: 0.6rem; }

.card p { color: var(--muted); margin-bottom: 1.1rem; }

.card ul { list-style: none; }

.card li {
  padding: 0.45em 0 0.45em 1.4em;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 0.95rem;
}

/* node-dot bullet */
.card li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 1.05em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- Approach (dark band) ---------- */

.approach {
  background:
    radial-gradient(50rem 26rem at 100% 0%, rgba(76, 119, 181, 0.16), transparent 60%),
    var(--deep);
}

.approach h2, .approach h3 { color: #fff; }

.approach .eyebrow { color: #c88ec8; }

.steps {
  list-style: none;
  display: grid;
  gap: 2.25rem;
  margin-top: 3rem;
  counter-reset: step;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.steps li { position: relative; padding-top: 1.4rem; }

/* trace rule above each step */
.steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(200, 142, 200, 0.7), rgba(122, 156, 210, 0.35));
  border-radius: 1px;
}

.step-no {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a9bede;
  display: block;
  margin-bottom: 0.5rem;
}

.steps h3 { margin-bottom: 0.4rem; }

.steps p { color: #c3b8d4; font-size: 0.98rem; }

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(46rem 24rem at 18% 0%, rgba(142, 42, 142, 0.5), transparent 65%),
    radial-gradient(46rem 24rem at 85% 100%, rgba(76, 119, 181, 0.42), transparent 65%),
    var(--deep-2);
}

.contact h2 { color: #fff; }

.contact .eyebrow { color: #c88ec8; }

.contact .lead { margin-inline: auto; color: #cdc2dd; }

.contact .btn-solid {
  background: #fff;
  color: var(--purple);
}

.contact .btn-solid:hover {
  background: #f3ecf6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.contact .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.contact .btn-ghost:hover { border-color: #fff; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--deep-2);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.88rem;
  color: #a894bd;
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
}

.footer-legal a {
  font-size: 0.85rem;
  color: #8d7aa3;
  text-decoration: none;
}

.footer-legal a:hover { color: #fff; }

@media (min-width: 800px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* ---------- Legal pages (Impressum / Privacy) ---------- */

.legal {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.legal .wrap { max-width: 46rem; }

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 2.25rem 0 0.6rem;
}

.legal p, .legal li { color: var(--muted); margin-bottom: 0.8rem; }

.legal ul { padding-left: 1.2rem; }

.legal a { color: var(--purple); }

.legal address { font-style: normal; color: var(--muted); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease var(--d, 0s), transform 0.5s ease var(--d, 0s);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
