/* ============================================================
   calendly.css — Pureframe Labs
   Calendly booking widget, popup modal, confirmation overlay —
   retthemed to the bone/ink/red editorial system. Structural
   sizing (widths/heights/z-index) is unchanged so the embedded
   Calendly iframe keeps working.
   ============================================================ */

/* ── CALENDLY POPUP MODAL OVERLAY ── */
.calendly-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.35s;
}

.calendly-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
}

/* ── MODAL CONTAINER ── */
.calendly-modal {
  position: relative;
  width: 90vw;
  max-width: 1080px;
  height: 85vh;
  max-height: 720px;
  background: var(--bone);
  border: 1px solid var(--hair);
  overflow: hidden;
  transform: scale(0.96) translateY(16px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.calendly-modal-overlay.active .calendly-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.05s;
}

/* ── MODAL CLOSE BUTTON ── */
.calendly-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hair);
  background: var(--bone);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1;
}

.calendly-modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--bone);
  transform: rotate(90deg);
}

.calendly-modal-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── MODAL LOADING STATE ── */
.calendly-modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 5;
  background: var(--bone);
  transition: opacity 0.4s ease;
}

.calendly-modal-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.calendly-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--hair);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: calendly-spin 0.8s linear infinite;
}

@keyframes calendly-spin {
  to {
    transform: rotate(360deg);
  }
}

.calendly-modal-loader p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ── MODAL IFRAME ── */
.calendly-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── INLINE EMBED WRAPPER (Contact Section) ── */
.calendly-inline-wrapper {
  position: relative;
  background: var(--bone-2);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--red);
  overflow: hidden;
  min-height: 680px;
}

.calendly-inline-wrapper .calendly-embed-widget {
  min-width: 100%;
  height: 680px;
}

/* Inline loading state */
.calendly-inline-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bone-2);
  z-index: 2;
  transition: opacity 0.5s ease;
}

.calendly-inline-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.calendly-inline-loader .calendly-spinner {
  width: 34px;
  height: 34px;
}

.calendly-inline-loader p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ── ERROR STATE ── */
.calendly-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
}

.calendly-error.visible {
  display: flex;
}

.calendly-error-icon {
  width: 52px;
  height: 52px;
  border: 1px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.calendly-error h3,
.calendly-error h4 {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 900;
  font-variation-settings: 'wdth' 74;
  font-size: 19px;
  color: var(--ink);
}

.calendly-error p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 360px;
}

.calendly-error .btn-retry {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bone);
  border: none;
  padding: 12px 22px;
  cursor: pointer;
  transition: background .2s;
}

.calendly-error .btn-retry:hover {
  background: var(--red);
}

/* ── BOOKING CONFIRMATION OVERLAY ── */
.booking-confirmation-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.35s;
}

.booking-confirmation-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0s;
}

/* ── CONFIRMATION CARD ── */
.booking-confirmation {
  background: var(--bone);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--red);
  padding: 48px 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}

.booking-confirmation-overlay.active .booking-confirmation {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.08s;
}

/* ── SUCCESS CHECKMARK ── */
.confirmation-check {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: confirmPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}

@keyframes confirmPop {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirmation-check svg {
  width: 30px;
  height: 30px;
  stroke: var(--red);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.4s ease 0.5s forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.booking-confirmation h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.booking-confirmation .confirm-subtitle {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── CONFIRMATION DETAILS ── */
.confirm-details {
  background: var(--bone-2);
  border: 1px solid var(--hair);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.confirm-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.confirm-detail-row .detail-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.confirm-detail-row .detail-text {
  color: var(--ink);
  font-weight: 500;
}

/* ── CONFIRMATION ACTIONS ── */
.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-actions .btn-primary,
.confirm-actions .btn-secondary {
  font-size: 11px;
  padding: 13px 24px;
}

/* ── CONTACT SECTION ENHANCED LAYOUT ── */
.contact-section-enhanced {
  padding: clamp(64px, 8vw, 112px) 0;
}

.contact-enhanced-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.contact-enhanced-header .section-sub {
  margin: 0 auto;
}

/* ── MEETING TYPES GRID ── */
.meeting-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.meeting-type-card {
  background: var(--bone-2);
  border: 1px solid var(--hair);
  border-top: 3px solid transparent;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background .25s, border-color .25s, transform .3s cubic-bezier(.22, 1, .36, 1);
  position: relative;
  overflow: hidden;
}

.meeting-type-card:hover {
  background: var(--bone-3);
  transform: translateY(-2px);
}

.meeting-type-card.active {
  border-top-color: var(--red);
  background: var(--bone-3);
}

.meeting-type-card .mt-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.meeting-type-card .mt-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meeting-type-card .mt-name {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 900;
  font-variation-settings: 'wdth' 76;
  font-size: 15px;
  letter-spacing: -.005em;
}

.meeting-type-card .mt-desc {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.meeting-type-card .mt-check {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--red-deep);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.meeting-type-card.active .mt-check {
  opacity: 1;
  transform: scale(1);
}

/* ── FULL WIDTH CALENDLY WRAPPER ── */
.calendly-full-wrapper {
  margin-bottom: 36px;
}

/* ── SOCIAL & INFO BAR ── */
.contact-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-info-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bone-2);
  border: 1px solid var(--hair);
  padding: 14px 18px;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .25s cubic-bezier(.22, 1, .36, 1);
  flex: 1;
  min-width: 200px;
}

.contact-info-chip:hover {
  background: var(--bone-3);
  border-color: var(--ink-3);
  transform: translateY(-2px);
}

.contact-info-chip .chip-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--bone);
}

.contact-info-chip .chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-info-chip .chip-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .16em;
}

.contact-info-chip .chip-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ── RIGHT COLUMN: CALENDLY ── */
.contact-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendly-embed-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendly-embed-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.calendly-embed-header h3 {
  font-size: 17px;
}

.calendly-embed-header p {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ── OR DIVIDER ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.or-divider span {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .18em;
}

/* ── HERO SCHEDULE BUTTON ── */
.btn-schedule {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 15px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: color .3s;
}

.btn-schedule > * {
  position: relative;
  z-index: 1;
}

.btn-schedule::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  z-index: 0;
}

.btn-schedule:hover {
  color: var(--bone);
}

.btn-schedule:hover::before {
  transform: translateY(0);
}

.btn-schedule-icon {
  display: inline-flex;
  transition: transform 0.3s ease;
}

.btn-schedule:hover .btn-schedule-icon {
  transform: rotate(15deg);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .meeting-types-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calendly-inline-wrapper {
    min-height: 600px;
  }

  .calendly-inline-wrapper .calendly-embed-widget {
    height: 600px;
  }

  .calendly-modal {
    width: 95vw;
    max-width: 800px;
    height: 80vh;
  }
}

@media (max-width: 768px) {
  .contact-enhanced-header {
    margin-bottom: 36px;
  }

  .meeting-types-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-bar {
    flex-direction: column;
  }

  .contact-info-chip {
    min-width: unset;
  }

  .calendly-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
  }

  .calendly-modal-close {
    top: 12px;
    right: 12px;
  }

  .calendly-inline-wrapper {
    min-height: 560px;
  }

  .calendly-inline-wrapper .calendly-embed-widget {
    height: 560px;
  }

  .booking-confirmation {
    padding: 36px 28px;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions .btn-primary,
  .confirm-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .booking-confirmation h3 {
    font-size: 19px;
  }

  .calendly-inline-wrapper {
    min-height: 500px;
  }

  .calendly-inline-wrapper .calendly-embed-widget {
    height: 500px;
  }
}
