/* ==========================================================================
   Golzary Immobilien – WordPress-Theme
   Gestaltung aus website/assets/css/style.css, angepasst auf das Block-Markup
   der Seite «Start» (content/start.html). Tokens gemäss DESIGN.md.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Schrift Geist, lokal (Fontsource, OFL-1.1, nur latin)
   -------------------------------------------------------------------------- */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 200; font-display: swap; src: url("../fonts/geist-latin-200-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/geist-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/geist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/geist-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Farben */
  --color-bg: #f4f1ea;      /* Kalkweiss */
  --color-ink: #1e1d1a;     /* Anthrazit */
  --accent: #2d4739;        /* Tannengrün */
  --color-line: #d8d1c4;    /* Sand */
  --shade-photo: rgba(30, 29, 26, .55);

  /* Schrift */
  --font-sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Layout */
  --side: 4%;
  --header-h: 125px;
  --header-h-fixed: 84px;
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--color-ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 { margin: 0; font-weight: 200; text-transform: uppercase; line-height: 1em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
img { max-width: 100%; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.skip-link {
  position: absolute; left: var(--side); top: -100px; z-index: 100;
  padding: 14px 24px; background: var(--color-ink); color: var(--color-bg);
  font-size: 16px; font-weight: 300; text-transform: uppercase;
}
.skip-link:focus { top: 12px; color: var(--color-bg); }

.wrap { width: 100%; margin: 0 auto; padding: 0 var(--side); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.h2 { font-size: 35px; font-weight: 400; }
.lead { font-size: 20px; line-height: 1.4em; }

/* Vor der Animation unsichtbar; die Klassen setzt ausschliesslich das Skript. */
.anim-pending .hero h1 { visibility: hidden; }
.pre-anim { opacity: 0; }

/* --------------------------------------------------------------------------
   Header: transparent über dem Hero, fährt beim Hochscrollen fixiert ein
   -------------------------------------------------------------------------- */

.header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--header-h); padding: 0 var(--side);
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; color: var(--color-bg);
  transition: transform .35s ease;
}
/* Die einfahrende Variante ist niedriger als der Header über dem Hero */
.header.is-fixed { position: fixed; height: var(--header-h-fixed); background: var(--color-bg); color: var(--color-ink); transform: translateY(-100%); }
.header.is-fixed.is-visible { transform: translateY(0); }
.header.is-snap { transition: none !important; }

.brand { display: flex; align-items: center; gap: 16px; color: var(--accent); }
.brand:hover { color: var(--accent); }
.header:not(.is-fixed):not(.menu-open):not(.is-static) .brand { color: var(--color-bg); }
.brand .signet { width: auto; height: 58px; flex: none; }
.brand .signet .acc { fill: var(--accent); }
.header:not(.is-fixed):not(.menu-open):not(.is-static) .brand .signet .acc { fill: currentColor; opacity: .6; }
.brand .word {
  display: flex; flex-direction: column; gap: 4px; overflow: hidden;
  font-size: 25px; font-weight: 500; letter-spacing: .02em; line-height: 1.05; text-transform: uppercase;
}
.brand .word .w2 { font-size: 12.5px; font-weight: 200; letter-spacing: .34em; }

/* Logo-Animation: Balken wachsen, danach gleitet die Wortmarke herein */
.brand .lb { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); animation: lb-grow .7s cubic-bezier(.22, 1, .36, 1) forwards; }
.brand .b2 { animation-delay: .08s; }
.brand .b3 { animation-delay: .16s; }
.brand .b4 { animation-delay: .26s; }
.brand .b5 { animation-delay: .36s; }
.brand .b6 { animation-delay: .46s; }
.brand .word > span { opacity: 0; transform: translateX(-32px); animation: lb-slide .8s cubic-bezier(.22, 1, .36, 1) forwards; }
.brand .word .w1 { animation-delay: 1.1s; }
.brand .word .w2 { animation-delay: 1.25s; }
@keyframes lb-grow { to { transform: scaleY(1); } }
@keyframes lb-slide { to { transform: translateX(0); opacity: 1; } }

/* Menüs aus wp_nav_menu: <ul>/<li> verschwinden aus dem Layout, die Links bleiben direkte Flex-Kinder */
.nav ul, .nav li, .mobile-nav ul, .mobile-nav li, .footer .links ul, .footer .links li { display: contents; }

.nav { display: flex; gap: 5px; }
.nav a {
  display: block; padding: 13px 20px;
  font-size: 16px; font-weight: 300; line-height: 1; text-transform: uppercase;
  transition: color .4s, transform .4s, opacity .4s;
}
.nav a:hover { color: var(--accent); transform: translateY(8px); }
.nav a.active { color: var(--accent); }
.header:not(.is-fixed):not(.is-static) .nav a { color: var(--color-bg); }
.header:not(.is-fixed):not(.is-static) .nav a:hover { color: var(--color-bg); opacity: .75; }
.header:not(.is-fixed):not(.is-static) .nav a.active { color: var(--color-bg); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }

.burger {
  display: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer;
  align-items: center; justify-content: center; color: inherit; font: inherit;
}
.burger svg { width: 30px; height: 30px; }

.mobile-nav {
  position: fixed; top: 92px; left: 0; right: 0; z-index: 9;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 92px); max-height: calc(100svh - 92px); overflow-y: auto;
  background: var(--color-bg); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 22px var(--side); border-bottom: 1px solid var(--color-line); color: var(--color-ink); font-size: 16px; font-weight: 300; text-transform: uppercase; }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav li:not(:last-child) > a { border-bottom: 1px solid var(--color-line); }   /* Menü aus dem Backend: jeder Link ist letztes Kind seines <li> */
