/* ============================================================
   PLEDGE BREAK
   Animated document + signature + stamp interrupt section
   between Pillar 1 and Pillar 2 on the homepage.
   ============================================================ */

.pledge-break {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 8rem;
  background: #0e100f;
  color: #fffce1;
}

/* Gradient background bloom - the pattern interrupt color */
.pledge-break-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(98, 54, 87, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 80% 70%, rgba(112, 4, 4, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(157, 149, 255, 0.18) 0%, transparent 65%),
    linear-gradient(180deg, #0e100f 0%, #15101a 100%);
  pointer-events: none;
  z-index: 0;
}

.pledge-break-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.pledge-break-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a8c5e8;
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

.pledge-break-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fffce1;
  margin: 0 auto 1.5rem;
  max-width: 22ch;
}

.pledge-break-headline em {
  font-style: italic;
  color: #c89bb8;
  font-weight: 400;
}

.pledge-break-dek {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #fffce1;
  opacity: 0.78;
  margin: 0 auto 3.5rem;
  max-width: 48ch;
}

/* ============================================================
   THE DOCUMENT - paper, list of planks, signature, stamp
   ============================================================ */
.pledge-break-planks {
  margin: 0 auto 3.5rem;
  max-width: 620px;
  width: 100%;
  perspective: 1200px;
}

.pledge-doc {
  position: relative;
  text-align: left;
  transform: rotate(-1.2deg) translateY(20px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease-out;
}

.pledge-break.is-visible .pledge-doc {
  opacity: 1;
  transform: rotate(-1.2deg) translateY(0);
}

.pledge-doc-paper {
  position: relative;
  background: #fdfbf6;
  color: #1a1a2e;
  padding: 2.25rem 2.5rem 2rem;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 40px 100px rgba(0, 0, 0, 0.35),
    inset 0 0 60px rgba(98, 54, 87, 0.04);
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 28px,
      rgba(26, 26, 46, 0.04) 28px,
      rgba(26, 26, 46, 0.04) 29px
    );
}

/* Torn-paper edge effect on the top */
.pledge-doc-paper::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 4px;
  background:
    radial-gradient(circle at 4px 100%, transparent 2px, #fdfbf6 2.5px),
    #fdfbf6;
  background-size: 8px 4px;
}

.pledge-doc-header {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #623657;
  margin: 0 0 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(98, 54, 87, 0.18);
}

.pledge-doc-preamble {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-style: italic;
  color: #1a1a2e;
  opacity: 0.7;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.pledge-doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #1a1a2e;
  counter-reset: plank;
}

.pledge-doc-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(26, 26, 46, 0.1);
  display: flex;
  gap: 0.875rem;
  align-items: baseline;
}

.pledge-doc-list li:last-child {
  border-bottom: none;
}

.pledge-doc-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.0625rem;
  font-style: italic;
  flex-shrink: 0;
  min-width: 1.5rem;
}

/* ============================================================
   SIGNATURE + STAMP row
   ============================================================ */
.pledge-doc-sign-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 2px solid #1a1a2e;
  position: relative;
  min-height: 110px;
}

.pledge-doc-signature-block {
  flex: 1;
  min-width: 0;
}

.pledge-doc-signature-text {
  font-family: 'Dancing Script', 'Brush Script MT', cursive;
  font-weight: 600;
  font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  line-height: 1;
  color: #2b6cd9;
  letter-spacing: -0.01em;
  padding: 0.25rem 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  transform: rotate(-2deg);
  transform-origin: left center;
  display: inline-block;
  /* Always-running loop - signature writes, pauses, fades, repeats */
  animation: sign-loop 7s cubic-bezier(0.55, 0.1, 0.45, 0.95) infinite;
}

@keyframes sign-loop {
  0%   { clip-path: inset(0 100% 0 0); opacity: 1; }
  55%  { clip-path: inset(0 0 0 0);    opacity: 1; }
  85%  { clip-path: inset(0 0 0 0);    opacity: 1; }
  95%  { clip-path: inset(0 0 0 0);    opacity: 0; }
  96%  { clip-path: inset(0 100% 0 0); opacity: 0; }
  100% { clip-path: inset(0 100% 0 0); opacity: 1; }
}

.pledge-doc-signature-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1a2e;
  opacity: 0.55;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(26, 26, 46, 0.4);
  display: inline-block;
  min-width: 220px;
}

/* ============================================================
   THE STAMP - slams in after signature completes
   ============================================================ */
.pledge-doc-stamp {
  position: relative;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(2.6) rotate(-30deg);
  transform-origin: center center;
  margin-bottom: 0.5rem;
  margin-right: -0.5rem;
}

.pledge-break.is-visible .pledge-doc-stamp {
  animation: stamp-slam 0.55s cubic-bezier(0.18, 1.2, 0.32, 1) 4.65s forwards;
}

@keyframes stamp-slam {
  0% {
    opacity: 0;
    transform: scale(2.6) rotate(-30deg);
  }
  60% {
    opacity: 1;
    transform: scale(0.92) rotate(-9deg);
  }
  78% {
    transform: scale(1.04) rotate(-7deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-8deg);
  }
}

