/*
Theme Name: Plavisto
Author: Hagen Plasswich
Description: Reduziertes Hybrid-Theme fuer Plavisto.
Version: 1.1.0
Text Domain: plavisto
*/

:root {
  --plavisto-bg: #ededeb;
  --plavisto-text: #111111;
  --plavisto-muted: rgba(17, 17, 17, 0.62);
  --plavisto-line: rgba(17, 17, 17, 0.18);
  --plavisto-accent: #8b2f2b;
  --plavisto-edge: clamp(0.85rem, 2vw, 1.4rem);
  --plavisto-serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --plavisto-sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --plavisto-page-top: clamp(12rem, 22vw, 18rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --plavisto-bg: #252525;
    --plavisto-text: #f4f1ec;
    --plavisto-muted: rgba(244, 241, 236, 0.68);
    --plavisto-line: rgba(244, 241, 236, 0.18);
    --plavisto-accent: #d8b46d;
  }
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--plavisto-bg);
  color: var(--plavisto-text);
  font-family: var(--plavisto-sans);
  overflow-x: hidden;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  background: var(--plavisto-text);
  color: var(--plavisto-bg);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.screen-reader-text:focus {
  clip: auto;
  height: auto;
  left: var(--plavisto-edge);
  top: var(--plavisto-edge);
  width: auto;
  z-index: 10000;
}

.plavisto-header {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  padding: clamp(1rem, 2vw, 1.35rem) 0 0;
  color: var(--plavisto-text);
  pointer-events: none;
  transition: padding 220ms ease, transform 220ms ease;
}

body.admin-bar .plavisto-header {
  top: 32px;
}

.plavisto-header__side,
.plavisto-header__brand {
  pointer-events: auto;
}

.plavisto-header__side {
  position: relative;
  min-width: 0;
}

.plavisto-header__side--left {
  justify-self: start;
  margin-left: var(--plavisto-edge);
}

.plavisto-header__side--right {
  justify-self: end;
  margin-right: var(--plavisto-edge);
  text-align: right;
}

.plavisto-header__brand {
  display: grid;
  justify-self: center;
  justify-items: center;
  min-width: min(58vw, 30rem);
  color: var(--plavisto-text);
  font-family: var(--plavisto-serif);
  text-align: center;
  text-decoration: none;
  text-shadow: 0 0.08rem 0.85rem var(--plavisto-bg), 0 0 1.5rem var(--plavisto-bg);
}

