/* Reusable pieces: buttons, links, icon containers, comic forms, Andy, chips, boxes,
   placeholders, steps, list rows, photos, forms. */

/* --- Buttons (CI p. 30): pill, verb first; ↗ to finish, → to go on --- */

.btn {
  --btn-shadow: var(--hover-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border: 0;
  border-radius: var(--radius-button);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
/* Hover: moves up, hard pflaume shadow, no glow */
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--btn-shadow);
}
.btn:disabled { opacity: .7; cursor: progress; transform: none; box-shadow: none; }

.btn--primary { background: var(--magenta); color: var(--weiss); }
.btn--primary:hover { color: var(--weiss); }
.btn--dark { --btn-shadow: 4px 4px 0 var(--schrift); background: var(--pflaume); color: var(--weiss); }
.btn--dark:hover { color: var(--weiss); }
/* Outlined; the 2px border is taken off the padding so all buttons are the same size. */
.btn--outline { padding: 13px 28px; border: 2px solid currentColor; background: none; color: inherit; }
.btn--outline:hover { color: inherit; }

/* On magenta areas magenta buttons would vanish: they turn pflaume. */
.tile--magenta .btn--primary { --btn-shadow: 4px 4px 0 var(--schrift); background: var(--pflaume); }

.btn--header { font-size: 15px; padding: 11px 22px; }
.btn--compact { font-size: 16px; padding: 13px 24px; }

@container frame (max-width: 1359.98px) {
  .btn--header { font-size: 14px; padding: 10px 16px; }
}
@container frame (max-width: 467.98px) {
  .btn--header { font-size: 13px; padding: 9px 13px; }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
}

.tile > .btn,
.stack > .btn { align-self: flex-start; }

/* --- Text link: versal, with a magenta line that grows on hover (CI p. 30) --- */

.textlink {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  align-self: flex-start;
  padding-bottom: 6px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 3px no-repeat;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-size .25s;
}
.textlink:hover { background-size: 100% 6px; color: inherit; }
/* E-mail addresses and source titles stay as written. */
.textlink[href^="mailto:"],
.textlink[href^="tel:"],
.post__list .textlink { text-transform: none; letter-spacing: 0; }

/* Arrow that points the way; it moves a little on hover (0.2 s). */
.arrow { display: inline-block; transition: transform .2s; }
a:hover .arrow { transform: translateX(4px); }
a:hover .arrow--up { transform: translate(3px, -3px); }

/* --- Icon containers (CI p. 29): line icons never stand alone --- */

.icon-circle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--icon-bg);
  color: var(--icon-fg);
}
.icon-circle--small { width: 52px; height: 52px; }
.icon-circle--small .icon { width: 22px; height: 22px; }

/* --- Gezacktes Badge: icons and numbers (CI p. 21) --- */

.jag {
  --size: 64px;
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--size);
  height: var(--size);
  color: var(--pflaume);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(var(--size) * .36);
}
.jag__shape {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.jag__shadow { fill: var(--pflaume); }
.jag__fill {
  fill: var(--weiss);
  stroke: var(--pflaume);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}
.jag__content { position: relative; display: flex; }
.jag--magenta { color: var(--weiss); }
.jag--magenta .jag__fill { fill: var(--magenta); }
.jag--small { --size: 48px; }

/* --- Comic forms (CI chapter 06): pflaume outline and hard shadow, Exo 2 Black,
   slightly rotated. At most two loud moments per page. --- */

/* Explosions-Stern: the one big message */
.boom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--boom-w, 240px);
  aspect-ratio: 1.6;
  color: var(--magenta);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(var(--boom-w, 240px) * .17);
  line-height: .9;
  text-transform: uppercase;
  text-align: center;
}
.boom__shape { position: absolute; inset: 0; overflow: visible; }
.boom__shadow { fill: var(--pflaume); }
.boom__fill {
  fill: var(--weiss);
  stroke: var(--pflaume);
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
}
.boom__text { position: relative; transform: rotate(-4deg); }