.pledge-doc-stamp-inner {
  border: 3px solid #8a0a0a;
  color: #8a0a0a;
  padding: 0.5rem 0.875rem;
  border-radius: 4px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.06em;
  background: transparent;
  /* faux rubber stamp texture - layered low-opacity radial gradients */
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(138, 10, 10, 0.4),
    inset 1px 1px 8px rgba(253, 251, 246, 0.4),
    inset -1px -1px 8px rgba(253, 251, 246, 0.4);
}

/* Distress the stamp with a noise overlay */
.pledge-doc-stamp-inner::after {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 20% 30%, transparent 1px, rgba(253, 251, 246, 0.85) 1.5px, transparent 2px),
    radial-gradient(circle at 80% 60%, transparent 1px, rgba(253, 251, 246, 0.7) 1.5px, transparent 2px),
    radial-gradient(circle at 45% 80%, transparent 1px, rgba(253, 251, 246, 0.6) 1.5px, transparent 2px),
    radial-gradient(circle at 65% 15%, transparent 1px, rgba(253, 251, 246, 0.7) 1.5px, transparent 2px),
    radial-gradient(circle at 10% 70%, transparent 1px, rgba(253, 251, 246, 0.5) 1.5px, transparent 2px);
  background-size: 12px 12px, 16px 16px, 9px 9px, 14px 14px, 11px 11px;
  pointer-events: none;
  border-radius: 4px;
  mix-blend-mode: lighten;
  opacity: 0.7;
}

.pledge-doc-stamp-top {
  font-size: 1.25rem;
  line-height: 1;
}

.pledge-doc-stamp-divider {
  height: 1.5px;
  background: #8a0a0a;
  margin: 0.25rem 0;
  opacity: 0.65;
}

.pledge-doc-stamp-bottom {
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.12em;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
}

/* ============================================================
   VOTER SIGNATURE ROW - empty line below candidate signature
   showing where the voter's name goes
   ============================================================ */
.pledge-doc-voter-row {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(26, 26, 46, 0.25);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pledge-doc-voter-line {
  flex: 1;
  height: 2px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(26, 26, 46, 0.45) 0,
      rgba(26, 26, 46, 0.45) 6px,
      transparent 6px,
      transparent 12px
    );
}

.pledge-doc-voter-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #623657;
  flex-shrink: 0;
  animation: voter-nudge 2.4s ease-in-out infinite;
}

.pledge-doc-voter-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.25s ease;
}

@keyframes voter-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* Respect reduced motion - show everything instantly */
@media (prefers-reduced-motion: reduce) {
  .pledge-doc { opacity: 1; transform: rotate(-1.2deg) translateY(0); }
  .pledge-doc-signature-text {
    animation: none;
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
  .pledge-doc-stamp { opacity: 1; transform: rotate(-8deg); }
  .pledge-doc-voter-label { animation: none; }
  .pledge-break.is-visible .pledge-doc-stamp { animation: none; }
}

/* ============================================================
   TAGLINE + CTA
   ============================================================ */
.pledge-break-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-style: italic;
  font-weight: 500;
  color: #a8c5e8;
  margin: 0 auto 2.5rem;
  letter-spacing: -0.01em;
}

.pledge-break-cta {
  display: flex;
  justify-content: center;
}

.btn-pledge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fffce1;
  border: 2px solid #fffce1;
  border-radius: 100px;
  padding: 1rem 2.25rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn-pledge:hover,
.btn-pledge:focus-visible {
  background: #fffce1;
  color: #0e100f;
  transform: translateY(-2px);
}

.btn-pledge span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.btn-pledge:hover span,
.btn-pledge:focus-visible span {
  transform: translateX(4px);
}

.pledge-break-secondary-cta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #fffce1;
  opacity: 0.7;
  margin: 1.25rem auto 0;
  text-align: center;
}

.pledge-break-secondary-cta a {
  color: #a8c5e8;
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 197, 232, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pledge-break-secondary-cta a:hover,
.pledge-break-secondary-cta a:focus-visible {
  color: #fffce1;
  border-bottom-color: #fffce1;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 640px) {
  .pledge-break {
    padding: 5rem 0 5.5rem;
  }
  .pledge-break-dek {
    margin-bottom: 2.5rem;
  }
  .pledge-doc-paper {
    padding: 1.5rem 1.25rem 1.5rem;
  }
  .pledge-doc-list {
    font-size: 0.8125rem;
  }
  .pledge-doc-list li {
    gap: 0.625rem;
  }
  .pledge-doc-num {
    font-size: 0.9375rem;
  }
  .pledge-doc-sign-row {
    flex-direction: row;
    align-items: flex-end;
  }
  .pledge-doc-signature-text {
    font-size: 2.25rem;
  }
  .pledge-doc-signature-label {
    font-size: 0.5625rem;
    min-width: 0;
  }
  .pledge-doc-stamp-top {
    font-size: 1rem;
  }
  .pledge-doc-stamp-bottom {
    font-size: 0.5625rem;
  }
  .btn-pledge {
    padding: 0.875rem 1.75rem;
    font-size: 0.85rem;
  }
}
