/*
Theme Name: OF-Tek
Theme URI: https://of-tek.at
Author: OF-Tek
Description: One-Page Theme für OF-Tek – Elektro & Anlagenmontage. Eigenständiges Classic-Theme ohne Page-Builder, mit anpassbaren Bereichen für Hero, Leistungen, Über uns und Kontakt.
Version: 2.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oftek
*/

/* ============================================================
   Lokale Schriften (DSGVO-konform, keine Google-Server)
   Archivo & Inter – SIL Open Font License 1.1
   ============================================================ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/archivo-700.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/archivo-800.woff2") format("woff2");
}

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --blau:        #1E4E8C;
  --blau-tief:   #14365f;
  --blau-nacht:  #0c2240;
  --orange:      #F48221;
  --orange-hell: #ff9d45;
  --weiss:       #ffffff;
  --grau-hell:   #f3f5f8;
  --grau:        #e2e7ee;
  --grau-text:   #5a6678;
  --text:        #16243a;

  --ff-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --ff-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
  --pad:  clamp(1.25rem, 4vw, 3rem);
}

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

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

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--weiss);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 .5em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.eyebrow {
  font-family: var(--ff-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  color: var(--orange);
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--orange);
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1rem;
  padding: .85rem 1.6rem;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--orange); color: #1a1206; }
.btn-primary:hover { background: var(--orange-hell); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--weiss); border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 34, 64, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  /* Geräte mit Statusleiste/Notch respektieren */
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 1rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; min-width: 0; }
.brand img,
.brand .custom-logo-link img,
.site-header .custom-logo {
  height: 48px !important;
  width: auto !important;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
.brand .custom-logo-link { display: flex; align-items: center; line-height: 0; }
.brand .brand-text {
  font-family: var(--ff-display); font-weight: 800; color: var(--weiss);
  font-size: 1.4rem; letter-spacing: .02em;
}
.brand .brand-text span { color: var(--orange); }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a {
  color: rgba(255,255,255,.82); font-family: var(--ff-display); font-weight: 600;
  font-size: .98rem; position: relative; padding: .25rem 0;
}
.nav a:hover { color: var(--weiss); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
  background: var(--orange); transition: width .2s ease;
}
.nav a:hover::after { width: 100%; }
.nav .btn { padding: .55rem 1.1rem; font-size: .9rem; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--weiss); margin: 5px 0; transition: .25s; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(244,130,33,.18), transparent 55%),
    linear-gradient(160deg, var(--blau-nacht) 0%, var(--blau-tief) 60%, var(--blau) 100%);
  color: var(--weiss);
}
/* Stromfluss-Signatur: diagonale Blitzlinie */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0 49.6%, rgba(244,130,33,.35) 49.6% 50%, transparent 50.4%);
  background-size: 220px 220px;
  opacity: .25;
  mask-image: linear-gradient(to right, transparent, #000 40%, #000 70%, transparent);
}
.hero .wrap { position: relative; z-index: 2; padding-top: clamp(3.5rem, 9vw, 6.5rem); padding-bottom: clamp(3.5rem, 9vw, 6.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 {
  color: var(--weiss);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  text-transform: uppercase;
}
.hero h1 .akz { color: var(--orange); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 40ch; margin: 0 0 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px; padding: 1.8rem;
  backdrop-filter: blur(4px);
}
.hero-card h3 { color: var(--weiss); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.88); font-size: .96rem;
}
.hero-card li:last-child { border-bottom: 0; }
.hero-card li .bolt { color: var(--orange); flex: none; font-weight: 800; }

/* Trust-Leiste */
.trust { background: var(--blau-nacht); color: rgba(255,255,255,.7); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; padding-top: 1.1rem; padding-bottom: 1.1rem; font-family: var(--ff-display); font-weight: 600; font-size: .95rem; }
.trust span .num { color: var(--orange); font-size: 1.15rem; margin-right: .35rem; }

/* ============================================================
   Sektionen allgemein
   ============================================================ */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 56ch; margin-bottom: 2.8rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-head p { color: var(--grau-text); font-size: 1.08rem; margin: 0; }
.section.alt { background: var(--grau-hell); }

/* Leistungen */
.leist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.leist-card {
  background: var(--weiss); border: 1px solid var(--grau);
  border-radius: 6px; padding: 1.8rem; position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.section.alt .leist-card { background: var(--weiss); }
.leist-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(20,54,95,.45); border-color: var(--orange); }
.leist-card .icon {
  width: 52px; height: 52px; border-radius: 4px;
  background: linear-gradient(150deg, var(--blau), var(--blau-tief));
  display: grid; place-items: center; margin-bottom: 1.2rem;
}
.leist-card .icon svg { width: 26px; height: 26px; }
.leist-card h3 { font-size: 1.25rem; }
.leist-card p { color: var(--grau-text); margin: 0; font-size: .98rem; }
.leist-card .num {
  position: absolute; top: 1.4rem; right: 1.4rem;
  font-family: var(--ff-display); font-weight: 800; font-size: 1.1rem;
  color: var(--grau);
}

/* Über uns */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-grid--single { grid-template-columns: 1fr; max-width: 760px; }
.about-text p { color: var(--grau-text); font-size: 1.05rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--grau); border: 1px solid var(--grau); border-radius: 6px; overflow: hidden; }
.about-stats .stat { background: var(--weiss); padding: 1.8rem; }
.about-stats .stat .big { font-family: var(--ff-display); font-weight: 800; font-size: 2.4rem; color: var(--blau); line-height: 1; }
.about-stats .stat .lbl { color: var(--grau-text); font-size: .92rem; margin-top: .4rem; }
.about-text ul { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.about-text li { padding: .45rem 0 .45rem 1.8rem; position: relative; }
.about-text li::before { content: "⚡"; position: absolute; left: 0; color: var(--orange); }

/* Inhaber-Profile */
.inhaber-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3rem; }
.inhaber-card {
  --foto-size: 120px;
  display: flex; gap: 1.3rem; align-items: flex-start;
  background: var(--weiss); border: 1px solid var(--grau);
  border-radius: 8px; padding: 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.inhaber-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(20,54,95,.45); border-color: var(--orange); }