.mobile-nav a.active { color: var(--accent); }
.header.menu-open { position: fixed; background: var(--color-bg); color: var(--color-ink); transform: none; }
.header.is-fixed.menu-open { height: var(--header-h); }   /* offenes Menü: volle Höhe, damit das Panel bündig anschliesst */

/* Unterseiten ohne Hero: fester, heller Header im Fluss */
.header.is-static { position: relative; height: var(--header-h-fixed); background: var(--color-bg); color: var(--color-ink); border-bottom: 1px solid var(--color-line); }
.header.is-static.menu-open { position: relative; }
.no-hero .mobile-nav { top: var(--header-h-fixed); }

/* --------------------------------------------------------------------------
   Buttons (Block «Buttons»; der Link trägt das Aussehen von .btn)
   -------------------------------------------------------------------------- */

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.wp-block-buttons > .wp-block-button { display: block; margin: 0; }

.btn,
.wp-block-button .wp-block-button__link {
  display: inline-block; width: auto; height: auto; padding: 20px 50px; border: 1px solid var(--color-ink); border-radius: 0;
  background: var(--color-bg); color: var(--color-ink);
  font-family: inherit; font-size: 16px; font-weight: 300; line-height: 1; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: all .3s;
}
.btn:hover, .btn:focus-visible,
.wp-block-button .wp-block-button__link:hover, .wp-block-button .wp-block-button__link:focus-visible { background: var(--accent); color: var(--color-bg); }
.btn.on-dark { border-color: var(--color-bg); color: var(--color-ink); }
.btn.on-dark:hover, .btn.on-dark:focus-visible { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-bg); }
.btn[disabled] { opacity: .6; cursor: default; }

/* --------------------------------------------------------------------------
   Hero (Block «Cover»)
   -------------------------------------------------------------------------- */

.hero.wp-block-cover {
  position: relative; display: flex; align-items: flex-end; justify-content: flex-start; overflow: hidden;
  min-height: 100vh; min-height: 100svh; padding: 0 var(--side) 64px;
  background: #26362d;
}
.hero.wp-block-cover > .wp-block-cover__image-background { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Overlay fest in Tannengrün, 36 % (unabhängig von der Einstellung im Editor) */
.hero.wp-block-cover > .wp-block-cover__background.has-background-dim { position: absolute; inset: 0; z-index: 1; background-color: var(--accent) !important; opacity: .36; }
.hero.wp-block-cover > .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; color: var(--color-bg); }
.hero.wp-block-cover h1 { color: var(--color-bg); font-weight: 400; font-size: clamp(28px, 4.3vw, 84px); text-wrap: balance; }

/* --------------------------------------------------------------------------
   Sektionen (Gruppen-Blöcke mit tagName «section»)
   -------------------------------------------------------------------------- */

.section { padding: 100px var(--side) 50px; }
.section.objects { padding-top: 144px; }

.h-line { border-left: 1px solid var(--color-ink); padding-left: 30px; font-size: 35px; font-weight: 300; }
.intro-cta { justify-content: flex-end; margin-top: 50px; }

