/*
Theme Name: HausPlan
Description: Deutsches Lead-Portal für regionale Hausprojekte im HausPlan-Design.
Author: HausPlan
Version: 1.2.0
Requires at least: 5.2
Text Domain: hausplan
*/

:root {
  color-scheme: light;
  --ink: #1a343c;
  --muted: #425b62;
  --brand: #185667;
  --brand-dark: #124653;
  --deep: #103943;
  --wash: #f0f7f8;
  --page: #fcfefe;
  --white: #fff;
  --line: #cddfe2;
  --field-border: #7a9198;
  --tint: #dcedef;
  --accent: #f6d477;
  --accent-hover: #fbe5a1;
  --focus: #0b7289;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 78rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.6 var(--font); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; }
p { color: var(--muted); }
.wrap { width: min(var(--wrap), calc(100% - 5rem)); margin-inline: auto; }
.section { padding-block: 5.3rem; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 20; padding: .65rem 1rem; transform: translateY(-180%); background: var(--white); }
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 2; background: var(--page); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.7rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; white-space: nowrap; color: var(--ink); font-size: 1.48rem; font-weight: 820; letter-spacing: -.075em; line-height: 1; }
.wordmark > span:last-child { color: var(--brand); }
.brand-mark { display: grid; width: 2.15rem; height: 2.15rem; margin-inline-end: .6rem; place-items: center; border-radius: .62rem; background: var(--brand); }
.brand-mark i { width: .89rem; height: .7rem; position: relative; top: .17rem; border: 2px solid var(--white); border-top: 0; border-radius: 0 0 .11rem .11rem; }
.brand-mark i::before { content: ""; position: absolute; width: .67rem; height: .67rem; top: -.34rem; left: -.015rem; border: solid var(--white); border-width: 2px 0 0 2px; transform: rotate(45deg); }
.site-nav { display: flex; align-items: center; gap: clamp(1.15rem, 3vw, 2.4rem); font-size: .94rem; font-weight: 620; }
.site-nav a:not(.button):hover, .site-footer a:not(.wordmark):hover { color: var(--brand); text-decoration: underline; text-underline-offset: .21em; }
.menu-toggle { display: none; }
.button { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: .63rem; padding: .64rem 1.03rem; font-size: .94rem; font-weight: 730; line-height: 1.2; text-align: center; text-decoration: none; transition: background-color .18s ease, border-color .18s ease; }
.button-primary { background: var(--brand); color: var(--white); }
.button-primary:hover { background: var(--brand-dark); }
.button-outline, .button-secondary { border-color: var(--line); background: var(--page); color: var(--brand-dark); }
.button-outline:hover, .button-secondary:hover { border-color: var(--brand); background: var(--wash); }
.button-accent { background: var(--accent); color: var(--ink); }
.button-accent:hover { background: var(--accent-hover); }

.category-bar { border-bottom: 1px solid var(--line); background: var(--page); }
.category-bar-inner { display: flex; align-items: center; gap: .85rem; }
.category-bar-inner > p { flex: none; padding-right: .9rem; border-inline-end: 1px solid var(--line); color: var(--muted); font-size: .875rem; font-weight: 690; }
.category-shortcuts { display: flex; flex: 1; gap: .42rem; min-width: 0; overflow-x: auto; margin: 0; padding: .45rem .25rem; list-style: none; scroll-behavior: smooth; scroll-padding-inline: .25rem; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--field-border) var(--wash); }
.category-shortcuts li { flex: 0 0 6rem; scroll-snap-align: start; }
.category-shortcuts button { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: .55rem; background: var(--white); color: var(--brand-dark); font-size: .875rem; font-weight: 690; line-height: 1.18; text-align: center; }
.category-shortcuts button:focus-visible { outline-offset: -3px; }
.category-shortcuts button:hover { border-color: var(--brand); background: var(--wash); }
.category-shortcuts img { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tint); }
.category-shortcuts span { display: grid; flex: 1; align-items: center; width: 100%; min-height: 2.15rem; padding: .27rem .22rem; overflow-wrap: anywhere; hyphens: auto; }
.category-scroll-controls { display: flex; flex: none; gap: .25rem; }
.category-scroll-controls button { min-height: 2.75rem; padding: .35rem .45rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--white); color: var(--brand-dark); font-size: .875rem; font-weight: 680; }
.category-scroll-controls button[aria-disabled="true"] { color: var(--muted); background: var(--wash); cursor: default; }
.category-scroll-controls button:not([aria-disabled="true"]):hover { border-color: var(--brand); background: var(--tint); }
.category-browse { flex: none; min-height: 2.75rem; white-space: nowrap; }

