/* Punchline Component */

/* Process Card */
.process-card {
   --pc-fs: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
   font-size: var(--pc-fs);
   background: white;
   border-radius: var(--modal-border-radius);
   padding: clamp(1.5rem, 4vw, 3rem);
   box-shadow:
      0 0.25rem 0.375rem hsl(0 0% 0% / 0.02),
      0 0.75rem 1.5rem hsl(0 0% 0% / 0.06);
   position: relative;
   overflow: hidden;
}

/* Header */
.process-header {
   text-align: center;
   margin-bottom: 2em;
   padding-bottom: 1.5em;
   border-bottom: 1px solid var(--punchline-warm-light);
}

.process-title {
   font-size: clamp(1.25rem, 3vw + 0.5rem, 1.75rem);
   font-weight: var(--fw-bolder);
   margin-bottom: 0.5em;
}

.process-subtitle {
   font-size: 0.9375em;
   color: var(--punchline-warm-muted);
}

/* Steps Grid */
.punchline-modal .steps-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(min(100%, 15em), 1fr));
   gap: clamp(0.75em, 2vw, 1.5em);
   margin-bottom: 2em;
}

/* Force 3 columns on wide viewports to avoid awkward 4-column layout with 9 items */
@media (min-width: 65.625em) { /* 1050px */
   .punchline-modal .steps-grid {
      grid-template-columns: repeat(3, 1fr);
   }
}

/* Step Item */
.punchline-modal .step-item {
   display: block;
   padding: 1.25em;
   background: linear-gradient(135deg, var(--punchline-bg-start) 0%, var(--punchline-bg-end) 100%);
   border-radius: 1em;
   border: 1px solid var(--punchline-warm-light);
   transition: all 0.3s ease;
   position: relative;
}

.punchline-modal .step-item:hover {
   transform: translateY(-0.25em);
   box-shadow: 0 0.5em 1.5em hsl(0 0% 0% / 0.08);
   border-color: var(--punchline-warm-mid);
}

.punchline-modal .step-number {
   position: absolute;
   top: 0.75em;
   right: 0.75em;
   width: 1.75em;
   height: 1.75em;
   background: linear-gradient(135deg, var(--punchline-terracotta) 0%, var(--punchline-terracotta-dark) 100%);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.75em;
   font-weight: var(--fw-black);
   color: white;
}

.punchline-modal .step-icon {
   width: 2.75em;
   height: 2.75em;
   background: linear-gradient(135deg, var(--punchline-gold) 0%, var(--punchline-gold-dark) 100%);
   border-radius: 0.75em;
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 0.75em;
   box-shadow: 0 0.25em 0.75em var(--punchline-gold-shadow);
}

.punchline-modal .step-icon svg {
   width: 1.25em;
   height: 1.25em;
   color: white;
}

.punchline-modal .step-title {
   font-size: 1em;
   font-weight: var(--fw-bolder);
   color: var(--punchline-text-dark);
   margin-bottom: 0.35em;
}

.punchline-modal .step-description {
   font-size: 0.875em;
   color: var(--punchline-warm-text);
   line-height: var(--lh-relaxed);
}

/* Footer Quote */
.process-footer {
   text-align: center;
   padding-top: 1.5em;
   border-top: 1px solid var(--punchline-warm-light);
}

.footer-quote {
   font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
   font-style: italic;
   color: var(--punchline-gold-accent);
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.75em;
}

.footer-quote::before,
.footer-quote::after {
   content: '';
   width: clamp(1.5rem, 4vw, 2.5rem);
   height: 0.125em;
   background: linear-gradient(90deg, transparent, var(--punchline-gold));
}

.footer-quote::after {
   background: linear-gradient(90deg, var(--punchline-gold), transparent);
}

/* Mobile: Full viewport modal */
@media (max-width: 37.5em) { /* 600px */
   .punchline-modal .modal-dialog {
      width: 100vw;
      height: 100vh;
      margin: 0;
      max-width: none;
   }

   .punchline-modal .modal-content {
      border-radius: 0;
      min-height: 100vh;
      min-height: 100dvh;
   }

   .punchline-modal .process-card {
      border-radius: 0;
   }

   .punchline-modal .process-card::before {
      display: none;
   }

   /* Ensure steps stack and take full width */
   .punchline-modal .steps-grid {
      grid-template-columns: 1fr;
   }

   .punchline-modal .step-item {
      max-width: 100%;
   }
}

/* Badge - Shared */
.punchline-quote-wrapper .badge {
    display: grid;
    justify-items: center;
    gap: 0.75em;
    text-align: center;
}

.punchline-quote-wrapper .badge-circle {
    width: clamp(4.5rem, 8vw, 5.625rem);
    height: clamp(4.5rem, 8vw, 5.625rem);
    border-radius: 50%;
    display: grid;
    place-items: center;
    place-content: center;
}

.punchline-quote-wrapper .badge-caption {
    font-size: 0.75rem;
    font-weight: var(--fw-semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--punchline-warm-muted, hsl(30 15% 45%));
}