/* Fotos im Hochformat 3:4 (Breite = --foto-size, Höhe entsprechend höher) */
.inhaber-foto { flex: none; width: var(--foto-size); aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: linear-gradient(150deg, var(--blau), var(--blau-tief)); display: grid; place-items: center; }
.inhaber-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inhaber-initialen { font-family: var(--ff-display); font-weight: 800; font-size: calc(var(--foto-size) * .42); color: var(--weiss); letter-spacing: .03em; }
/* Ab großen Fotos: Bild oben über volle Breite, Text darunter (verhindert Quetschen) */
.inhaber-card.is-stacked { flex-direction: column; align-items: stretch; text-align: left; }
.inhaber-card.is-stacked .inhaber-foto { width: var(--foto-size); aspect-ratio: 3 / 4; border-radius: 8px; }
.inhaber-info { min-width: 0; }
.inhaber-info h3 { font-size: 1.2rem; margin: 0 0 .15rem; }
.inhaber-rolle { color: var(--orange); font-family: var(--ff-display); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .6rem; }
.inhaber-text { color: var(--grau-text); font-size: .96rem; margin: 0; }

/* Kontakt */
.kontakt { background: linear-gradient(160deg, var(--blau-tief), var(--blau-nacht)); color: var(--weiss); }
.kontakt h2 { color: var(--weiss); }
.kontakt .section-head p { color: rgba(255,255,255,.8); }
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.kontakt-info { display: grid; gap: 1.2rem; align-content: start; }
.kontakt-info .row { display: flex; gap: 1rem; align-items: flex-start; }
.kontakt-info .row .ic { color: var(--orange); flex: none; font-weight: 800; font-size: 1.2rem; width: 28px; }
.kontakt-info .row a, .kontakt-info .row span { color: rgba(255,255,255,.9); }
.kontakt-info .row strong { display: block; font-family: var(--ff-display); color: var(--weiss); margin-bottom: .15rem; }

.kontakt-form { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 1.8rem; }
.kontakt-form label { display: block; font-size: .85rem; font-family: var(--ff-display); font-weight: 600; color: rgba(255,255,255,.8); margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .05em; }
.kontakt-form input, .kontakt-form textarea {
  width: 100%; padding: .8rem .9rem; margin-bottom: 1.1rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 3px;
  color: var(--weiss); font-family: var(--ff-body); font-size: 1rem;
}
.kontakt-form input::placeholder, .kontakt-form textarea::placeholder { color: rgba(255,255,255,.45); }
.kontakt-form input:focus, .kontakt-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.kontakt-form .btn { width: 100%; justify-content: center; }
.form-note { font-size: .82rem; color: rgba(255,255,255,.55); margin: .8rem 0 0; }
/* Honeypot – für Menschen unsichtbar, aus Sichtfeld und Tab-Reihenfolge entfernt */
.oftek-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--blau-nacht); color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.08); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; padding-top: 2rem; padding-bottom: 2rem; align-items: center; }
.site-footer img { height: 46px; }
.site-footer .legal { font-size: .88rem; }
.site-footer .legal a { color: rgba(255,255,255,.7); }
.site-footer .to-top { font-family: var(--ff-display); font-weight: 700; color: var(--orange); }

/* ============================================================
   Focus / Accessibility
   ============================================================ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--orange); color: #1a1206; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .leist-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .kontakt-grid { grid-template-columns: 1fr; }
  .inhaber-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brand img,
  .brand .custom-logo-link img,
  .site-header .custom-logo { height: 44px !important; }
  /* Header wird Anker für das ausklappende Menü */
  .site-header .wrap { position: relative; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--blau-nacht);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem var(--pad) 1.5rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 20px 30px -18px rgba(0,0,0,.6);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav a { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: .8rem; justify-content: center; }
  .nav-toggle { display: block; }
  .leist-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
