/*
Theme Name: ProWerk Wortmann
Theme URI: https://prowerk-wortmann.de
Author: ProWerk Wortmann
Description: Maßgeschneidertes WordPress-Theme für ProWerk Wortmann mit Projektgalerie, Shop-Vorschau und Besucherstatistik.
Version: 2.1.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prowerk-wortmann
*/

:root {
  --ink: #242722;
  --muted: #666a63;
  --ivory: #f7f4ee;
  --white: #ffffff;
  --terracotta: #c95f3d;
  --terracotta-dark: #a9462b;
  --sage: #718168;
  --line: #ded8ce;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: min(1220px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 78px;
  padding-inline: max(32px, calc((100% - 1220px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 244, 238, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.admin-bar .site-header { top: 32px; }
.brand { font-size: 25px; font-weight: 500; letter-spacing: -1px; }
.brand span { font-weight: 800; }
.nav { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 600; }
.nav > a:not(.nav-cta) { position: relative; }
.nav > a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--terracotta); transition: right .18s ease; }
.nav > a:not(.nav-cta):hover::after { right: 0; }
.nav > a.nav-active::after { right: 0; }
.nav-projects-link { padding: 10px 14px; border-radius: 5px; background: rgba(201,95,61,.09); }
.nav-cta { padding: 14px 20px; border-radius: 5px; color: white; background: var(--terracotta); transition: transform .18s ease, background .18s ease; }
.nav-cta:hover, .button-primary:hover { color: white; transform: translateY(-2px); background: var(--terracotta-dark); }
.menu-button { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-button span { display: block; width: 24px; height: 2px; margin: 6px 0; background: var(--ink); }

.shop-tab {
  position: fixed;
  z-index: 60;
  top: 46%;
  right: 0;
  width: 326px;
  display: flex;
  align-items: stretch;
  filter: drop-shadow(0 12px 25px rgba(36,39,34,.18));
  transform: translateX(270px);
  transition: transform .28s ease;
}
.shop-tab-open { transform: translateX(0); }
.shop-tab-trigger {
  width: 56px;
  min-height: 158px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  flex: 0 0 56px;
  border: 0;
  border-radius: 9px 0 0 9px;
  color: white;
  background: var(--terracotta);
  cursor: pointer;
}
.shop-tab-trigger > span:first-child { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 14px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.shop-tab-arrow { font-size: 18px; line-height: 1; }
.shop-tab-panel { width: 270px; padding: 29px 27px; display: flex; flex-direction: column; justify-content: center; background: var(--ink); }
.shop-tab-panel p { margin: 0 0 13px; color: #e78a6f; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.shop-tab-panel strong { color: white; font-size: 25px; line-height: 1.08; letter-spacing: -.025em; }
.shop-tab-panel > span { margin-top: 15px; color: #c5c8c1; font-size: 13px; line-height: 1.45; }

.admin-tab {
  position: fixed;
  z-index: 59;
  left: 0;
  top: 46%;
  min-width: 92px;
  padding: 15px 17px 14px;
  display: grid;
  gap: 4px;
  border-radius: 0 8px 8px 0;
  color: white;
  background: var(--sage);
  box-shadow: 0 12px 25px rgba(36,39,34,.16);
  transition: transform .18s ease, background .18s ease;
}
.admin-tab:hover { color: white; transform: translateX(3px); background: #5e7056; }
.admin-tab span { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.admin-tab strong { font-size: 14px; }

.hero { min-height: 610px; padding-block: 40px 28px; display: grid; grid-template-columns: .78fr 1.42fr; align-items: stretch; gap: 56px; }
.hero-copy { align-self: center; padding-block: 24px; }
.eyebrow { margin: 0 0 18px; color: var(--terracotta); font-size: 13px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(54px, 6vw, 82px); line-height: .92; letter-spacing: -.055em; }
.hero-text { max-width: 500px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 25px; border-radius: 5px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.button-primary { color: white; background: var(--terracotta); }
.text-link { padding-block: 8px; border-bottom: 2px solid var(--terracotta); font-weight: 700; }
.hero-image { position: relative; min-height: 520px; overflow: hidden; border-radius: 12px; background: #ddd3c3; }
.hero-image > img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 52%; transition: transform .6s ease; }
.hero-image:hover > img { transform: scale(1.02); }
.hero-badge { position: absolute; right: 22px; bottom: 22px; width: min(300px, calc(100% - 44px)); padding: 18px 20px; display: grid; gap: 5px; border-radius: 8px; background: rgba(255,255,255,.92); box-shadow: 0 12px 36px rgba(36,39,34,.14); backdrop-filter: blur(10px); }
.hero-badge strong { font-size: 15px; }
.hero-badge span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.trust { min-height: 80px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; border-block: 1px solid var(--line); }
.trust span { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 18px; color: #4e554a; font-size: 14px; font-weight: 700; text-align: center; border-right: 1px solid var(--line); }
.trust span:last-child { border: 0; }
.trust span::before { content: "✓"; display: grid; place-items: center; width: 25px; height: 25px; margin-right: 10px; border: 1.5px solid var(--sage); border-radius: 50%; color: var(--sage); font-size: 13px; }

.section { padding-block: 100px; }
.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: end; margin-bottom: 44px; }
.section-heading h2 { max-width: 650px; margin: 0; font-size: clamp(37px, 4vw, 56px); line-height: 1.04; letter-spacing: -.04em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card { min-height: 285px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.54); transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.service-card:hover { transform: translateY(-5px); background: white; box-shadow: 0 18px 45px rgba(70,59,43,.09); }
.service-card > span { color: var(--terracotta); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.service-card h3 { margin: 48px 0 12px; font-size: 22px; }
.service-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.service-card a { margin-top: auto; padding-top: 22px; font-size: 14px; font-weight: 800; }

.projects-section { background: #ece7de; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px 22px; }
.project-card { min-width: 0; }
.project-visual, .compare, .project-gallery-visual { position: relative; height: 410px; overflow: hidden; border-radius: 10px; background: #d4cec2; }
.project-visual img, .compare img, .project-gallery-visual img { width: 100%; height: 100%; object-fit: cover; }
.compare > img, .compare-after { position: absolute; inset: 0; }
.compare-after { clip-path: inset(0 0 0 var(--position)); }
.compare-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--position); width: 2px; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; transform: translateX(-1px); }
.compare-line span { position: absolute; top: 50%; left: 50%; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: white; box-shadow: 0 5px 18px rgba(0,0,0,.2); transform: translate(-50%,-50%); font-size: 18px; }
.compare input { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.image-label { position: absolute; z-index: 3; top: 18px; padding: 8px 11px; border-radius: 4px; color: white; background: rgba(28,31,28,.82); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(6px); }
.image-label-before { left: 18px; }
.image-label-after, .image-label-finished { right: 18px; }
.image-label-finished { background: var(--terracotta); }
.project-meta { padding: 20px 4px 0; display: flex; justify-content: space-between; gap: 20px; }
.project-meta span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.project-meta .project-status { display: inline-block; margin-right: 10px; padding: 6px 8px; border-radius: 4px; color: white; background: var(--terracotta); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.project-meta h3 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.02em; }
.project-meta h3 a:hover { color: var(--terracotta-dark); }
.project-description { max-width: 580px; margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.project-meta .project-number { color: #aaa298; font-size: 20px; }
.project-portrait .compare-before, .project-portrait .compare-after img { object-position: center 55%; }
.project-featured { grid-column: 1 / -1; }
.project-featured .compare { height: 560px; }
.projects-cta { margin-top: 52px; display: flex; justify-content: center; }

.project-gallery-visual { display: grid; gap: 3px; }
.project-gallery-visual figure { position: relative; min-width: 0; min-height: 0; margin: 0; overflow: hidden; }
.project-gallery-visual figure span { position: absolute; left: 12px; bottom: 12px; padding: 7px 9px; border-radius: 4px; color: white; background: rgba(28,31,28,.76); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(5px); }
.project-gallery-count-2 { grid-template-columns: 1fr 1fr; }
.project-gallery-count-3, .project-gallery-count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.project-gallery-count-3 figure:first-child { grid-row: 1 / -1; }
.project-empty { display: grid; place-items: center; padding: 25px; color: var(--muted); text-align: center; }
.project-gallery-card { grid-column: 1 / -1; }
.project-gallery-card .project-gallery-visual { height: 650px; }
.project-gallery-visual.project-gallery-full { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
.project-gallery-visual.project-gallery-full figure { aspect-ratio: 4 / 3; }
.project-gallery-visual.project-gallery-full figure:first-child { grid-row: auto; }
.project-video { margin-top: 14px; overflow: hidden; border-radius: 10px; background: #171915; }
.project-video video { display: block; width: 100%; max-height: 680px; background: #171915; }

.projects-page-hero { min-height: 500px; padding-block: 90px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 90px; align-items: end; }
.projects-page-hero h1 { margin: 0; font-size: clamp(48px, 6vw, 78px); line-height: .96; letter-spacing: -.055em; }
.projects-page-hero > div:last-child { padding-bottom: 7px; }
.projects-page-hero > div:last-child p { margin: 0 0 28px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.projects-current-section { background: var(--white); }
.projects-section-heading { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: end; margin-bottom: 45px; }
.projects-section-heading h2 { margin: 0; font-size: clamp(38px, 4.5vw, 60px); line-height: 1.02; letter-spacing: -.045em; }
.projects-section-heading > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.project-current-card { grid-column: 1 / -1; }
.project-current-card .project-gallery-visual.project-gallery-full { display: block; column-count: 2; column-gap: 4px; }
.project-current-card .project-gallery-visual.project-gallery-full figure { width: 100%; margin: 0 0 4px; display: inline-block; aspect-ratio: auto; break-inside: avoid; }
.project-current-card .project-gallery-visual.project-gallery-full img { height: auto; }
.projects-archive-section .section { padding-top: 78px; }
.project-page-contact { text-align: center; }
.project-page-contact h2 { max-width: 780px; margin: 0 auto 30px; font-size: clamp(38px, 5vw, 64px); line-height: 1.04; letter-spacing: -.045em; }

.single-project { max-width: 1220px; }
.back-link { display: inline-block; margin-bottom: 45px; color: var(--terracotta-dark); font-weight: 800; }
.single-project-header { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: end; margin-bottom: 48px; }
.single-project-header h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: .98; letter-spacing: -.05em; }
.single-project-header > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.single-project-visual .compare, .single-project-visual .project-gallery-visual:not(.project-gallery-full) { height: 680px; }
.single-project-content { max-width: 760px; margin: 55px auto; }
.single-project-cta { margin-top: 70px; padding: 55px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-radius: 10px; color: white; background: var(--ink); }
.single-project-cta h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; }

.about { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; }
.about-copy h2, .contact-section h2 { margin: 0; font-size: clamp(39px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.045em; }
.about-copy > p:not(.eyebrow) { max-width: 640px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.about-copy .about-lead { margin-top: 30px; color: var(--ink); font-size: 20px; font-weight: 600; }
.about-facts { margin-top: 42px; padding-top: 30px; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; border-top: 1px solid var(--line); }
.about-facts div { display: grid; gap: 8px; }
.about-facts strong { color: var(--terracotta); font-size: 34px; }
.about-facts span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.contact-section { padding-block: 100px; color: white; background: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1fr .78fr; gap: 100px; align-items: center; }
.contact-section .eyebrow { color: #e78a6f; }
.contact-section h2 { max-width: 650px; }
.contact-section p:not(.eyebrow) { max-width: 610px; color: #c5c8c1; font-size: 17px; line-height: 1.65; }
.contact-card { padding: 30px; display: grid; border: 1px solid #51554e; border-radius: 10px; background: #2e312c; }
.contact-card > a, .contact-card > div { padding: 20px 0; display: grid; gap: 7px; border-bottom: 1px solid #50544e; }
.contact-card > :last-child { border: 0; }
.contact-card span { color: #aeb3aa; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.contact-card strong { color: white; font-size: 18px; }
.contact-card .contact-note { margin: 0 0 12px; padding: 10px 12px; color: #f3c2b3; background: rgba(201,95,61,.16); border-radius: 4px; font-size: 12px; font-weight: 700; }

.footer { padding-block: 64px 25px; background: #f1ede5; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .75fr .75fr; gap: 80px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-grid p, .footer-grid a:not(.brand) { margin: 0; color: var(--muted); font-size: 14px; }
.footer-grid strong { margin-bottom: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.footer-bottom { margin-top: 55px; padding-top: 22px; display: flex; justify-content: space-between; color: #8b8a83; border-top: 1px solid var(--line); font-size: 12px; }

.content-shell { min-height: 65vh; max-width: 900px; }
.content-shell h1 { font-size: clamp(42px, 6vw, 66px); letter-spacing: -.04em; }
.entry-content { color: var(--muted); font-size: 17px; line-height: 1.75; }
.entry-content a { color: var(--terracotta-dark); text-decoration: underline; }

.reveal { animation: rise .65s ease both; }
.reveal-delay { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .shell { width: min(100% - 36px, 680px); }
  .site-header { height: 70px; padding-inline: 18px; }
  .menu-button { display: block; }
  .nav { position: fixed; inset: 70px 0 auto; padding: 26px 24px 34px; display: none; align-items: stretch; gap: 8px; background: var(--ivory); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(0,0,0,.08); }
  .admin-bar .nav { top: 102px; }
  .nav-open { display: grid; }
  .nav a { padding: 13px 5px; }
  .nav-cta { margin-top: 8px; padding-inline: 18px; text-align: center; }
  .hero { min-height: 0; padding-top: 52px; grid-template-columns: 1fr; gap: 34px; }
  .hero-image { min-height: 430px; }
  .trust { grid-template-columns: 1fr 1fr; padding-block: 12px; }
  .trust span { border-right: 0; justify-content: flex-start; }
  .section { padding-block: 76px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }
  .project-featured .compare, .project-visual, .compare, .project-gallery-visual:not(.project-gallery-full) { height: 440px; }
  .project-gallery-card { grid-column: auto; }
  .project-gallery-card .project-gallery-visual:not(.project-gallery-full) { height: 620px; }
  .projects-page-hero { min-height: 0; padding-block: 72px; grid-template-columns: 1fr; gap: 35px; }
  .projects-section-heading { grid-template-columns: 1fr; gap: 22px; }
  .single-project-header { grid-template-columns: 1fr; gap: 25px; }
  .single-project-visual .compare, .single-project-visual .project-gallery-visual:not(.project-gallery-full) { height: 590px; }
  .about { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 45px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .nav { top: 116px; }
}

@media (max-width: 560px) {
  .brand { font-size: 21px; }
  .hero h1 { font-size: 57px; }
  .hero-text { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 15px; }
  .text-link { align-self: center; }
  .hero-image { min-height: 330px; }
  .hero-badge { display: none; }
  .shop-tab { top: auto; bottom: 22px; width: 292px; transform: translateX(244px); }
  .shop-tab-open { transform: translateX(0); }
  .shop-tab-trigger { width: 48px; min-height: 142px; flex-basis: 48px; }
  .shop-tab-panel { width: 244px; padding: 24px 21px; }
  .shop-tab-panel strong { font-size: 22px; }
  .admin-tab { top: auto; bottom: 22px; min-width: 84px; padding-inline: 14px; }
  .trust { grid-template-columns: 1fr; }
  .trust span { justify-content: flex-start; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 235px; }
  .service-card h3 { margin-top: 32px; }
  .project-visual, .compare, .project-featured .compare, .project-gallery-visual:not(.project-gallery-full) { height: 310px; }
  .project-gallery-card .project-gallery-visual:not(.project-gallery-full), .single-project-visual .project-gallery-visual:not(.project-gallery-full) { height: 520px; }
  .single-project-visual .compare { height: 360px; }
  .project-gallery-visual { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 1fr); }
  .project-current-card .project-gallery-visual.project-gallery-full { column-count: 1; }
  .project-gallery-count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .single-project-cta { padding: 34px 25px; align-items: flex-start; flex-direction: column; }
  .project-meta h3 { font-size: 21px; }
  .about-facts { grid-template-columns: 1fr; }
  .contact-section { padding-block: 75px; }
  .contact-card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}

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