/*
Theme Name: Conntxt Apple-Style
Theme URI: https://conntxt.de
Author: Cornelia Schade
Description: Nüchternes, reduziertes WordPress-Theme in Weiß/Gold mit kuratierbarer Apple-artiger Startseite. Jede Seite/jeder Beitrag/jedes Projekt kann per Häkchen zur Startseite hinzugefügt werden, inkl. Reihe und Kachelgröße.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: conntxt-apple
*/

@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/bebas-neue-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --white: #FFFFFF;
  --paper: #FAFAF8;
  --ink: #1D1D1F;
  --ink-soft: #4A4A4D;
  --ink-faint: #86868B;
  --gold: #B8963E;
  --gold-soft: #F4EEDE;
  --line: #E5E3DD;

  --font-display: "Bebas Neue", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1180px;
}

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

body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-weight: 400; font-size: 19px;
  letter-spacing: .002em; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: .01em;
  margin: 0 0 .3em; color: var(--ink); text-transform: none;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.1em; color: var(--ink); max-width: 62ch; }
p.lede { font-size: 1.25rem; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: .8em;
}

/* ---------- header / hamburger nav ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 32px; max-width: var(--max); margin: 0 auto; }
.logo { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .03em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--gold); }
.logo:hover { text-decoration: none; }

.nav-toggle { background: none; border: 1.5px solid var(--ink); border-radius: 2px; width: 44px; height: 38px; cursor: pointer; position: relative; padding: 0; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle::before { top: 13px; }
.nav-toggle span { top: 19px; }
.nav-toggle::after { top: 25px; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }

.nav-menu {
  position: fixed; inset: 0 0 0 auto; width: min(380px, 88vw); background: var(--white);
  border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .3s ease;
  padding: 90px 36px 32px; overflow-y: auto; z-index: 55;
}
.nav-menu.open { transform: translateX(0); }
.nav-menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu li { border-bottom: 1px solid var(--line); }
.nav-menu a { display: block; padding: 16px 0; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.nav-menu a:hover { color: var(--gold); text-decoration: none; }
.nav-menu .nav-cta { margin-top: 24px; }
/* Wichtig: gezielt VOR der allgemeinen ".nav-menu a:hover"-Regel überschreiben,
   sonst gewinnt die allgemeinere Regel und der Button-Text wird unsichtbar
   (Gold-Text auf Gold-Hintergrund). Deshalb hier höhere Spezifität + späterer Ort im CSS. */