/* Badge - Since 1979 (Gold circle, dark text) */
.badge-since .badge-circle {
    background: linear-gradient(135deg, var(--punchline-gold, hsl(43 65% 55%)) 0%, var(--punchline-gold-dark, hsl(43 60% 45%)) 100%);
    box-shadow: 0 0.25rem 1rem var(--punchline-gold-shadow, hsl(43 65% 55% / 0.3));
}

.badge-since .badge-label {
    font-size: 0.6875rem;
    font-weight: var(--fw-semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(30 10% 15%);
}

.badge-since .badge-year {
    font-family: var(--ff-serif, Georgia, serif);
    font-size: clamp(1.375rem, 2.5vw, 1.625rem);
    font-weight: var(--fw-semibold, 600);
    color: hsl(30 10% 15%);
    line-height: 1;
}

/* Badge - Guarantee (Red circle, white text) */
.badge-guarantee .badge-circle {
    background: linear-gradient(135deg, var(--punchline-terracotta, hsl(8 57% 51%)) 0%, var(--punchline-terracotta-dark, hsl(8 57% 42%)) 100%);
    box-shadow: 0 0.25rem 1rem var(--punchline-terracotta-shadow, hsl(8 57% 51% / 0.3));
}

.badge-guarantee .badge-number {
    font-family: var(--ff-serif, Georgia, serif);
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: var(--fw-semibold, 600);
    color: white;
    line-height: 1;
}

.badge-guarantee .badge-unit {
    font-size: 0.6875rem;
    font-weight: var(--fw-semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    margin-top: -0.125em;
}

/* Modal Overrides */
.punchline-modal .modal-content {
   padding: 0;
}

.punchline-modal .modal-body {
   padding: 0;
}

.punchline-modal .modal-header {
   padding: 0;
}

.punchline-modal .modal-header .close {
   background: none;
   color: var(--foreground);
}

.punchline-modal .process-title {
   margin-block-start: 0;
   font-size: var(--fs-h1);
   font-family: var(--ff-serif);
   color: var(--foreground);
}

.punchline-modal .process-subtitle {
   color: var(--foreground);
   opacity: 0.8;
}

.punchline-modal .footer-quote {
   font-family: var(--ff-serif);
   font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem);
   text-wrap: balance;
}

.punchline-modal .step-title {
   font-family: var(--ff-system);
   font-weight: var(--fw-bolder);
   color: var(--foreground);
   text-align: left;
}

.punchline-modal .step-description {
   text-align: left;
   font-size: 0.9rem;
   color: var(--foreground);
   opacity: 0.8;
}

.btn-transparent {
    display: flex !important;
    align-items: baseline;
    gap: 5px;
    padding: .6em 1em;
    margin-block-start: 1em;
    background: transparent;
    color: var(--foreground);
    border-radius: 5px;
    border: 2px solid var(--grey-mid-light);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    left: -2rem;
    top: .7em
}
.btn-transparent::after {
    content: "\f054";
    font: normal normal normal .8em / 1 FontAwesome;
}

.btn-transparent:hover {
    background: linear-gradient(135deg, hsl(8.57deg 56% 50.98%) 0%, #a8402f 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 80, 60, 0.25);
    border: 2px solid var(--punchline-terracotta-dark);
}

.punchline-quote-wrapper {
    width: 100%;
    background: linear-gradient(135deg, hsl(30 20% 99%) 0%, hsl(30 17% 97%) 100%);
    border-radius: 1.25rem;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 5vw, 3rem);
    display: grid;
    grid-template-columns: 6rem 1fr 6rem;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 0.125rem 0.25rem hsl(0 0% 0% / 0.02),
                0 0.5rem 1rem hsl(0 0% 0% / 0.04);
    border: 1px solid hsl(30 14% 91%);
    position: relative;
    overflow: hidden;
}

.punchline-quote-wrapper::after {content: unset}
.punchline-quote-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c8503c 0%, #d4a853 100%);
}

.punchline-quote-wrapper h2 {
    color: var(--punchline-gold-accent);
    font-family: var(--ff-serif);
    letter-spacing: .01em;
    white-space: nowrap;
}
.punchline-quote-wrapper h3 {
    font-size: var(--fs-body);
}

.punchline-quote-wrapper.under-quote {
    display: flex;
    margin-block-start: 2rem;

    display: none;
}

.punchline-quote-wrapper.under-quote::before {
    content: '';
    position: absolute;
    top: unset;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c8503c 0%, #d4a853 100%);
}

@media (max-width: 48em) { /* 768px */
    .punchline-quote-wrapper {
        grid-template-columns: 5rem 1fr 5rem;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .punchline-quote-wrapper h2 {
        white-space: normal;
    }
}

@media (max-width: 37.5em) { /* 600px - matches modal breakpoint */
    .punchline-quote-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        max-width: 94%;
    }

    .punchline-quote-wrapper .badge {
        grid-template-columns: auto auto;
        align-items: center;
        justify-content: center;
    }

    .punchline-quote-wrapper .badge-circle {
        width: 4rem;
        height: 4rem;
    }

    .punchline-quote-content {
        text-wrap: balance;
        text-wrap: pretty;
    }

    .btn-transparent {
        left: revert;
    }

    .process-header {
        border-bottom: none;
    }
}