/* ── Phone Call Popup ("Talk to Mucka") ───────────────────────────────────
   Styled to match the hero close-out modal: a chamfered card with a charcoal
   brand "border" wrapping a cream inner, orange eyebrow + squiggle title. */

.phone-popup {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(.75rem, 4vh, 1.25rem);
  overflow-y: auto;
}

.phone-popup.is-open,
.phone-popup.is-closing {
  display: flex;
}

/* Backdrop */
.phone-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .35s ease;
}
.phone-popup.is-open .phone-popup__backdrop { opacity: 1; }

/* Chamfered card: charcoal outer (the "border") + cream inner, both octagonal */
.phone-popup__card {
  --notch: 18px;
  --bw: 2.5px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin-block: auto;
  background: #231f20;
  padding: var(--bw);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%,
    0 calc(100% - var(--notch)), 0 var(--notch));
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, .55));
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
}
.phone-popup.is-open .phone-popup__card { opacity: 1; transform: none; }

.phone-popup__inner {
  position: relative;
  background: #fbfaf8;
  color: #231f20;
  padding: 1.9rem 1.9rem 1.5rem;
  clip-path: polygon(calc(var(--notch) - var(--bw)) 0, calc(100% - var(--notch) + var(--bw)) 0,
    100% calc(var(--notch) - var(--bw)), 100% calc(100% - var(--notch) + var(--bw)),
    calc(100% - var(--notch) + var(--bw)) 100%, calc(var(--notch) - var(--bw)) 100%,
    0 calc(100% - var(--notch) + var(--bw)), 0 calc(var(--notch) - var(--bw)));
}

/* Close */
.phone-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: none;
  color: #231f20;
  cursor: pointer;
  padding: .25rem;
  line-height: 0;
  opacity: .75;
}
.phone-popup__close:hover { opacity: 1; }

/* Eyebrow + logo mark */
.phone-popup__eyebrow {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #FF4E00;
}
.phone-popup__mark { width: 18px; height: 18px; border-radius: 5px; display: block; }