/* Titelzeile mit Linie: die Linie ist ein Pseudo-Element der Überschrift */
.divider-text { display: flex; align-items: center; gap: 24px; padding: 15px 0; font-size: 30px; font-weight: 200; text-transform: uppercase; line-height: 1em; }
.divider-text::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.divider-text.line-first::after { content: none; }
.divider-text.line-first::before { content: ""; flex: 1; height: 1px; background: currentColor; }

/* Leistungen */
.services { padding: 72px var(--side) 60px; }
.icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 30px; perspective: 900px; }
.ibox {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  min-height: 260px; padding: 36px 16px; text-align: center;
  background: var(--accent); color: var(--color-bg);
}
.ibox svg { display: block; width: 56px; height: 56px; }
.ibox h3 { font-size: 22px; line-height: 1.1em; hyphens: manual; overflow-wrap: break-word; max-width: 100%; }

/* Objekte */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; margin-top: 40px; }
.card .wp-block-image { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--color-line); }
.card .wp-block-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .tag { display: block; margin: 20px 15px 10px; font-size: 15px; font-weight: 400; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 24px; margin: 0 15px 10px; }
.card p:not(.tag) { margin: 0 15px; }
.objects-cta { justify-content: center; margin-top: 60px; }

/* Werte & Arbeitsweise: Bild-Block als Hintergrund, darüber Abdunklung und Text */
.team { position: relative; display: flex; align-items: center; overflow: hidden; min-height: 640px; padding: 100px var(--side); color: var(--color-bg); background: var(--color-ink); }
.team::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--shade-photo); }
.team-bg.wp-block-image { position: absolute; inset: 0; z-index: 0; }
.team-bg.wp-block-image img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
/* Eigener Bildausschnitt für Mobile (zweiter Bild-Block); fehlt er, bleibt das breite Bild */
.team-bg-mobile.wp-block-image { display: none; }
.team-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; margin-top: 12px; }
.value { display: flex; flex-direction: column; gap: 8px; }
.value h3 { font-size: 18px; font-weight: 400; }
.value p { font-size: 15px; line-height: 1.4em; }

/* Gründer */
.founder .founder-grid { align-items: center; }
.founder-photo.wp-block-image { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--color-line); }
.founder-photo.wp-block-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.founder-text .tag { display: block; font-size: 15px; font-weight: 400; text-transform: uppercase; color: var(--accent); }
.founder-claim { margin-top: 12px; border-left: 1px solid var(--color-ink); padding-left: 30px; font-size: 28px; font-weight: 200; line-height: 1.1em; text-transform: uppercase; }

/* Kontakt */
.band { background: var(--accent); color: var(--color-bg); }
.band a { color: var(--color-bg); }
.band.contact { padding: 75px var(--side); }
.contact-lead { margin-top: 24px; }
.info { margin: 40px 0 0; }
.info p { margin: 0 0 30px; font-size: 15px; }
.info .info-label { margin-bottom: 10px; font-size: 18px; font-weight: 400; text-transform: uppercase; line-height: 1em; }

/* --------------------------------------------------------------------------
   Kontaktformular (Contact Form 7, Vorlage: div.field > label + Feld)
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 40px; }
.field label { font-size: 15px; font-weight: 200; }
.field .wpcf7-form-control-wrap { display: block; }
.field .input {
  display: block; width: 100%; height: 44px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--color-bg); border-radius: 0;
  background: transparent; color: var(--color-bg); caret-color: var(--color-bg);
  font-family: inherit; font-size: 18px; font-weight: 300; line-height: 1.4;
  -webkit-appearance: none; appearance: none;
}
.field .input.area { height: 96px; min-height: 96px; resize: vertical; }
.field .input:focus { outline: none; border-bottom-width: 2px; }
.field .input:focus-visible { outline: none; }
.field .input[aria-invalid="true"] { border-bottom-style: dashed; }
.field .input:-webkit-autofill { -webkit-text-fill-color: var(--color-bg); box-shadow: 0 0 0 1000px var(--accent) inset; caret-color: var(--color-bg); }

/* Fehlermeldung pro Feld */
.wpcf7 .wpcf7-not-valid-tip { display: block; margin-top: 6px; color: var(--color-bg); font-size: 15px; font-weight: 300; }

/* Senden-Button mit Ladeanzeige daneben */
.wpcf7-form .form-actions { display: flex; align-items: center; gap: 20px; }
.wpcf7-form input.btn { -webkit-appearance: none; appearance: none; }
.wpcf7-form.submitting input.btn { opacity: .6; cursor: default; }
.wpcf7 .wpcf7-spinner { margin: 0; background-color: var(--color-bg); opacity: .8; }
.wpcf7 .wpcf7-spinner::before { background-color: var(--accent); }