.plavisto-header__wordmark {
  display: block;
  max-height: 7rem;
  overflow: hidden;
  font-size: clamp(2.7rem, 6.7vw, 7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.86;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top center;
  transition: max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
}

.plavisto-header__subline {
  display: block;
  margin-top: 0.48rem;
  color: var(--plavisto-muted);
  font-family: var(--plavisto-sans);
  font-size: clamp(0.58rem, 1.1vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1.25;
  text-transform: uppercase;
  transition: color 180ms ease, margin 220ms ease, transform 220ms ease;
}

.plavisto-header.is-reduced {
  padding-top: clamp(0.62rem, 1.2vw, 0.9rem);
}

.plavisto-header.is-reduced .plavisto-header__wordmark {
  max-height: 0;
  opacity: 0;
  transform: translateY(-0.45rem) scale(0.78);
}

.plavisto-header.is-reduced .plavisto-header__subline {
  margin-top: 0;
  color: var(--plavisto-text);
  transform: translateY(0);
}

.plavisto-header__button,
.plavisto-header__contact-placeholder {
  min-height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--plavisto-text);
  font-family: var(--plavisto-serif);
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0.08rem 0.85rem var(--plavisto-bg), 0 0 1rem var(--plavisto-bg);
}

.plavisto-header__button {
  cursor: pointer;
}

.plavisto-header__contact-placeholder {
  cursor: default;
  display: inline-block;
}

.plavisto-header__button:hover,
.plavisto-header__button:focus-visible,
.plavisto-header__panel a:hover,
.plavisto-header__panel a:focus-visible,
.plavisto-header__brand:hover,
.plavisto-header__brand:focus-visible {
  color: var(--plavisto-accent);
}

.plavisto-header__button:focus-visible,
.plavisto-header__panel a:focus-visible,
.plavisto-header__brand:focus-visible {
  outline: 1px solid var(--plavisto-accent);
  outline-offset: 0.32rem;
}

.plavisto-header__panel {
  position: absolute;
  top: 3rem;
  min-width: max-content;
  max-width: min(78vw, 22rem);
  padding-top: 0.85rem;
  border-top: 1px solid var(--plavisto-line);
  color: var(--plavisto-text);
  font-family: var(--plavisto-serif);
  font-size: clamp(1.32rem, 2.5vw, 2rem);
  line-height: 1.03;
  text-shadow: 0 0.08rem 0.85rem var(--plavisto-bg), 0 0 1rem var(--plavisto-bg);
}

.plavisto-header__panel[hidden] {
  display: none;
}

.plavisto-header__panel--left {
  left: 0;
}

.plavisto-header__menu-list {
  display: grid;
  gap: 0.52rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.plavisto-page {
  min-height: 100vh;
  padding: var(--plavisto-page-top) var(--plavisto-edge) clamp(5rem, 10vw, 9rem);
}

.plavisto-page__inner {
  width: min(88vw, 64rem);
  margin: 0 auto;
}

.plavisto-page h1,
.plavisto-page h2,
.plavisto-page h3,
.plavisto-page h4 {
  font-family: var(--plavisto-serif);
  font-weight: 430;
  line-height: 0.98;
}

.plavisto-page h1 {
  max-width: 12em;
  margin: 0 0 0.7em;
  font-size: clamp(2.4rem, 6vw, 6rem);
}

.plavisto-page h2 {
  font-size: clamp(2rem, 4.4vw, 4.2rem);
}

.plavisto-page p,
.plavisto-page li {
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.72;
}

.plavisto-page p {
  margin-top: 0;
}

.plavisto-page a {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

.plavisto-page .alignwide {
  width: min(92vw, 82rem);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.plavisto-page .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.plavisto-page .wp-block-image,
.plavisto-page .wp-block-gallery {
  margin-top: clamp(2.5rem, 7vw, 7rem);
  margin-bottom: clamp(2.5rem, 7vw, 7rem);
}

.plavisto-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.8rem 1.5rem;
  padding: 1.4rem var(--plavisto-edge) 1.6rem;
  border-top: 1px solid var(--plavisto-line);
  color: var(--plavisto-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.plavisto-footer p {
  margin: 0;
}

.plavisto-footer__identity,
.plavisto-footer__links {
  display: grid;
  gap: 0.28rem;
}

.plavisto-footer__links {
  justify-items: end;
}

.plavisto-footer__link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1.05rem;
}

.plavisto-footer a:hover,
.plavisto-footer a:focus-visible {
  color: var(--plavisto-accent);
}

.plavisto-footer a:focus-visible {
  outline: 1px solid var(--plavisto-accent);
  outline-offset: 0.24rem;
}

@media (max-width: 782px) {
  body.admin-bar .plavisto-header {
    top: 46px;
  }
}

@media (max-width: 760px) {
  :root {
    --plavisto-page-top: clamp(11rem, 42vw, 14rem);
  }

  .plavisto-header {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding-top: 0.95rem;
  }

  .plavisto-header.is-reduced {
    padding-top: 0.75rem;
  }

  .plavisto-header__side--left,
  .plavisto-header__side--right {
    position: absolute;
    top: 0.95rem;
    margin: 0;
  }

  .plavisto-header__side--left {
    left: var(--plavisto-edge);
  }

  .plavisto-header__side--right {
    right: var(--plavisto-edge);
  }

  .plavisto-header__brand {
    min-width: min(62vw, 18rem);
    margin-top: 3.1rem;
  }

  .plavisto-header.is-reduced .plavisto-header__brand {
    margin-top: 0.25rem;
  }

  .plavisto-header__wordmark {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .plavisto-header__subline {
    letter-spacing: 0.18em;
  }

  .plavisto-header__panel {
    position: fixed;
    top: 5.8rem;
    max-width: calc(100vw - 2rem);
    font-size: clamp(1.3rem, 8vw, 2.3rem);
  }

  body.admin-bar .plavisto-header__panel {
    top: calc(5.8rem + 46px);
  }

  .plavisto-header__panel--left {
    left: var(--plavisto-edge);
  }

  .plavisto-footer {
    grid-template-columns: 1fr;
  }

  .plavisto-footer__links {
    justify-items: start;
  }

  .plavisto-footer__link-row {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