/* Sprechblase: short promises and quotes */
.bubble {
  position: relative;
  align-self: flex-start;
  max-width: 280px;
  padding: 14px 18px;
  border: 4px solid var(--pflaume);
  background: var(--weiss);
  color: var(--pflaume);
  box-shadow: 6px 6px 0 var(--pflaume);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.05;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.bubble__tail {
  position: absolute;
  left: 28px;
  top: 100%;
  width: 34px;
  height: 26px;
  margin-top: -4px;
  overflow: visible;
}
.bubble__tail path { fill: var(--weiss); stroke: var(--pflaume); stroke-width: 4px; }

/* Schräges Band: subtitle, slightly rotated */
.band-tag {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  padding: 10px 18px;
  border: 4px solid var(--pflaume);
  background: var(--weiss);
  color: var(--schrift);
  box-shadow: 6px 6px 0 var(--pflaume);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, calc(2 * var(--vw)), 28px);
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.band-tag__accent { color: var(--magenta); }

/* Raster and stars: depth in one corner of a magenta or pflaume area. Both sit behind
   the content (the tile isolates its own stacking). */
.raster {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.raster::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--raster-dot, var(--magenta-hell)) 1.5px, transparent 1.7px);
  background-size: 13px 13px;
  -webkit-mask-image: linear-gradient(225deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(225deg, #000 0%, transparent 55%);
}
.tile--pflaume .raster { --raster-dot: var(--magenta); }

.star {
  position: absolute;
  z-index: -1;
  width: var(--star, 56px);
  height: var(--star, 56px);
  overflow: visible;
  pointer-events: none;
}
.star__shadow { fill: var(--pflaume); }
.star__fill { fill: var(--weiss); stroke: var(--pflaume); stroke-width: 3px; vector-effect: non-scaling-stroke; }

/* --- Ribbon with arrow ends: kicker and section labels (CI p. 19) --- */

.ribbon {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  align-self: flex-start;
}
.ribbon__label {
  padding: 9px 30px 9px 26px;
  background: var(--schrift);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
}
.ribbon--magenta .ribbon__label { background: var(--magenta); }

/* Magenta marker behind one word */
.marker {
  display: inline-block;
  padding: .04em .25em 0;
  background: var(--magenta);
  color: var(--weiss);
}

/* --- Andy (CI chapter 07): always in the magenta circle with a pflaume rim and a
   hard shadow; rim and shadow grow with him (about 1/24 and 1/16 of the size). --- */

.andy {
  --size: 96px;
  position: relative;
  display: block;
  flex-shrink: 0;
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  border: max(2px, calc(var(--size) / 24)) solid var(--pflaume);
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: calc(var(--size) / 16) calc(var(--size) / 16) 0 var(--pflaume);
}
/* The drawing is a full figure; the circle shows head and shoulders. */
.andy img {
  position: absolute;
  left: -34%;
  top: -6%;
  width: 220%;
  max-width: none;
  height: auto;
}
.andy--bar { --size: 48px; }
.andy--confirm { --size: 96px; }
.andy--page { --size: clamp(120px, calc(14 * var(--vw)), 180px); }

/* --- Chips and tags (CI p. 31) --- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 18px;
  border-radius: var(--radius-button);
  background: var(--schrift);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--active { background: var(--magenta); }

/* --- Boxes inside an area: square, no shadow --- */

.box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, calc(3 * var(--vw)), 36px);
}
.box--sand { background: var(--sand); }
.box--hellsand { background: var(--hellsand); }
.box--anthrazit,
.box--pflaume {
  --accent: var(--magenta-hell);
  --dots: var(--magenta-hell);
  --icon-bg: var(--pflaume);
  --icon-fg: var(--magenta-hell);
  color: var(--weiss);
}
.box--anthrazit { background: var(--anthrazit); }
.box--pflaume { background: var(--pflaume); }
.box--magenta {
  --accent: var(--weiss);
  --dots: var(--weiss);
  --icon-bg: var(--pflaume);
  --icon-fg: var(--magenta-hell);
  background: var(--magenta);
  color: var(--weiss);
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--box-min, 300px)), 1fr));
  gap: 20px;
}
.box-grid--wide { --box-min: 420px; }

