/*
Theme Name: XNF Engineering
Theme URI: https://xnf-engineering.com
Author: XNF Engineering GmbH
Description: Product-first WordPress theme for XNF Engineering.
Version: 0.3.5
Text Domain: xnf
*/

:root {
  --xnf-blue: #0b4dbb;
  --xnf-blue-bright: #1768e5;
  --xnf-ink: #0a0d12;
  --xnf-graphite: #121821;
  --xnf-steel: #7d8897;
  --xnf-line: rgba(255, 255, 255, 0.13);
  --xnf-paper: #f4f6f8;
  --xnf-white: #fff;
  --xnf-radius: 18px;
  --xnf-max: 1240px;
  --space-section: clamp(76px, 8vw, 112px);
  --text-measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--xnf-ink);
  background: var(--xnf-paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
main, .site-footer { position: relative; z-index: 1; }
.tech-network { position: fixed; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; background: #f4f6f8; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--xnf-max)); margin-inline: auto; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--xnf-blue-bright);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; color: inherit; font-weight: 760; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
h1 { max-width: 760px; font-size: clamp(3rem, 6.4vw, 6rem); line-height: 1.02; }
h2 { max-width: 760px; font-size: clamp(2.15rem, 4vw, 3.75rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.45rem); letter-spacing: -.02em; }
p { max-width: var(--text-measure); margin-top: 0; }
.lead { max-width: 680px; color: #4b5665; font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.58; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--xnf-blue);
  color: #fff;
  font-weight: 750;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--xnf-blue-bright); }
.button--ghost { border-color: rgba(255,255,255,.34); background: transparent; }
.button--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  color: #fff;
  transition: background .25s ease, border-color .25s ease;
}
.site-header { z-index: 20; }
.site-header.is-scrolled { border-color: var(--xnf-line); background: rgba(8,12,18,.92); backdrop-filter: blur(14px); }
.header-inner { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 10px 0; }
.brand img { width: 140px; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: .92rem; font-weight: 650; }
.site-nav a { opacity: .78; }
.site-nav a:hover { opacity: 1; }
.site-nav .nav-cta { padding: 9px 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; opacity: 1; }
.site-nav > .menu-item { position: relative; list-style: none; }
.site-nav .menu-item-has-children > a::after {
  display: inline-block;
  margin-left: 7px;
  content: "⌄";
  font-size: .8em;
  line-height: 1;
  transition: transform .2s ease;
}
.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  min-width: 205px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--xnf-line);
  border-radius: 12px;
  list-style: none;
  background: rgba(8,12,18,.97);
  box-shadow: 0 18px 44px rgba(0,0,0,.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.site-nav .sub-menu::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 15px;
  content: "";
}
.site-nav .sub-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible { background: rgba(23,104,229,.2); }
.site-nav .menu-item-has-children:hover > .sub-menu,
.site-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.site-nav .menu-item-has-children:hover > a::after,
.site-nav .menu-item-has-children:focus-within > a::after { transform: rotate(180deg); }
.menu-toggle { display: none; border: 0; background: none; color: #fff; font: inherit; }

.hero {
  position: relative;
  min-height: 820px;
  padding: 168px 0 84px;
  color: #fff;
  background:
    radial-gradient(circle at 79% 48%, rgba(23,104,229,.22), transparent 30%),
    linear-gradient(135deg, #06080c, #111923 68%, #08101c);
}
.hero-inner { position: relative; z-index: 1; display: grid; align-items: center; gap: clamp(24px, 3vw, 54px); grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr); }
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.hero-copy h1 { max-width: 780px; font-size: clamp(2.9rem, 5.2vw, 5.15rem); }
.hero-copy .lead { max-width: 660px; color: #b6c0cd; }
.hero-copy .hero-mission { margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-visual { position: relative; z-index: 1; display: grid; min-height: 530px; place-items: center; }
.hero-visual::before { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: rgba(23,104,229,.12); content: ""; filter: blur(42px); }
.hero-product { position: relative; width: min(100%, 660px); max-height: 590px; object-fit: contain; filter: drop-shadow(0 35px 50px rgba(0,0,0,.5)); }
.hero-meta {
  grid-column: 1 / -1;
  display: grid;
  max-width: 940px;
  margin-top: 34px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--xnf-line);
}
.hero-meta div { padding: 26px 28px 0 0; }
.hero-meta strong {
  display: block;
  font-size: clamp(1.2rem, 1.55vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero-meta span {
  display: block;
  margin-top: 8px;
  color: #9aa6b5;
  font-size: 1rem;
  line-height: 1.45;
}

.section { padding: var(--space-section) 0; }
.section--dark { color: #fff; background: var(--xnf-graphite); }
.section--dark .lead { color: #aeb8c5; }
.split { display: grid; align-items: center; gap: 80px; grid-template-columns: 1fr 1fr; }
.product-stage { position: relative; min-height: 500px; border-radius: var(--xnf-radius); background: radial-gradient(circle, #233044, #0a0d12 66%); overflow: hidden; }
.product-stage img { position: absolute; inset: 50% auto auto 50%; width: calc(100% - 48px); max-width: 100%; max-height: calc(100% - 48px); object-fit: contain; transform: translate(-50%,-50%); }
.technology-intro { display: grid; align-items: center; gap: clamp(42px, 6vw, 80px); grid-template-columns: minmax(0, 1fr) minmax(420px, .92fr); }
.technology-copy { max-width: 640px; }
.product-stage--technology { min-height: 430px; }
.technology-grid {
  display: grid;
  gap: 1px;
  margin-top: clamp(46px, 6vw, 72px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #d7dce2;
}
.technology-grid article {
  min-height: 230px;
  padding: clamp(28px, 4vw, 46px);
  background: var(--xnf-paper);
}
.technology-grid article > span {
  color: var(--xnf-blue);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.technology-grid h3 { margin: 42px 0 12px; }
.technology-grid p { margin-bottom: 0; color: #596574; }
.metrics { display: grid; gap: 1px; margin-top: 55px; grid-template-columns: repeat(4,1fr); background: #d7dce2; }
.metric { padding: 32px; background: #fff; }
.metric strong { display: block; color: var(--xnf-blue); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; }
.metric span { display: block; margin-top: 12px; color: #586474; font-size: .9rem; }

.cards { display: grid; gap: 18px; margin-top: 48px; grid-template-columns: repeat(3,1fr); }
.card { min-height: 310px; padding: 34px; border: 1px solid var(--xnf-line); border-radius: var(--xnf-radius); background: rgba(255,255,255,.025); }
.card .number { display: block; margin-bottom: 68px; color: var(--xnf-blue-bright); font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
.card p { color: #9faab8; }
.applications { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 42px; }
.applications span { padding: 10px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #c5ccd5; }

.contact-panel {
  display: grid;
  align-items: start;
  gap: clamp(42px, 7vw, 96px);
  padding: clamp(34px, 5vw, 68px);
  grid-template-columns: minmax(0,.85fr) minmax(360px,1.15fr);
  border-radius: var(--xnf-radius);
  color: #fff;
  background: linear-gradient(120deg, #092f74, var(--xnf-blue));
}
.contact-panel h2 { margin-bottom: 18px; }
.contact-panel p { color: #cfddf4; }
.contact-email { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 5px; }
.contact-form-wrap { padding: clamp(24px, 3vw, 36px); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(4,19,45,.24); }
.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.contact-form label { display: grid; gap: 7px; color: #d9e5f8; font-size: .82rem; font-weight: 700; letter-spacing: .03em; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; outline: none; padding: 12px 14px; color: #fff; background: rgba(3,10,22,.38); font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color .2s, box-shadow .2s; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #8ebaff; box-shadow: 0 0 0 3px rgba(142,186,255,.18); }
.contact-form .form-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.form-consent input { width: 17px; flex: 0 0 17px; margin-top: 3px; }
.form-consent a { text-decoration: underline; }
.form-honeypot { position: absolute !important; left: -10000px !important; }
.contact-form .button { justify-self: start; border: 1px solid rgba(255,255,255,.35); background: #fff; color: #073478; }
.form-notice { margin-bottom: 20px; padding: 13px 15px; border-radius: 8px; font-size: .92rem; }
.form-notice--success { border: 1px solid rgba(151,237,190,.55); background: rgba(25,105,65,.35); }
.form-notice--error { border: 1px solid rgba(255,167,167,.55); background: rgba(120,25,35,.35); }

.site-footer { padding: 65px 0 28px; color: #c4ccd6; background: #070a0f; }
.footer-lead .eyebrow { color: var(--xnf-blue-bright); }
.footer-grid { display: grid; gap: 50px; grid-template-columns: 1.6fr 1fr 1fr; }
.footer-logo { width: 165px; margin-bottom: 22px; }
.footer-grid h3 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-grid a { display: block; margin-bottom: 7px; color: #9ba6b4; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--xnf-line); color: #707b89; font-size: .82rem; }

.page-hero { padding: 170px 0 70px; color: #fff; background: linear-gradient(135deg,#080b10,#132033); }
.legal-content { max-width: var(--xnf-max); }
.legal-title { max-width: none; margin: 72px 0 28px; font-size: clamp(2rem, 3vw, 2.8rem); }
.legal-columns { display: grid; gap: clamp(28px, 5vw, 70px); grid-template-columns: repeat(2, minmax(0,1fr)); }
.legal-columns--company { align-items: stretch; }
.legal-column { padding: clamp(24px, 3vw, 36px); border: 1px solid #dce2e8; border-radius: 14px; background: rgba(255,255,255,.9); }
.legal-column h2 { margin: 8px 0 22px; font-size: 1.8rem; }
.legal-column h3 { margin: 32px 0 9px; font-size: 1.08rem; letter-spacing: -.01em; }
.legal-column > h3:first-of-type { margin-top: 8px; font-size: 1.55rem; }
.legal-column p { max-width: 66ch; margin-bottom: 12px; color: #3f4a57; font-size: .96rem; line-height: 1.7; }
.language-label { color: var(--xnf-blue); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

@media (max-width: 1000px) {
  .hero { min-height: auto; }
  .hero-inner { grid-template-columns: minmax(0,1fr) minmax(330px,.8fr); }
  .hero-visual { min-height: 450px; }
  .split { gap: 45px; }
  .technology-intro { gap: 42px; grid-template-columns: minmax(0, 1fr) minmax(350px, .82fr); }
  .product-stage--technology { min-height: 380px; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body.admin-bar .site-header { top: 46px; }
  .container { width: min(calc(100% - 28px), var(--xnf-max)); }
  .eyebrow { font-size: .82rem; }
  .technology-grid article > span, .card .number { font-size: .82rem; }
  .header-inner { min-height: 86px; }
  .brand { padding-block: 8px; }
  .brand img { width: 132px; }
  .site-nav { position: absolute; top: 86px; right: 14px; left: 14px; display: none; padding: 24px; flex-direction: column; align-items: flex-start; border: 1px solid var(--xnf-line); border-radius: 14px; background: #0a0f17; }
  .site-nav.is-open { display: flex; }
  .site-nav > .menu-item { width: 100%; }
  .site-nav .menu-item-has-children > a { display: block; }
  .site-nav .sub-menu {
    position: static;
    min-width: 0;
    margin-top: 8px;
    padding: 4px 0 4px 14px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav .sub-menu::before { display: none; }
  .site-nav .sub-menu a { padding: 8px 10px; color: #c5cfdb; }
  .menu-toggle { display: block; }
  .hero { padding: 136px 0 68px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; margin-top: 10px; }
  .hero-product { width: min(92vw, 520px); max-height: none; }
  .hero-meta, .metrics { grid-template-columns: 1fr 1fr; }
  .hero-meta { max-width: 100%; row-gap: 16px; }
  .hero-meta div { padding: 20px 18px 0 0; }
  .hero-meta strong { font-size: 1.15rem; }
  .hero-meta span { margin-top: 6px; font-size: .94rem; }
  .split, .technology-intro, .contact-panel, .footer-grid, .legal-columns { grid-template-columns: 1fr; }
  .technology-copy { max-width: none; }
  .product-stage--technology { min-height: 340px; order: -1; }
  .technology-grid { grid-template-columns: 1fr; }
  .technology-grid article { min-height: auto; }
  .form-row { grid-template-columns: 1fr; }
  .product-stage { min-height: 360px; order: -1; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 250px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tech-network { display: none; }
}

/* Harmonized site-wide type scale. */
:root {
  --type-body: 1rem;
  --type-small: .875rem;
  --type-label: 1.125rem;
  --type-h3: clamp(1.25rem, 1.5vw, 1.5rem);
}

body { font-size: 17px; line-height: 1.65; }
h1 { font-size: clamp(3rem, 5.7vw, 5.5rem); }
h2 { font-size: clamp(2.1rem, 3.6vw, 3.5rem); }
h3 { font-size: var(--type-h3); }

.eyebrow,
.feature-index,
.technology-grid article > span,
.application-grid article > span,
.card .number,
.language-label {
  font-size: var(--type-label);
  letter-spacing: .12em;
}

.site-nav,
.hero-meta span,
.metric span,
.contact-form label,
.form-notice,
.footer-grid h3,
.footer-bottom {
  font-size: var(--type-small);
}

.legal-column h2 { font-size: 1.75rem; }
.legal-column h3 { font-size: 1.125rem; }
.legal-column > h3:first-of-type { font-size: 1.5rem; }
.legal-column p { font-size: var(--type-body); }

@media (max-width: 760px) {
  :root { --type-label: 1rem; }
  .eyebrow,
  .feature-index,
  .technology-grid article > span,
  .application-grid article > span,
  .card .number,
  .language-label {
    font-size: var(--type-label);
  }
}


/* Accessible footer social link. */
.footer-social-link {
  display: inline-grid !important;
  width: 42px;
  height: 42px;
  margin: 18px 0 0 !important;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #aeb8c5 !important;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.footer-social-link:hover {
  border-color: rgba(23, 104, 229, .8);
  color: #fff !important;
  background: rgba(23, 104, 229, .18);
  transform: translateY(-2px);
}
.footer-social-link:focus-visible {
  outline: 3px solid #8ebaff;
  outline-offset: 4px;
  color: #fff !important;
}
.footer-social-icon { width: 19px; height: 19px; }

@media (max-width: 760px) {
  .footer-social-link { margin-top: 16px !important; }
}


/* Refined Introduction rhythm and alignment. */
#introduction { scroll-margin-top: 64px; }
body.admin-bar #introduction { scroll-margin-top: 96px; }
.company-introduction {
  padding-top: clamp(64px, 6.5vw, 88px);
  padding-bottom: clamp(52px, 5vw, 72px);
}
.company-introduction .intro-grid {
  align-items: start;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: clamp(42px, 7vw, 96px);
}
.company-introduction .intro-grid > div:first-child { max-width: 520px; }
.company-introduction .intro-grid h2 { margin-bottom: 0; }
.company-introduction .intro-copy { max-width: 690px; padding-top: 2px; }
.company-introduction .intro-topic > :first-child { margin-top: 0; }
.company-introduction .intro-topic > :last-child { margin-bottom: 0; }
.company-introduction .intro-topic--challenge {
  margin-top: clamp(28px, 3.5vw, 44px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid rgba(10, 13, 18, 0.14);
}
.company-introduction .intro-topic--challenge h3 {
  margin-bottom: 14px;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.25;
}
.technology-section { padding-top: clamp(52px, 5vw, 72px); }
@media (max-width: 760px) {
  .company-introduction { padding-block: clamp(52px, 13vw, 68px); }
  .company-introduction .intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .company-introduction .intro-copy { padding-top: 0; }
  .technology-section { padding-top: clamp(48px, 12vw, 64px); }
}


/* Three-level product navigation. */
@media (min-width: 761px) {
  .site-nav .sub-menu .menu-item { position: relative; list-style: none; }
  .site-nav .sub-menu .sub-menu { top: -10px; left: calc(100% + 10px); }
  .site-nav .sub-menu .sub-menu::before { top: 0; right: 100%; bottom: 0; left: auto; width: 11px; height: auto; }
  .site-nav .sub-menu .menu-item-has-children > a::after { content: "›"; float: right; margin: .2em 0 0 16px; }
  .site-nav .sub-menu .menu-item-has-children:hover > a::after,
  .site-nav .sub-menu .menu-item-has-children:focus-within > a::after { transform: translateX(2px); }
}
@media (max-width: 760px) {
  .site-nav .sub-menu .sub-menu { margin: 4px 0 0 10px; padding-left: 12px; }
}

/* Blue Series identity. */
.blue-series-logo { display: block; width: min(100%, 148px); height: auto; margin: 0 0 16px; }
.blue-series-logo--home-card { width: min(100%, 148px); margin-bottom: 16px; }
.blue-series-logo--dark { filter: drop-shadow(0 10px 20px rgba(0,0,0,.2)); }
.product-home-head__copy { max-width: 800px; }
@media (max-width: 760px) {
  .blue-series-logo,
  .blue-series-logo--home-card { width: min(44vw, 138px); margin-bottom: 14px; }
}


/* Introduction material callout. */
.company-introduction .intro-heading {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}
.company-introduction .intro-fact {
  max-width: 520px;
  margin-top: clamp(40px, 6vw, 76px);
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(10, 13, 18, .14);
  border-left: 4px solid var(--xnf-blue-bright);
  border-radius: 14px;
  background: rgba(255, 255, 255, .58);
}
.company-introduction .intro-fact h3 {
  margin-bottom: 10px;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}
.company-introduction .intro-fact p {
  margin-bottom: 16px;
  color: #4b5665;
}
.company-introduction .intro-fact ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2em;
  color: #303a47;
}
.company-introduction .intro-fact li::marker { color: var(--xnf-blue-bright); }

@media (max-width: 760px) {
  .company-introduction .intro-fact {
    margin-top: 30px;
    padding: 22px;
  }
}


/* Align Introduction topics as two explicit rows. */
.company-introduction .intro-grid {
  grid-template-areas:
    "heading overview"
    "fact challenge";
  row-gap: clamp(28px, 3.5vw, 44px);
}
.company-introduction .intro-heading {
  grid-area: heading;
  min-height: 0;
}
.company-introduction .intro-topic--overview { grid-area: overview; }
.company-introduction .intro-fact {
  grid-area: fact;
  align-self: start;
  margin-top: 0;
}
.company-introduction .intro-topic--challenge {
  grid-area: challenge;
  align-self: start;
  margin-top: 0;
}
.company-introduction .intro-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}
@media (max-width: 760px) {
  .company-introduction .intro-grid {
    grid-template-areas:
      "heading"
      "overview"
      "fact"
      "challenge";
    row-gap: 28px;
  }
  .company-introduction .intro-fact { margin-top: 0; }
}
