/*
 *  di Pinto · Ristorante · Pizzeria – Landingpage
 *  Erstellt durch: KTITM · Klaus Tesching IT & Media
 *  © 2026 KTITM / Klaus Tesching. Alle Rechte vorbehalten.
 *
 *  Nachtblau und Gold wie das Titelbild mit dem Pinselstrich.
 *  Alle Schriften liegen lokal, kein JavaScript, keine externen Anfragen.
 */

/* ---------- Schriften ---------- */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/bodoni-moda-latin.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;
}

@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/bodoni-moda-italic-latin.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;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.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;
}

/* ---------- Farben und Maße ---------- */

:root {
  color-scheme: dark;

  --night: #020b1c;          /* Seitengrund, an den Bildrand angeglichen */
  --gold: #e8ca91;
  --gold-deep: #c8a260;
  --gold-soft: #dec9a0;
  --gold-muted: #c9ae7d;
  --cream: #eed6a5;
  --text: #ddd3be;
  --rule: rgb(232 202 145 / 0.18);

  --font-serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --font-body: "Manrope", system-ui, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ---------- Grundlagen ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgb(0 0 0 / 0);
  touch-action: manipulation;
}

body.page-legal {
  grid-template-rows: auto 1fr auto;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--cream);
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--gold);
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-300%);
}

.skip-link:focus-visible {
  transform: none;
  color: var(--night);
}

.frame {
  width: min(100% - 2 * var(--gutter), 76rem);
  margin-inline: auto;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

/* ---------- Wortmarke ---------- */

.wordmark {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(4.5rem, 2rem + 8vw, 10.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  white-space: nowrap;
  font-optical-sizing: auto;
  background: linear-gradient(105deg, #f6e2b3 0%, #d9b46e 38%, #f3d9a0 62%, #b98f48 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wordmark .di {
  margin-right: 0.04em;
  font-style: italic;
  font-size: 0.56em;
}

@media (forced-colors: active) {
  .wordmark {
    background: none;
    color: CanvasText;
  }
}

/* ---------- Startseite ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  overflow: clip; /* clip statt hidden: der Bereich darf mit dem Inhalt wachsen */
}

.hero-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  container-type: size;
}

/* Bühne im Seitenverhältnis des Bildes, füllt die Fläche wie object-fit: cover.
   Bild und Dampf liegen darauf und bleiben dadurch deckungsgleich. */
.photo-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, 100cqh * 1672 / 941);
  aspect-ratio: 1672 / 941;
  translate: -50% -50%;
  transform-origin: 72% 55%;
}

.photo-stage img {
  display: block;
  width: 100%;
  height: 100%;
}

/* sanfter Schatten links, damit die Schrift auch bei knappen Formaten frei steht */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(2 11 28 / 0.6) 0%, rgb(2 11 28 / 0.25) 38%, transparent 55%);
}

.brand {
  position: relative;
  z-index: 1;
  width: min(36%, 31rem);
  margin-left: 4.5%;
  padding-block: 3rem;
  text-align: center;
}