.box__text { font-size: 17px; line-height: 1.55; }

/* Info box inside running text */
.note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px;
  border-left: var(--fuge) solid var(--magenta);
  background: var(--sand);
}
.note__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
}

/* --- "Inhalt folgt" placeholder --- */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 32px;
  border: 3px dotted var(--dots);
  text-align: center;
}
.placeholder--compact { padding-block: 40px; }
.placeholder__text { font-size: 17px; }

/* --- Numbered steps: number in the jagged badge --- */

.steps { display: flex; flex-direction: column; }

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-top: 2px dotted var(--dots);
}

.step__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.step__text { font-size: 17px; line-height: 1.5; }

/* --- List row (CI p. 30): number, title, arrow; on hover it moves and the line
   turns magenta --- */

.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 2px dotted var(--dots);
  color: inherit;
  text-decoration: none;
  transition: padding .2s, border-color .2s;
}
.list-row:hover { padding-left: 8px; border-bottom: 2px solid var(--accent); color: inherit; }
.list-row__number {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
}
.list-row__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, calc(2.2 * var(--vw)), 30px);
  line-height: 1;
  text-transform: uppercase;
}
.list-row__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
}
.list-row .arrow { color: var(--accent); font-size: 22px; }

/* --- Photo with a tag (CI p. 27) --- */

.photo {
  position: relative;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
}
.photo .cover { position: absolute; inset: 0; object-position: 50% 20%; }
.tile--flush > .photo { flex: 1; }

.photo-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 8px 16px;
  border: 3px solid var(--pflaume);
  background: var(--magenta);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* Halbkreis: drives in from the edge, once per area (CI p. 18) */
.half {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(200px, calc(22 * var(--vw)), 300px);
  aspect-ratio: 2;
  padding: 18% 14% 0;
  border-radius: 999px 999px 0 0;
  background: var(--magenta);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16px, calc(1.6 * var(--vw)), 21px);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}
.half span { transform: rotate(-6deg); }

/* --- Forms (CI p. 31) --- */

.form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form .btn { align-self: flex-start; }

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.field__required { color: var(--magenta); }

.input {
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
  border: 2px solid var(--schrift);
  border-radius: 0;
  background: var(--weiss);
  color: var(--schrift);
  font-size: 17px;
}
.input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 2px var(--magenta); }
textarea.input { resize: vertical; }
.tile--pflaume .input,
.tile--anthrazit .input {
  border-color: var(--weiss);
  background: transparent;
  color: var(--weiss);
}
.tile--pflaume .input::placeholder,
.tile--anthrazit .input::placeholder { color: rgba(255, 255, 255, .7); }
.tile--pflaume .input:focus,
.tile--anthrazit .input:focus { border-color: var(--magenta-hell); box-shadow: 0 0 0 2px var(--magenta-hell); }

/* Error: magenta circle with "!" in front of the message (CI p. 31) */
.form-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 16px;
  font-weight: 600;
}
.form-error::before {
  content: "!";
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
}
.tile--pflaume .form-error::before { color: var(--pflaume); }

/* Confirmation: Andy is happy after sending (CI p. 25) */
.form-thanks {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0;
}
.form-thanks:focus { outline: none; }
.form-thanks__burst {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.form-thanks__text { font-size: 19px; line-height: 1.5; }

.form-thanks-inline {
  padding: 14px 18px;
  border-left: var(--fuge) solid var(--accent);
  background: rgba(255, 255, 255, .5);
  font-weight: 600;
}
.tile--pflaume .form-thanks-inline { background: rgba(255, 255, 255, .08); }
.form-thanks-inline:focus { outline: none; }

/* Honeypot: out of sight for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
