/* Haus Strobel — Meisterberg 19, Bad Waldsee
   Die Farben sind aus dem Luftbild gemessen: die Seite setzt das Wasser fort. */

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --water: #27292a;        /* Unterkante des Luftbilds */
  --water-deep: #1c1e1f;
  --water-line: #3c4144;
  --sky: #a8bcd2;          /* Himmel im Luftbild */
  --paper: #e4e8ea;        /* helle Seiten (Rechtstexte) */
  --ink: #1c1e1f;
  --mist: #9aa5ab;         /* Sekundaertext auf dunklem Grund */
  --slate: #5c666b;        /* Sekundaertext auf hellem Grund */

  --measure: 34rem;
  --gutter: clamp(1.5rem, 7vw, 6rem);

  /* Manrope hat eine grosse x-Hoehe: dieselbe optische Groesse wie eine
     Serifenschrift wird bei etwas kleineren Werten erreicht. */
  --t-micro: 0.8125rem;
  --t-small: 0.9rem;
  --t-base: 1rem;
  --t-lead: clamp(1.075rem, 2.2vw, 1.275rem);
}

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

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

body {
  margin: 0;
  background: var(--water);
  color: #e8ebec;
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus { left: 0; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----------------------------------------------------------- Bild + Himmel */

.view {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: start;
  padding: clamp(2.5rem, 9vh, 6rem) var(--gutter) 0;
  isolation: isolate;
}

.view__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  z-index: -2;
}

/* Breiter als das Bild: es wird oben/unten beschnitten. Weiter oben ansetzen,
   damit der helle Himmel stehen bleibt -- die Wortmarke steht darin. */
@media (min-aspect-ratio: 16 / 9) {
  .view__photo { object-position: 50% 10%; }
}

/* Blende zur Seitenfarbe: das Foto endet nie mit einer sichtbaren Kante. */
.view::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 22vh;
  background: linear-gradient(to bottom, rgba(39, 41, 42, 0) 0%, var(--water) 92%);
  z-index: -1;
  pointer-events: none;
}

.wordmark {
  margin: 0;
  color: var(--ink);
  font-weight: 300;
  /* Auch an die Fensterhoehe gekoppelt: auf flachen Fenstern rutscht der Block
     sonst aus dem Himmel in die Baumreihe und wird unlesbar. */
  font-size: clamp(2.5rem, min(8vw, 13vh), 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

/* Normalfall: eine Zeile. */
.wordmark span { display: inline; }

/* Schmale Schirme: umbrechen -- und dann darf der Grad groesser sein, weil
   "Strobel" allein in der Zeile steht. */
@media (max-width: 40rem) {
  .wordmark { font-size: clamp(2.75rem, 13vw, 4.5rem); }
  .wordmark span { display: block; }
}

.wordmark + p {
  margin: clamp(0.9rem, 2.5vh, 1.6rem) 0 0;
  color: #2c363b;
  font-size: var(--t-lead);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------- Inhalt */

.sheet {
  padding: clamp(3.5rem, 12vh, 8rem) var(--gutter) clamp(2rem, 6vh, 4rem);
}

.stack {
  max-width: var(--measure);
  display: grid;
  gap: clamp(2.25rem, 6vh, 3.5rem);
}

.stack > * { margin: 0; }

.postal {
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-style: normal;
}

.postal span { display: block; }
.postal span + span { color: var(--mist); }

.note {
  max-width: 32rem;
  color: #c6cdd0;
  font-size: var(--t-lead);
  line-height: 1.6;
  /* Verhindert, dass die letzte Zeile aus einem einzelnen Wort besteht.
     Browser ohne Unterstuetzung brechen wie bisher um. */
  text-wrap: pretty;
}

.contact {
  font-size: var(--t-base);
}

.contact a {
  color: var(--sky);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(168, 188, 210, 0.45);
}

.contact a:hover { text-decoration-color: var(--sky); }

/* ------------------------------------------------------------------ Karte */

.map {
  border-top: 1px solid var(--water-line);
  padding-top: clamp(1.75rem, 5vh, 2.5rem);
}

/* Die Groesse ist vor und nach dem Laden dieselbe. Nicht aendern: Leaflet im
   OSM-Embed misst sich einmal beim Start aus und rechnet nicht nach -- waechst
   die Box erst beim Einsetzen des iframes, bleiben die Kacheln zu klein. */
.map__frame {
  position: relative;
  aspect-ratio: 16 / 11;
  background: var(--water-deep);
  border: 1px solid var(--water-line);
}

@media (max-width: 34rem) {
  .map__frame { aspect-ratio: 1 / 1; }
}

.map__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map__consent {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.map__consent p {
  margin: 0;
  max-width: 26rem;
  color: var(--mist);
  font-size: var(--t-small);
  line-height: 1.55;
}

.btn {
  font: inherit;
  font-size: var(--t-small);
  letter-spacing: 0.02em;
  color: #e8ebec;
  background: transparent;
  border: 1px solid var(--sky);
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  transition: background-color 120ms linear, color 120ms linear;
}

.btn:hover {
  background: var(--sky);
  color: var(--ink);
}

.map__caption {
  margin: 0.85rem 0 0;
  color: #8b959b;
  font-size: var(--t-micro);
}

.map__caption a { color: inherit; }

/* --------------------------------------------------------------- Fusszeile */

.foot {
  border-top: 1px solid var(--water-line);
  margin-top: clamp(3rem, 9vh, 5rem);
  padding: 1.6rem var(--gutter) 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  align-items: baseline;
  font-size: var(--t-small);
  color: #8b959b;
}

.foot a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 165, 171, 0.35);
  padding-bottom: 1px;
}

.foot a:hover {
  color: #e8ebec;
  border-bottom-color: currentColor;
}

.foot__name { margin-right: auto; }

/* ---------------------------------------------------- Rechtstexte: Himmel */

.doc {
  background: var(--paper);
  color: var(--ink);
}

.doc .foot {
  border-top-color: #c6ced2;
  color: var(--slate);
}

.doc .foot a {
  color: var(--slate);
  border-bottom-color: #b3bdc2;
}

.doc .foot a:hover { color: var(--ink); }

.doc__head {
  padding: clamp(3rem, 9vh, 5.5rem) var(--gutter) 0;
}

.back {
  display: inline-block;
  color: var(--slate);
  font-size: var(--t-small);
  text-decoration: none;
  border-bottom: 1px solid #b3bdc2;
  padding-bottom: 1px;
}

.back:hover { color: var(--ink); }

.doc__head h1 {
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  font-size: clamp(2rem, 5.6vw, 3.2rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.prose {
  max-width: 34rem;
  padding: clamp(2rem, 5vh, 3rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  box-sizing: content-box;
}

.prose h2 {
  margin: 2.75rem 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 1.9rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.prose > :first-child { margin-top: 0; }

.prose p,
.prose ul {
  margin: 0 0 1rem;
  color: #2d3639;
}

.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }

.prose a {
  color: #2d3639;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.prose .lede {
  font-size: var(--t-lead);
  color: var(--slate);
  margin-bottom: 2rem;
}

.prose .fine {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #c6ced2;
  font-size: var(--t-small);
  color: var(--slate);
}

/* ---------------------------------------------------------------- Auftritt */

@media (prefers-reduced-motion: no-preference) {
  .wordmark,
  .wordmark + p {
    animation: rise 900ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  .wordmark + p { animation-delay: 140ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

@media print {
  .view { min-height: auto; }
  .view__photo,
  .map { display: none; }
  body { background: #fff; color: #000; }
}