.hero { background: var(--wash); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(1.7rem, 4vw, 4rem); padding-block: 3.2rem; }
.hero-copy { padding-block: .8rem; }
.eyebrow { display: flex; align-items: center; gap: .52rem; color: var(--brand-dark); font-size: .875rem; font-weight: 760; }
.eyebrow > span { width: .7rem; height: .7rem; background: var(--accent); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: .18rem; transform: rotate(18deg); }
.hero h1 { margin-top: .9rem; font-size: clamp(2.65rem, 5vw, 4.7rem); font-weight: 820; line-height: 1.015; letter-spacing: -.075em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero-intro { max-width: 30rem; margin-top: 1.4rem; font-size: clamp(1.02rem, .9rem + .35vw, 1.19rem); }

.project-search { display: grid; grid-template-columns: minmax(8.5rem, 1fr) minmax(6.5rem, .68fr) auto; gap: .55rem; margin-top: 1.8rem; padding: .55rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); box-shadow: 0 7px 25px color-mix(in srgb, var(--ink) 7%, transparent); }
.project-search label { display: flex; flex-direction: column; justify-content: center; gap: .11rem; padding-inline: .5rem; }
.project-search label + label { border-inline-start: 1px solid var(--line); padding-inline-start: .72rem; }
.project-search label > span, .project-filter > span { color: var(--muted); font-size: .875rem; font-weight: 640; }
.project-search input, .project-search select { display: block; width: 100%; min-width: 0; min-height: 1.75rem; padding: 0; border: 0; border-radius: .15rem; background-color: var(--white); color: var(--ink); font-size: 1rem; font-weight: 650; }
.project-search input::placeholder { color: var(--muted); font-weight: 520; opacity: 1; }
.project-search .button { min-height: 3.2rem; white-space: nowrap; }
select { appearance: none; padding-inline-end: 2rem; background-image: linear-gradient(45deg, transparent 52%, var(--brand-dark) 52%), linear-gradient(135deg, var(--brand-dark) 52%, transparent 52%); background-repeat: no-repeat; background-size: .34rem .34rem; background-position: calc(100% - .84rem) calc(50% + .1rem), calc(100% - .5rem) calc(50% + .1rem); }
.project-search select { padding-inline-end: 1.4rem; }
.preview-note { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; font-size: .875rem; }
.status-dot { flex: 0 0 .44rem; height: .44rem; border-radius: 50%; background: var(--brand); }

.hero-figure { position: relative; overflow: hidden; aspect-ratio: 1.23; border-radius: 1rem 4rem 1rem 1rem; background: var(--tint); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 54% 50%; }
.hero-figure figcaption { position: absolute; bottom: 1rem; left: 1rem; display: flex; align-items: center; gap: .67rem; padding: .55rem 1rem .55rem .57rem; border-radius: .7rem; background: var(--white); box-shadow: 0 3px 14px color-mix(in srgb, var(--ink) 15%, transparent); line-height: 1.3; }
.caption-icon { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: .45rem; background: var(--tint); color: var(--brand-dark); font-size: 1.34rem; line-height: 1; font-weight: 800; }
.hero-figure figcaption strong, .hero-figure figcaption small { display: block; }
.hero-figure figcaption strong { font-size: .93rem; }
.hero-figure figcaption small { margin-top: .14rem; color: var(--muted); font-size: .81rem; }

.section h2, .partner h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); font-weight: 795; }
.section-header { margin-bottom: 1.45rem; }
.section-header p, .faq > div > p { margin-top: .65rem; font-size: 1.06rem; }
.catalog-controls { display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 19rem); gap: .75rem; }
.project-filter { display: grid; min-width: 0; gap: .22rem; }
.project-filter input, .project-filter select, .inquiry-input { width: 100%; min-height: 2.85rem; border: 1px solid var(--field-border); border-radius: .55rem; padding: .45rem .7rem; background-color: var(--white); color: var(--ink); }
.project-filter input::placeholder { color: var(--muted); opacity: 1; }
.project-filter select, select.inquiry-input { padding-inline-end: 2.15rem; }
.catalog-status { margin-top: .6rem; font-size: .875rem; }
.catalog-results { display: grid; gap: 1.8rem; margin-top: .95rem; }
.catalog-group h3 { margin-bottom: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: clamp(1.2rem, 2.35vw, 1.6rem); font-weight: 740; }

