/* =========================================================
   Alles skaliert fließend mit der Bildschirmbreite (clamp):
   – Schrift:   15 px (Handy) → 18 px (MacBook 16") → max 20 px
   – Rand:      8 px → 10 px → max 14 px
   – Foto:      110 px → 218 px → max 280 px
   ========================================================= */
:root {
  --bg: #EEEEEE;
  --ink: #000;
  --fs: clamp(15px, 0.4vw + 11px, 20px);
  --lh: 1;                                    /* Zeilenabstand 100 % wie in Figma */
  --pad: clamp(8px, 0.6vw, 14px);
  --photo: clamp(110px, 12.6vw, 280px);
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Layout (Desktop / Tablet) ---------- */
.top {
  position: absolute;
  inset: var(--pad) var(--pad) auto var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  z-index: 2;
}

.stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.portrait {
  display: block;
  width: var(--photo);
  max-height: 40vh;          /* niedrige Fenster: Foto schrumpft mit */
  max-height: 40dvh;
  object-fit: contain;
  height: auto;
  aspect-ratio: 595 / 814;
  user-select: none;
  -webkit-user-drag: none;
}

.bottom {
  position: absolute;
  inset: auto var(--pad) var(--pad) var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2em;
  z-index: 2;
}

.intro {
  margin: 0;
  max-width: 34em;           /* Figma-Textbreite im Verhältnis zur Schrift */
}

.gap { display: block; height: 1em; }

.send { white-space: nowrap; }

/* Sehr niedrige Fenster (z. B. Laptop mit Zoom): nichts überlappt, Seite scrollt */
@media (max-height: 520px) and (min-width: 701px) {
  body { min-height: 520px; }
}

/* Unter ~1000 px: festen Zeilenumbruch weglassen, Text fließt frei */
@media (max-width: 1000px) {
  .br-desktop { display: none; }
}

/* ---------- Handy (Figma: iPhone-Frame) ---------- */
@media (max-width: 700px) {
  body {
    display: grid;
    grid-template-rows: auto 1fr auto;
  }
  .top, .stage, .bottom { position: static; }
  .top { padding: var(--pad); }
  .stage { padding: 2em 0; }
  .portrait { max-height: 30vh; max-height: 30dvh; }
  .bottom { display: block; padding: var(--pad); }
  .send {
    display: inline-block;
    margin-top: 1em;         /* Leerzeile wie in Figma */
  }
}

/* ---------- Graffiti layer ---------- */
#graffiti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;      /* Links darunter bleiben klickbar */
  mix-blend-mode: multiply;
}