.category {
  margin: 1rem 0 0;
  color: var(--gold-soft);
  font-size: clamp(0.72rem, 0.65rem + 0.25vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.gold-rule {
  width: 58px;
  height: 1px;
  margin: clamp(1.5rem, 3vw, 2.25rem) auto;
  background: var(--gold-deep);
}

.claim {
  max-width: 12em;
  margin: 0 auto;
  color: var(--cream);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  line-height: 1.2;
  text-wrap: balance;
}

.lead {
  max-width: 34ch;
  margin: 1.25rem auto 0;
  color: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.italian {
  margin: 1.5rem 0 0;
  color: var(--gold-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* Hochformat und schmale Fenster: Schrift oben, Pizza darunter */
@media (max-width: 47.99rem), (max-aspect-ratio: 3/2) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    width: auto;
    max-width: 36rem;
    margin: 0 auto;
    padding: clamp(2.5rem, 9vw, 4.5rem) var(--gutter) 0;
  }

  .hero-photo {
    order: 2;
    position: relative;
    inset: auto;
    margin-top: 0.5rem;
    overflow: hidden;
    container-type: normal;
    /* oben nur kurz ausblenden, damit der Dampf über der Kruste sichtbar bleibt */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%);
  }

  .hero-photo::after {
    content: none;
  }

  /* nur die rechte Bildhälfte mit Pizza und Pinselstrich zeigen */
  .photo-stage {
    position: relative;
    left: auto;
    top: auto;
    translate: none;
    width: 180%;
    margin-left: -80%;
  }
}

@media (min-width: 40rem) and (max-aspect-ratio: 3/2) {
  .photo-stage {
    width: 150%;
    margin-left: -50%;
  }
}

/* langsame Kamerafahrt, nur ohne Wunsch nach reduzierter Bewegung */
@keyframes kamerafahrt {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}

/* ---------- Dampf ----------
   Schwaden über der oberen Kruste. Die Ebene deckt im Bild x 900–1350 und y 0–280 ab.
   Jede Schwade steigt auf, weht zur Seite und löst sich auf; die Unschärfe sitzt im SVG,
   bewegt werden nur transform und opacity. */

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.steam {
  position: absolute;
  left: 53.83%;
  top: 0;
  width: 26.91%;
  height: 29.76%;
  display: none;
  pointer-events: none;
}

.wisp {
  position: absolute;
  left: var(--x);
  bottom: var(--b);
  width: var(--w);
  aspect-ratio: 100 / 200;
  margin-left: calc(var(--w) / -2);
  opacity: 0;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

.wisp svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wisp.flip svg {
  scale: -1 1;
}

/*        Fußpunkt auf der Kruste    Größe       Dauer     Versatz      Deckkraft  Drift       Neigung */
.w1 { --x: 46.7%; --b: 38.6%; --w: 22%; --t: 6s;   --delay: 0s;    --o: 0.75; --dx: 8%;   --r: 6deg; }
.w2 { --x: 60%;   --b: 41%;   --w: 19%; --t: 7s;   --delay: -1.6s; --o: 0.65; --dx: 14%;  --r: 10deg; }
.w3 { --x: 36%;   --b: 35%;   --w: 17%; --t: 6.5s; --delay: -3.1s; --o: 0.6;  --dx: -6%;  --r: -5deg; }
.w4 { --x: 73%;   --b: 41.4%; --w: 15%; --t: 7.5s; --delay: -2.3s; --o: 0.5;  --dx: 12%;  --r: 9deg; }
.w5 { --x: 51%;   --b: 40%;   --w: 26%; --t: 8s;   --delay: -4.2s; --o: 0.5;  --dx: 4%;   --r: 3deg; }
.w6 { --x: 15%;   --b: 16%;   --w: 13%; --t: 6s;   --delay: -1s;   --o: 0.45; --dx: -10%; --r: -8deg; }

@keyframes steam-rise {
  0%   { opacity: 0; transform: translateY(0) scale(0.55, 0.5); }
  18%  { opacity: var(--o); }
  60%  { opacity: calc(var(--o) * 0.7); }
  100% { opacity: 0; transform: translate(var(--dx), -70%) scale(1.6, 1.15) rotate(var(--r)); }
}

@keyframes steam-sway {
  from { transform: translateX(-8%) skewX(-4deg); }
  to   { transform: translateX(8%) skewX(4deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .photo-stage {
    animation: kamerafahrt 20s ease-in-out infinite;
  }

  .steam {
    display: block;
  }

  .wisp {
    animation: steam-rise var(--t) cubic-bezier(0.3, 0.1, 0.5, 1) var(--delay) infinite;
  }

  .wisp svg {
    animation: steam-sway calc(var(--t) / 2.2) ease-in-out var(--delay) infinite alternate;
  }
}

/* ---------- Rechtstexte ---------- */

.site-header .frame {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.site-header .wordmark {
  display: inline-block;
  padding-block: 0.2rem;
  font-size: 2.4rem;
  text-decoration: none;
}

.legal {
  padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
}

.legal-body {
  max-width: 44rem;
}

.legal h1 {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.legal h2 {
  margin: 2.25rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--gold-soft);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 1.5rem;
}

.legal p,
.legal ul,
.legal address {
  margin: 0 0 0.9rem;
  overflow-wrap: anywhere;
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.3rem;
}

.legal .meta {
  margin-top: 2.5rem;
  color: var(--gold-muted);
  font-size: 0.875rem;
}

/* ---------- Fuß ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
}

.site-footer .frame {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  padding-block: 0.4rem max(0.6rem, env(safe-area-inset-bottom));
  font-size: 0.85rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold-soft);
}

.site-footer a[aria-current="page"] {
  color: var(--gold);
  text-decoration-thickness: 2px;
}
