/*
Theme Name: Maxpain
Description: Schlankes Theme für maxpain.at e.U. (Elektrotechnik, Photovoltaik, Haussteuerung, IT)
Version: 1.0
Author: gshop
Text Domain: maxpain
*/

:root {
  --navy: #0d1b2e;
  --navy-2: #14283f;
  --ink: #1c2738;
  --muted: #5b6878;
  --line: #e3e8ee;
  --soft: #f4f6f9;
  --sun: #ffb400;
  --sun-d: #e29b00;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 27, 46, .10);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 27, 46, .96); backdrop-filter: blur(8px);
  color: #fff;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; }
.brand b { font-weight: 800; }
.brand span { color: var(--sun); }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: #dbe4ef; text-decoration: none; padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.main-nav .nav-cta a { background: var(--sun); color: var(--navy); font-weight: 700; }
.main-nav .nav-cta a:hover { background: var(--sun-d); }
.nav-toggle, .nav-burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 10px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-sun:hover { background: var(--sun-d); box-shadow: 0 8px 20px rgba(255, 180, 0, .35); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy) center/cover no-repeat;
  padding: clamp(80px, 13vw, 170px) 0 clamp(70px, 10vw, 130px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(13,27,46,.93) 0%, rgba(13,27,46,.78) 48%, rgba(13,27,46,.25) 100%);
}
.hero .wrap { position: relative; }
.hero .kicker { display: inline-block; color: var(--sun); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; margin-bottom: 18px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p.lead { font-size: 1.25rem; max-width: 40ch; color: #d7e1ee; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.page-hero { background: var(--navy); color: #fff; padding: 64px 0 52px; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero p { color: #c3d0e0; margin: 12px 0 0; max-width: 60ch; font-size: 1.15rem; }

/* ---------- Strip ---------- */
.strip { background: var(--sun); color: var(--navy); }
.strip ul { list-style: none; margin: 0; padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 34px; justify-content: center; font-weight: 700; }
.strip li::before { content: "✓ "; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section.soft { background: var(--soft); }
.section.dark { background: var(--navy); color: #cdd8e6; }
.section.dark h2, .section.dark h3 { color: #fff; }
.eyebrow { color: var(--sun-d); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; margin-bottom: 10px; }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.dark .section-head p { color: #aebccd; }

.grid { display: grid; gap: 26px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

/* Service cards */
.card {
  background: #fff; 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 { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.card .body { padding: 24px 26px 28px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
.card ul { margin: 14px 0 0; padding-left: 1.1em; color: var(--muted); }

.mini { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.mini .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--sun); display: grid; place-items: center; margin-bottom: 16px; }
.mini .ico svg { width: 26px; height: 26px; stroke: var(--navy); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mini h3 { font-size: 1.1rem; margin-bottom: 6px; }
.mini p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Steps */
.steps { counter-reset: s; }
.step { position: relative; padding: 26px 26px 26px 26px; border-radius: var(--radius); background: var(--navy-2); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sun); color: var(--navy); font-weight: 800; margin-bottom: 14px; }
.step h3 { color: #fff; margin-bottom: 6px; }
.step p { margin: 0; color: #b9c7d8; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split.rev .split-media { order: 2; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 9px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .38em; width: 18px; height: 18px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1b2e' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; color: var(--muted); }

/* CTA band */
.cta { background: linear-gradient(110deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #c3d0e0; max-width: 54ch; margin-inline: auto; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }

/* Team */
.person { text-align: left; }
.person .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--sun); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; }
.person h3 { margin: 0; font-size: 1.1rem; }
.person p { margin: 2px 0 0; color: var(--muted); font-size: .97rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.contact-box { background: var(--soft); border-radius: var(--radius); padding: 30px; }
.contact-box dl { margin: 0; }
.contact-box dt { font-weight: 800; color: var(--navy); margin-top: 16px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-box dt:first-child { margin-top: 0; }
.contact-box dd { margin: 2px 0 0; }
.form label { display: block; font-weight: 600; margin: 14px 0 6px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid #cdd6e0; border-radius: 10px; font: inherit; background: #fff;
}
.form input:focus, .form textarea:focus { outline: 3px solid rgba(255,180,0,.45); border-color: var(--sun-d); }
.form textarea { min-height: 150px; resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.form .check input { margin-top: .4em; }
.form .hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.notice.ok { background: #e6f6ec; color: #0e5c2d; }
.notice.err { background: #fdeaea; color: #8a1c1c; }

/* Legal text pages */
.prose { max-width: 800px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { background: #08121f; color: #9fb0c4; padding: 56px 0 28px; font-size: .96rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #cdd8e6; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-burger { display: block; cursor: pointer; padding: 10px; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; content: ""; }
  .nav-burger span::before { position: absolute; top: -7px; }
  .nav-burger span::after { position: absolute; top: 7px; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); display: none; padding: 10px 20px 22px; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { display: block; }
  .split, .contact-grid, .site-footer .cols { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .hero::before { background: rgba(13,27,46,.82); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