/* Title */
.phone-popup__title {
  margin: 0 0 .85rem;
  padding: 0;
  font-family: 'soehne-breit-kraftig', system-ui, sans-serif;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #231f20;
}
.phone-popup__em { color: #FF4E00; }
.phone-popup__ul { position: relative; white-space: nowrap; }
.phone-popup__ul::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -.14em;
  height: .26em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 Q 25 1.5 50 4 T 99 4' stroke='%23ff4e00' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

/* Intro text */
.phone-popup__text {
  margin: 0 0 1.4rem;
  padding: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: #5e5d5c;
  max-width: 32em;
}

/* Fields */
.phone-popup__fields {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.phone-popup__input {
  width: 100%;
  height: 52px;
  border: 1.5px solid rgba(0, 0, 0, .16);
  border-radius: 10px;
  padding: 0 16px;
  font-family: inherit;
  font-size: .95rem;
  color: #231f20;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s ease-in-out;
}
.phone-popup__input::placeholder { color: #9a9690; }
.phone-popup__input:focus { border-color: #FF4E00; outline: none !important; }
.phone-popup__input.has-error { border-color: #d32f2f; }

/* Error message */
.phone-popup__error {
  font-family: inherit;
  font-size: .78rem;
  color: #d32f2f;
  min-height: 1.3em;
  margin: .4rem 0 0;
  padding: 0;
  text-align: left;
}

/* Submit — primary button style (orange octagon; charcoal chip + phone icon on
   the left, label, trailing arrow on the right inside a bottom V-notch).
   Mirrors the nav "Start Free" / HeroLab's .hl-btn--md primary. */
.phone-popup__submit {
  --notch: 7px; --vnotch-pos: 34px; --vnotch-w: 9px; --vnotch-d: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  margin-top: .35rem;
  padding: 0 14px 0 7px;
  border: none;
  cursor: pointer;
  background: #FF4E00;
  color: #231f20;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0;
  transition: background .15s ease, transform .05s ease;
  clip-path: polygon(
    var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    calc(100% - var(--vnotch-pos) + (var(--vnotch-w) / 2)) 100%,
    calc(100% - var(--vnotch-pos)) calc(100% - var(--vnotch-d)),
    calc(100% - var(--vnotch-pos) - (var(--vnotch-w) / 2)) 100%,
    var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch)
  );
}
.phone-popup__submit:hover { background: #e64500; }
.phone-popup__submit:active { transform: translateY(1px); }
.phone-popup__submit:disabled { opacity: .75; cursor: default; }
/* Charcoal chip holding the phone icon (left) */
.phone-popup__submit-chip {
  --chip-notch: 5px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #231f20;
  color: #fff;
  clip-path: polygon(
    var(--chip-notch) 0, calc(100% - var(--chip-notch)) 0, 100% var(--chip-notch),
    100% calc(100% - var(--chip-notch)), calc(100% - var(--chip-notch)) 100%, var(--chip-notch) 100%,
    0 calc(100% - var(--chip-notch)), 0 var(--chip-notch)
  );
}
.phone-popup__submit-label { flex: 1; text-align: left; padding-left: 2px; }
.phone-popup__submit-trail { flex-shrink: 0; opacity: .95; }

/* "Start for free" CTA in the confirmation state (anchor reusing the submit style) */
.phone-popup__cta { text-decoration: none; width: 100%; }
/* Centre the label so the CTA reads balanced (chip + arrow flank it) */
.phone-popup__cta .phone-popup__submit-label { text-align: center; padding-left: 0; }

/* Consent + dismiss */
.phone-popup__consent {
  font-family: inherit;
  font-size: .72rem;
  line-height: 1.4;
  color: #9a9690;
  margin: .9rem 0 0;
  padding: 0;
  text-align: center;
}
.phone-popup__consent a { color: #9a9690; text-decoration: underline; }
.phone-popup__dismiss {
  display: block;
  margin: .7rem auto 0;
  font-family: inherit;
  font-size: .8rem;
  color: #9a9690;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color .2s ease-in-out;
}
.phone-popup__dismiss:hover { color: #231f20; }

/* Confirmation state */
.phone-popup__confirmation {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .75rem .25rem .35rem;
}
.phone-popup__confirmation.is-visible { display: flex; }
.phone-popup__tick {
  font-size: 3rem;
  line-height: 1;
  color: #FF4E00;
  margin-bottom: 1.15rem;
}
.phone-popup__tick::after {
  content: "\f058";
  font-family: "Font Awesome 6 Solid";
  font-weight: 900;
}
.phone-popup__confirm-heading {
  font-family: 'soehne-breit-kraftig', system-ui, sans-serif;
  font-size: clamp(1.5rem, 4.2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #231f20;
  margin: 0 0 .6rem;
  padding: 0;
}
.phone-popup__confirm-text {
  font-size: .95rem;
  line-height: 1.55;
  color: #5e5d5c;
  max-width: 30ch;
  margin: 0 0 1.5rem;
  padding: 0;
}
.phone-popup__confirm-foot {
  font-size: .78rem;
  line-height: 1.4;
  color: #9a9690;
  margin: .85rem 0 0;
  padding: 0;
}

/* Body lock */
html.popup-is-open { overflow-y: hidden; }

/* Short viewports: tighten so the card stays on screen */
@media (max-height: 680px) {
  .phone-popup__inner { padding: 1.4rem 1.5rem 1.2rem; }
  .phone-popup__title { font-size: 1.45rem; margin-bottom: .7rem; }
  .phone-popup__text { margin-bottom: 1.1rem; }
}

@media (max-width: 520px) {
  .phone-popup__inner { padding: 1.6rem 1.4rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-popup__backdrop,
  .phone-popup__card { transition: opacity .2s ease; transform: none; }
}