.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.project-card { min-width: 0; background: var(--white); border-radius: .86rem; }
.project-card button { display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: inherit; color: var(--ink); background: transparent; text-align: left; transition: border-color .2s ease, box-shadow .2s ease; }
.project-card button:hover { border-color: var(--brand); box-shadow: 0 6px 21px color-mix(in srgb, var(--ink) 10%, transparent); }
.project-card img { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tint); }
.card-copy { display: flex; width: 100%; min-height: 5.3rem; flex: 1; align-items: start; justify-content: space-between; gap: .45rem; padding: .75rem; }
.card-copy > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.card-copy strong { display: block; font-size: 1.02rem; font-weight: 760; letter-spacing: -.025em; line-height: 1.25; }
.card-copy small { display: block; margin-top: .22rem; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.card-copy i { display: grid; flex: 0 0 1.8rem; height: 1.8rem; align-self: end; place-items: center; background: var(--wash); color: var(--brand-dark); border-radius: 50%; font-size: 1.2rem; font-style: normal; line-height: 1; }

.process { border-bottom: 1px solid var(--line); background: var(--white); }
.process-intro { margin-bottom: 1.6rem; text-align: center; }
.process-intro p { margin-top: .6rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; align-content: start; gap: .8rem; padding: clamp(1rem, 3vw, 1.7rem); border: 1px solid var(--line); border-radius: .85rem; background: var(--wash); }
.step-number { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: .55rem; background: var(--accent); color: var(--ink); font-size: .95rem; font-weight: 790; }
.steps h3 { font-size: 1.35rem; font-weight: 720; }
.steps p { margin-top: .4rem; }
.process-action { margin-top: 1.4rem; text-align: center; }

.faq { display: grid; grid-template-columns: .84fr 1.16fr; gap: clamp(1.6rem, 6vw, 5rem); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: .85rem; min-height: 3.55rem; padding: .75rem 0; list-style: none; font-size: 1rem; font-weight: 710; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { flex: none; content: "+"; color: var(--brand); font-weight: 550; font-size: 1.36rem; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: .02rem 2rem 1rem 0; }
.faq-list details a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: .15em; }
.partner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.4rem, 4vw, 3.75rem); border-radius: 1.1rem; background: var(--deep); color: var(--white); }
.partner h2 { margin-top: .36rem; }
.partner p { color: var(--tint); }
.partner :focus-visible { outline-color: var(--accent); }
.partner p:last-child { margin-top: .65rem; }
.partner .button { flex: none; }
.site-footer { padding-block: 1.45rem; border-top: 1px solid var(--line); background: var(--wash); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-inner p, .footer-inner > a:last-child { color: var(--muted); font-size: .875rem; }

.inquiry-dialog { width: min(100% - 1.7rem, 35rem); max-height: calc(100dvh - 1.7rem); overflow: auto; padding: clamp(1.1rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--page); color: var(--ink); box-shadow: 0 18px 70px color-mix(in srgb, var(--deep) 50%, transparent); }
.inquiry-dialog::backdrop { background: color-mix(in srgb, var(--deep) 68%, transparent); }
body:has(.inquiry-dialog[open]) { overflow: hidden; }
.inquiry-header { position: relative; padding-right: 2.75rem; }
.inquiry-header h2 { font-size: clamp(1.64rem, 5vw, 2.18rem); }
.inquiry-header h2:focus { outline: none; }
.inquiry-header p { margin-top: .55rem; }
.inquiry-close { position: absolute; top: -.18rem; right: -.22rem; display: grid; width: 2.55rem; height: 2.55rem; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); font-size: 1.65rem; line-height: 1; }
.inquiry-close:hover { background: var(--wash); }
.inquiry-progress { display: grid; gap: .33rem; margin-top: 1.05rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
.inquiry-progress-bar { width: 100%; height: .45rem; accent-color: var(--brand); border: 0; border-radius: 1rem; background: var(--tint); }
.inquiry-progress-bar::-webkit-progress-bar { border-radius: 1rem; background: var(--tint); }
.inquiry-progress-bar::-webkit-progress-value { border-radius: 1rem; background: var(--brand); }
.inquiry-progress-bar::-moz-progress-bar { border-radius: 1rem; background: var(--brand); }
.inquiry-form { display: grid; gap: .9rem; margin-top: 1.05rem; }
.inquiry-field { display: grid; gap: .33rem; font-size: .94rem; font-weight: 650; }
.inquiry-input { font-size: 1rem; font-weight: 500; }
.inquiry-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; padding: 0; border: 0; }
.inquiry-options legend { margin-bottom: .38rem; font-size: .94rem; font-weight: 700; }
.inquiry-option { display: flex; align-items: center; gap: .45rem; min-height: 2.8rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--white); font-size: .875rem; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; cursor: pointer; }
.inquiry-option:has(input:checked) { border-color: var(--brand); background: var(--wash); }
.inquiry-option input, .inquiry-consent input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: 0; accent-color: var(--brand); }
.inquiry-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .35rem; }
.inquiry-header + .inquiry-actions, .inquiry-summary + .inquiry-actions { margin-top: 1.05rem; }
.inquiry-note { border-radius: .5rem; background: var(--wash); padding: .68rem .8rem; font-size: .875rem; }
.inquiry-consent { display: flex; gap: .55rem; align-items: center; font-size: .875rem; cursor: pointer; }
.inquiry-summary { margin-top: 1rem; }
.inquiry-summary > div { display: grid; grid-template-columns: 7rem 1fr; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.inquiry-summary dt { color: var(--muted); font-size: .875rem; font-weight: 650; }

@media (max-width: 68rem) {
  .project-search { grid-template-columns: minmax(7.5rem, 1fr) minmax(6.3rem, .67fr) auto; }
  .project-search .button { padding-inline: .65rem; }
}

@media (max-width: 56rem) {
  .wrap { width: calc(100% - 3rem); }
  .category-bar-inner > p { display: none; }
  .hero-grid { padding-block: 2.8rem; }
  .hero-figure { aspect-ratio: 1; }
  .section { padding-block: 4rem; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: .52rem; background: var(--page); color: var(--ink); font-weight: 680; }
  .site-nav { position: absolute; inset: 100% 0 auto; display: none; padding: .7rem 1rem 1rem; border-bottom: 1px solid var(--line); background: var(--page); box-shadow: 0 8px 18px color-mix(in srgb, var(--ink) 9%, transparent); }
  .site-nav.is-open { display: grid; gap: .15rem; }
  .site-nav a { padding-block: .57rem; }
  .site-nav .button { justify-self: start; }
  .category-shortcuts { padding-block: .42rem; }
  .category-shortcuts li { flex-basis: 5.2rem; }
  .category-scroll-controls { display: none; }
  .category-bar-inner { gap: .45rem; }
  .category-browse { padding-inline: .62rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; padding-block: 1.9rem 2rem; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(2.72rem, 8.6vw, 4rem); }
  .hero-intro { margin-top: 1rem; }
  .project-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 1.25rem; }
  .project-search .button { grid-column: 1 / -1; }
  .hero-figure { aspect-ratio: 1.52; border-top-right-radius: 2.4rem; }
  .hero-figure figcaption { bottom: .7rem; left: .7rem; }
  .section { padding-block: 3.15rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .faq { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: auto minmax(0, 1fr); }
  .partner { align-items: start; flex-direction: column; gap: 1rem; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 33rem) {
  .section-header p { margin-top: .53rem; }
  .catalog-controls { grid-template-columns: minmax(0, 1fr); }
  .project-grid { gap: .5rem; }
  .card-copy { padding: .55rem; }
  .card-copy i { flex-basis: 1.45rem; height: 1.45rem; font-size: 1.05rem; }
}

@media (max-width: 23rem) {
  .inquiry-options { grid-template-columns: 1fr; }
}

@media (max-width: 22rem) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* WordPress pages, posts and archives. */
.wp-content > article + article { margin-top: 2rem; }
.wp-content h1 { font-size: clamp(2.35rem, 5vw, 3.8rem); }
.wp-content .entry-content { margin-top: 1rem; overflow-wrap: anywhere; }
.wp-content .entry-content > * + * { margin-top: 1em; }
.wp-content .entry-content a, .wp-content .posts-navigation a { color: var(--brand-dark); text-decoration: underline; }
.wp-content .entry-content img { height: auto; }
.wp-content .posts-navigation { margin-top: 2rem; }
