/*
Theme Name: Haslinger Foto
Theme URI: https://alfredhaslinger.net
Author: Alfred Haslinger
Description: Modernes, dunkles Fotografen-Theme mit großen Vollbild-Fotos, Best-of-Galerie mit Lightbox und Kunden-Login (zusammen mit dem Plugin „AH Kundengalerien“). Schrift lokal eingebunden (DSGVO).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: haslinger-foto
*/

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0f0f0f;
  --bg-alt: #171717;
  --line: #2a2a2a;
  --text: #ececec;
  --muted: #9a9a9a;
  --accent: #c9a97c;
  --accent-ink: #141414;
  --radius: 4px;
  --wrap: 1180px;
  --head: "Montserrat", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); font-weight: 300; letter-spacing: .06em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
p { margin: 0 0 1em; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--wide { max-width: 1600px; padding: 0 12px; }
.wrap--text { max-width: 760px; }
.center-block { margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin-inline: auto; }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; color: var(--accent); margin-bottom: .8em; }
.icon { flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.7em; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 500 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .18em; text-decoration: none; border-radius: var(--radius); cursor: pointer; transition: .25s; }
.btn:hover { background: transparent; color: var(--accent); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { border-color: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,15,15,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: background .3s, border-color .3s; }
.site-header--over { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; }
.site-header--over.is-scrolled { background: rgba(15,15,15,.92); backdrop-filter: blur(10px); border-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1600px; margin: 0 auto; padding: 16px 24px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font: 400 1.05rem var(--head); text-transform: uppercase; letter-spacing: .25em; }
.brand__tag { font: 400 .65rem var(--head); text-transform: uppercase; letter-spacing: .45em; color: var(--accent); margin-top: 4px; }
.brand__logo { max-height: 48px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav .menu { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav .menu li { position: relative; }
.main-nav .menu a { text-decoration: none; font: 400 .78rem var(--head); text-transform: uppercase; letter-spacing: .18em; padding: 8px 0; display: block; }
.main-nav .sub-menu { list-style: none; position: absolute; top: 100%; left: -16px; min-width: 220px; margin: 0; padding: 10px 16px; background: var(--bg-alt); border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-login { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 500 .72rem var(--head); text-transform: uppercase; letter-spacing: .16em; border: 1px solid rgba(255,255,255,.35); padding: 9px 14px; border-radius: var(--radius); }
.nav-login .icon { width: 15px; height: 15px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; gap: 6px; background: none; border: 0; padding: 10px; cursor: pointer; z-index: 2; }
  .nav-toggle span:not(.sr-only) { width: 26px; height: 1.5px; background: var(--text); transition: .3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 0; background: rgba(12,12,12,.98); flex-direction: column; justify-content: center; gap: 36px; opacity: 0; visibility: hidden; transition: .3s; }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav .menu { flex-direction: column; align-items: center; gap: 18px; }
  .main-nav .menu a { font-size: 1rem; }
  .main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; padding: 0; text-align: center; }
  .main-nav .sub-menu a { color: var(--muted); font-size: .8rem; }
  body.nav-open { overflow: hidden; }
}

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #000; }
.hero__slides, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; opacity: 0; transition: opacity 1.6s ease; transform: scale(1.06); }
.hero__img.is-active { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.65) 100%); }
.hero__content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 14vh; text-align: center; padding: 0 24px; }
.hero__title { font-size: clamp(2.2rem, 7vw, 5rem); font-weight: 200; letter-spacing: .22em; text-transform: uppercase; margin-bottom: .25em; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.hero__sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2.2vw, 1.4rem); color: #e8e1d6; margin-bottom: 2em; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; z-index: 2; bottom: 28px; left: 50%; width: 1px; height: 46px; background: linear-gradient(var(--text), transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero__img.is-active { animation: none; transform: none; } .hero__scroll { animation: none; } html { scroll-behavior: auto; } }