.nav-menu a.nav-cta {
  display: inline-flex; width: auto; align-self: flex-start;
  justify-content: center; align-items: center; text-align: center;
  padding: 13px 28px; font-family: var(--font-body); font-size: .98rem;
}
.nav-menu a.nav-cta:hover,
.nav-menu a.nav-cta:focus,
.nav-menu a.nav-cta:active {
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
}
.nav-overlay { position: fixed; inset: 0; background: rgba(29,29,31,.35); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 54; }
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none;
  padding: 13px 26px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink);
  font-family: var(--font-body); font-size: .98rem; letter-spacing: .01em; cursor: pointer; background: transparent;
}
.btn:hover { background: var(--ink); color: var(--white); text-decoration: none; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--white); }
.btn-primary:hover { background: #9c7f34; border-color: #9c7f34; color: var(--white); }
.btn-ghost-white { border-color: var(--white); color: var(--white); }
.btn-ghost-white:hover { background: var(--white); color: var(--ink); }

/* ---------- homepage: kuratierte Kacheln ---------- */
.home-hero-tile {
  position: relative; min-height: 640px; display: flex; align-items: flex-end;
  background: var(--gold); background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.home-hero-tile .tile-content { position: relative; z-index: 2; padding: 64px 32px; width: 100%; max-width: var(--max); margin: 0 auto; }
.home-hero-tile.has-image .tile-content { color: var(--white); }
.home-hero-tile.has-image {
  background-color: var(--white); /* Hintergrund weiß, sobald ein echtes Vorschaubild existiert */
}
.home-hero-tile.has-image::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.05) 55%, rgba(0,0,0,0) 100%);
}
.home-hero-tile.has-image p { color: rgba(255,255,255,.92); }
.home-hero-tile h2 { margin-bottom: .2em; }
.home-hero-tile .tile-eyebrow { color: var(--white); }
.home-hero-tile.has-image .tile-eyebrow { color: #F0D98A; }
/* Titel auf Bildkacheln: goldener Balken direkt hinter der Schrift für Lesbarkeit */
.home-hero-tile.has-image h2 {
  display: inline-block; background: var(--gold); color: var(--ink);
  padding: 4px 16px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.home-grid-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.home-grid-tile { background: var(--gold); padding: 48px 36px; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; color: var(--white); }
.home-grid-tile.has-image {
  background-color: var(--white); /* Hintergrund weiß, sobald ein echtes Vorschaubild existiert */
  background-size: cover; background-position: center; color: var(--white); justify-content: flex-end;
}
.home-grid-tile.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 60%); }
.home-grid-tile .tile-inner { position: relative; z-index: 2; }
.home-grid-tile.has-image p { color: rgba(255,255,255,.9); }
.home-grid-tile p { color: rgba(255,255,255,.92); }
.home-grid-tile h3 { margin-bottom: .25em; color: var(--white); }
/* Titel auf Bildkacheln: goldener Balken direkt hinter der Schrift */
.home-grid-tile.has-image h3 {
  display: inline-block; background: var(--gold); color: var(--ink);
  padding: 3px 12px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.home-grid-tile a.tile-link { position: absolute; inset: 0; z-index: 3; }
.home-hero-tile a.tile-link { position: absolute; inset: 0; z-index: 3; }

/* ---------- Ausklapp-Button je Kachel ---------- */
.tile-toggle {
  position: absolute; z-index: 4; right: 18px; bottom: 18px;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
  transition: background .2s ease, transform .15s ease;
}
.tile-toggle:hover { background: #000; transform: scale(1.05); }
.tile-toggle[aria-expanded="true"] .tile-toggle-icon { transform: none; }
.tile-toggle-icon { display: inline-block; font-weight: 700; line-height: 1; color: var(--white); }

.tile-full-content {
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 48px 0; animation: conntxt-fade-in .25s ease;
}
.tile-full-content[hidden] { display: none; }
@keyframes conntxt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tile-full-content { animation: none; }
}

/* Schwebender Schließen-Button: bleibt beim Scrollen im Sichtbereich,
   solange ein Kachel-Inhalt aufgeklappt ist. */
.floating-collapse {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--white); font-size: 1.8rem; font-weight: 700;
  box-shadow: 0 4px 18px rgba(0,0,0,.3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.floating-collapse:hover { background: #000; }
.floating-collapse[hidden] { display: none; }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-hero-tile { min-height: 460px; }
}

/* ---------- content sections (Profil-Seite etc.) ---------- */
section, .c-section { padding: 72px 0; }
.section-alt { background: var(--paper); }
.section-line { border-top: 1px solid var(--line); }

.field-row { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); }
.field-row:last-child { border-bottom: 1px solid var(--line); }
.field-row h3 { margin: 0; font-size: 1.1rem; }
.field-row .meta { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.field-row ul { margin: 0; padding-left: 20px; }
.field-row li { margin-bottom: 6px; color: var(--ink-soft); }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; gap: 8px; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- contact form ---------- */
.contact-form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--white); color: var(--ink); resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-faint); }
.form-status { display: none; padding: 12px 16px; border-radius: 6px; font-size: .92rem; }
.form-status.success { display: block; background: var(--gold-soft); color: var(--ink); }
.form-status.error { display: block; background: #FBE4DD; color: var(--ink); }

/* ---------- flächiger Gold-Bereich (volle Breite) am Seitenanfang ---------- */
.intro-gold {
  background: var(--gold);
  width: 100vw; position: relative; left: 50%; margin-left: -50vw;
  padding: 56px 32px; margin-bottom: 40px;
}
.intro-gold-inner { max-width: 800px; margin: 0 auto; }
.intro-gold p { color: var(--ink); }
.intro-gold p.lede { color: var(--ink); }

/* ---------- legal / standard content ---------- */
.legal h2 { margin-top: 1.6em; }
.legal address { font-style: normal; }
.crumb { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); margin-bottom: 14px; }
.entry-content { padding: 64px 0; }
.entry-content .wrap { max-width: 800px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--paper); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.footer-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--gold); }
.copyright { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); }
