/* ==========================================================================
   theme.css — the single stylesheet for the optimiSE website.
   Self-contained: fonts, reset, layout, components, legal pages.
   Palette: Navy + Cyan. Font: self-hosted Open Sans (no external requests).
   ========================================================================== */

/* --- Fonts (self-hosted) -------------------------------------------------- */

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/opensans-300-normal-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/opensans-400-normal-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/opensans-400-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/opensans-700-normal-latin.woff2') format('woff2');
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  --navy: #0a1f44;
  --navy-2: #0d2c63;
  --cyan: #18c5d9;
  --cyan-600: #0fa6b8;
  --blue: #0070c0;
  --ink: #1f2733;
  --muted: #5b6573;
  --bg-soft: #f5f7fb;
  --border: #e4e8ef;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(10, 31, 68, .10);
  --header-h: 72px;
}

/* --- Reset / base ---------------------------------------------------------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: 46px; margin: 0 0 18px; }
h2 { font-size: 30px; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; }

a { color: var(--blue); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* --- Header ----------------------------------------------------------------
   Shared across all pages (legal pages prefix links with "../"). */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(10, 31, 68, .06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.brand { display: flex; align-items: center; }
.brand img { max-height: 40px; width: auto; }

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.site-nav a:hover,
.site-nav a.active { color: var(--cyan-600); border-bottom-color: var(--cyan); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { display: block; }

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

.section { padding: 84px 0; scroll-margin-top: var(--header-h); }
.section.alt { background: var(--bg-soft); }

/* Light watermark of the PCB trace texture behind a section (as on the one-pager) */
.section.circuit { position: relative; overflow: hidden; }
.section.circuit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/circuit-traces.svg') center / cover no-repeat;
  filter: invert(1); /* the SVG is white; show it dark on light backgrounds */
  opacity: .05;
}
.section.circuit .container { position: relative; }

.section-head { text-align: center; margin-bottom: 48px; }
.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 36px;
}
.section-head .lead { margin-left: auto; margin-right: auto; margin-bottom: 0; }

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: var(--cyan-600); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
/* Navy variant for buttons on light section backgrounds */
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }

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

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--header-h);
}
.hero::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(24, 197, 217, .22), transparent 60%);
}
/* PCB trace texture (circuit-traces.svg: white traces, traced from the trade-fair one-pager) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/circuit-traces.svg') right center / cover no-repeat;
  opacity: .12;
  /* fade out towards the headline */
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 85%);
  mask-image: linear-gradient(90deg, transparent 25%, #000 85%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 820px; }
.hero .hero-accent { color: var(--cyan); }
.hero p { font-size: 19px; color: #c7d2e2; max-width: 640px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Cards grid ----------------------------------------------------------------- */

.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: auto; aspect-ratio: 560 / 340; object-fit: cover; }
.card .card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card p { font-size: 14px; color: var(--muted); flex: 1; margin: 0 0 10px; }
.card .read-more { color: var(--blue); font-weight: 600; text-decoration: none; }
.card .read-more:hover { color: var(--cyan-600); }

/* --- Two-column feature lists ------------------------------------------------------ */

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cols h3 { font-size: 19px; }
.cols ul { padding-left: 18px; color: var(--muted); margin: 0 0 28px; }
.cols li { margin-bottom: 8px; }

/* Product screenshot next to a feature list */
.screenshot { margin: 0; }
.screenshot img {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.screenshot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* --- Logo rows (clients, cooperations) ----------------------------------------------- */

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.logo-row img { max-height: 46px; width: auto; }

/* Partners (cooperations) */
.partner-row { display: flex; gap: 14px 40px; flex-wrap: wrap; margin-top: 20px; }
.partner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.partner img { height: 34px; width: auto; }
.partner span { font-weight: 600; color: var(--navy); font-size: 14px; white-space: nowrap; }

.trusted-by {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Proof block inside the hero (client logos as light silhouettes) */
.hero-proof { margin-top: 72px; }
.hero-proof .trusted-by {
  text-align: left;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 20px;
}
.hero-proof .logo-row { justify-content: flex-start; gap: 44px; }
.hero-proof .logo-row img {
  max-height: 36px;
  opacity: .7;
  transition: opacity .2s;
}
.hero-proof .logo-row img:hover { opacity: 1; }

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
}
.contact-tile .tile-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--cyan-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-tile h3 { font-size: 16px; }
.contact-tile p { margin: 0; color: var(--muted); font-size: 15px; }
.contact-tile a { color: var(--blue); text-decoration: none; font-weight: 600; }
.contact-tile a:hover { color: var(--cyan-600); }

/* Contact persons */
.team-block { margin-top: 56px; }
.team-row { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 36px;
  text-align: center;
  width: 280px;
}
.team-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  border: 3px solid var(--bg-soft);
}
.team-card h3 { font-size: 17px; margin: 0 0 4px; }
.team-card .team-role { color: var(--muted); font-size: 14px; }

/* --- Footer -----------------------------------------------------------------------------
   Shared across all pages (legal pages prefix links with "../"). */

.site-footer {
  background: var(--navy);
  color: #c7d2e2;
  padding: 28px 0;
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* --- Scroll reveal (progressive enhancement; JS adds .reveal-ready/.revealed) ------------ */

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-ready .reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Legal pages (impressum, privacy policy, disclaimer) ---------------------------------- */

.legal { padding: 64px 0 84px; }
.legal .container { max-width: 820px; }
.legal .page-note {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 32px;
}
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 22px; margin-top: 40px; }
.legal h3 { font-size: 17px; margin-top: 24px; }
.legal p, .legal li { color: var(--ink); font-size: 15.5px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-top: 48px; }

/* --- Responsive ----------------------------------------------------------------------------- */

@media (max-width: 980px) {
  h1 { font-size: 34px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; gap: 0; }
  .contact-grid { grid-template-columns: 1fr; max-width: 480px; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(10, 31, 68, .08);
    padding: 8px 24px 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 10px 0; border-bottom: none; }
}

@media (max-width: 560px) {
  h1 { font-size: 28px; }
  h2 { font-size: 26px; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 52px 0 48px; }
  .hero p { font-size: 17px; }
  .hero-cta .btn { flex: 1 1 auto; text-align: center; }
  .hero-proof { margin-top: 48px; }
  .hero-proof .logo-row { gap: 20px 28px; }
  .hero-proof .logo-row img { max-height: 26px; }
  .section-head { margin-bottom: 36px; }
  .logo-row { gap: 24px; }
  .logo-row img { max-height: 38px; }
  .site-footer .container { justify-content: center; text-align: center; }
}