/* Rückmeldung nach dem Senden */
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 0; border: 0; font-size: 18px; font-weight: 300; line-height: 1.4em; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--color-ink); padding: 40px var(--side) 44px; }
.footer .row { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 50px; }
.footer .links a { font-size: 16px; font-weight: 300; text-transform: uppercase; }
.footer .small { margin-top: 32px; font-size: 15px; }

/* --------------------------------------------------------------------------
   Inhaltsseiten (Impressum, Datenschutzerklärung)
   -------------------------------------------------------------------------- */

.page-section { padding: 80px 0 100px; }
.page-wrap { max-width: 820px; margin: 0; }
.page-title { font-size: 35px; font-weight: 400; margin-bottom: 40px; }
.entry-content { font-size: 17px; line-height: 1.5; }
.entry-content > * + * { margin-top: 18px; }
.entry-content h2 { font-size: 24px; font-weight: 400; margin-top: 44px; }
.entry-content h3 { font-size: 18px; font-weight: 400; margin-top: 32px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content ul { list-style: disc; }
.entry-content li + li { margin-top: 6px; }
.entry-content img { height: auto; }
.entry-title { font-size: 24px; font-weight: 400; }
.entry + .entry { margin-top: 40px; }
.nav-links { display: flex; gap: 24px; margin-top: 40px; font-size: 16px; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Tablet: Im Canvas nicht definiert. Navigation und Kacheln werden hier nur
   so weit angepasst, dass nichts überläuft.
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .nav a { padding: 13px 14px; font-size: 15px; }
  .ibox h3 { font-size: 19px; }
  .divider-text { font-size: 26px; }
}

@media (max-width: 900px) {
  :root { --header-h: 92px; --header-h-fixed: 72px; }
  .nav { display: none; }
  .burger { display: flex; }
  .header.is-fixed, .header.menu-open { border-bottom: 1px solid var(--color-line); }
  .icons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ibox { min-height: 200px; }
  .ibox h3 { font-size: 20px; }
}

/* --------------------------------------------------------------------------
   Mobile (Artboard «Mobile 390»)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .header .brand .word { display: none; }
  .brand .signet { height: 46px; }
  .footer .brand .signet { height: 46px; }

  .hero.wp-block-cover { padding: 0 var(--side) 40px; }

  .section { padding: 50px var(--side) 30px; }
  .section.objects { padding-top: 80px; }
  .two, .cards { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .h-line { font-size: 28px; padding-left: 20px; }
  .h2 { font-size: 28px; }
  .lead { font-size: 18px; }

  .services { padding: 50px var(--side) 40px; }
  .divider-text { font-size: 18px; gap: 16px; }
  .icons { gap: 8px; margin-top: 24px; }
  .ibox { min-height: 160px; padding: 24px 10px; gap: 14px; }
  .ibox svg { width: 40px; height: 40px; }
  .ibox h3 { font-size: 16px; }

  .card h3 { font-size: 22px; }

  .team { min-height: 520px; padding: 60px var(--side); }
  .team-bg.wp-block-image img { object-position: center; }
  .team:has(.team-bg-mobile) .team-bg.wp-block-image:not(.team-bg-mobile) { display: none; }
  .team-bg-mobile.wp-block-image { display: block; }
  .values { grid-template-columns: minmax(0, 1fr); gap: 22px; }

  .founder-claim { font-size: 22px; padding-left: 20px; }

  .band.contact { padding: 60px var(--side); }
  .contact-lead br { display: none; }

  .footer { padding: 30px var(--side) 34px; }
  .footer .row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer .links { gap: 26px; }

  .page-section { padding: 50px 0 60px; }
  .page-title { font-size: 28px; margin-bottom: 28px; }
}

/* --------------------------------------------------------------------------
   Bewegung reduzieren
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .header { transition: none; }
  .brand .lb, .brand .word > span { animation: none; transform: none; opacity: 1; }
  .nav a:hover { transform: none; }
  .btn, .wp-block-button .wp-block-button__link, .nav a { transition: none; }
}

@media print {
  .header, .burger, .mobile-nav { display: none !important; }
  .hero.wp-block-cover { min-height: 0; padding-top: 40px; }
}
