/*
Theme Name: Christian Stoppacher
Theme URI: https://stoppacher.net/
Author: OpenAI
Description: Reduzierte cineastische Vollbild-Startseite.
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: christian-stoppacher
*/

:root {
  color-scheme: dark;

  /* ===== DESIGN-EINSTELLUNGEN DESKTOP ===== */
  --name-font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --name-font-size: clamp(1rem, 3vw, 2rem);
  --contact-font-size: 0.72rem;
  --identity-left: clamp(1.5rem, 4vw, 4.5rem);
  --identity-bottom: clamp(1.5rem, 4vw, 4.5rem);

  --text: #f4f3ef;
  --muted: rgba(244, 243, 239, 0.78);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #080808;
}

body {
  color: var(--text);
  font-family: var(--name-font-family);
  -webkit-font-smoothing: antialiased;
}

.site {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.site::before,
.site::after {
  position: absolute;
  inset: 0;
  content: "";
}

.site::before {
  z-index: -2;
  background-image: url("assets/images/hero.webp");
  /* Linker Fokus: Leiter und Handtuch bleiben bei rechtem Beschnitt sichtbar. */
  background-position: left center;
  background-size: cover;
  transform: scale(1.01);
}

.site::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.12) 52%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent 45%);
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: end;
  gap: 0.1rem;
  width: min(34rem, 100%);
  padding: 0;
  margin: 0 0 var(--identity-bottom) var(--identity-left);
}

.name {
  max-width: 10ch;
  margin: 0;
  font-family: var(--name-font-family);
  font-size: var(--name-font-size);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

.contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: var(--contact-font-size);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.contact::after {
  position: absolute;
  right: 0;
  bottom: 0.55rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.5;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 180ms ease, opacity 180ms ease;
}

.contact:hover,
.contact:focus-visible {
  color: var(--text);
}

.contact:hover::after,
.contact:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.contact:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 0.35rem;
}

@media (max-width: 720px) {
  :root {
    /* ===== DESIGN-EINSTELLUNGEN MOBIL ===== */
    --name-font-size: clamp(2rem, 5vw, 3rem);
    --contact-font-size: 0.72rem;
    --identity-left: 1.5rem;
    --identity-bottom: 1.5rem;
  }

  .site::before {
    background-position: left center;
  }

  .site::after {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.16) 56%, rgba(0, 0, 0, 0.06) 100%);
  }

  .identity {
    gap: 0rem;
    margin-bottom: max(var(--identity-bottom), env(safe-area-inset-bottom));
  }

  .name {
    max-width: 8ch;
  }
}

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