/* agent030 — Layout mobile-first. Desktop erst ab 1024px. */
:root {
  --phi: 1.6180339887;
  --s1: 8px;
  --s2: 13px;
  --s3: 21px;
  --s4: 34px;
  --s5: 55px;
  --s6: 89px;
  --shell: 1200px;
  --pad-x: 16px;
  --pad-y: 34px;
  --gap-phi: 21px;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.phi-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  width: 100%;
  box-sizing: border-box;
}

.phi-section {
  padding-block: var(--pad-y);
  border-bottom: 2px solid #16100c;
  box-sizing: border-box;
}

.phi-prose {
  max-width: none;
  width: 100%;
}

/* —— Default: eine Spalte (Handy) —— */
.phi-held {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--gap-phi);
}

.phi-held > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.phi-held > :not(figure) {
  order: 1;
}

.phi-held > figure {
  order: 2;
  margin: 0 auto;
  width: 100%;
  max-width: min(280px, 78vw);
}

.phi-held > figure img,
.phi-duo figure img,
.phi-shell img[src*="brand/"] {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.phi-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 2px solid #16100c;
}

.phi-split > * {
  padding: var(--s3) var(--s4);
  box-sizing: border-box;
  min-width: 0;
}

.phi-split > *:first-child {
  border-right: 0;
  border-bottom: 2px solid #16100c;
}

.phi-packs,
.phi-guthaben {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  background: #3a342e;
}

.phi-packs > *,
.phi-guthaben > * {
  min-width: 0;
}

/* Vorher/Nachher: untereinander auf Handy — Vergleich lesbar */
.phi-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s4);
  align-items: start;
}

.phi-duo > * {
  min-width: 0;
}

.phi-duo figure {
  margin: 0 auto;
  max-width: min(280px, 78vw);
  width: 100%;
}

/* Dark bg (#16100c): freigestellte Duo-Bilder + Captions lesbar */
.phi-section[style*="#16100c"] .phi-duo figure img {
  filter: drop-shadow(0 0 22px rgba(255, 244, 236, 0.14));
}

.phi-section[style*="#16100c"] .phi-duo figcaption {
  margin-top: var(--s3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d2c8be;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.phi-section[style*="#16100c"] .phi-duo figure:last-child figcaption {
  color: #e07a3a;
}

.phi-cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s3);
}

.phi-cta-row > a {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.phi-kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bb4800;
}

.phi-h2 {
  margin: var(--s3) 0 0;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 7vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: none;
  overflow-wrap: break-word;
}

.phi-lead {
  margin: var(--s3) 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #5d5751;
  max-width: none;
  overflow-wrap: anywhere;
}

.phi-stack > * + * {
  margin-top: var(--s4);
}

/* Kein Vollbild-Zwang auf Handy */
.phi-hero {
  min-height: 0;
  display: block;
  padding-block: var(--pad-y);
}

.phi-held > div[style*="border-left"] {
  border-left: 0 !important;
  border-top: 2px solid #16100c;
  padding-left: 0 !important;
  padding-top: var(--s4);
  margin-top: var(--s3);
}

/* —— Tablet ab 640: Duo nebeneinander —— */
@media (min-width: 640px) {
  :root {
    --pad-x: 21px;
    --pad-y: 55px;
    --gap-phi: 34px;
  }

  .phi-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: var(--gap-phi);
  }

  .phi-duo figure {
    margin: 0;
    max-width: none;
  }

  .phi-guthaben {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .phi-held > figure {
    max-width: min(320px, 70%);
  }
}

/* —— Desktop erst ab 1024: Text | Bild (Tablet bleibt einspaltig) —— */
@media (min-width: 1024px) {
  :root {
    --pad-x: clamp(21px, 5vw, 89px);
    --pad-y: clamp(55px, 7vw, 89px);
    --gap-phi: clamp(21px, 4vw, 55px);
  }

  .phi-hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding-block: var(--s5);
  }

  .phi-held {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--gap-phi);
  }

  .phi-held > :not(figure),
  .phi-held > figure {
    order: initial;
  }

  .phi-held > figure {
    margin: 0;
    max-width: min(100%, 480px);
    justify-self: end;
  }

  .phi-held > div[style*="border-left"] {
    border-left: 2px solid #16100c !important;
    border-top: 0 !important;
    padding-left: var(--s4) !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .phi-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .phi-split > * {
    padding: var(--s4) clamp(21px, 3vw, var(--s5));
  }

  .phi-split > *:first-child {
    border-right: 2px solid #16100c;
    border-bottom: 0;
  }

  .phi-packs {
    grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr);
  }

  .phi-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .phi-cta-row > a {
    width: auto;
  }

  .phi-kicker {
    font-size: 13px;
    letter-spacing: 0.14em;
  }

  .phi-h2 {
    font-size: clamp(26px, 3.4vw, 42px);
  }

  .phi-lead {
    font-size: 18px;
  }
}