/* Sections */
.section { padding: clamp(64px, 10vw, 130px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; margin-bottom: clamp(32px, 5vw, 60px); }
.page-content--plain { padding-top: 150px; }
.page-hero { height: 60vh; min-height: 340px; overflow: hidden; }
.page-hero img { width: 100%; height: 100%; object-fit: cover; }
.page-title { text-align: center; margin-bottom: 1.2em; }

/* Foto-Raster (Masonry) */
.photo-grid { columns: 3 320px; column-gap: 10px; }
.photo-grid__item { break-inside: avoid; margin: 0 0 10px; overflow: hidden; background: #1b1b1b; }
.photo-grid__item a { display: block; cursor: zoom-in; }
.photo-grid__item img { width: 100%; transition: transform .6s ease, opacity .4s; }
.photo-grid__item a:hover img { transform: scale(1.035); opacity: .9; }
@media (max-width: 700px) { .photo-grid { columns: 2; column-gap: 6px; } .photo-grid__item { margin-bottom: 6px; } }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.service__img { aspect-ratio: 4/5; overflow: hidden; background: #222; margin-bottom: 18px; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.service:hover .service__img img { transform: scale(1.05); }
.service p { color: var(--muted); font-size: .95rem; }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

/* Über mich */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.about__img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about__img:empty { display: none; }
.about:has(.about__img:empty) { grid-template-columns: 1fr; max-width: 760px; }
.about__text p { color: #cfcfcf; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* Kunden-Teaser */
.kunden-teaser h2 { margin-bottom: .4em; }
.kunden-teaser .lead { margin-bottom: 2em; }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); }
.contact > div:first-child p { color: #cfcfcf; }
.contact__list { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 12px; }
.contact__list li { display: flex; align-items: center; gap: 12px; }
.contact__list .icon { color: var(--accent); }
.contact__list a { text-decoration: none; font-size: 1.1rem; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* Formulare (auch Contact Form 7 & Kunden-Login) */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], textarea, select {
  width: 100%; background: #1a1a1a; border: 1px solid var(--line); color: var(--text); padding: 13px 14px; font: 16px var(--body); border-radius: var(--radius); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.wpcf7 label, .ahkg-login label { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.wpcf7 p { margin-bottom: 1em; }
.wpcf7 input[type=submit] { display: inline-block; padding: .95em 1.8em; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 500 .8rem var(--head); text-transform: uppercase; letter-spacing: .18em; border-radius: var(--radius); cursor: pointer; width: auto; }

.ahkg-login-wrap { max-width: 420px; margin: 0 auto; padding: 36px; background: var(--bg-alt); border: 1px solid var(--line); }
.ahkg-login { display: grid; gap: 18px; }
.ahkg-login .btn { justify-content: center; }
.ahkg-gate { max-width: 420px; margin: 0 auto; text-align: center; }
.ahkg-gate .ahkg-login { text-align: left; margin-top: 20px; }
.ahkg-msg--err { color: #ff8a80; font-size: .9rem; margin: 0; }
.ahkg-gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 auto 30px; max-width: var(--wrap); padding: 0 12px; }
.ahkg-intro { max-width: 640px; color: #cfcfcf; }
.ahkg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ahkg-count, .ahkg-exp { color: var(--muted); font-size: .85rem; }

/* Inhalte / Blog */
.entry a { color: var(--accent); }
.entry img { margin: 1.5em 0; }
.entry .wp-block-gallery, .entry .gallery { margin: 2em 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.post-card { text-decoration: none; display: block; background: var(--bg-alt); }
.post-card__img { aspect-ratio: 3/2; overflow: hidden; background: #222; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover img { transform: scale(1.04); }
.post-card__body { padding: 18px 20px 22px; }
.post-card h2 { font-size: 1.05rem; font-weight: 500; letter-spacing: .04em; margin: .3em 0 0; }
.pagination { margin-top: 50px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; text-decoration: none; }
.pagination .current { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; }
.site-footer__social { display: flex; gap: 14px; }
.site-footer__social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; transition: .25s; }
.site-footer__social a:hover { border-color: var(--accent); }
.site-footer__nav { text-align: right; }
.site-footer__nav .menu { list-style: none; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 18px; margin: 0 0 6px; padding: 0; }
.site-footer__nav a { text-decoration: none; font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: 1fr; text-align: center; } .site-footer__social, .site-footer__nav .menu { justify-content: center; } .site-footer__nav { text-align: center; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5,5,5,.97); display: grid; place-items: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox__stage { margin: 0; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__stage img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .3s; user-select: none; -webkit-user-drag: none; }
.lightbox__stage img.is-loaded { opacity: 1; }
.lightbox__stage figcaption { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; opacity: .7; font: 300 2.6rem/1 var(--head); padding: 14px 18px; }
.lightbox button:hover { opacity: 1; color: var(--accent); }
.lightbox__close { top: 6px; right: 8px; }
.lightbox__prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox__bar { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 24px; align-items: center; font-size: .8rem; color: var(--muted); letter-spacing: .1em; }
.lightbox__dl { color: var(--accent); text-decoration: none; text-transform: uppercase; font-family: var(--head); }
@media (max-width: 700px) { .lightbox__prev, .lightbox__next { display: none; } }
